WO2023170815A1 - Pointer transfer device, pointer transfer method, and memory control device - Google Patents

Pointer transfer device, pointer transfer method, and memory control device Download PDF

Info

Publication number
WO2023170815A1
WO2023170815A1 PCT/JP2022/010281 JP2022010281W WO2023170815A1 WO 2023170815 A1 WO2023170815 A1 WO 2023170815A1 JP 2022010281 W JP2022010281 W JP 2022010281W WO 2023170815 A1 WO2023170815 A1 WO 2023170815A1
Authority
WO
WIPO (PCT)
Prior art keywords
pointer
read
write
value
memory
Prior art date
Application number
PCT/JP2022/010281
Other languages
French (fr)
Japanese (ja)
Inventor
進 田中
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2024505719A priority Critical patent/JPWO2023170815A1/ja
Priority to PCT/JP2022/010281 priority patent/WO2023170815A1/en
Publication of WO2023170815A1 publication Critical patent/WO2023170815A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/06Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor

Definitions

  • the present disclosure relates to a pointer transfer device, a pointer transfer method, and a memory control device including the pointer transfer device.
  • Patent Document 1 When data is transferred between asynchronous clocks in a logic circuit, data is synchronized.
  • Patent Document 1 data is transferred between asynchronous clocks via a memory, typically a FIFO (First In First Out) memory. Synchronization techniques for passing data are known.
  • clocks generated by both clocks are used to determine whether there is free space to write to the memory used for data exchange and whether data to be read is stored. It is necessary to use a pointer. At this time, Gray code is sometimes used to transfer data between different asynchronous clocks without changing the pointer value.
  • Patent Document 2 describes a Gray code generation method that allows a Gray code corresponding to 2 n items to be expanded into an even number of items, and using this reduced Gray code, , a technique is described in which pointer values are correctly synchronized between asynchronous clocks.
  • JP2007-233636A Japanese Patent Application Publication No. 2006-074758
  • Patent Document 1 shows an asynchronous transfer unit that performs synchronization before performing an operation using a pointer, it does not show a specific circuit configuration, and as a result, the pointer It is not described how the mistransfer of values is achieved. Therefore, it is unclear whether correct data can be exchanged.
  • Patent Document 2 describes a technique for preventing erroneous transfer of pointer values by using the Gray code corresponding to the even-numbered items described above, but even if the number of items is an odd number, the memory capacity is reduced by 1. It is necessary to use a larger address, which poses problems such as an increase in circuit size and power consumption.
  • An object of the present invention is to provide a memory control device and a memory control method that can perform the following steps.
  • a pointer transfer device includes a first pointer generation section, a second pointer generation section, a first synchronization section, a first circuit side pointer value calculation section, and a first coincidence detection section.
  • the first pointer generation unit changes the pointer by one in a predetermined direction of increasing or decreasing every time the first circuit executes the first operation according to the first clock.
  • the second pointer generator changes the second pointer by one in a predetermined direction each time the second circuit executes the second operation according to the second clock.
  • the first synchronization unit takes in the value of the second pointer generated by the second pointer generation unit into the first circuit side in synchronization with the first clock.
  • the first circuit side pointer value calculation section calculates the value of the second pointer on the first circuit side.
  • the first coincidence detection section executes a coincidence comparison between the value of the second pointer in the first circuit side pointer value calculation section and the value of the second pointer taken in by the first synchronization section.
  • the first circuit side pointer value calculation section changes the value of the second pointer by 1 in a predetermined direction for each cycle of the first clock while the first coincidence detection section detects a mismatch. , when a match is detected by the first match detector, the value of the second pointer is maintained.
  • a pointer transfer method in which a first operation is performed in a first circuit according to a first clock, and a second operation is performed in a second circuit according to a second clock.
  • the pointer transfer method includes the steps of changing the first pointer by 1 in a predetermined direction, either increasing or decreasing, on the first circuit side each time the first operation is executed, and each time the second operation is executed. a step of changing the second pointer by 1 in a predetermined direction on the second circuit side; and a step of importing the value of the second pointer on the second circuit side into the first circuit side in synchronization with the first clock.
  • the step of calculating the value of the second pointer is a step of changing the value of the second pointer by 1 in a predetermined direction every cycle of the first clock while a mismatch is detected in the step of performing the match comparison. and maintaining the value of the second pointer when a match is detected in the step of performing the match comparison.
  • FIG. 12 is a chart illustrating a process for calculating the number of writable data in data write.
  • 12 is a chart illustrating an example of changes in a write pointer, a read pointer, a writable number, and a readable number due to data writing and data reading;
  • 7 is a timing chart illustrating a specific example of a read pointer transfer process from a memory read circuit to a memory write circuit.
  • 12 is a chart illustrating a process for calculating the number of readable data in data read.
  • 5 is a timing chart illustrating a specific example of a write pointer transfer process from a memory write circuit to a memory read circuit.
  • FIG. 1 is a block diagram illustrating the configuration of a memory control device 100 according to the present embodiment.
  • the memory control device 100 can be used, for example, to transfer data between logic circuits used in electronic devices that operate with different asynchronous clocks.
  • the memory control device 100 operates in response to different asynchronous write clocks WCLK and read clocks RCLK.
  • the memory control device 100 includes a memory 300 for temporarily holding data, a memory write circuit 101 for writing data to the memory 300 in synchronization with a write clock WCLK, and a memory write circuit 101 in synchronization with a read clock RCLK.
  • a memory read circuit 201 for reading data from the memory 300 is provided.
  • the write clock WCLK and read clock RCLK are generated for each clock cycle and input to the memory control device 100. Note that, in the following, for each signal and clock, a logic high level is also expressed as "1", and a logic low level is also expressed as "0".
  • the memory write circuit 101 includes a write-side access control section 103, a write-side write pointer generation section 107, a read-side read pointer synchronization section 109, a write-side read pointer calculation section 112, and a write-side coincidence detection section 113. include.
  • WPRM write permission
  • the write-side write pointer generation unit 107 generates the write-side write pointer 108 indicating the write address of the memory 300.
  • write-side write enable 104 When the write-side write enable 104 is valid, data writing is executed by writing write data WDAT to the write address of the memory 300 indicated by the write-side write pointer 108 in response to the rising edge of the write clock WCLK. Ru.
  • the read side read pointer synchronization unit 109 receives the read side read pointer 208 generated in the memory read circuit 201 according to the read clock RCLK.
  • the read side read pointer synchronization unit 109 generates the read side read pointer 111 by synchronizing the read side read pointer 208 with the write clock WCLK.
  • the write-side coincidence detection unit 113 is based on the coincidence detection result between the value of the read-side read pointer 111 generated by the read-side read pointer synchronization unit 109 and the value of the write-side read pointer 110 by the write-side read pointer calculation unit 112. , outputs write-side read pointer increment 114.
  • the write-side read pointer calculation unit 112 calculates the value of the write-side read pointer 110 in synchronization with the write clock WCLK, based on the write-side read pointer increment 114 from the write-side coincidence detection unit 113.
  • the write-side access control unit 103 uses the write-side read pointer 110 generated by the write-side read pointer calculation unit 112 instead of the read-side read pointer 111 generated by the read-side read pointer synchronization unit 109 to write data to the memory 300. Determine whether writing to WDAT is possible.
  • the memory read circuit 201 includes a read side access control section 203, a read side read pointer generation section 207, a write side write pointer synchronization section 209, a read side write pointer calculation section 212, and a read side coincidence detection section 213. include.
  • RPRM read permission RPRM
  • read-side read enable 204 When the read-side read enable 204 is enabled, data reading is executed by reading read data RDAT from the read address of the memory 300 indicated by the read-side read pointer 208 in response to the rising edge of the read clock RCLK. Ru.
  • the write side write pointer synchronization unit 209 receives the write side write pointer 108 generated in the memory write circuit 101 according to the write clock WCLK.
  • the write side write pointer synchronization unit 209 generates a write side write pointer 211 by synchronizing the write side write pointer 108 with the read clock RCLK.
  • the read-side coincidence detection unit 213 detects the read-side write based on the coincidence detection result between the write-side write pointer 211 generated by the write-side write pointer synchronization unit 209 and the read-side write pointer 210 by the read-side write pointer calculation unit 212.
  • Pointer increment 214 is output.
  • the read-side write pointer calculation unit 212 calculates the value of the read-side write pointer 210 in synchronization with the read clock RCLK, based on the read-side write pointer increment 214 from the read-side coincidence detection unit 213.
  • the read-side access control unit 203 uses the read-side write pointer 210 generated by the read-side write pointer calculation unit 212 instead of the write-side write pointer 211 generated by the write-side write pointer synchronization unit 209 to perform reading from the memory 300. Determine whether data RDAT can be read.
  • the memory write circuit 101 executes data write to the address of the memory 300 indicated by the write-side write pointer 108 in accordance with the write clock WCLK.
  • data is read from the address of the memory 300 indicated by the read-side read pointer 208 in accordance with the read clock RCLK.
  • Data writing by the memory write circuit 101 needs to be executed in such a way that the read status of the memory read circuit 201 from the memory 300 is grasped and unread data from the memory 300 is not overwritten and erased.
  • the read status is grasped using the write-side read pointer 110, which is recognized on the memory write circuit 101 side through an operation synchronized with the write clock WCLK. Therefore, it is important to synchronize the read-side read pointer 208, which is incremented in synchronization with the read clock RCLK, with the write-side read pointer 110, which prevents erroneous transfer of pointer values.
  • the write status of the memory write circuit 101 to the memory 300 is grasped so as to avoid reading data from the memory 300 by mistake when there is no read data in the memory 300. In other words, it is necessary to sequentially read unread data.
  • the write status is grasped by the read-side write pointer 210, which is recognized on the memory read circuit 201 side by an operation synchronized with the read clock RCLK. Therefore, it is important to synchronize the write-side write pointer 108, which is incremented in synchronization with the write clock WCLK, and the read-side write pointer 210, which prevents erroneous transfer of pointer values.
  • the write pointer and the read pointer have a pointer part that changes within a value range according to the memory depth, and a flag part that is set to "0" or "1".
  • the value of the flag part is inverted every time the value of the pointer part goes around.
  • the value of the pointer section is initialized to "0" and increases by 1 each time data is written or read.
  • the value of the pointer section returns to "0” and the value of the flag section changes from “0” to "1". Or, it is inverted from "1" to "0".
  • a write instruction WCMD is input to the write-side access control unit 103.
  • write data WDAT is written to the address of the memory 300 indicated by the write-side write pointer 108.
  • no particular processing is performed on the memory 300 even if the write instruction WCMD is input.
  • FIG. 2 shows an example of a process for calculating the number of data that can be written in data writing.
  • the writability determination can be performed according to the calculated value of the writable number illustrated in FIG. 2 .
  • wpf indicates the value of the flag section of the write-side write pointer 108
  • wpp indicates the value of the pointer section of the write-side write pointer 108
  • rpf indicates the value of the flag section of the write-side read pointer 110
  • rpp indicates the value of the pointer section of the write-side read pointer 110.
  • N is the memory depth.
  • FIG. 3 shows a diagram illustrating an example of changes in the write pointer (wpf, wpp) and read pointer (rpf, rpp), as well as the number of writable numbers and the number of readable numbers, due to data writing and data reading. It will be done.
  • the memory write circuit 101 uses the values of the flag part wpf and pointer part wpp of the write-side write pointer 108 and the flag part rpf and pointer part rpp of the write-side read pointer 110 to calculate the writeable number according to FIG. Then, a determination is made as to whether or not writing is possible.
  • wpp increases by 1 from 0 to 5 for each data write.
  • rpp increases by 1 from 0 to 5 for each data read.
  • the writable number increases by 1 according to the arithmetic expression N-(wpp-rpp) shown in FIG. 2 for each data read.
  • N-(wpp-rpp) the arithmetic expression shown in FIG. 2 for each data read.
  • the read side read pointer 208 changes. Since the read side read pointer 208 is synchronized with the read clock RCLK, it is necessary to synchronize it with the write clock WCLK by the read side read pointer synchronization unit 109.
  • the configuration of the read-side read pointer synchronization unit 109 shown in FIG. 1 can be a commonly known two-stage flip-flop.
  • the read side read pointer 208 composed of a plurality of bits is also synchronized by the read side read pointer synchronization unit 109 using, for example, a two-stage flip-flop. Therefore, if the timing of the change in the read side read pointer 208 and the timing of the rising edge of the write clock WCLK overlap, a so-called meta-stable state occurs, and the read side read pointer 208 synchronized on the write side There is a possibility that the value of the read side read pointer 208 cannot be correctly transferred to the value of 111. As a result, if the write-side read pointer 110 is used to determine whether writing is possible with an incorrect value, there is a possibility that data writing will be executed even though there is no free space in the memory 300.
  • the value of the read-side read pointer 111 synchronized on the write side is used.
  • the write-side coincidence detection unit 113 detects that the write-side read pointer 110 is different, the write-side read pointer 110 is changed by 1 until the read-side read pointer 111 and the write-side read pointer 110 become equal.
  • the values of the pointer part wpp and the flag part wpf are changed so as to change the value of the pointer part wpp and the flag part wpf.
  • the read-side read pointer synchronization section 109 can be implemented using other synchronization methods. 109 is also possible. Furthermore, when the values of the read side read pointer 111 synchronized according to the write clock WCLK and the write side read pointer 110 do not match, the write side coincidence detection unit 113 reads the value of the write side read pointer 110 from the read side. Since the read-side read pointer synchronization unit 109 is configured to follow the value set, the read-side read pointer synchronization unit 109 can also be configured without using a synchronization circuit.
  • FIG. 4 For each of the read-side read pointer 208, the read-side read pointer 111 synchronized on the write side, and the write-side read pointer 110, the values of the flag part rpf and pointer part rpp are ”.
  • the read side read pointer 208 is incremented at every rising edge (RCLK).
  • the read-side read pointer synchronization unit 109 of the memory write circuit 101 captures the value of the read-side read pointer 208 in response to the rising edge of the write clock WCLK, which is asynchronous with the read clock RCLK. As a result, a read-side read pointer 111 synchronized according to the write clock WCLK is generated.
  • the read side read pointer synchronization unit 109 is assumed to have a two-stage flip-flop configuration, the value of the read side read pointer 208 is synchronized on the write side with the above-mentioned delay. This is reflected in the read pointer 111 on the read side.
  • the write-side read pointer 110 is incremented at each rising edge of the write clock WCLK from time t3 to t5.
  • the write-side read pointer 110 changes to "0-6", which is the value of the read-side read pointer 111 synchronized on the write side and coincides with the read-side read pointer 208, at time t5.
  • the undefined value (“ ⁇ 0-3”) that has become meta-stable is not taken into the read-side read pointer 111 that is synchronized on the write side.
  • the value of the read pointer taken in (i.e., the value of the read side read pointer 111) is not used as is.
  • the values of the write-side read pointer 110 and the write-side read pointer 110 are different, a process of changing the write-side read pointer 110 by 1 is executed. As a result, the value of the write-side read pointer 110 can be changed without error by following the change in the read-side read pointer 208 that occurs when the memory read circuit 201 performs a data read.
  • pointer synchronization is achieved by transferring the read pointer from the memory read circuit 201 to the memory write circuit 101 without error between the memory read circuit 201 and the memory write circuit 101 that operate with different clocks. .
  • the memory write circuit 101 by accurately determining whether data can be written in the memory write circuit 101, it becomes possible to transfer correct data between asynchronous clocks via the memory 300.
  • a read instruction RCMD is input to the read side access control unit 203.
  • the read side read enable 204 is enabled (“1”) from the read side access control unit 203.
  • read data RDAT is read from the read address of the memory 300 indicated by the read-side read pointer 208. At this time, if reading is not possible, no particular processing is performed on the memory 300 even if the read instruction RCMD is input.
  • FIG. 5 shows an example of calculation processing for the number of readable data reads. Readability can be determined according to the calculated value of the readable number illustrated in FIG. 5 .
  • wpf indicates the value of the flag section of the read-side write pointer 210
  • wpp indicates the value of the pointer section of the read-side write pointer 210
  • rpf indicates the value of the flag section of the read-side read pointer 208
  • rpp indicates the value of the pointer section of the read-side read pointer 208.
  • N indicates the memory depth as in FIG.
  • the memory read circuit 201 uses the values of the flag part wpf and pointer part wpp of the read-side write pointer 210 and the flag part rpf and pointer part rpp of the read-side read pointer 208 to find the readable number explained in FIG. In this way, it is determined whether reading is possible or not.
  • the write side write pointer 108 changes. Since the write side write pointer 108 is synchronized with the write clock WCLK, it is necessary to synchronize it with the read clock RCLK by the write side write pointer synchronization unit 209.
  • the read-side write pointer calculation unit 212 increments the read-side write pointer 210 (flag section wpf, pointer section wpp) every cycle of the read clock RCLK. ) is incremented.
  • the write side write pointer 108 composed of multiple bits is also synchronized by the write side write pointer synchronization unit 209 using, for example, a two-stage flip-flop. Therefore, if the timing of the change in the write side write pointer 108 and the timing of the rising edge of the read clock RCLK overlap, a so-called meta-stable state occurs, and the write side write pointer synchronized on the read side There is a possibility that the value of the write pointer 108 on the write side cannot be correctly transferred to the value of 211. As a result, if the read-side write pointer 210 is used to determine whether reading is possible with an incorrect value, there is a possibility that data reading will be executed even though there is no unread data in the memory 300.
  • the value of the write-side write pointer 211 synchronized on the read side is used as the read-side write pointer 210.
  • the read side coincidence detection unit 213 detects that the read side write pointer 210 is different, the read side write pointer 210 is synchronized on the read side until the write side write pointer 211 synchronized on the read side becomes equal to the read side write pointer 210
  • the values of the pointer part rpp and the flag part rpf are changed so that the write pointer 210 is changed by 1.
  • the read-side write pointer 210 can follow the write-side write pointer 108 and transfer the value from the write side to the read side without making a mistake.
  • the write-side write pointer synchronization unit 209 it is possible to apply a two-stage flip-flop as a synchronization circuit to the write-side write pointer synchronization unit 209, but it is also possible to synchronize the write-side write pointer using other synchronization methods. It is also possible to configure the section 209. Furthermore, the read side coincidence detection unit 213 changes the value of the read side write pointer 210 to the value on the write side when the values of the write side write pointer 211 synchronized on the read side and the read side write pointer 210 do not match. Since the write-side write pointer synchronization unit 209 can be configured to follow the synchronization circuit, the write-side write pointer synchronization unit 209 can also be configured without using a synchronization circuit.
  • FIG. 6 the values of the flag part wpf and pointer part wpp are shown for each of the write side write pointer 108, the write side write pointer 211 synchronized on the read side, and the read side write pointer 210, as in FIG. is written as "wpf-wpp".
  • the write-side write pointer synchronization unit 209 of the memory read circuit 201 takes in the value of the write-side write pointer 108 in response to the rising edge of the read clock RCLK, which is asynchronous with the write clock WCLK. As a result, a write side write pointer 211 synchronized on the read side is generated according to the read clock RCLK.
  • the write side write pointer synchronization unit 209 At the rising edge (RCLK) of , and t21, it is taken into the write side write pointer synchronization unit 209, and synchronized on the read side at the respective next rising edges, times t12, t14, t16, t19, and t22. This is reflected in the converted write-side write pointer 211.
  • the write side write pointer synchronization unit 209 is also assumed to have a two-stage flip-flop configuration, the value of the write side write pointer 108 is synchronized on the read side with the above-mentioned delay. It is reflected in the write side write pointer 211 that has been set.
  • the read-side write pointer 210 is incremented at each rising edge of the read clock RCLK at times t12, t15, t17, t20, and t23.
  • the read-side write pointer 210 changes to "1-1", which is the value of the write-side write pointer 211 synchronized on the read side and coincides with the write-side write pointer 108, at time t23.
  • the undefined value (“ ⁇ 0-3”) that has become meta-stable is not taken into the write-side write pointer 211 that is synchronized on the read side.
  • the read side write By performing a process of changing the read-side write pointer 210 by 1 when the value differs from the pointer 210, the change in the write-side write pointer 108 accompanying the execution of data write in the memory write circuit 101 can be followed.
  • the value of the read-side write pointer 210 can be changed without making a mistake.
  • the write pointer can be transferred from the memory write circuit 101 to the memory read circuit 201 without error, thereby avoiding erroneous transfer of pointer values.
  • Pointer synchronization can be achieved.
  • by accurately determining whether data can be read in the memory read circuit 201 it becomes possible to transfer correct data between asynchronous clocks via the memory 300.
  • Gray code as in Patent Document 2 is not used, it is no longer necessary to use a memory capacity that is one address larger than the memory capacity accessed when the number of pointers is an odd number, which reduces the increase in circuit size and power consumption. It can be prevented.
  • the write clock WCLK corresponds to an example of the "first clock”
  • the read clock RCLK corresponds to an example of the "second clock”
  • the memory write circuit 101 corresponds to an example of the "second clock.”
  • the memory read circuit 201 corresponds to an embodiment of the "first circuit”
  • the memory read circuit 201 corresponds to an embodiment of the "second circuit”.
  • the write side write pointer 108 is a "first pointer”
  • the write side write pointer generation section 107 is a “first pointer generation section”
  • the read side read pointer synchronization section 109 is a "first pointer”.
  • the write-side read pointer calculation unit 112 corresponds to an embodiment of the “first circuit-side pointer value calculation unit”
  • the write-side coincidence detection unit 113 corresponds to an example of the “first coincidence detection unit”.
  • the write side read pointer 110 corresponds to "the second pointer calculated by the first circuit side pointer value calculation section”
  • the read side read pointer 111 generated by the read side read pointer synchronization section 109 corresponds to "the second pointer calculated by the first circuit side pointer value calculation section”. "The second pointer fetched by the first synchronization unit”.
  • the read-side read pointer 208 is a "second pointer”
  • the read-side read pointer generation section 207 is a “second pointer generation section”
  • the write-side write pointer synchronization section 209 is a "second synchronization section.”
  • the read side write pointer calculation unit 212 corresponds to an example of a “second circuit side pointer value calculation unit”
  • the read side coincidence detection unit 213 corresponds to an example of a “second coincidence detection unit”.
  • the read side write pointer 210 corresponds to "the first pointer calculated by the second circuit side pointer value calculation section”
  • the write side write pointer 211 generated by the write side write pointer synchronization section 209 corresponds to "the first pointer calculated by the second circuit side pointer value calculation section”. "first pointer taken in by the second synchronization unit”.
  • each pointer is incremented every time data is written and every time data is read.
  • this embodiment It is possible to apply memory control related to. In this case, similar memory control can be realized by appropriately replacing "increment” with “decrement” in the description of this embodiment. That is, in this embodiment, each pointer value changes by 1 in a predetermined direction, either increasing or decreasing.
  • the number of data stored in the memory 300 is not output to the outside, but information indicating the number of data stored may be output from the memory control device 100 to the outside.
  • the number of clock cycles required for the operation of each circuit block is not limited to the above description and can be set freely.
  • the pointer transfer according to the present embodiment is applied to both write pointer transfer and read pointer transfer, that is, bidirectional pointer transfer. It is also possible to apply this embodiment to only one of the pointer transfers. For example, if this embodiment is applied only to write pointer transfer, the arrangement of the write-side read pointer calculation section 112 and the write-side coincidence detection section 113 on the write side can be omitted from the configuration example of FIG. can. On the other hand, if this embodiment is applied only to read pointer transfer, the arrangement of the read side write pointer calculation section 212 and the read side coincidence detection section 213 on the read side can be omitted from the configuration example of FIG. I can do it.
  • memory control has been described as involving data writing and reading from the memory 300, but by applying this embodiment only to the part of pointer transfer between asynchronous clocks, this embodiment can be It is also possible to provide a pointer transfer device and a pointer control method according to the embodiment. In this case as well, the pointer transfer device and pointer control method can be configured so that the present embodiment is applied only to one-way pointer transfer out of two-way pointer transfer.
  • 100 Memory control device 101 Memory write circuit, 103 Write side access control unit, 104 Write side write enable, 106 Write side write pointer increment, 107 Write side write pointer generation unit, 108 Write side write pointer, 109 Read side read pointer synchronization conversion unit, 110 write side read pointer, 111 read side read pointer (write circuit side synchronization), 112 write side read pointer calculation unit, 113 write side coincidence detection unit, 114 write side read pointer increment, 201 memory read circuit, 203 Read side access control unit, 204 Read side read enable, 206 Read side read pointer increment, 207 Read side read pointer generation unit, 208 Read side read pointer, 209 Write side write pointer synchronization unit, 210 Read side write pointer, 211 Write side write pointer (read circuit side synchronization), 212 Read side write pointer calculation unit, 213 Read side coincidence detection unit, 214 Read side write pointer increment, 300 Memory, N memory depth, RCLK read clock, RCMD read instruction, RDAT read data, RPRM read permission,

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

A read-side read pointer synchronization unit (109) synchronizes a read pointer (208) with a write clock (WCLK) and takes in the result, said read pointer (208) having been generated on the side of a memory read circuit (201) which synchronizes with a read clock (RCLK). A write-side agreement detection unit (113) performs an agreement comparison between the value of a write-side read pointer (110) that is calculated by a write-side read pointer calculation unit (112), and the value of a read-side read pointer (111) that was taken in by the read-side read pointer synchronization unit (109). As long as the write-side agreement detection unit (113) detects non-agreement, the write-side read pointer calculation unit (112) changes the write-side read pointer (110) by one each cycle of the write clock (WCLK).

Description

ポインタ転送装置及びポインタ転送方法、並びに、メモリ制御装置Pointer transfer device, pointer transfer method, and memory control device
 本開示は、ポインタ転送装置及びポインタ転送方法、並びに、当該ポインタ転送装置を備えるメモリ制御装置に関する。 The present disclosure relates to a pointer transfer device, a pointer transfer method, and a memory control device including the pointer transfer device.
 論理回路における非同期クロック間のデータの受け渡しでは、データの同期化が行われる。データ同期化の一手法として、特開2007-233636号公報(特許文献1)に記載される様に、メモリ、代表的には,FIFO(First In First Out)メモリを介して非同期クロック間でデータを受け渡す同期化手法が公知である。 When data is transferred between asynchronous clocks in a logic circuit, data is synchronized. As one method of data synchronization, as described in Japanese Patent Application Laid-Open No. 2007-233636 (Patent Document 1), data is transferred between asynchronous clocks via a memory, typically a FIFO (First In First Out) memory. Synchronization techniques for passing data are known.
 通常、この様な同期化手法では、データの受け渡しに用いるメモリに対して、ライトする空きスペースがあるか、及び、リードするデータが格納されているかを判断するために、双方のクロックで生成されたポインタを用いる必要がある。この際に、非同期の異なるクロック間で、ポインタ値が化けることなくデータを受け渡しするために、グレイコードが利用されることがある。 Normally, in this type of synchronization method, clocks generated by both clocks are used to determine whether there is free space to write to the memory used for data exchange and whether data to be read is stored. It is necessary to use a pointer. At this time, Gray code is sometimes used to transfer data between different asynchronous clocks without changing the pointer value.
 特開2006-074758号公報(特許文献2)には、通常2n項目に対応するグレイコードを偶数項目で展開可能とするグレイコードの生成方法が記載されており、この簡約グレイコードを用いて、非同期クロック間でポインタ値が正しく同期化される技術が記載されている。 Japanese Unexamined Patent Publication No. 2006-074758 (Patent Document 2) describes a Gray code generation method that allows a Gray code corresponding to 2 n items to be expanded into an even number of items, and using this reduced Gray code, , a technique is described in which pointer values are correctly synchronized between asynchronous clocks.
特開2007-233636号公報JP2007-233636A 特開2006-074758号公報Japanese Patent Application Publication No. 2006-074758
 しかしながら、特許文献1では、ポインタを用いた演算を行う前に同期化を行うことを示す非同期受け渡し部が示されているが、具体的な回路構成が示されておらず、結果として、ポインタの値の誤転送がどのように実現されるかが記載されてない。このため、正しいデータの受け渡しが可能かどうかは不明である。 However, although Patent Document 1 shows an asynchronous transfer unit that performs synchronization before performing an operation using a pointer, it does not show a specific circuit configuration, and as a result, the pointer It is not described how the mistransfer of values is achieved. Therefore, it is unclear whether correct data can be exchanged.
 又、特許文献2には、上述した偶数項目に対応するグレイコードを用いて、ポインタ値の誤転送を防止する技術が記載されるが、項目数が奇数個でよい場合でもメモリの容量に1アドレス分大きいものを使用する必要があり、回路規模や消費電力が増加するといった課題があった。 Further, Patent Document 2 describes a technique for preventing erroneous transfer of pointer values by using the Gray code corresponding to the even-numbered items described above, but even if the number of items is an odd number, the memory capacity is reduced by 1. It is necessary to use a larger address, which poses problems such as an increase in circuit size and power consumption.
 本開示は、このような問題点を解決するためになされたものであって、本開示の目的は、簡易な構成及び制御によって、非同期クロック間でのポインタ値の誤転送を回避した正しいポインタ同期化が実行できるメモリ制御装置及びメモリ制御方法を提供することである。 The present disclosure has been made to solve such problems, and the purpose of the present disclosure is to achieve correct pointer synchronization that avoids erroneous transfer of pointer values between asynchronous clocks through simple configuration and control. An object of the present invention is to provide a memory control device and a memory control method that can perform the following steps.
 本開示のある局面によれば、ポインタ転送装置が提供される。ポインタ転送装置は、第1ポインタ生成部と、第2ポインタ生成部と、第1同期化部と、第1回路側ポインタ値演算部と、第1一致検出部とを備える。第1ポインタ生成部は、第1クロックに従った第1回路による第1動作の実行毎に増加方向又は減少方向の予め定められた方向に1ずつ変化させる。第2ポインタ生成部は、第2クロックに従った第2回路による第2動作の実行毎に第2ポインタを予め定められた方向に1ずつ変化させる。第1同期化部は、第1クロックに同期して第2ポインタ生成部による第2ポインタの値を第1回路側に取り込む。第1回路側ポインタ値演算部は、第1回路側における第2ポインタの値を演算する。第1一致検出部は、第1回路側ポインタ値演算部での第2ポインタの値と、第1同期化部で取り込まれた第2ポインタの値との一致比較を実行する。第1回路側ポインタ値演算部は、第1一致検出部で不一致が検出される間は、第1クロックのサイクル毎に、第2ポインタの値を予め定められた方向に1ずつ変化させる一方で、第1一致検出部で一致が検出されたときは第2ポインタの値を維持する。 According to an aspect of the present disclosure, a pointer transfer device is provided. The pointer transfer device includes a first pointer generation section, a second pointer generation section, a first synchronization section, a first circuit side pointer value calculation section, and a first coincidence detection section. The first pointer generation unit changes the pointer by one in a predetermined direction of increasing or decreasing every time the first circuit executes the first operation according to the first clock. The second pointer generator changes the second pointer by one in a predetermined direction each time the second circuit executes the second operation according to the second clock. The first synchronization unit takes in the value of the second pointer generated by the second pointer generation unit into the first circuit side in synchronization with the first clock. The first circuit side pointer value calculation section calculates the value of the second pointer on the first circuit side. The first coincidence detection section executes a coincidence comparison between the value of the second pointer in the first circuit side pointer value calculation section and the value of the second pointer taken in by the first synchronization section. The first circuit side pointer value calculation section changes the value of the second pointer by 1 in a predetermined direction for each cycle of the first clock while the first coincidence detection section detects a mismatch. , when a match is detected by the first match detector, the value of the second pointer is maintained.
 本開示の他のある局面によれば、第1クロックに従って第1回路で第1動作が実行されるとともに、第2クロックに従って第2回路で第2動作が実行される下でのポインタ転送方法が提供される。ポインタ転送方法は、第1動作が実行される毎に第1回路側で第1ポインタを増加方向又は減少方向の予め定められた方向に1ずつ変化させるステップと、第2動作が実行される毎に第2回路側で第2ポインタを予め定められた方向に1ずつ変化させるステップと、第1クロックに同期して第2回路側での第2ポインタの値を第1回路側に取り込むステップと、第1回路側における第2ポインタの値を演算するステップと、第1回路側で演算されている第2ポインタの値と、第2回路側から取り込まれた第2ポインタの値との一致比較を実行するステップとを備える。第2ポインタの値を演算するステップは、一致比較を実行するステップにおいて不一致が検出される間は、第1クロックのサイクル毎に第2ポインタの値を予め定められた方向に1ずつ変化させるステップと、一致比較を実行するステップにおいて一致が検出されると第2ポインタの値を維持するステップとを含む。 According to another aspect of the present disclosure, a pointer transfer method is provided in which a first operation is performed in a first circuit according to a first clock, and a second operation is performed in a second circuit according to a second clock. provided. The pointer transfer method includes the steps of changing the first pointer by 1 in a predetermined direction, either increasing or decreasing, on the first circuit side each time the first operation is executed, and each time the second operation is executed. a step of changing the second pointer by 1 in a predetermined direction on the second circuit side; and a step of importing the value of the second pointer on the second circuit side into the first circuit side in synchronization with the first clock. , calculating the value of the second pointer on the first circuit side, and comparing the value of the second pointer calculated on the first circuit side with the value of the second pointer fetched from the second circuit side. and a step of performing. The step of calculating the value of the second pointer is a step of changing the value of the second pointer by 1 in a predetermined direction every cycle of the first clock while a mismatch is detected in the step of performing the match comparison. and maintaining the value of the second pointer when a match is detected in the step of performing the match comparison.
 本開示によれば、非同期クロック間のポインタ転送において、送信側でのポインタ値の変化を検出して、受信側で演算されているポインタ値を1ずつ変化させる制御によって、送信側及び受信側の間でのポインタ値の誤転送を回避した正しいポインタ同期化を実現することができる。 According to the present disclosure, in pointer transfer between asynchronous clocks, a change in the pointer value on the transmitting side is detected and the pointer value calculated on the receiving side is changed by 1, so that the transmitting side and the receiving side It is possible to achieve correct pointer synchronization that avoids erroneous transfer of pointer values between the two.
本実施の形態に係るメモリ制御装置の構成を説明するブロック図である。1 is a block diagram illustrating the configuration of a memory control device according to an embodiment. FIG. データライトにおけるライト可能数の算出処理を説明する図表である。12 is a chart illustrating a process for calculating the number of writable data in data write. データライト及びデータリードに伴う、ライトポインタ及びリードポインタ並びにライト可能数及びリード可能数の変化の一例を説明する図表である。12 is a chart illustrating an example of changes in a write pointer, a read pointer, a writable number, and a readable number due to data writing and data reading; メモリリード回路からメモリライト回路へのリードポインタの転送処理の具体例を説明するタイミングチャートである。7 is a timing chart illustrating a specific example of a read pointer transfer process from a memory read circuit to a memory write circuit. データリードにおけるリード可能数の算出処理を説明する図表である。12 is a chart illustrating a process for calculating the number of readable data in data read. メモリライト回路からメモリリード回路へのライトポインタの転送処理の具体例を説明するタイミングチャートである。5 is a timing chart illustrating a specific example of a write pointer transfer process from a memory write circuit to a memory read circuit.
 以下に、本開示の実施の形態について、図面を参照して詳細に説明する。なお、以下では、図中の同一又は相当部分には同一符号を付して、その説明は原則的に繰返さないものとする。 Embodiments of the present disclosure will be described in detail below with reference to the drawings. In addition, below, the same code|symbol is attached|subjected to the same or equivalent part in a figure, and the description shall not be repeated in principle.
 図1は、本実施の形態に係るメモリ制御装置100の構成を説明するブロック図である。以下の説明で明らかになる様に、メモリ制御装置100は、例えば、電子機器で用いられる、非同期の異なるクロックで動作する論理回路の間でのデータ転送に用いることができる。 FIG. 1 is a block diagram illustrating the configuration of a memory control device 100 according to the present embodiment. As will become clear from the following description, the memory control device 100 can be used, for example, to transfer data between logic circuits used in electronic devices that operate with different asynchronous clocks.
 (回路構成の説明)
 図1に示される様に、メモリ制御装置100は、非同期の異なるライトクロックWCLK及びリードクロックRCLKを受けて動作する。メモリ制御装置100は、データを一時的に保持するためのメモリ300と、ライトクロックWCLKに同期してメモリ300に対してデータを書込むためのメモリライト回路101と、リードクロックRCLKに同期してメモリ300からデータを読出すためのメモリリード回路201とを備える。ライトクロックWCLK及びリードクロックRCLKは、それぞれのクロック周期毎に生成されたものが、メモリ制御装置100に入力される。尚、以下では、各信号及びクロックについて、論理ハイレベルを「1」とも表記し、論理ローレベルを「0」とも表記する。
(Explanation of circuit configuration)
As shown in FIG. 1, the memory control device 100 operates in response to different asynchronous write clocks WCLK and read clocks RCLK. The memory control device 100 includes a memory 300 for temporarily holding data, a memory write circuit 101 for writing data to the memory 300 in synchronization with a write clock WCLK, and a memory write circuit 101 in synchronization with a read clock RCLK. A memory read circuit 201 for reading data from the memory 300 is provided. The write clock WCLK and read clock RCLK are generated for each clock cycle and input to the memory control device 100. Note that, in the following, for each signal and clock, a logic high level is also expressed as "1", and a logic low level is also expressed as "0".
 メモリライト回路101は、ライト側アクセス制御部103と、ライト側ライトポインタ生成部107と、リード側リードポインタ同期化部109と、ライト側リードポインタ演算部112と、ライト側一致検出部113とを含む。 The memory write circuit 101 includes a write-side access control section 103, a write-side write pointer generation section 107, a read-side read pointer synchronization section 109, a write-side read pointer calculation section 112, and a write-side coincidence detection section 113. include.
 ライト側アクセス制御部103は、メモリ300に対するデータ書込に関する全体の制御を実行する。具体的には、ライト側アクセス制御部103は、後述する様に、メモリ300に対する書込可否の判断結果に従って、ライト許可WPRMを出力する(WRPM=「1」)。ライト側アクセス制御部103は、ライト指示WCMDを受けたときに、書込可能な状態(WPRM=「1」)であると、ライト側ライトイネーブル104を有効(「1」にする。ライト側アクセス制御部103は、ライト側ライトイネーブル104の有効時には、ライト側ライトポインタインクリメント106を更に出力する。ライト側ライトポインタ生成部107は、メモリ300のライトアドレスを示すライト側ライトポインタ108を生成する。 The write-side access control unit 103 executes overall control regarding data writing to the memory 300. Specifically, as described later, the write-side access control unit 103 outputs write permission WPRM (WRPM="1") according to the determination result of whether or not writing to the memory 300 is possible. When the write-side access control unit 103 receives the write instruction WCMD and is in a writable state (WPRM="1"), the write-side write enable 104 is enabled (set to "1").Write-side access When the write-side write enable 104 is valid, the control unit 103 further outputs the write-side write pointer increment 106. The write-side write pointer generation unit 107 generates the write-side write pointer 108 indicating the write address of the memory 300.
 ライト側ライトイネーブル104の有効時には、ライトクロックWCLKの立上がりエッジに応答して、ライトデータWDATが、ライト側ライトポインタ108で示される、メモリ300のライトアドレスに書き込まれることで、データライトが実行される。ライト側ライトポインタ108は、ライトデータWDATの書込毎に、即ち、ライト側ライトポインタインクリメント106の出力時(即ち、106=「1」の期間)において、ライトクロックWCLKに同期して1ずつ増加される。 When the write-side write enable 104 is valid, data writing is executed by writing write data WDAT to the write address of the memory 300 indicated by the write-side write pointer 108 in response to the rising edge of the write clock WCLK. Ru. The write side write pointer 108 increases by 1 in synchronization with the write clock WCLK every time the write data WDAT is written, that is, when the write side write pointer increment 106 is output (i.e., during the period when 106 = “1”). be done.
 リード側リードポインタ同期化部109は、メモリリード回路201においてリードクロックRCLKに従って生成されたリード側リードポインタ208を受ける。リード側リードポインタ同期化部109は、リード側リードポインタ208をライトクロックWCLKで同期化した、リード側リードポインタ111を生成する。 The read side read pointer synchronization unit 109 receives the read side read pointer 208 generated in the memory read circuit 201 according to the read clock RCLK. The read side read pointer synchronization unit 109 generates the read side read pointer 111 by synchronizing the read side read pointer 208 with the write clock WCLK.
 ライト側一致検出部113は、リード側リードポインタ同期化部109が生成するリード側リードポインタ111の値と、ライト側リードポインタ演算部112によるライト側リードポインタ110の値との一致検出結果に基づき、ライト側リードポインタインクリメント114を出力する。 The write-side coincidence detection unit 113 is based on the coincidence detection result between the value of the read-side read pointer 111 generated by the read-side read pointer synchronization unit 109 and the value of the write-side read pointer 110 by the write-side read pointer calculation unit 112. , outputs write-side read pointer increment 114.
 ライト側リードポインタ演算部112は、ライト側一致検出部113からのライト側リードポインタインクリメント114に基づいて、ライトクロックWCLKに同期したライト側リードポインタ110の値を演算する。ライト側アクセス制御部103は、リード側リードポインタ同期化部109によって生成されたリード側リードポインタ111ではなく、ライト側リードポインタ演算部112によるライト側リードポインタ110を用いて、メモリ300に対するライトデータWDATの書込可否を判断する。 The write-side read pointer calculation unit 112 calculates the value of the write-side read pointer 110 in synchronization with the write clock WCLK, based on the write-side read pointer increment 114 from the write-side coincidence detection unit 113. The write-side access control unit 103 uses the write-side read pointer 110 generated by the write-side read pointer calculation unit 112 instead of the read-side read pointer 111 generated by the read-side read pointer synchronization unit 109 to write data to the memory 300. Determine whether writing to WDAT is possible.
 メモリリード回路201は、リード側アクセス制御部203と、リード側リードポインタ生成部207と、ライト側ライトポインタ同期化部209と、リード側ライトポインタ演算部212と、リード側一致検出部213とを含む。 The memory read circuit 201 includes a read side access control section 203, a read side read pointer generation section 207, a write side write pointer synchronization section 209, a read side write pointer calculation section 212, and a read side coincidence detection section 213. include.
 リード側アクセス制御部203は、メモリ300からのデータ読出に関する全体の制御を実行する。具体的には、リード側アクセス制御部203は、後述する様に、メモリ300からの読出可否の判断結果に従って、リード許可RPRMを出力する(RRPM=「1」)。リード側アクセス制御部203は、リード指示RCMDを受けたときに、読出可能な状態(RPRM=「1」)であると、リード側リードイネーブル204を有効(「1」)とする。リード側アクセス制御部203は、リード側リードイネーブル204の有効化時には、リード側リードポインタインクリメント206を更に出力する。リード側リードポインタ生成部207は、メモリ300のリードアドレスを示すリード側リードポインタ208を生成する。 The read-side access control unit 203 executes overall control regarding reading data from the memory 300. Specifically, as described later, the read-side access control unit 203 outputs read permission RPRM (RRPM="1") according to the determination result of whether reading from the memory 300 is possible. When the read-side access control unit 203 receives the read instruction RCMD and is in a readable state (RPRM="1"), the read-side read enable 204 is enabled ("1"). The read-side access control unit 203 further outputs a read-side read pointer increment 206 when the read-side read enable 204 is enabled. The read side read pointer generation unit 207 generates a read side read pointer 208 indicating a read address of the memory 300.
 リード側リードイネーブル204の有効時には、リードクロックRCLKの立上がりエッジに応答して、リードデータRDATが、リード側リードポインタ208で示されるメモリ300のリードアドレスから読出されることで、データリードが実行される。リード側リードポインタ208は、リードデータRDATの読出毎に、即ち、リード側リードポインタインクリメント206の出力時(即ち、206=「1」の期間)において、リードクロックRCLKに同期して1ずつ増加される。 When the read-side read enable 204 is enabled, data reading is executed by reading read data RDAT from the read address of the memory 300 indicated by the read-side read pointer 208 in response to the rising edge of the read clock RCLK. Ru. The read side read pointer 208 is incremented by 1 in synchronization with the read clock RCLK every time the read data RDAT is read, that is, when the read side read pointer increment 206 is output (that is, during the period when 206 = “1”). Ru.
 ライト側ライトポインタ同期化部209は、メモリライト回路101においてライトクロックWCLKに従って生成されたライト側ライトポインタ108を受ける。ライト側ライトポインタ同期化部209は、ライト側ライトポインタ108をリードクロックRCLKで同期化した、ライト側ライトポインタ211を生成する。リード側一致検出部213は、ライト側ライトポインタ同期化部209が生成するライト側ライトポインタ211と、リード側ライトポインタ演算部212によるリード側ライトポインタ210との一致検出結果に基づき、リード側ライトポインタインクリメント214を出力する。 The write side write pointer synchronization unit 209 receives the write side write pointer 108 generated in the memory write circuit 101 according to the write clock WCLK. The write side write pointer synchronization unit 209 generates a write side write pointer 211 by synchronizing the write side write pointer 108 with the read clock RCLK. The read-side coincidence detection unit 213 detects the read-side write based on the coincidence detection result between the write-side write pointer 211 generated by the write-side write pointer synchronization unit 209 and the read-side write pointer 210 by the read-side write pointer calculation unit 212. Pointer increment 214 is output.
 リード側ライトポインタ演算部212は、リード側一致検出部213からのリード側ライトポインタインクリメント214に基づいて、リードクロックRCLKに同期したリード側ライトポインタ210の値を演算する。リード側アクセス制御部203は、ライト側ライトポインタ同期化部209によって生成されたライト側ライトポインタ211ではなく、リード側ライトポインタ演算部212によるリード側ライトポインタ210を用いて、メモリ300からのリードデータRDATの読出可否を判断する。 The read-side write pointer calculation unit 212 calculates the value of the read-side write pointer 210 in synchronization with the read clock RCLK, based on the read-side write pointer increment 214 from the read-side coincidence detection unit 213. The read-side access control unit 203 uses the read-side write pointer 210 generated by the read-side write pointer calculation unit 212 instead of the write-side write pointer 211 generated by the write-side write pointer synchronization unit 209 to perform reading from the memory 300. Determine whether data RDAT can be read.
 この様に、メモリライト回路101では、ライトクロックWCLKに従って、ライト側ライトポインタ108によって示されるメモリ300のアドレスに対して、データライトが実行される。同様に、メモリリード回路201では、リードクロックRCLKに従って、リード側リードポインタ208によって示されるメモリ300のアドレスに対して、データリードが実行される。 In this manner, the memory write circuit 101 executes data write to the address of the memory 300 indicated by the write-side write pointer 108 in accordance with the write clock WCLK. Similarly, in the memory read circuit 201, data is read from the address of the memory 300 indicated by the read-side read pointer 208 in accordance with the read clock RCLK.
 メモリライト回路101によるデータライトは、メモリ300からのメモリリード回路201による読出状況を把握して、メモリ300から未読出のデータを上書き消去してしまわない様に実行する必要がある。この際に、当該読出状況は、ライトクロックWCLKに同期した動作によってメモリライト回路101側で認識された、ライト側リードポインタ110を用いて把握される。従って、ポインタ値の誤転送を防止した、リードクロックRCLKに同期してインクリメントされるリード側リードポインタ208と、ライト側リードポインタ110との同期化処理が重要となる。 Data writing by the memory write circuit 101 needs to be executed in such a way that the read status of the memory read circuit 201 from the memory 300 is grasped and unread data from the memory 300 is not overwritten and erased. At this time, the read status is grasped using the write-side read pointer 110, which is recognized on the memory write circuit 101 side through an operation synchronized with the write clock WCLK. Therefore, it is important to synchronize the read-side read pointer 208, which is incremented in synchronization with the read clock RCLK, with the write-side read pointer 110, which prevents erroneous transfer of pointer values.
 同様に、メモリリード回路201によるデータリードは、メモリ300に対するメモリライト回路101による書込状況を把握して、メモリ300に読出データが無いのに誤ってメモリ300からのデータ読出を実行しない様に、言い換えると、未読出のデータを順次読出す様に実行する必要がある。この際に、当該書込状況は、リードクロックRCLKに同期した動作によってメモリリード回路201側で認識された、リード側ライトポインタ210によって把握される。従って、ポインタ値の誤転送を防止した、ライトクロックWCLKに同期してインクリメントされるライト側ライトポインタ108と、リード側ライトポインタ210との同期化処理が重要となる。 Similarly, when reading data by the memory read circuit 201, the write status of the memory write circuit 101 to the memory 300 is grasped so as to avoid reading data from the memory 300 by mistake when there is no read data in the memory 300. In other words, it is necessary to sequentially read unread data. At this time, the write status is grasped by the read-side write pointer 210, which is recognized on the memory read circuit 201 side by an operation synchronized with the read clock RCLK. Therefore, it is important to synchronize the write-side write pointer 108, which is incremented in synchronization with the write clock WCLK, and the read-side write pointer 210, which prevents erroneous transfer of pointer values.
 次に、図1に示されたメモリ制御装置100における、ポインタ転送に係る回路動作について、より詳細説明する。尚、前提として、メモリ300の深さは7段とし、初期状態において、各ポインタ値は「0」に初期化されるものとする。 Next, the circuit operation related to pointer transfer in the memory control device 100 shown in FIG. 1 will be described in more detail. It is assumed that the depth of the memory 300 is seven stages, and that each pointer value is initialized to "0" in the initial state.
 以下、ライトポインタ及びリードポインタは、メモリ深さに従った値の範囲内で変化するポインタ部と、「0」又は「1」に設定されるフラグ部とを有するものとする。フラグ部の値は、ポインタ部の値が一巡する毎に値が反転される。上述の様にメモリ深さが7である場合には、ポインタ部の値は「0」を初期値として、データライト又はデータリードが行われる毎に1ずつ増加する。そして、ポインタ部の値が「6」である状態で、データライト又はデータリードが行われると、ポインタ部の値が「0」に戻るとともに、フラグ部の値は「0」から「1」、又は、「1」から「0」に反転される。 Hereinafter, it is assumed that the write pointer and the read pointer have a pointer part that changes within a value range according to the memory depth, and a flag part that is set to "0" or "1". The value of the flag part is inverted every time the value of the pointer part goes around. As described above, when the memory depth is 7, the value of the pointer section is initialized to "0" and increases by 1 each time data is written or read. When data is written or read while the value of the pointer section is "6", the value of the pointer section returns to "0" and the value of the flag section changes from "0" to "1". Or, it is inverted from "1" to "0".
 まず、ライト動作について説明する。ライト動作では、ライト指示WCMDがライト側アクセス制御部103に入力される。このときに、ライトが可能であればライト側アクセス制御部103は、ライト側ライトイネーブル104を有効化する(104=「1」)。ライト側ライトイネーブル104が有効化されると、ライト側ライトポインタ108で示されるメモリ300のアドレスへ、ライトデータWDATが書き込まれる。この際に、ライトが不可能であれば、ライト指示WCMDが入力されても、メモリ300に対して、特に処理は行われない。 First, the write operation will be explained. In the write operation, a write instruction WCMD is input to the write-side access control unit 103. At this time, if writing is possible, the write-side access control unit 103 enables the write-side write enable 104 (104=“1”). When the write-side write enable 104 is enabled, write data WDAT is written to the address of the memory 300 indicated by the write-side write pointer 108. At this time, if writing is not possible, no particular processing is performed on the memory 300 even if the write instruction WCMD is input.
 図2には、データライトにおけるライト可能数の算出処理例が示される。ライト可否は、図2に例示されたライト可能数の算出値に従って、実行することができる。 FIG. 2 shows an example of a process for calculating the number of data that can be written in data writing. The writability determination can be performed according to the calculated value of the writable number illustrated in FIG. 2 .
 図2において、wpfは、ライト側ライトポインタ108のフラグ部の値を示し、wppは、ライト側ライトポインタ108のポインタ部の値を示す。又、rpfは、ライト側リードポインタ110のフラグ部の値を示し、rppは、ライト側リードポインタ110のポインタ部の値を示す。Nは、メモリ深さである。図2に従って判定されたライト可能数に基づくライト可否の判定結果は、ライト許可WPRMに反映されて、ライト側アクセス制御部103から出力される。具体的には、ライト可能数が0のとき、WPRM=「0」に設定される一方で、ライト可能数が、予め定められた任意の自然数以上のとき、WPRM=「1」に設定される。 In FIG. 2, wpf indicates the value of the flag section of the write-side write pointer 108, and wpp indicates the value of the pointer section of the write-side write pointer 108. Further, rpf indicates the value of the flag section of the write-side read pointer 110, and rpp indicates the value of the pointer section of the write-side read pointer 110. N is the memory depth. The determination result of write permission based on the number of write permissions determined according to FIG. 2 is reflected in the write permission WPRM and output from the write-side access control unit 103. Specifically, when the writable number is 0, WPRM="0" is set, and when the writable number is greater than or equal to a predetermined arbitrary natural number, WPRM="1" is set. .
 図3には、データライト及びデータリードに伴う、ライトポインタ(wpf,wpp)及びリードポインタ(rpf,rpp)、並びに、及び、ライト可能数及びリード可能数の変化の一例を説明する図表が示される。 FIG. 3 shows a diagram illustrating an example of changes in the write pointer (wpf, wpp) and read pointer (rpf, rpp), as well as the number of writable numbers and the number of readable numbers, due to data writing and data reading. It will be done.
 メモリライト回路101では、ライト側ライトポインタ108のフラグ部wpf及びポインタ部wppと、ライト側リードポインタ110のフラグ部rpf及びポインタ部rppとの値を用いて、図2に従ってライト可能数を求めることで、ライト可否の判定が実行される。 The memory write circuit 101 uses the values of the flag part wpf and pointer part wpp of the write-side write pointer 108 and the flag part rpf and pointer part rpp of the write-side read pointer 110 to calculate the writeable number according to FIG. Then, a determination is made as to whether or not writing is possible.
 図3の例では、メモリ300にデータが存在しないwpf=wpp=rpf=rpp=0(初期値)の初期状態から、データライトが5回実行される。これに応じて、wppが、データライト毎に0から5まで1ずつ増加する。この際に、wpp<Nであるので、wpf=0に維持されており、データリードが実行されていないことから、rpf=rpp=0も維持されている。 In the example of FIG. 3, data write is executed five times from the initial state of wpf=wpp=rpf=rpp=0 (initial value) where no data exists in the memory 300. Correspondingly, wpp increases by 1 from 0 to 5 for each data write. At this time, since wpp<N, wpf=0 is maintained, and since data reading is not executed, rpf=rpp=0 is also maintained.
 この際に、ライト可能数は、初期状態ではNに等しい7であり、その後、データライト毎に、図2に示された演算式N-(wpp-rpp)に従って1ずつ減少する。5回のデータライト後には、ライト可能数は、N-5=2まで減少している。 At this time, the writable number is 7 equal to N in the initial state, and thereafter decreases by 1 for each data write according to the arithmetic expression N-(wpp-rpp) shown in FIG. After data is written five times, the number of writable data is reduced to N-5=2.
 上記5回のデータライト後に、同じく5回のデータリードが実行される。これに応じて、rppが、データリード毎に0から5まで1ずつ増加する。この際に、rpp<Nの範囲内であるので、rpf=0に維持されており、データライトが実行されていないことから、ライトポインタの値は、それまでのwpf=0,wpp=5に維持される。 After the above five data writes, the same five data reads are executed. Correspondingly, rpp increases by 1 from 0 to 5 for each data read. At this time, since rpp<N, rpf=0 is maintained, and data writing is not executed, so the write pointer values are changed to wpf=0, wpp=5. maintained.
 この際に、データリード毎に、ライト可能数は、図2に示された演算式N-(wpp-rpp)に従って1ずつ増加する。データライトと同数のデータリードが終了した状態では、wpp=rpp(=5)、かつ、wpf=wpf(=0)となっており、かつ、ライト可能数はN(=7)に戻っている。 At this time, the writable number increases by 1 according to the arithmetic expression N-(wpp-rpp) shown in FIG. 2 for each data read. When the same number of data reads as data writes have been completed, wpp = rpp (=5) and wpf = wpf (=0), and the number of writable data has returned to N (=7). .
 続いて、wpp=5(wpf=0)の状態から7回のデータライトが行われると、2回目のデータライトにおいて、wppが6からインクリメントされる際に、wpp=0に戻されるとともに、フラグ部wpfが「0」から「1」に反転される。以降では、wpf=1の下で、wppがインクリメントされるので、7回目のデータライト後には、wpf=1,wpp=5となる。又、ライト側リードポインタ110については、rpf=0,rpp=5が維持されている。 Subsequently, when data is written seven times from the state of wpp=5 (wpf=0), when wpp is incremented from 6 in the second data write, wpp is returned to 0 and the flag is The part wpf is inverted from "0" to "1". Thereafter, wpp is incremented under wpf=1, so after the seventh data write, wpf=1 and wpp=5. Furthermore, regarding the write-side read pointer 110, rpf=0 and rpp=5 are maintained.
 この際に、ライト可能数は、図2に示された演算式N-(wpp-rpp)(wpf=rpf,wpp>rppのとき)、-(wpp-rpp)(wpf≠rpf,wpp<rppのとき)、及び、0(wpf≠rpf,wpp=rppのとき)に従って、データライト毎に1ずつ減少する。7回のデータライト後には、ライト可能数は、N-7=0まで減少している。このとき、ライト許可WPRMは「0」に設定される。 At this time, the number of writable numbers is calculated using the calculation formula N-(wpp-rpp) (when wpf=rpf, wpp>rpp), -(wpp-rpp) (wpf≠rpf, wpp<rpp) shown in FIG. ) and 0 (when wpf≠rpf, wpp=rpp), it is decreased by 1 for each data write. After seven data writes, the number of writable data has decreased to N-7=0. At this time, write permission WPRM is set to "0".
 上記7回のデータライト後に、同じく7回のデータリードが実行される。rpp=5(rpf=0)の状態から7回のデータリードが行われると、2回目のデータリードにおいて、rppが6からインクリメントされる際に、rpp=0に戻されるとともに、フラグ部rpfが「0」から「1」に反転される。以降では、rpf=1の下で、rppがインクリメントされるので、7回目のデータリード後には、rpf=1,rpp=5となる。この際に、ライト可能数は、図2に示された演算式、-(wpp-rpp)(wpf≠rpf,wpp<rppのとき)、N-(wpp-rpp)(wpf=rpf,wpp>rppのとき)、及び、N(wpf=rpf,wpp=rppのとき)に従って、データリード毎に1ずつ増加する。ライト許可WPRMについても「1」に設定される。7回のデータリード後には、ライト可能数はN(=7)まで戻っている。 After the above seven data writes, the same seven data reads are executed. When data is read seven times from the state of rpp=5 (rpf=0), when rpp is incremented from 6 in the second data read, rpp=0 is returned and the flag part rpf is set. It is inverted from "0" to "1". Thereafter, rpp is incremented under rpf=1, so after the seventh data read, rpf=1 and rpp=5. At this time, the number of writable numbers is determined by the calculation formula shown in FIG. rpp) and N (when wpf=rpf, wpp=rpp), it increases by 1 for each data read. Write permission WPRM is also set to "1". After seven data reads, the number of writable data has returned to N (=7).
 次に、リードポインタのリード側及びライト側の間での同期化処理について説明する。
 再び図1を参照して、データリードが行われた場合には、リード側リードポインタ208が変化する。リード側リードポインタ208は、リードクロックRCLKに同期化しているため、リード側リードポインタ同期化部109により、ライトクロックWCLKに同期化させる必要がある。
Next, a synchronization process between the read side and the write side of the read pointer will be described.
Referring again to FIG. 1, when data is read, the read side read pointer 208 changes. Since the read side read pointer 208 is synchronized with the read clock RCLK, it is necessary to synchronize it with the write clock WCLK by the read side read pointer synchronization unit 109.
 例えば、図1に示されたリード側リードポインタ同期化部109の構成は、一般的に知られる2段フリップフロップとすることができる。ライト側一致検出部113は、ライトクロックWCLKに従ってライト側で同期化されたリード側リードポインタ111の値と、ライト側リードポインタ110の値との一致比較を実行する。ライト側一致検出部113は、リード側リードポインタ111の値と、ライト側リードポインタ110との値が不一致であると、ライト側リードポインタインクリメント114を有効化する(114=「1」)。一方で、リード側リードポインタ111の値と、ライト側リードポインタ110との値が一致するときには、ライト側リードポインタインクリメント114は無効化される(114=「0」)。 For example, the configuration of the read-side read pointer synchronization unit 109 shown in FIG. 1 can be a commonly known two-stage flip-flop. The write-side coincidence detection unit 113 performs a coincidence comparison between the value of the read-side read pointer 111 synchronized on the write side and the value of the write-side read pointer 110 according to the write clock WCLK. If the value of the read-side read pointer 111 and the value of the write-side read pointer 110 do not match, the write-side coincidence detection unit 113 enables the write-side read pointer increment 114 (114=“1”). On the other hand, when the value of the read-side read pointer 111 and the value of the write-side read pointer 110 match, the write-side read pointer increment 114 is invalidated (114="0").
 ライト側リードポインタインクリメント114が有効(=「1」)である状態では、ライト側リードポインタ演算部112は、ライトクロックWCLKのサイクル毎に、ライト側リードポインタ110(フラグ部rpf,ポインタ部rpp)をインクリメントする。上述の様に、インクリメント後のポインタ部rppの値がメモリ深さNになるときには、rpp=Nとすることなく、rpp=0に戻すとともに、フラグ部rpfの値が反転される。 When the write-side read pointer increment 114 is valid (="1"), the write-side read pointer calculation unit 112 increments the write-side read pointer 110 (flag section rpf, pointer section rpp) every cycle of the write clock WCLK. Increment. As described above, when the value of the pointer part rpp after incrementing reaches the memory depth N, rpp is not set to N but is returned to rpp=0, and the value of the flag part rpf is inverted.
 ライト側リードポインタ110が、ライト側で同期化されたリード側リードポインタ111に追いついて両者が一致すると、ライト側リードポインタインクリメント114は、無効(=「0」)となり、ライト側リードポインタ110のインクリメントは行われない。即ち、ライト側リードポインタ110の値は維持される。 When the write-side read pointer 110 catches up with the read-side read pointer 111 synchronized on the write side and they match, the write-side read pointer increment 114 becomes invalid (="0"), and the write-side read pointer 110 becomes invalid. No increment is done. That is, the value of the write-side read pointer 110 is maintained.
 ここで、複数ビットから構成されるリード側リードポインタ208についても、リード側リードポインタ同期化部109により、例えば、2段フリップフロップによって同期化されている。このため、リード側リードポインタ208の変化のタイミングと、ライトクロックWCLKの立ち上がりエッジのタイミングとが重なった場合には、所謂、メタ・ステーブル状態となり、ライト側で同期化されたリード側リードポインタ111の値に、リード側リードポインタ208の値を正しく転送できない可能性がある。これにより、誤った値のままでライト側リードポインタ110をライト可否の判断に使用すると、メモリ300に空き領域がないのにデータライトを実行してしまう可能性がある。 Here, the read side read pointer 208 composed of a plurality of bits is also synchronized by the read side read pointer synchronization unit 109 using, for example, a two-stage flip-flop. Therefore, if the timing of the change in the read side read pointer 208 and the timing of the rising edge of the write clock WCLK overlap, a so-called meta-stable state occurs, and the read side read pointer 208 synchronized on the write side There is a possibility that the value of the read side read pointer 208 cannot be correctly transferred to the value of 111. As a result, if the write-side read pointer 110 is used to determine whether writing is possible with an incorrect value, there is a possibility that data writing will be executed even though there is no free space in the memory 300.
 従って、本実施の形態においては、ライトクロックWCLKに従って同期化されたリード側リードポインタ111の値をそのままライト側リードポインタ110として用いるのではなく、ライト側で同期化されたリード側リードポインタ111と、ライト側リードポインタ110とが異なることをライト側一致検出部113で検出した場合に、当該リード側リードポインタ111と、ライト側リードポインタ110とが等しくなるまで、ライト側リードポインタ110を1ずつ変化させる様に、ポインタ部wpp及びフラグ部wpfの値を変化させる。この様な処理を追加することで、ライト側リードポインタ110について、リード側リードポインタ208に追従して、値を誤ることなく、リード側からライト側へ転送することが可能となる。 Therefore, in this embodiment, instead of using the value of the read-side read pointer 111 synchronized according to the write clock WCLK as the write-side read pointer 110, the value of the read-side read pointer 111 synchronized on the write side is used. , when the write-side coincidence detection unit 113 detects that the write-side read pointer 110 is different, the write-side read pointer 110 is changed by 1 until the read-side read pointer 111 and the write-side read pointer 110 become equal. The values of the pointer part wpp and the flag part wpf are changed so as to change the value of the pointer part wpp and the flag part wpf. By adding such processing, it becomes possible to transfer the write-side read pointer 110 from the read side to the write side, following the read-side read pointer 208, without making a mistake in value.
 尚、上述の様に、同期化回路として、リード側リードポインタ同期化部109には2段フリップフロップを適用することが可能であるが、他の同期化方式によって、リード側リードポインタ同期化部109を構成することも可能である。更には、ライト側一致検出部113によって、ライトクロックWCLKに従って同期化されたリード側リードポインタ111と、ライト側リードポインタ110との値の不一致時には、ライト側リードポインタ110の値をリード側から読み込まれた値に追従させる構成としているので、リード側リードポインタ同期化部109は、同期化回路を用いずに構成することも可能である。 As mentioned above, it is possible to apply a two-stage flip-flop to the read-side read pointer synchronization section 109 as a synchronization circuit, but the read-side read pointer synchronization section 109 can be implemented using other synchronization methods. 109 is also possible. Furthermore, when the values of the read side read pointer 111 synchronized according to the write clock WCLK and the write side read pointer 110 do not match, the write side coincidence detection unit 113 reads the value of the write side read pointer 110 from the read side. Since the read-side read pointer synchronization unit 109 is configured to follow the value set, the read-side read pointer synchronization unit 109 can also be configured without using a synchronization circuit.
 次に、図4を用いて、メモリリード回路201からメモリライト回路101へのリードポインタの転送処理の具体例を説明する。図4中では、リード側リードポインタ208、ライト側で同期化されたリード側リードポインタ111、及び、ライト側リードポインタ110のそれぞれについて、フラグ部rpf及びポインタ部rppの値を、「rpf-rpp」と表記する。 Next, a specific example of a read pointer transfer process from the memory read circuit 201 to the memory write circuit 101 will be described using FIG. 4. In FIG. 4, for each of the read-side read pointer 208, the read-side read pointer 111 synchronized on the write side, and the write-side read pointer 110, the values of the flag part rpf and pointer part rpp are ”.
 例えば、図4の初期状態では、リード側リードポインタ208は、フラグ部rpf=0、ポインタ部rpp=3であり(「0-3」)、ライト側で同期化されたリード側リードポインタ111及びライト側リードポインタ110についても同様に、フラグ部rpf=0、ポインタ部rpp=3となっていること(「0-3」)が示されている。即ち、メモリライト回路101及びメモリリード回路201の間で、リードポインタは、正しく共通の値が認識された状態となっている。 For example, in the initial state of FIG. 4, the read-side read pointer 208 has a flag part rpf=0 and a pointer part rpp=3 ("0-3"), and the read-side read pointer 111 and Similarly, for the write-side read pointer 110, it is shown that the flag part rpf=0 and the pointer part rpp=3 ("0-3"). That is, the common value of the read pointers between the memory write circuit 101 and the memory read circuit 201 is correctly recognized.
 この状態から、メモリリード回路201では、リード側リードポインタインクリメント206が有効(=「1」)となる期間では、リードクロックRCLKの立上がりエッジ毎にメモリ300に対してデータリードが実行される。データリードの実行に応じて、リード側リードポインタ208が、立上がりエッジ毎(RCLK)にインクリメントされる。 From this state, in the memory read circuit 201, data is read from the memory 300 at every rising edge of the read clock RCLK during a period in which the read side read pointer increment 206 is valid (="1"). In response to data read execution, the read side read pointer 208 is incremented at every rising edge (RCLK).
 図4の例では、まず3個の立上がりエッジ(RCLK)のそれぞれにて3回のデータリードが実行されて、リード側リードポインタ208が、クロックエッジ毎にインクリメントされる。これにより、リード側リードポインタ208は、「0-3」から「0-6」まで変化する。その後、1回ずつのデータリードが二度行われることで、リード側リードポインタ208は、「0-6」から「1-0」に変化し、更に、「1-0」から「1-1」に変化する。 In the example of FIG. 4, data reading is performed three times at each of three rising edges (RCLK), and the read-side read pointer 208 is incremented at each clock edge. As a result, the read side read pointer 208 changes from "0-3" to "0-6". After that, data read is performed twice each time, and the read side read pointer 208 changes from "0-6" to "1-0", and then from "1-0" to "1-1". ”.
 メモリライト回路101のリード側リードポインタ同期化部109は、リードクロックRCLKとは非同期のライトクロックWCLKの立上がりエッジに応答してリード側リードポインタ208の値を取り込む。これにより、ライトクロックWCLKに従って同期化されたリード側リードポインタ111が生成される。 The read-side read pointer synchronization unit 109 of the memory write circuit 101 captures the value of the read-side read pointer 208 in response to the rising edge of the write clock WCLK, which is asynchronous with the read clock RCLK. As a result, a read-side read pointer 111 synchronized according to the write clock WCLK is generated.
 しかしながら、図4の例では、時刻t1において、リード側リードポインタ208が「0-3」から「0-4」へ変化するタイミングと、ライトクロックWCLKの立上がりエッジが重なる。これにより、メタ・ステーブル状態が発生するので、ライト側で同期化されたリード側リードポインタ111の値は一位に定まらない。この現象について、図4中では、「0-3」から不定値となるので、「≠0-3」と表記している。 However, in the example of FIG. 4, at time t1, the timing at which the read pointer 208 on the read side changes from "0-3" to "0-4" overlaps with the rising edge of the write clock WCLK. As a result, a meta-stable state occurs, so that the value of the read-side read pointer 111 synchronized on the write side is not fixed at the first position. This phenomenon is expressed as "≠0-3" in FIG. 4 because it becomes an undefined value from "0-3".
 図4の例では、その他のリード側リードポインタ208の変化タイミングは、ライトクロックWCLKの立ち上がりエッジと重ならないため、リード側リードポインタ208の値が、ライト側で同期化されたリード側リードポインタ111に正しく取り込まれている。具体的には、リード側リードポインタ208の「0-6」、「1-0」、「1-1」は、時刻t2、t5、及び、t7の立上がりエッジ(WCLK)でリード側リードポインタ同期化部109に取り込まれ、それぞれの次の立上がりエッジである時刻t3,時刻t6、及び、時刻t8において、ライト側で同期化されたリード側リードポインタ111に反映されている。上述の様に、リード側リードポインタ同期化部109については2段フリップフロップでの構成を想定しているため、リード側リードポインタ208の値が、上述の遅れを伴って、ライト側で同期化されたリード側リードポインタ111に反映されている。 In the example of FIG. 4, since the change timing of the other read side read pointers 208 does not overlap with the rising edge of the write clock WCLK, the value of the read side read pointer 208 is changed to the read side read pointer 111 synchronized on the write side. is correctly included. Specifically, "0-6", "1-0", and "1-1" of the read side read pointer 208 are synchronized with the read side read pointer at the rising edge (WCLK) of time t2, t5, and t7. The data is taken into the conversion unit 109 and reflected in the read-side read pointer 111 synchronized on the write side at the respective next rising edges at time t3, time t6, and time t8. As mentioned above, since the read side read pointer synchronization unit 109 is assumed to have a two-stage flip-flop configuration, the value of the read side read pointer 208 is synchronized on the write side with the above-mentioned delay. This is reflected in the read pointer 111 on the read side.
 ライト側リードポインタインクリメント114は、ライト側一致検出部113によって、ライト側で同期化されたリード側リードポインタ111がライト側リードポインタ110と異なる値であるサイクルでは有効(=「1」)とされる。反対に、ライト側で同期化されたリード側リードポインタ111及びライト側リードポインタ110が同じであるサイクルでは、ライト側リードポインタインクリメント114は、無効(=「0」)とされる。 The write-side read pointer increment 114 is determined by the write-side coincidence detection unit 113 to be valid (=“1”) in a cycle in which the read-side read pointer 111 synchronized on the write side has a different value from the write-side read pointer 110. Ru. On the contrary, in a cycle in which the read-side read pointer 111 and the write-side read pointer 110 synchronized on the write side are the same, the write-side read pointer increment 114 is invalidated (="0").
 ライト側リードポインタ演算部112は、ライト側リードポインタインクリメント114が有効(=「1」)であることを確認すると、ライトクロックWCLKの次の立上がりエッジにおいて、ライト側リードポインタ110をインクリメントする。一方で、ライト側リードポインタインクリメント114が無効(=「0」)であるときには、ライト側リードポインタ110の値は維持される。 When the write-side read pointer calculation unit 112 confirms that the write-side read pointer increment 114 is valid (="1"), it increments the write-side read pointer 110 at the next rising edge of the write clock WCLK. On the other hand, when the write-side read pointer increment 114 is invalid (="0"), the value of the write-side read pointer 110 is maintained.
 この結果、図4の例では、時刻t3~t5の、ライトクロックWCLKの各立ち上がりエッジにおいて、ライト側リードポインタ110がインクリメントされる。これにより、ライト側リードポインタ110は、時刻t5において、リード側リードポインタ208と一致している、ライト側で同期化されたリード側リードポインタ111の値である「0-6」まで変化する。この様に、メタ・ステーブル状態となった不定値(「≠0-3」)が、そのままライト側で同期化されたリード側リードポインタ111に取り込まれることがない。 As a result, in the example of FIG. 4, the write-side read pointer 110 is incremented at each rising edge of the write clock WCLK from time t3 to t5. As a result, the write-side read pointer 110 changes to "0-6", which is the value of the read-side read pointer 111 synchronized on the write side and coincides with the read-side read pointer 208, at time t5. In this way, the undefined value (“≠0-3”) that has become meta-stable is not taken into the read-side read pointer 111 that is synchronized on the write side.
 その後のデータリードによる、リード側リードポインタ208の「1-0」及び「1-1」への変化は、ライトクロックWCLKに従ってライト側で同期化されたリード側リードポインタ111へ取り込まれる。更に、ライト側リードポインタ110の値は、ライト側一致検出部113によってライト側リードポインタインクリメント114が有効(=「1」)にされることで、ライト側で同期化されたリード側リードポインタ111の値に追いつくまで、インクリメントされる。 Changes of the read-side read pointer 208 to "1-0" and "1-1" due to subsequent data reading are captured into the read-side read pointer 111 synchronized on the write side according to the write clock WCLK. Furthermore, the value of the write-side read pointer 110 is changed to the read-side read pointer 111 synchronized on the write side by enabling the write-side read pointer increment 114 (="1") by the write-side coincidence detection unit 113. is incremented until it catches up with the value of .
 この様に、本実施の形態では、ライトクロックWCLKに同期して取り込まれたリード側リードポインタ208の値をそのまま用いるのではなく、取り込まれたリードポインタの値(即ち、リード側リードポインタ111の値)とライト側リードポインタ110との値が異なる場合に、ライト側リードポインタ110を1ずつ変化させる処理が実行される。これにより、メモリリード回路201でのデータリードの実行に伴うリード側リードポインタ208の変化に追従させて、ライト側リードポインタ110の値を誤ることなく変化することができる。 In this way, in this embodiment, instead of using the value of the read side read pointer 208 taken in in synchronization with the write clock WCLK as is, the value of the read pointer taken in (i.e., the value of the read side read pointer 111) is not used as is. When the values of the write-side read pointer 110 and the write-side read pointer 110 are different, a process of changing the write-side read pointer 110 by 1 is executed. As a result, the value of the write-side read pointer 110 can be changed without error by following the change in the read-side read pointer 208 that occurs when the memory read circuit 201 performs a data read.
 この様に、異なるクロックで動作するメモリリード回路201及びメモリライト回路101の間で、リードポインタをメモリリード回路201からメモリライト回路101へ誤りなく転送することで、ポインタの同期化が実現される。この結果、メモリライト回路101におけるデータライトの可否判定を正確に行うことで、結果的に、メモリ300を介した、非同期クロック間での正しいデータの受け渡しが可能となる。 In this way, pointer synchronization is achieved by transferring the read pointer from the memory read circuit 201 to the memory write circuit 101 without error between the memory read circuit 201 and the memory write circuit 101 that operate with different clocks. . As a result, by accurately determining whether data can be written in the memory write circuit 101, it becomes possible to transfer correct data between asynchronous clocks via the memory 300.
 次に、再び図1を参照して、リード動作について説明する。リード動作では、リード指示RCMDがリード側アクセス制御部203に入力される。このときに、リードが可能であればリード側アクセス制御部203からリード側リードイネーブル204が有効化(「1」)される。リード側リードイネーブル204が有効化されると、リード側リードポインタ208で示されるメモリ300のリードアドレスからリードデータRDATが読出される。この際に、リードが不可能であれば、リード指示RCMDが入力されても、メモリ300に対して、特に処理は行われない。 Next, referring to FIG. 1 again, the read operation will be explained. In the read operation, a read instruction RCMD is input to the read side access control unit 203. At this time, if reading is possible, the read side read enable 204 is enabled (“1”) from the read side access control unit 203. When the read-side read enable 204 is enabled, read data RDAT is read from the read address of the memory 300 indicated by the read-side read pointer 208. At this time, if reading is not possible, no particular processing is performed on the memory 300 even if the read instruction RCMD is input.
 図5には、データリードにおけるリード可能数の算出処理例が示される。リード可否は、図5に例示されたリード可能数の算出値に従って、実行することができる。 FIG. 5 shows an example of calculation processing for the number of readable data reads. Readability can be determined according to the calculated value of the readable number illustrated in FIG. 5 .
 図5において、wpfは、リード側ライトポインタ210のフラグ部の値を示し、wppは、リード側ライトポインタ210のポインタ部の値を示す。又、rpfは、リード側リードポインタ208のフラグ部の値を示し、rppは、リード側リードポインタ208のポインタ部の値を示す。Nは、図2と同様にメモリ深さを示す。図5に従って算出されたリード可能数に基づくリード可否の判定結果は、リード許可RPRMに反映されて、リード側アクセス制御部203から出力される。具体的には、リード可能数が0のとき、RPRM=「0」に設定される一方で、リード可能数が予め定められた任意の自然数以上のとき、RPRM=「1」に設定される。 In FIG. 5, wpf indicates the value of the flag section of the read-side write pointer 210, and wpp indicates the value of the pointer section of the read-side write pointer 210. Furthermore, rpf indicates the value of the flag section of the read-side read pointer 208, and rpp indicates the value of the pointer section of the read-side read pointer 208. N indicates the memory depth as in FIG. The readability determination result based on the readability number calculated according to FIG. 5 is reflected in the read permission RPRM and output from the read side access control unit 203. Specifically, when the readable number is 0, RPRM="0" is set, and when the readable number is greater than or equal to a predetermined arbitrary natural number, RPRM="1" is set.
 再び図3を参照して、データライト及びデータリードに伴う、ライトポインタ(wpf、wpp)及びリードポインタ(rpf,rpp)、並びに、リード可能数の変化の一例を説明する。 Referring again to FIG. 3, an example of changes in the write pointers (wpf, wpp), read pointers (rpf, rpp), and the readable number due to data writing and data reading will be described.
 メモリリード回路201では、リード側ライトポインタ210のフラグ部wpf及びポインタ部wppと、リード側リードポインタ208のフラグ部rpf及びポインタ部rppとの値を用いて図5で説明したリード可能数を求めることで、リード可否の判定が実行される。 The memory read circuit 201 uses the values of the flag part wpf and pointer part wpp of the read-side write pointer 210 and the flag part rpf and pointer part rpp of the read-side read pointer 208 to find the readable number explained in FIG. In this way, it is determined whether reading is possible or not.
 上述した様に、図3の例では、wpf=wpp=rpf=rpp=0(初期値)の初期状態から、データライトが5回実行されるが、この間、データリードが実行されていないことから、rpf=rpp=0も維持される。一方で、wpf=0のままで、wppが、データライト毎に0から5まで1ずつ増加する。この際に、リード可能数は、初期状態では0である一方で、その後、データライト毎に、図5に示された演算式wpp-rppに従って1ずつ増加する。5回のデータライト後には、リード可能数は、wpp-rpp=5まで増加している。 As mentioned above, in the example of FIG. 3, data write is executed five times from the initial state of wpf=wpp=rpf=rpp=0 (initial value), but data read is not executed during this time. , rpf=rpp=0 is also maintained. On the other hand, with wpf=0, wpp increases by 1 from 0 to 5 for each data write. At this time, while the readable number is 0 in the initial state, it increases by 1 each time data is written in accordance with the arithmetic expression wpp-rpp shown in FIG. After five data writes, the number of readable data has increased to wpp-rpp=5.
 次に、5回のデータライト後に、同じく5回のデータリードが実行される際には、rppが、データリード毎に0から5まで1ずつ増加するが、rpp<Nの範囲内であるので、rpf=0に維持される。一方で、データライトが実行されていないことから、ライトポインタの値は、それまでのwpf=0,wpp=5に維持される。 Next, when data is read five times after five data writes, rpp increases by 1 from 0 to 5 for each data read, but since rpp<N. , rpf=0. On the other hand, since no data write has been executed, the values of the write pointer are maintained at wpf=0 and wpp=5.
 この際に、データリード毎に、リード可能数は、図5に示された演算式wpp-rppに従って1ずつ減少する。データライトと同数のデータリードが終了した状態では、wpp=rpp(=5)、かつ、wpf=wpf(=0)となっており、かつ、リード可能数は0に戻っている。このとき、リード許可RPRMは「0」に設定される。 At this time, for each data read, the readable number decreases by 1 according to the arithmetic expression wpp-rpp shown in FIG. When the same number of data reads as data writes have been completed, wpp=rpp (=5) and wpf=wpf (=0), and the readable number has returned to 0. At this time, read permission RPRM is set to "0".
 続いて、rpp=5(rpf=0)の状態から7回のデータライトが行われる際には、リード側リードポインタ208について、rpf=0,rpp=5が維持されている。一方で、リード側ライトポインタ210については、上述の様に、2回目のデータライトにおいて、wpp=0に戻されるとともに、フラグ部wpfが「0」から「1」に反転される。そして、7回目のデータライト後には、wpf=1,wpp=5となる。この際に、リード可能数は、図5に示された演算式、具体的には、wpp-rpp(wpf=rpf,wpp>rppのとき)、N+(wpp-rpp)(wpf≠rpf,wpp<rppのとき)、及び、N(wpf≠rpf,wpp=rppのとき)に従って、データライト毎に1ずつ増加する。7回のデータライト後には、リード可能数は、N=7まで増加している。 Subsequently, when data is written seven times from the state of rpp=5 (rpf=0), rpf=0 and rpp=5 are maintained for the read-side read pointer 208. On the other hand, as for the read-side write pointer 210, as described above, in the second data write, wpp is returned to 0, and the flag part wpf is inverted from "0" to "1". After the seventh data write, wpf=1 and wpp=5. At this time, the readable number is determined by the calculation formula shown in FIG. <rpp) and N (wpf≠rpf, wpp=rpp), it increases by 1 for each data write. After seven data writes, the number of readable data has increased to N=7.
 上記7回のデータライト後に、同じく7回のデータリードが実行されると、上述の様に、2回目のデータリードにおいて、rpp=0に戻されるとともに、フラグ部rpfが「0」から「1」に反転される。以降では、rpf=1の下で、rppがインクリメントされて、7回目のデータリード後には、rpf=1,rpp=5となる。この際に、リード可能数は、図5に示された演算式、具体的には、N+(wpp-rpp)(wpf≠rpf,wpp<rppのとき)、wpp-rpp(wpf=rpf,wpp>rppのとき)、及び、0(wpf=rpf,wpp=rppのとき)に従って、データリード毎に1ずつ減少する。7回目のデータリード後には、リード可能数は0になる。このとき、リード許可RPRMは「0」に設定される。 After the above seven data writes, when the same seven data reads are executed, as mentioned above, in the second data read, rpp is returned to 0, and the flag part rpf changes from "0" to "1". ” is reversed. Thereafter, rpp is incremented under rpf=1, and after the seventh data read, rpf=1 and rpp=5. At this time, the readable number is determined by the calculation formula shown in FIG. >rpp) and 0 (when wpf=rpf, wpp=rpp), it is decreased by 1 for each data read. After the seventh data read, the readable number becomes 0. At this time, read permission RPRM is set to "0".
 次に、ライトポインタのライト側及びリード側の間での同期化処理について説明する。
 再び図1を参照して、データライトが行われた場合には、ライト側ライトポインタ108が変化する。ライト側ライトポインタ108は、ライトクロックWCLKに同期化しているため、ライト側ライトポインタ同期化部209により、リードクロックRCLKに同期化させる必要がある。
Next, a synchronization process between the write side and the read side of the write pointer will be explained.
Referring again to FIG. 1, when a data write is performed, the write side write pointer 108 changes. Since the write side write pointer 108 is synchronized with the write clock WCLK, it is necessary to synchronize it with the read clock RCLK by the write side write pointer synchronization unit 209.
 図1に示されたライト側ライトポインタ同期化部209の構成についても、リード側リードポインタ同期化部109で説明したのと同様に、2段フリップフロップとすることができる。リード側一致検出部213によって、リードクロックRCLKに従ってリード側で同期化されたライト側ライトポインタ211の値と、リード側ライトポインタ210の値との一致比較が実行される。リード側一致検出部213は、ライト側ライトポインタ211の値と、リード側ライトポインタ210との値が不一致であると、リード側ライトポインタインクリメント214を有効化する(214=「1」)。一方で、ライト側ライトポインタ211の値と、リード側ライトポインタ210との値が不一致であると、リード側ライトポインタインクリメント214は無効化される(214=「0」)。 The configuration of the write side write pointer synchronization unit 209 shown in FIG. The read-side coincidence detection unit 213 compares the value of the write-side write pointer 211 synchronized on the read side according to the read clock RCLK with the value of the read-side write pointer 210. If the value of the write-side write pointer 211 and the value of the read-side write pointer 210 do not match, the read-side coincidence detection unit 213 enables the read-side write pointer increment 214 (214=“1”). On the other hand, if the value of the write-side write pointer 211 and the value of the read-side write pointer 210 do not match, the read-side write pointer increment 214 is invalidated (214="0").
 リード側ライトポインタインクリメント214が有効(=「1」)である状態では、リード側ライトポインタ演算部212は、リードクロックRCLKの1サイクル毎に、リード側ライトポインタ210(フラグ部wpf,ポインタ部wpp)をインクリメントする。リード側ライトポインタ210が、リード側で同期化されたライト側ライトポインタ211に追いついて両者が一致すると、リード側ライトポインタインクリメント214は、無効(=「0」)となり、リード側ライトポインタ210のインクリメントは行われない。即ち、リード側ライトポインタ210の値は維持される。 When the read-side write pointer increment 214 is valid (="1"), the read-side write pointer calculation unit 212 increments the read-side write pointer 210 (flag section wpf, pointer section wpp) every cycle of the read clock RCLK. ) is incremented. When the read-side write pointer 210 catches up with the write-side write pointer 211 synchronized on the read side and they match, the read-side write pointer increment 214 becomes invalid (="0"), and the read-side write pointer 210 becomes invalid. No increment is done. That is, the value of the read-side write pointer 210 is maintained.
 ここで、複数ビットから構成されるライト側ライトポインタ108についても、ライト側ライトポインタ同期化部209により、例えば、2段フリップフロップによって同期化されている。このため、ライト側ライトポインタ108の変化のタイミングと、リードクロックRCLKの立ち上がりエッジのタイミングとが重なった場合には、所謂、メタ・ステーブル状態となり、リード側で同期化されたライト側ライトポインタ211の値に、ライト側ライトポインタ108の値を、正しく転送できない可能性がある。これにより、誤った値のままでリード側ライトポインタ210をリード可否の判断に使用すると、メモリ300に未読出のデータが無いのにデータリードを実行してしまう可能性がある。 Here, the write side write pointer 108 composed of multiple bits is also synchronized by the write side write pointer synchronization unit 209 using, for example, a two-stage flip-flop. Therefore, if the timing of the change in the write side write pointer 108 and the timing of the rising edge of the read clock RCLK overlap, a so-called meta-stable state occurs, and the write side write pointer synchronized on the read side There is a possibility that the value of the write pointer 108 on the write side cannot be correctly transferred to the value of 211. As a result, if the read-side write pointer 210 is used to determine whether reading is possible with an incorrect value, there is a possibility that data reading will be executed even though there is no unread data in the memory 300.
 従って、本実施の形態においては、リードクロックRCLKに従って同期化されたライト側ライトポインタ211の値をそのままリード側ライトポインタ210として用いるのではなく、リード側で同期化されたライト側ライトポインタ211と、リード側ライトポインタ210とが異なることをリード側一致検出部213で検出した場合に、リード側で同期化されたライト側ライトポインタ211と、リード側ライトポインタ210とが等しくなるまで、リード側ライトポインタ210を1ずつ変化させる様に、ポインタ部rpp及びフラグ部rpfの値を変化させる。この様な処理を追加することで、リード側ライトポインタ210についても、ライト側ライトポインタ108に追従して、値を誤ることなく、ライト側からリード側へ転送することが可能となる。 Therefore, in this embodiment, instead of using the value of the write-side write pointer 211 synchronized according to the read clock RCLK as the read-side write pointer 210, the value of the write-side write pointer 211 synchronized on the read side is used as the read-side write pointer 210. , when the read side coincidence detection unit 213 detects that the read side write pointer 210 is different, the read side write pointer 210 is synchronized on the read side until the write side write pointer 211 synchronized on the read side becomes equal to the read side write pointer 210 The values of the pointer part rpp and the flag part rpf are changed so that the write pointer 210 is changed by 1. By adding such processing, the read-side write pointer 210 can follow the write-side write pointer 108 and transfer the value from the write side to the read side without making a mistake.
 尚、上述の様に、ライト側ライトポインタ同期化部209には、同期化回路として、2段フリップフロップを適用することが可能であるが、他の同期化方式によって、ライト側ライトポインタ同期化部209を構成することも可能である。更には、リード側一致検出部213によって、リード側で同期化されたライト側ライトポインタ211と、リード側ライトポインタ210との値の不一致時に、リード側ライトポインタ210の値をライト側での値に追従させる構成としているので、ライト側ライトポインタ同期化部209は、同期化回路を用いずに構成することも可能である。 As mentioned above, it is possible to apply a two-stage flip-flop as a synchronization circuit to the write-side write pointer synchronization unit 209, but it is also possible to synchronize the write-side write pointer using other synchronization methods. It is also possible to configure the section 209. Furthermore, the read side coincidence detection unit 213 changes the value of the read side write pointer 210 to the value on the write side when the values of the write side write pointer 211 synchronized on the read side and the read side write pointer 210 do not match. Since the write-side write pointer synchronization unit 209 can be configured to follow the synchronization circuit, the write-side write pointer synchronization unit 209 can also be configured without using a synchronization circuit.
 次に、図6を用いて、メモリライト回路101からメモリリード回路201へのライトポインタの転送処理の具体例を説明する。図6中では、ライト側ライトポインタ108、リード側で同期化されたライト側ライトポインタ211、及び、リード側ライトポインタ210のそれぞれについて、図4と同様に、フラグ部wpf及びポインタ部wppの値を「wpf-wpp」と表記する。 Next, a specific example of the process of transferring the write pointer from the memory write circuit 101 to the memory read circuit 201 will be described using FIG. 6. In FIG. 6, the values of the flag part wpf and pointer part wpp are shown for each of the write side write pointer 108, the write side write pointer 211 synchronized on the read side, and the read side write pointer 210, as in FIG. is written as "wpf-wpp".
 図6において、初期状態では、ライト側ライトポインタ108は、フラグ部wpf=0、ポインタ部wpp=3であり(「0-3」)、リード側で同期化されたライト側ライトポインタ211及びリード側ライトポインタ210についても同様に、フラグ部wpf=0、ポインタ部wpp=3となっている(「0-3」)。即ち、メモリリード回路201及びメモリライト回路101の間で、ライトポインタは、正しく共通の値が認識された状態となっている。 In FIG. 6, in the initial state, the write side write pointer 108 has a flag part wpf=0 and a pointer part wpp=3 ("0-3"), and the write side write pointer 211 and the read side write pointer 108 are synchronized on the read side. Similarly, for the side write pointer 210, the flag portion wpf=0 and the pointer portion wpp=3 (“0-3”). That is, the write pointers are in a state where a common value is correctly recognized between the memory read circuit 201 and the memory write circuit 101.
 この状態から、メモリライト回路101では、ライト側ライトポインタインクリメント106が有効(=「1」)となる期間では、ライトクロックWCLKの立上がりエッジ毎にメモリ300に対してデータライトが実行される。データライトの実行に応じて、ライト側ライトポインタ108が、立上がりエッジ毎(WCLK)にインクリメントされる。 From this state, in the memory write circuit 101, data is written to the memory 300 at every rising edge of the write clock WCLK during a period in which the write side write pointer increment 106 is valid (="1"). In response to data write execution, the write side write pointer 108 is incremented at every rising edge (WCLK).
 図6の例では、まず3個の立上がりエッジ(WCLK)のそれぞれにて3回のデータライトが実行されて、ライト側ライトポインタ108が、クロックエッジ毎にインクリメントされる。これにより、ライト側ライトポインタ108は、「0-3」から「0-6」まで変化する。その後、1回ずつのデータライトが二度行われることで、ライト側ライトポインタ108は、「0-6」から「1-0」に変化し、更に、「1-0」から「1-1」に変化する。 In the example of FIG. 6, data writes are performed three times at each of three rising edges (WCLK), and the write-side write pointer 108 is incremented at each clock edge. As a result, the write side write pointer 108 changes from "0-3" to "0-6". Thereafter, by performing one data write twice, the write side write pointer 108 changes from "0-6" to "1-0", and then from "1-0" to "1-1". ”.
 メモリリード回路201のライト側ライトポインタ同期化部209は、ライトクロックWCLKとは非同期のリードクロックRCLKの立上がりエッジに応答してライト側ライトポインタ108の値を取り込む。これにより、リードクロックRCLKに従ってリード側で同期化されたライト側ライトポインタ211が生成される。 The write-side write pointer synchronization unit 209 of the memory read circuit 201 takes in the value of the write-side write pointer 108 in response to the rising edge of the read clock RCLK, which is asynchronous with the write clock WCLK. As a result, a write side write pointer 211 synchronized on the read side is generated according to the read clock RCLK.
 しかしながら、図6の例では、時刻t10において、ライト側ライトポインタ108が「0-3」から「0-4」へ変化するタイミングと、リードクロックRCLKの立上がりエッジが重なる。これにより、メタ・ステーブル状態が発生するので、リード側で同期化されたライト側ライトポインタ211の値は一位に定まらず、不定値(図4と同様に、「≠0-3」と表記)となる。 However, in the example of FIG. 6, at time t10, the timing at which the write side write pointer 108 changes from "0-3" to "0-4" overlaps with the rising edge of the read clock RCLK. As a result, a meta-stable state occurs, and the value of the write pointer 211 on the write side synchronized on the read side is not fixed at the first position, but is an undefined value (similar to FIG. 4, "≠0-3"). notation).
 図6の例では、その他のライト側ライトポインタ108の変化タイミングは、リードクロックRCLKの立ち上がりエッジと重ならないため、ライト側ライトポインタ108の値が、リード側で同期化されたライト側ライトポインタ211に正しく導入されている。具体的には、ライト側ライトポインタ108の「0-4」、「0-5」、「0-6」、「1-0」、「1-1」は、時刻t11、t13、t15、t18、及び、t21の立上がりエッジ(RCLK)において、ライト側ライトポインタ同期化部209に取り込まれ、それぞれの次の立上がりエッジである時刻t12,t14、t16、t19、及び、t22において、リード側で同期化されたライト側ライトポインタ211に反映されている。上述の様に、ライト側ライトポインタ同期化部209についても2段フリップフロップでの構成を想定しているため、ライト側ライトポインタ108の値が、上述の遅れを伴って、リード側で同期化されたライト側ライトポインタ211に反映されている。 In the example of FIG. 6, since the change timing of the other write-side write pointers 108 does not overlap with the rising edge of the read clock RCLK, the value of the write-side write pointer 108 is changed to the write-side write pointer 211 synchronized on the read side. has been properly installed. Specifically, "0-4", "0-5", "0-6", "1-0", and "1-1" of the write side write pointer 108 correspond to times t11, t13, t15, and t18. At the rising edge (RCLK) of , and t21, it is taken into the write side write pointer synchronization unit 209, and synchronized on the read side at the respective next rising edges, times t12, t14, t16, t19, and t22. This is reflected in the converted write-side write pointer 211. As mentioned above, since the write side write pointer synchronization unit 209 is also assumed to have a two-stage flip-flop configuration, the value of the write side write pointer 108 is synchronized on the read side with the above-mentioned delay. It is reflected in the write side write pointer 211 that has been set.
 リード側ライトポインタインクリメント214は、リード側一致検出部213によって、リード側で同期化されたライト側ライトポインタ211がリード側ライトポインタ210と異なる値であるサイクルでは有効(=「1」)とされる。反対に、リード側で同期化されたライト側ライトポインタ211及びリード側ライトポインタ210が同じであるサイクルでは、リード側ライトポインタインクリメント214は、無効(=「0」)とされる。 The read-side write pointer increment 214 is determined by the read-side coincidence detection unit 213 to be valid (=“1”) in a cycle in which the write-side write pointer 211 synchronized on the read side has a different value from the read-side write pointer 210. Ru. On the contrary, in a cycle in which the write side write pointer 211 and the read side write pointer 210 that are synchronized on the read side are the same, the read side write pointer increment 214 is invalidated (="0").
 リード側ライトポインタ演算部212は、リード側ライトポインタインクリメント214が有効(=「1」)であることを確認すると、リードクロックRCLKの次の立上がりエッジにおいて、リード側ライトポインタ210をインクリメントする。一方で、リード側ライトポインタインクリメント214が無効(=「0」)であるときには、リード側ライトポインタ210の値は維持される。 When the read-side write pointer calculation unit 212 confirms that the read-side write pointer increment 214 is valid (="1"), it increments the read-side write pointer 210 at the next rising edge of the read clock RCLK. On the other hand, when the read-side write pointer increment 214 is invalid (="0"), the value of the read-side write pointer 210 is maintained.
 この結果、図6の例では、時刻t12、t15、t17、t20、及び、t23の、リードクロックRCLKの各立ち上がりエッジにおいて、リード側ライトポインタ210がインクリメントされる。これにより、リード側ライトポインタ210は、時刻t23において、ライト側ライトポインタ108と一致している、リード側で同期化されたライト側ライトポインタ211の値である「1-1」まで変化する。この様に、メタ・ステーブル状態となった不定値(「≠0-3」)が、そのままリード側で同期化されたライト側ライトポインタ211に取り込まれることがない。 As a result, in the example of FIG. 6, the read-side write pointer 210 is incremented at each rising edge of the read clock RCLK at times t12, t15, t17, t20, and t23. As a result, the read-side write pointer 210 changes to "1-1", which is the value of the write-side write pointer 211 synchronized on the read side and coincides with the write-side write pointer 108, at time t23. In this way, the undefined value (“≠0-3”) that has become meta-stable is not taken into the write-side write pointer 211 that is synchronized on the read side.
 更に、リード側ライトポインタ210の値はライト側ライトポインタ108の正しい値が取り込まれたライト側ライトポインタ211の値と不一致になると、リード側一致検出部213によってリード側ライトポインタインクリメント214が有効(=「1」)にされることで、リード側で同期化されたライト側ライトポインタ211の値に追いつくまで、インクリメントされる。 Further, when the value of the read-side write pointer 210 does not match the value of the write-side write pointer 211, which has taken in the correct value of the write-side write pointer 108, the read-side match detection unit 213 enables the read-side write pointer increment 214 ( = "1"), it is incremented until it catches up with the value of the write side write pointer 211 synchronized on the read side.
 この様に、リードクロックRCLKに同期して取り込まれたライト側ライトポインタ108の値をそのまま用いるのではなく、取り込まれたライトポインタの値(即ち、ライト側ライトポインタ211の値)とリード側ライトポインタ210との値が異なる場合に、リード側ライトポインタ210を1ずつ変化させる処理とすることで、メモリライト回路101でのデータライトの実行に伴うライト側ライトポインタ108の変化に追従させて、リード側ライトポインタ210の値を誤ることなく変化することができる。 In this way, instead of using the value of the write side write pointer 108 taken in synchronization with the read clock RCLK as is, the read side write By performing a process of changing the read-side write pointer 210 by 1 when the value differs from the pointer 210, the change in the write-side write pointer 108 accompanying the execution of data write in the memory write circuit 101 can be followed. The value of the read-side write pointer 210 can be changed without making a mistake.
 これにより、異なるクロックで動作するメモリライト回路101及びメモリリード回路201の間で、ライトポインタをメモリライト回路101からメモリリード回路201へ誤りなく転送することで、ポインタ値の誤転送を回避した正しいポインタ同期化を実現できる。この結果、メモリリード回路201におけるデータリードの可否判定を正確に行うことで、結果的に、メモリ300を介した、非同期クロック間での正しいデータの受け渡しが可能となる。 As a result, between the memory write circuit 101 and the memory read circuit 201 that operate with different clocks, the write pointer can be transferred from the memory write circuit 101 to the memory read circuit 201 without error, thereby avoiding erroneous transfer of pointer values. Pointer synchronization can be achieved. As a result, by accurately determining whether data can be read in the memory read circuit 201, it becomes possible to transfer correct data between asynchronous clocks via the memory 300.
 以上のように、本実施の形態によれば、非同期クロック間のポインタ転送において送信側ポインタの値の変化を検出して、受信側のポインタの値を1ずつ変化させることで追従させる処理を行うことで、誤転送を防止した正しくポインタの同期化を実行することできる。この結果、メモリ300を介した、正しいデータの受け渡しが可能となる。 As described above, according to the present embodiment, in pointer transfer between asynchronous clocks, a change in the value of the transmitting side pointer is detected and the receiving side pointer value is changed by 1 to follow it. By doing so, it is possible to correctly synchronize pointers while preventing erroneous transfers. As a result, correct data can be exchanged via the memory 300.
 又、特許文献2の様なグレイコードを用いないことから、ポインタが奇数個の場合にアクセスされるメモリの容量を1アドレス分大きいものを使用する必要がなくなり、回路規模や消費電力の増加を防止することができる。 In addition, since Gray code as in Patent Document 2 is not used, it is no longer necessary to use a memory capacity that is one address larger than the memory capacity accessed when the number of pointers is an odd number, which reduces the increase in circuit size and power consumption. It can be prevented.
 以上説明した本実施の形態において、ライトクロックWCLKは「第1クロック」の一実施例に対応し、リードクロックRCLKは「第2クロック」の一実施例に対応し、メモリライト回路101は「第1回路」の一実施例に対応し、メモリリード回路201は「第2回路」の一実施例に対応する。 In the embodiment described above, the write clock WCLK corresponds to an example of the "first clock," the read clock RCLK corresponds to an example of the "second clock," and the memory write circuit 101 corresponds to an example of the "second clock." The memory read circuit 201 corresponds to an embodiment of the "first circuit", and the memory read circuit 201 corresponds to an embodiment of the "second circuit".
 更に、メモリライト回路101において、ライト側ライトポインタ108は「第1ポインタ」、ライト側ライトポインタ生成部107は「第1ポインタ生成部」、リード側リードポインタ同期化部109は「第1同期化部」、ライト側リードポインタ演算部112は「第1回路側ポインタ値演算部」、ライト側一致検出部113は「第1一致検出部」の一実施例にそれぞれ対応する。又、ライト側リードポインタ110は、「第1回路側ポインタ値演算部で演算された第2ポインタ」に対応し、リード側リードポインタ同期化部109によって生成されたリード側リードポインタ111は、「第1同期化部で取り込まれた第2ポインタ」に対応する。 Further, in the memory write circuit 101, the write side write pointer 108 is a "first pointer", the write side write pointer generation section 107 is a "first pointer generation section", and the read side read pointer synchronization section 109 is a "first pointer". The write-side read pointer calculation unit 112 corresponds to an embodiment of the “first circuit-side pointer value calculation unit”, and the write-side coincidence detection unit 113 corresponds to an example of the “first coincidence detection unit”. Further, the write side read pointer 110 corresponds to "the second pointer calculated by the first circuit side pointer value calculation section", and the read side read pointer 111 generated by the read side read pointer synchronization section 109 corresponds to "the second pointer calculated by the first circuit side pointer value calculation section". "The second pointer fetched by the first synchronization unit".
 同様に、メモリリード回路201において、リード側リードポインタ208は「第2ポインタ」、リード側リードポインタ生成部207は「第2ポインタ生成部」、ライト側ライトポインタ同期化部209は「第2同期化部」、リード側ライトポインタ演算部212は「第2回路側ポインタ値演算部」、リード側一致検出部213は「第2一致検出部」の一実施例にそれぞれ対応する。又、リード側ライトポインタ210は、「第2回路側ポインタ値演算部で演算された第1ポインタ」に対応し、ライト側ライトポインタ同期化部209によって生成されたライト側ライトポインタ211は、「第2同期化部で取り込まれた第1ポインタ」に対応する。 Similarly, in the memory read circuit 201, the read-side read pointer 208 is a "second pointer," the read-side read pointer generation section 207 is a "second pointer generation section," and the write-side write pointer synchronization section 209 is a "second synchronization section." The read side write pointer calculation unit 212 corresponds to an example of a “second circuit side pointer value calculation unit”, and the read side coincidence detection unit 213 corresponds to an example of a “second coincidence detection unit”. Further, the read side write pointer 210 corresponds to "the first pointer calculated by the second circuit side pointer value calculation section", and the write side write pointer 211 generated by the write side write pointer synchronization section 209 corresponds to "the first pointer calculated by the second circuit side pointer value calculation section". "first pointer taken in by the second synchronization unit".
 尚、本実施の形態において、各ポインタは、データライト毎及びデータリード毎にインクリメントされる例を示したが、各ポインタがデータライト毎及びデータリード毎にデクリメントされる場合でも、本実施の形態に係るメモリ制御を適用することが可能である。この場合には、本実施の形態での説明において、「インクリメント」を「デクリメント」に適宜読み替えることで、同様のメモリ制御を実現することができる。即ち、本実施の形態において、各ポインタ値は、増加方向又は減少方向の予め定められた方向に1ずつ変化する。 In this embodiment, an example is shown in which each pointer is incremented every time data is written and every time data is read. However, even if each pointer is decremented every time data is written and read, this embodiment It is possible to apply memory control related to. In this case, similar memory control can be realized by appropriately replacing "increment" with "decrement" in the description of this embodiment. That is, in this embodiment, each pointer value changes by 1 in a predetermined direction, either increasing or decreasing.
 更に、本実施の形態では、メモリ300へのデータ格納数は外部へ出力されていないが、格納数を示す情報がメモリ制御装置100から外部に出力されてもよい。又、各回路ブロックの動作に要するクロックサイクル数は、上述の説明に限定されず、自由に設定することが可能である。又、以上では、ライトポインタの転送及びリードポインタの転送の両方、即ち、双方向のポインタ転送の各々に本実施の形態に係るポインタ転送を適用する例を説明したが、ライトポインタの転送及びリードポインタの転送の一方のみに、本実施の形態を適用することも可能である。例えば、ライトポインタの転送のみに、本実施の形態を適用する場合には、図1の構成例からライト側のライト側リードポインタ演算部112及びライト側一致検出部113の配置を省略することができる。反対に、リードポインタの転送のみに、本実施の形態を適用する場合には、図1の構成例からリード側のリード側ライトポインタ演算部212及びリード側一致検出部213の配置を省略することができる。 Furthermore, in this embodiment, the number of data stored in the memory 300 is not output to the outside, but information indicating the number of data stored may be output from the memory control device 100 to the outside. Furthermore, the number of clock cycles required for the operation of each circuit block is not limited to the above description and can be set freely. Furthermore, in the above, an example has been described in which the pointer transfer according to the present embodiment is applied to both write pointer transfer and read pointer transfer, that is, bidirectional pointer transfer. It is also possible to apply this embodiment to only one of the pointer transfers. For example, if this embodiment is applied only to write pointer transfer, the arrangement of the write-side read pointer calculation section 112 and the write-side coincidence detection section 113 on the write side can be omitted from the configuration example of FIG. can. On the other hand, if this embodiment is applied only to read pointer transfer, the arrangement of the read side write pointer calculation section 212 and the read side coincidence detection section 213 on the read side can be omitted from the configuration example of FIG. I can do it.
 又、本実施の形態では、メモリ300に対するデータライト及びデータリードを伴うものとしてメモリ制御を説明したが、非同期クロック間のポインタ転送の部分のみに対して本実施の形態を適用することで、本実施の形態に係るポインタ転送装置及びポインタ制御方法を提供することも可能である。この場合にも、双方向のポインタ転送のうちの一方向のポインタ転送のみに対して本実施の形態が適用される様に、ポインタ転送装置及びポインタ制御方法を構成することができる。 Furthermore, in this embodiment, memory control has been described as involving data writing and reading from the memory 300, but by applying this embodiment only to the part of pointer transfer between asynchronous clocks, this embodiment can be It is also possible to provide a pointer transfer device and a pointer control method according to the embodiment. In this case as well, the pointer transfer device and pointer control method can be configured so that the present embodiment is applied only to one-way pointer transfer out of two-way pointer transfer.
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本開示の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。 The embodiments disclosed this time should be considered to be illustrative in all respects and not restrictive. The scope of the present disclosure is indicated by the claims rather than the above description, and it is intended that all changes within the meaning and range equivalent to the claims are included.
 100 メモリ制御装置、101 メモリライト回路、103 ライト側アクセス制御部、104 ライト側ライトイネーブル、106 ライト側ライトポインタインクリメント、107 ライト側ライトポインタ生成部、108 ライト側ライトポインタ、109 リード側リードポインタ同期化部、110 ライト側リードポインタ、111 リード側リードポインタ(ライト回路側同期化)、112 ライト側リードポインタで演算部、113 ライト側一致検出部、114 ライト側リードポインタインクリメント、201 メモリリード回路、203 リード側アクセス制御部、204 リード側リードイネーブル、206 リード側リードポインタインクリメント、207 リード側リードポインタ生成部、208 リード側リードポインタ、209 ライト側ライトポインタ同期化部、210 リード側ライトポインタ、211 ライト側ライトポインタ(リード回路側同期化)、212 リード側ライトポインタ演算部、213 リード側一致検出部、214 リード側ライトポインタインクリメント、300 メモリ、N メモリ深さ、RCLK リードクロック、RCMD リード指示、RDAT リードデータ、RPRM リード許可、WCLK ライトクロック、WCMD ライト指示、WDAT ライトデータ、WPRM ライト許可、rpf フラグ部(リードポインタ)、rpp ポインタ部(リードポインタ)、rpf フラグ部(ライトポインタ)、wpp ポインタ部(ライトポインタ)。 100 Memory control device, 101 Memory write circuit, 103 Write side access control unit, 104 Write side write enable, 106 Write side write pointer increment, 107 Write side write pointer generation unit, 108 Write side write pointer, 109 Read side read pointer synchronization conversion unit, 110 write side read pointer, 111 read side read pointer (write circuit side synchronization), 112 write side read pointer calculation unit, 113 write side coincidence detection unit, 114 write side read pointer increment, 201 memory read circuit, 203 Read side access control unit, 204 Read side read enable, 206 Read side read pointer increment, 207 Read side read pointer generation unit, 208 Read side read pointer, 209 Write side write pointer synchronization unit, 210 Read side write pointer, 211 Write side write pointer (read circuit side synchronization), 212 Read side write pointer calculation unit, 213 Read side coincidence detection unit, 214 Read side write pointer increment, 300 Memory, N memory depth, RCLK read clock, RCMD read instruction, RDAT read data, RPRM read permission, WCLK write clock, WCMD write instruction, WDAT write data, WPRM write permission, rpf flag section (read pointer), rpp pointer section (read pointer), rpf flag section (write pointer), wpp pointer part (light pointer).

Claims (12)

  1.  第1クロックに従った第1回路による第1動作の実行毎に第1ポインタを、増加方向又は減少方向の予め定められた方向に1ずつ変化させる第1ポインタ生成部と、
     第2クロックに従った第2回路による第2動作の実行毎に第2ポインタを前記予め定められた方向に1ずつ変化させる第2ポインタ生成部と、
     前記第1クロックに同期して前記第2ポインタ生成部による前記第2ポインタの値を前記第1回路側に取り込む第1同期化部と、
     前記第1回路側における前記第2ポインタの値を演算する第1回路側ポインタ値演算部と、
     前記第1回路側ポインタ値演算部で演算されている前記第2ポインタの値と、前記第1同期化部で取り込まれた前記第2ポインタの値との一致比較を実行する第1一致検出部とを備え、
     前記第1回路側ポインタ値演算部は、前記第1一致検出部で不一致が検出される間は、前記第1クロックのサイクル毎に、前記第2ポインタの値を前記予め定められた方向に1ずつ変化させる一方で、前記第1一致検出部で一致が検出されたときは前記第2ポインタの値を維持する、ポインタ転送装置。
    a first pointer generation unit that changes the first pointer by one in a predetermined direction of increasing or decreasing each time the first circuit executes the first operation according to the first clock;
    a second pointer generation unit that changes the second pointer by one in the predetermined direction each time a second operation is performed by a second circuit according to a second clock;
    a first synchronization unit that imports the value of the second pointer from the second pointer generation unit into the first circuit side in synchronization with the first clock;
    a first circuit side pointer value calculation unit that calculates the value of the second pointer on the first circuit side;
    a first coincidence detection section that performs a coincidence comparison between the value of the second pointer calculated by the first circuit side pointer value calculation section and the value of the second pointer taken in by the first synchronization section; and
    The first circuit-side pointer value calculation section changes the value of the second pointer by 1 in the predetermined direction for each cycle of the first clock while a mismatch is detected by the first coincidence detection section. The pointer transfer device maintains the value of the second pointer when a match is detected by the first match detector.
  2.  前記第2クロックに同期して前記第1ポインタ生成部による前記第1ポインタの値を前記第2回路側に取り込む第2同期化部と、
     前記第2回路側における前記第1ポインタの値を演算する第2回路側ポインタ値演算部と、
     前記第2回路側ポインタ値演算部で演算されている前記第1ポインタの値と、前記第2同期化部で取り込まれた前記第1ポインタの値との一致比較を実行する第2一致検出部とを更に備え、
     前記第2回路側ポインタ値演算部は、前記第2一致検出部で不一致が検出される間は、前記第2クロックのサイクル毎に、前記第1ポインタの値を前記予め定められた方向に1ずつ変化させる一方で、前記第2一致検出部で一致が検出されたときは前記第1ポインタの値を維持する、請求項1記載のポインタ転送装置。
    a second synchronization unit that imports the value of the first pointer from the first pointer generation unit into the second circuit side in synchronization with the second clock;
    a second circuit side pointer value calculation unit that calculates the value of the first pointer on the second circuit side;
    a second coincidence detection section that performs a coincidence comparison between the value of the first pointer being computed by the pointer value computing section on the second circuit side and the value of the first pointer taken in by the second synchronization section; further comprising:
    The second circuit-side pointer value calculation section changes the value of the first pointer by 1 in the predetermined direction for each cycle of the second clock while a mismatch is detected by the second coincidence detection section. 2. The pointer transfer device according to claim 1, wherein the pointer transfer device maintains the value of the first pointer when a match is detected by the second match detector.
  3.  請求項1に記載されたポイント転送装置を備え、
     前記第1回路による前記第1動作は、メモリへのデータ書込及び前記メモリからのデータ読出の一方の動作であり、
     前記第2回路による前記第2動作は、前記データ書込及び前記データ読出の他方の動作であり、
     前記第1ポインタは、前記一方の動作の対象となる前記メモリのアドレスを示し、
     前記第2ポインタは、前記他方の動作の対象となる前記メモリのアドレスを示す、メモリ制御装置。
    Comprising the point transfer device according to claim 1,
    The first operation by the first circuit is one of writing data to a memory and reading data from the memory,
    The second operation by the second circuit is the other operation of the data write and the data read,
    the first pointer indicates an address of the memory that is a target of the one operation;
    The second pointer indicates an address of the memory that is a target of the other operation.
  4.  請求項2に記載されたポイント転送装置を備え、
     前記第1回路による前記第1動作は、メモリへのデータ書込であり、
     前記第2回路による前記第2動作は、前記メモリからのデータ読出であり、
     前記第1ポインタは、前記データ書込の対象となる前記メモリのアドレスを示し、
     前記第2ポインタは、前記データ読出の対象となる前記メモリのアドレスを示す、メモリ制御装置。
    Comprising the point transfer device according to claim 2,
    The first operation by the first circuit is writing data to a memory,
    The second operation by the second circuit is reading data from the memory,
    the first pointer indicates an address of the memory to which the data is written;
    The second pointer indicates an address of the memory from which the data is to be read.
  5.  前記第1回路は、前記第1ポインタ生成部によって生成された前記第1ポインタの値と、前記第1回路側ポインタ値演算部によって演算される前記第2ポインタの値と、前記メモリのアドレス数に相当するメモリ深さとに基づいて、前記メモリに対する前記データ書込の可能回数を算出する、請求項4記載のメモリ制御装置。 The first circuit calculates the value of the first pointer generated by the first pointer generation unit, the value of the second pointer calculated by the first circuit side pointer value calculation unit, and the number of addresses of the memory. 5. The memory control device according to claim 4, wherein the possible number of times the data can be written to the memory is calculated based on a memory depth corresponding to .
  6.  前記第2回路は、前記第2ポインタ生成部によって生成された前記第2ポインタの値と、前記第2回路側ポインタ値演算部によって演算された前記第1ポインタの値と、前記メモリのアドレス数に相当するメモリ深さとに基づいて、前記メモリに対する前記データ読出の可能回数を算出する、請求項4記載のメモリ制御装置。 The second circuit calculates the value of the second pointer generated by the second pointer generation unit, the value of the first pointer calculated by the second circuit side pointer value calculation unit, and the number of addresses of the memory. 5. The memory control device according to claim 4, wherein the possible number of times the data can be read from the memory is calculated based on a memory depth corresponding to .
  7.  第1クロックに従って第1回路で第1動作が実行されるとともに、第2クロックに従って第2回路で第2動作が実行される下でのポインタ転送方法であって、
     前記第1動作が実行される毎に前記第1回路側で第1ポインタを増加方向又は減少方向の予め定められた方向に1ずつ変化させるステップと、
     前記第2動作が実行される毎に前記第2回路側で第2ポインタを前記予め定められた方向に1ずつ変化させるステップと、
     前記第1クロックに同期して前記第2回路側での前記第2ポインタの値を前記第1回路側に取り込むステップと、
     前記第1回路側における前記第2ポインタの値を演算するステップと、
     前記第1回路側で演算されている前記第2ポインタの値と、前記第2回路側から取り込まれた前記第2ポインタの値との一致比較を実行するステップとを備え、
     前記第2ポインタの値を演算するステップは、
     前記一致比較を実行するステップにおいて不一致が検出される間は、前記第1クロックのサイクル毎に、前記第2ポインタの値を前記予め定められた方向に1ずつ変化させるステップと、
     前記一致比較を実行するステップにおいて一致が検出されると前記第2ポインタの値を維持するステップとを含む、ポインタ転送方法。
    A pointer transfer method in which a first operation is executed in a first circuit according to a first clock, and a second operation is executed in a second circuit according to a second clock, the method comprising:
    changing a first pointer by one in a predetermined direction of increasing or decreasing on the first circuit side each time the first operation is executed;
    changing a second pointer by one in the predetermined direction on the second circuit side each time the second operation is executed;
    fetching the value of the second pointer on the second circuit side into the first circuit side in synchronization with the first clock;
    calculating the value of the second pointer on the first circuit side;
    comprising the step of performing a match comparison between the value of the second pointer calculated on the first circuit side and the value of the second pointer taken in from the second circuit side,
    The step of calculating the value of the second pointer includes:
    While a mismatch is detected in the step of performing the coincidence comparison, changing the value of the second pointer by 1 in the predetermined direction for each cycle of the first clock;
    and maintaining the value of the second pointer when a match is detected in the step of performing the match comparison.
  8.  前記第2クロックに同期して、前記第1回路側での前記第1ポインタの値を前記第2回路側に取り込むステップと、
     前記第2回路側における前記第1ポインタの値を演算するステップと、
     前記第2回路側で演算されている前記第1ポインタの値と、前記第1回路側から取り込まれた前記第1ポインタの値との一致比較を実行するステップとを更に備え、
     前記第1ポインタの値を演算するステップは、
     前記一致比較を実行するステップにおいて不一致が検出される間は、前記第2クロックのサイクル毎に、前記第1ポインタの値を前記予め定められた方向に1ずつ変化させるステップと、
     前記一致比較を実行するステップにおいて一致が検出されると前記第1ポインタの値を維持するステップとを含む、請求項7記載のポインタ転送方法。
    importing the value of the first pointer on the first circuit side into the second circuit side in synchronization with the second clock;
    calculating the value of the first pointer on the second circuit side;
    further comprising the step of performing a match comparison between the value of the first pointer calculated on the second circuit side and the value of the first pointer taken in from the first circuit side,
    The step of calculating the value of the first pointer includes:
    While a mismatch is detected in the step of performing the coincidence comparison, changing the value of the first pointer by 1 in the predetermined direction for each cycle of the second clock;
    8. The pointer transfer method according to claim 7, further comprising the step of maintaining the value of the first pointer when a match is detected in the step of performing the match comparison.
  9.  前記第1回路による前記第1動作は、メモリへのデータ書込及び前記メモリからのデータ読出の一方の動作であり、
     前記第2回路による前記第2動作は、前記データ書込及び前記データ読出の他方の動作であり、
     前記第1ポインタは、前記一方の動作の対象となる前記メモリのアドレスを示し、
     前記第2ポインタは、前記他方の動作の対象となる前記メモリのアドレスを示す、請求項7記載のポインタ転送方法。
    The first operation by the first circuit is one of writing data to a memory and reading data from the memory,
    The second operation by the second circuit is the other operation of the data write and the data read,
    the first pointer indicates an address of the memory that is a target of the one operation;
    8. The pointer transfer method according to claim 7, wherein said second pointer indicates an address of said memory that is a target of said other operation.
  10.  前記第1回路による前記第1動作は、メモリへのデータ書込であり、
     前記第2回路による前記第2動作は、前記メモリからのデータ読出であり、
     前記第1ポインタは、前記データ書込の対象となる前記メモリのアドレスを示し、
     前記第2ポインタは、前記データ読出の対象となる前記メモリのアドレスを示す、請求項8記載のポインタ転送方法。
    The first operation by the first circuit is writing data to a memory,
    The second operation by the second circuit is reading data from the memory,
    the first pointer indicates an address of the memory to which the data is written;
    9. The pointer transfer method according to claim 8, wherein the second pointer indicates an address of the memory from which the data is to be read.
  11.  前記メモリに対する前記データ書込の可能回数は、前記第1回路側で生成された前記第1ポインタの値と、前記第1回路側で演算された前記第2ポインタの値と、前記メモリのアドレス数に相当するメモリ深さとに基づいて、前記第1回路側で算出される、請求項10記載のポインタ転送方法。 The possible number of times the data can be written to the memory is determined by the value of the first pointer generated on the first circuit side, the value of the second pointer calculated on the first circuit side, and the address of the memory. 11. The pointer transfer method according to claim 10, wherein the pointer transfer method is calculated on the first circuit side based on a memory depth corresponding to the number.
  12.  前記メモリに対する前記データ読出の可能回数は、前記第2回路側に生成された前記第2ポインタの値と、前記第2回路側で演算された前記第1ポインタの値と、前記メモリのアドレス数に相当するメモリ深さとに基づいて、前記第2回路側で算出される、請求項10記載のポインタ転送方法。 The possible number of times the data can be read from the memory is determined by the value of the second pointer generated on the second circuit side, the value of the first pointer calculated on the second circuit side, and the number of addresses of the memory. 11. The pointer transfer method according to claim 10, wherein the pointer transfer method is calculated on the second circuit side based on a memory depth corresponding to .
PCT/JP2022/010281 2022-03-09 2022-03-09 Pointer transfer device, pointer transfer method, and memory control device WO2023170815A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2024505719A JPWO2023170815A1 (en) 2022-03-09 2022-03-09
PCT/JP2022/010281 WO2023170815A1 (en) 2022-03-09 2022-03-09 Pointer transfer device, pointer transfer method, and memory control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/010281 WO2023170815A1 (en) 2022-03-09 2022-03-09 Pointer transfer device, pointer transfer method, and memory control device

Publications (1)

Publication Number Publication Date
WO2023170815A1 true WO2023170815A1 (en) 2023-09-14

Family

ID=87936296

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/010281 WO2023170815A1 (en) 2022-03-09 2022-03-09 Pointer transfer device, pointer transfer method, and memory control device

Country Status (2)

Country Link
JP (1) JPWO2023170815A1 (en)
WO (1) WO2023170815A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130121100A1 (en) * 2011-11-11 2013-05-16 Qualcomm Incorporated Device and method to perform memory operations at a clock domain crossing
JP2014071929A (en) * 2012-09-28 2014-04-21 Konica Minolta Inc Fifo circuit
US20160124889A1 (en) * 2014-11-03 2016-05-05 Chanpreet Singh Asynchronous fifo buffer with johnson code write pointer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130121100A1 (en) * 2011-11-11 2013-05-16 Qualcomm Incorporated Device and method to perform memory operations at a clock domain crossing
JP2014071929A (en) * 2012-09-28 2014-04-21 Konica Minolta Inc Fifo circuit
US20160124889A1 (en) * 2014-11-03 2016-05-05 Chanpreet Singh Asynchronous fifo buffer with johnson code write pointer

Also Published As

Publication number Publication date
JPWO2023170815A1 (en) 2023-09-14

Similar Documents

Publication Publication Date Title
US5267191A (en) FIFO memory system
US8510503B2 (en) Ring buffer circuit and control circuit for ring buffer circuit
CN101681249B (en) Fifo buffer
US8001409B2 (en) Synchronization device and methods thereof
US9164951B2 (en) Multiprocessor system, execution control method and execution control program
US5608867A (en) Debugging system using virtual storage means, a normal bus cycle and a debugging bus cycle
JP2010015667A (en) Data transfer circuit and semiconductor memory device equipped with the same
US6802036B2 (en) High-speed first-in-first-out buffer
US8412883B2 (en) Memory controller and associated control method
JP2004062630A (en) Fifo memory and semiconductor device
WO2023170815A1 (en) Pointer transfer device, pointer transfer method, and memory control device
Suhaib et al. Dataflow architectures for GALS
US5355113A (en) Serialized difference flag circuit
CN107133184B (en) Configurable state machine implementation method, configurable state machine and terminal equipment
CN209765494U (en) Asynchronous FIFO device
US10592395B2 (en) Control system and method of memory access
CN103377029A (en) Parametric universal FIFO control method
JP2014071929A (en) Fifo circuit
JPS60181851A (en) Partial writing control system
US8462167B2 (en) Memory access control circuit and image processing system
US7752506B1 (en) FIFO memory error circuit and method
KR100386253B1 (en) Write data conviction circuit for fpga register in using parity bit
CN115220790A (en) Data processing method, processor and electronic equipment
JP2001176262A (en) Asynchronous fifo circuit
CN116760985A (en) Video input circuit of DSC encoder, DSC encoder system and video input method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22930798

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2024505719

Country of ref document: JP