JP2012137832A - Data transfer device and data transfer method - Google Patents

Data transfer device and data transfer method Download PDF

Info

Publication number
JP2012137832A
JP2012137832A JP2010288080A JP2010288080A JP2012137832A JP 2012137832 A JP2012137832 A JP 2012137832A JP 2010288080 A JP2010288080 A JP 2010288080A JP 2010288080 A JP2010288080 A JP 2010288080A JP 2012137832 A JP2012137832 A JP 2012137832A
Authority
JP
Japan
Prior art keywords
data
memory
determination information
read
sequence number
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2010288080A
Other languages
Japanese (ja)
Other versions
JP5667867B2 (en
Inventor
Jun Takehara
潤 竹原
Yoshitomi Sameda
芳富 鮫田
Naoya Onishi
直哉 大西
Hirotaka Sakai
宏隆 酒井
Nobuaki Yoshida
順陽 吉田
Takayuki Nitta
能之 新田
Atsushi Kojima
敦 児島
Mamoru Kato
守 加藤
Toshibumi Hayashi
俊文 林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2010288080A priority Critical patent/JP5667867B2/en
Publication of JP2012137832A publication Critical patent/JP2012137832A/en
Application granted granted Critical
Publication of JP5667867B2 publication Critical patent/JP5667867B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Static Random-Access Memory (AREA)
  • Information Transfer Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data transfer device capable of improving validity of data, and in which a writing side and a reading side can freely read/write, without constraint of access to each other.SOLUTION: A data transfer device comprises: a memory 11 composed of at least two surfaces; a data transmission unit 10 switching the memory 11 of a writing destination in a prescribed order and transmitting data in a prescribed period to write the data in the memory 11; a data reception unit 12 simultaneously receiving data from the memory including at least two surfaces in a period which does not depend on the period for writing; a determination information addition unit 13 adding determination information unique to each piece of data, to the data which the data transmission unit 12 transmits to the memory; and a determination information inspection unit 15 determining whether or not the data is valid using the determination information added to the data which the data reception unit 12 receives from the memory 11, and notifying the determination result to the data reception unit.

Description

本発明は、メモリへのデータの書き込みおよび読み出しが相互に依存することなく行い得るデータ伝送装置およびその方法に関する。   The present invention relates to a data transmission apparatus and method for writing and reading data to and from a memory without depending on each other.

例えば、随時更新されるデータを外部ネットワークから取り込み、演算処理部でそのデータを処理する装置が知られている。この装置は、受信したデータをメモリやストレージに一時蓄積し、演算処理部がメモリからデータを読み出して演算処理する。   For example, an apparatus is known in which data that is updated as needed is fetched from an external network and processed by an arithmetic processing unit. In this apparatus, received data is temporarily stored in a memory or storage, and an arithmetic processing unit reads the data from the memory and performs arithmetic processing.

この場合、メモリへの書き込み側と読み出し側との動作は、お互いの動作に依存せず自由に行いたいという要求がある。また、データの書き込み速度と読み出し速度が異なる、または周期が異なる場合はデータの入出力の為のポートを2つ設けたメモリ(RAM)であるデュアルポートメモリが用いられることがある。   In this case, there is a demand for the operations on the memory writing side and the memory reading side to be performed freely without depending on each other's operations. In addition, when the data writing speed and the reading speed are different or the periods are different, a dual port memory which is a memory (RAM) provided with two ports for data input / output may be used.

その一方で、高速で読み出し(リード)/書き込み(ライト)可能なSRAM(Static Random Access Memory)やSDRAM(Synchronous DRAM)などのメモリが主流となっている。このため、デュアルポートメモリは衰退しており、長期安定供給性に対する課題がある。また、デュアルポートメモリの両方のポートで同じアドレスのデータを同時に読み出し/書き込みされた場合、処理が競合しデータが不定となる場合がある。   On the other hand, memories such as SRAM (Static Random Access Memory) and SDRAM (Synchronous DRAM), which can be read (read) / written (written) at high speed, have become mainstream. For this reason, the dual port memory has declined, and there is a problem with long-term stable supply. In addition, when data of the same address is read / written simultaneously in both ports of the dual port memory, processing may conflict and the data may become indefinite.

SRAMやSDRAMを用いて、書き込み側と読み出し側との制御でデータラインを切替えて入出力する排他的アクセス制御を行う手法がある。書き込み側と読み出し側とから同時にアクセスが行われた場合、この手法ではいずれか一方はアクセスを待機しなければならない。   There is a method of performing exclusive access control using a SRAM or SDRAM to switch data lines and perform input / output by controlling between a writing side and a reading side. When accesses are made simultaneously from the writing side and the reading side, either one of them must wait for access in this method.

SRAM/SDRAMとデュアルポートメモリ両方の課題として、メモリに対する1回のアクセスサイクルでは、データのビット幅(8bit、16bitなど)より長いデータ長で有効な意味を持つデータ(「データ列」と言う。)の転送をする場合、あるデータ列のリードアクセス中に同じアドレス領域のデータ列へのライトアクセスによりデータが更新されると、読み出されたデータ列に古いデータ(前回書き込まれたデータ)と新しいデータ(今回書きこまれたデータ)とが混在してしまう。   As a problem of both the SRAM / SDRAM and the dual port memory, in one access cycle to the memory, data having a significant meaning with a data length longer than the data bit width (8 bits, 16 bits, etc.) is referred to as “data string”. ) Transfer, if data is updated by a write access to a data string in the same address area during a read access to a certain data string, the old data (previously written data) New data (data written this time) will be mixed.

そこで、従来、読み出されたデータフレームに今回書き換えられたデータと前回書き換えられたままのデータとが混在するか否かを判断するための技術が開示されている(例えば、特許文献1参照)。   Therefore, conventionally, a technique for determining whether or not data that has been rewritten this time and data that has been rewritten last time is mixed in the read data frame has been disclosed (see, for example, Patent Document 1). .

特開2003−32317号公報JP 2003-32317 A

データの混在を回避するため、メモリのアドレス領域を分割、または物理的に異なるメモリとすることでメモリの領域を2分割することが考えられる。これにより、片側のメモリ領域にライトアクセスしている場合は、もう一方のメモリ領域にリードアクセスすることができる。   In order to avoid the mixing of data, it is conceivable to divide the memory area into two parts by dividing the address area of the memory or by using physically different memories. As a result, when a write access is made to one memory area, a read access can be made to the other memory area.

例えば、データ列単位の書き込みが完了した後に読み出し側に面の切替えを許可し、有意なデータ列の更新中にはそのデータ列を読み出しさせないようにすることでデータの混在を回避する手法がとられる。   For example, there is a method of avoiding mixing of data by permitting surface switching on the reading side after completion of writing in units of data strings and not reading the data strings during a significant data string update. It is done.

しかし、この場合、データ列の書き込みが完了しないと読み出し側でメモリを切替えることができない。このため、ライトアクセスとリードアクセスはお互いの状況を確認しあわなければならないという制約がある。   However, in this case, the memory cannot be switched on the reading side unless writing of the data string is completed. For this reason, there is a restriction that write access and read access must confirm each other's situation.

本発明は上述した課題を解決するためになされたものであり、書き込み側と読み出し側とがお互いのアクセスに制約を受けず、自由にリードライトすることができ、データの有効性を向上させることができるデータ転送装置およびデータ転送方法を提供することを目的とする。   The present invention has been made to solve the above-described problem, and the writing side and the reading side are not restricted by each other's access and can be freely read and written to improve the effectiveness of data. An object of the present invention is to provide a data transfer apparatus and a data transfer method capable of performing the above.

本発明に係るデータ転送装置は、上述した課題を解決するために、少なくとも2面からなる複数のメモリと、書き込み先の前記メモリを所定の順番で切り替えて、かつ所定の周期でデータを送信し前記メモリに書き込ませるデータ送信部と、前記書き込みの周期に依存しない周期で、前記複数のメモリのうち少なくとも2面の前記メモリより同時に前記データを受信するデータ受信部と、前記データ送信部が前記メモリに送信する前記データに対して各データに固有な判定情報を付加する判定情報付加部と、前記データ受信部が前記メモリより受信する前記データに付加された前記判定情報を用いて前記データが有効であるか否かを判定し、判定結果を前記データ受信部に通知する判定情報検査部とを備えたことを特徴とする。   In order to solve the above-described problem, the data transfer device according to the present invention switches a plurality of memories having at least two surfaces and the write destination memory in a predetermined order and transmits data at a predetermined cycle. A data transmission unit for writing to the memory, a data reception unit for simultaneously receiving the data from the memory on at least two of the plurality of memories in a cycle independent of the cycle of the writing, and the data transmission unit A determination information adding unit for adding determination information unique to each data to the data to be transmitted to the memory, and the data using the determination information added to the data received from the memory by the data receiving unit. And a determination information inspection unit that determines whether the data is valid and notifies the data reception unit of the determination result.

本発明に係るデータ転送装置およびその方法においては、書き込み側と読み出し側とがお互いのアクセスに制約を受けず、自由にリードライトすることができる。また、データの有効性を向上させることができる。   In the data transfer apparatus and method according to the present invention, the writing side and the reading side can be freely read / written without being restricted by mutual access. In addition, the validity of the data can be improved.

本発明に係るデータ転送装置の第1実施形態を示すブロック図。1 is a block diagram showing a first embodiment of a data transfer apparatus according to the present invention. デュアルポートメモリの構成例を示す説明図。Explanatory drawing which shows the structural example of a dual port memory. SRAMまたはSDRAMを用いてデュアルポートメモリ相当の機能を実現したものの構成例を示す説明図。Explanatory drawing which shows the structural example of what implement | achieved the function equivalent to a dual port memory using SRAM or SDRAM. データ転送装置の第1のメモリ、判定情報生成付加部、および判定情報抽出検査部を特に示す説明図。Explanatory drawing which shows especially the 1st memory of a data transfer apparatus, the determination information production | generation addition part, and the determination information extraction test | inspection part. 第1のメモリのメモリ構造の一例を示す図。The figure which shows an example of the memory structure of a 1st memory. データ列1〜3の第1のメモリへのデータ列配置例を示す図。The figure which shows the example of data string arrangement | positioning to the 1st memory of the data strings 1-3. シーケンス番号および反転シーケンス番号がヘッダーおよびフッターに付加されたデータ列(データ列2)の第1のメモリへのデータ列配置例を示す図。The figure which shows the example of data sequence arrangement | positioning to the 1st memory of the data sequence (data sequence 2) with which the sequence number and the reverse sequence number were added to the header and footer. データ列2の同期性が保たれない場合の例を時間軸に沿って示した図。The figure which showed the example when the synchronism of the data sequence 2 is not maintained along the time-axis. 第1のメモリ内のデータ列2の同期性が保たれない場合のデータ列配置例を示す図。The figure which shows the example of data sequence arrangement | positioning in case the synchronism of the data sequence 2 in a 1st memory is not maintained. 比較例としてのデータ転送装置を示す説明図。Explanatory drawing which shows the data transfer apparatus as a comparative example. メモリのライト側およびリード側の切替タイミングが依存関係にある場合のタイミング図。The timing diagram in case the switching timing of the write side and read side of a memory has a dependency. メモリのライト側およびリード側の切替タイミングが依存関係にない場合のタイミング図。The timing diagram when the switching timing of the write side and read side of the memory is not dependent. 第1実施形態におけるデータ転送装置のライトアクセスおよびリードアクセスのタイミング図。The timing diagram of the write access of the data transfer apparatus in 1st Embodiment, and read access. 第1実施形態におけるデータ転送装置のライト側の処理を説明するフローチャート。5 is a flowchart for explaining processing on the write side of the data transfer apparatus according to the first embodiment. 第1実施形態におけるデータ転送装置のリード側の処理を説明するフローチャート。6 is a flowchart for explaining processing on the read side of the data transfer apparatus according to the first embodiment. 同時に2面のメモリより読み出しを行う場合のデータ転送装置のライトアクセスおよびリードアクセスのタイミング図。The timing diagram of the write access and read access of a data transfer apparatus in the case of reading from two memories simultaneously. 同時に2面のメモリより読み出しを行う場合であって、同期性が確保されない場合のデータ転送装置のライトアクセスおよびリードアクセスのタイミング図。FIG. 5 is a timing chart of write access and read access of the data transfer apparatus when reading is performed from two memories at the same time and synchronization is not ensured. 同時に2面のメモリより読み出しを行う場合であって、同期性が確保され得る場合のデータ転送装置のライトアクセスおよびリードアクセスのタイミング図。FIG. 4 is a timing chart of write access and read access of the data transfer apparatus when reading is performed from two memories at the same time and synchronization can be ensured. データ転送装置が2面のメモリに対し同時に読み出しを行う場合のリード側の処理を説明するフローチャート。The flowchart explaining the process by the side of a read in case a data transfer apparatus reads simultaneously with respect to the memory of 2 surfaces. データの有効性を判定するためのデータのデータ列配置例を示す図。The figure which shows the data string arrangement | positioning example of the data for determining the validity of data. 本発明に係るデータ転送装置の第2実施形態を示すブロック図。The block diagram which shows 2nd Embodiment of the data transfer apparatus which concerns on this invention. 第2実施形態におけるデータ転送装置のライトアクセスおよびリードアクセスのタイミング図。The timing diagram of the write access and read access of the data transfer apparatus in 2nd Embodiment.

本発明に係るデータ転送装置およびその方法の各実施形態について、図面を参照して説明する。   Embodiments of a data transfer apparatus and method according to the present invention will be described with reference to the drawings.

[第1実施形態]
図1は、本発明に係るデータ転送装置の第1実施形態を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing a first embodiment of a data transfer apparatus according to the present invention.

データ転送装置1は、例えば外部ネットワークから受信した随時更新されるデータをデータ受信部10において受信し、第1のメモリ11a〜第3のメモリ11c(第1〜第3のメモリ11a〜11cを特に区別しない場合には単に「メモリ11」という。)にデータを一時蓄積する。データ転送装置1は、メモリ11に蓄積されたデータを演算処理部12により読み出して演算処理する。   The data transfer apparatus 1 receives, for example, data updated from time to time received from an external network at the data receiving unit 10, and the first memory 11a to the third memory 11c (particularly the first to third memories 11a to 11c). If there is no distinction, the data is simply temporarily stored in “memory 11”). The data transfer device 1 reads out the data stored in the memory 11 by the arithmetic processing unit 12 and performs arithmetic processing.

データ受信部10は、外部ネットワークより、随時更新されるデータを受信する。データ受信部10は、受信したデータを判定情報生成付加部13に供給する。データ受信部10は、データを書き込むアドレス(アドレスA)と、メモリ11に書き込み(ライト)を行わせるための制御信号(ライトA)とをセレクター(SELA)14aを介してメモリ11へ供給する。また、データ受信部10は、セレクター14aに対してデータを記憶するメモリ11の切替を指示するための面切替信号(面切替A)を供給する。第1実施形態においては、データ受信部10は、書き込み先のメモリを所定の順番で切り替えて、かつ所定の周期でデータを送信し、メモリ11にデータを書き込ませるデータ送信部である。   The data receiving unit 10 receives data updated as needed from an external network. The data receiving unit 10 supplies the received data to the determination information generation / addition unit 13. The data receiving unit 10 supplies an address for writing data (address A) and a control signal (write A) for causing the memory 11 to write (write) to the memory 11 via the selector (SELA) 14a. Further, the data receiving unit 10 supplies a surface switching signal (surface switching A) for instructing the selector 14a to switch the memory 11 that stores data. In the first embodiment, the data receiving unit 10 is a data transmitting unit that switches the write destination memory in a predetermined order, transmits data at a predetermined cycle, and writes the data to the memory 11.

判定情報生成付加部13は、判定情報としてのシーケンス番号および反転シーケンス番号を生成し、データ受信部10より供給されたデータに付加してセレクター14aに供給する。   The determination information generation / addition unit 13 generates a sequence number and an inverted sequence number as determination information, adds them to the data supplied from the data reception unit 10 and supplies the data to the selector 14a.

セレクター14aは、データ受信部10より通知された面切替信号に基づいてデータを蓄積するメモリ11を切り替える。   The selector 14 a switches the memory 11 that stores data based on the surface switching signal notified from the data receiving unit 10.

メモリ11は、書き込みおよび読み出しが同時に実行可能であるメモリである。メモリ11は、例えばデュアルポートメモリ、またはSRAM(Static Random Access Memory)やSDRAM(Synchronous DRAM)などのメモリを用いてデュアルポートメモリ相当の機能を実現させたもので構成される。メモリ11は、少なくとも3面設けられ、それぞれが物理的に異なるメモリである。   The memory 11 is a memory that can execute writing and reading simultaneously. The memory 11 is configured by, for example, a dual port memory or a memory that realizes a function equivalent to a dual port memory using a memory such as SRAM (Static Random Access Memory) or SDRAM (Synchronous DRAM). The memory 11 is provided with at least three surfaces, and each is a physically different memory.

図2は、デュアルポートメモリ20の構成例を示す説明図である。   FIG. 2 is an explanatory diagram showing a configuration example of the dual port memory 20.

図3は、SRAMまたはSDRAMを用いてデュアルポートメモリ相当の機能を実現したものの構成例を示す説明図である。   FIG. 3 is an explanatory diagram showing an example of the configuration in which a function equivalent to a dual port memory is realized using SRAM or SDRAM.

デュアルポートメモリ20は、データの入出力の為のポートを2つ設けたメモリ(RAM)である。   The dual port memory 20 is a memory (RAM) provided with two ports for data input / output.

「SRAMまたはSDRAMを用いてデュアルポートメモリ相当の機能を実現した」メモリは、SRAM、SDRAMのように書き込みおよび読み出しを同時には行えないメモリ21であっても、A側のデータ・制御バスとB側のデータ・制御バスとの調停を行うアクセス調停部22を有することによりデュアルポートメモリ相当の機能を実現することができる。   Even if the memory “which realized the function equivalent to the dual port memory using SRAM or SDRAM” is the memory 21 that cannot be written and read simultaneously like SRAM and SDRAM, the data / control bus on the A side and B By having the access arbitration unit 22 that performs arbitration with the data / control bus on the side, a function equivalent to a dual port memory can be realized.

例えば、アクセス調停部22は、A側のアクセス発生時にはA側にメモリ21のアクセス権を与え、B側のアクセス発生時にはB側にメモリ21のアクセス権を与える。また、アクセス調停部22は、一方のアクセス時に他方のアクセスが発生した場合、他方のアクセスを一時待機させ、一方のアクセス終了後に他方にアクセス権を与える。アクセス権の与え方は、先着優先であったり、必ず交互であったりする。   For example, the access arbitration unit 22 gives the access right of the memory 21 to the A side when an access on the A side occurs, and gives the access right of the memory 21 to the B side when an access on the B side occurs. In addition, when the other access occurs during one access, the access arbitration unit 22 temporarily waits for the other access, and gives an access right to the other after the end of the one access. The method of giving the access right is first-come-first-served basis or always alternates.

判定情報抽出検査部15a〜15c(特に区別しない場合は単に「判定情報抽出検査部15」という。)は、判定情報生成付加部13によりデータ列に付加されたシーケンス番号および反転シーケンス番号を抽出し、データ列が有効であるか否かを検査し、その結果を演算処理部12に供給する。   Determination information extraction / inspection units 15a to 15c (simply referred to as “determination information extraction / inspection unit 15” unless otherwise distinguished) extract the sequence number and inverted sequence number added to the data string by the determination information generation / addition unit 13. The data string is checked to see if it is valid, and the result is supplied to the arithmetic processing unit 12.

セレクター(SELB)14bは、演算処理部12より供給された面切替信号(面切替B)に基づいてデータを読み出すメモリの切替を行う。   The selector (SELB) 14b performs switching of the memory from which data is read based on the surface switching signal (surface switching B) supplied from the arithmetic processing unit 12.

演算処理部12は、セレクター14bを介してデータ列をメモリ11より読み出し(リードし)、読み出されたデータ列に対して所要の演算処理を行う。演算処理部12は、データを読み出すアドレス(アドレスB)と、メモリ11より読み出しを行わせるための制御信号(リードB)とをセレクター(SELB)14bを介してメモリ11へ供給する。演算処理部12は、データ受信部10の受信タイミング(書き込みタイミング)に依存することなく、任意のタイミング(周期)でデータの読み出しを行うようになっている。第1実施形態においては、演算処理部12は、書き込みの周期に依存しない周期で、少なくとも2面のメモリより同時にデータを受信するデータ受信部である。   The arithmetic processing unit 12 reads (reads) the data string from the memory 11 via the selector 14b, and performs a required arithmetic process on the read data string. The arithmetic processing unit 12 supplies an address for reading data (address B) and a control signal (read B) for reading data from the memory 11 to the memory 11 via the selector (SELB) 14b. The arithmetic processing unit 12 reads data at an arbitrary timing (cycle) without depending on the reception timing (write timing) of the data reception unit 10. In the first embodiment, the arithmetic processing unit 12 is a data receiving unit that simultaneously receives data from at least two memories in a cycle that does not depend on the write cycle.

次に、メモリ11、判定情報生成付加部13、および判定情報抽出検査部15の詳細について説明する。   Next, details of the memory 11, the determination information generation / addition unit 13, and the determination information extraction / inspection unit 15 will be described.

図4は、データ転送装置1の第1のメモリ11a、判定情報生成付加部13、および判定情報抽出検査部15aを特に示す説明図である。第1〜第3のメモリ11a〜11cおよび判定情報抽出検査部15a〜15cはそれぞれほぼ同様の構成であるため、図4においては第1のメモリ11aおよび判定情報抽出検査部15aのみを説明する。また、セレクター14aの記載は省略した。   FIG. 4 is an explanatory diagram specifically illustrating the first memory 11a, the determination information generation / addition unit 13, and the determination information extraction / inspection unit 15a of the data transfer apparatus 1. Since the first to third memories 11a to 11c and the determination information extraction / inspection units 15a to 15c have substantially the same configuration, only the first memory 11a and the determination information extraction / inspection unit 15a will be described in FIG. The description of the selector 14a is omitted.

図5は、第1のメモリ11aのメモリ構造の一例を示す図である。   FIG. 5 is a diagram illustrating an example of the memory structure of the first memory 11a.

図6は、データ列1〜3の第1のメモリ11aへのデータ列配置例を示す図である。   FIG. 6 is a diagram illustrating an example of data string arrangement of the data strings 1 to 3 in the first memory 11a.

第1のメモリ11aは、例えばアドレス0〜n−1(アドレスA0、A1、・・・、An−2、An−1)が割り当てられ各データ幅がkビット(0〜bk−1)からなるメモリである。第1のメモリ11aにデータ受信部10より供給されるデータ列(データのビット幅(ここではkビット)より長いデータ長で有効な意味を持つデータ)が直接蓄積された場合には、データ列1にはアドレスA0〜Ap−1、データ列2にはアドレスAp〜A2p−1、データ列3にはA2p〜A3p−1のアドレス領域が割り当てられる。   For example, addresses 0 to n-1 (addresses A0, A1,..., An-2, An-1) are assigned to the first memory 11a, and each data width is composed of k bits (0 to bk-1). It is memory. When a data string (data having a meaningful meaning with a data length longer than the data bit width (here, k bits)) directly stored in the first memory 11a is stored in the data string Address 1 is assigned addresses A0 to Ap-1, data string 2 is assigned addresses Ap to A2p-1, and data string 3 is assigned address areas A2p to A3p-1.

判定情報生成付加部13は、データ受信部10より供給されるライトデータAのヘッダー(先頭)にシーケンス番号を付加する。また、判定情報生成付加部13は、ヘッダーに付加されるシーケンス番号をビット反転させた反転シーケンス番号をライトデータAのフッター(最後尾)に付加する。すなわち、判定情報生成付加部13は、ヘッダーとフッターとが付加されたヘッダー・フッター付ライトデータを生成する。   The determination information generation / addition unit 13 adds a sequence number to the header (head) of the write data A supplied from the data reception unit 10. The determination information generation / addition unit 13 adds an inverted sequence number obtained by bit-inverting the sequence number added to the header to the footer (tail) of the write data A. That is, the determination information generation / addition unit 13 generates write data with a header / footer to which a header and a footer are added.

図7は、シーケンス番号および反転シーケンス番号がヘッダーおよびフッターに付加されたデータ列(データ列2)の第1のメモリ11aへのデータ列配置例を示す図である。   FIG. 7 is a diagram illustrating a data string arrangement example in the first memory 11a of the data string (data string 2) in which the sequence number and the inverted sequence number are added to the header and the footer.

シーケンス番号は、第1のメモリ11aの全領域において唯一特有の番号であり、同じアドレス領域でデータ列が更新される前後でデータの新旧が識別可能な特有の番号とする。例えば、第1のメモリ11aの全領域に10個のデータ列1〜10を割り当てる場合、データ列1のヘッダーにはデータを更新する度に0a、0b、0c・・・(ここでは16進数で表わすが実際には8ビットの情報である。)というシーケンス番号を付加し、フッターにはf5、f4、f3・・・という反転シーケンス番号を付加する。データ列2のヘッダーには1a、1b、1c・・・というシーケンス番号を付加し、フッターにはe5、e4、e3・・・、という反転シーケンス番号を付加する。   The sequence number is a unique number in the entire area of the first memory 11a, and is a unique number that can identify whether the data is new or old before and after the data string is updated in the same address area. For example, when 10 data strings 1 to 10 are allocated to the entire area of the first memory 11a, 0a, 0b, 0c... (In this case in hexadecimal numbers) each time data is updated in the header of the data string 1. (In fact, it is 8-bit information.) And an inverted sequence number of f5, f4, f3... Is added to the footer. The sequence number 1a, 1b, 1c,... Is added to the header of the data string 2, and the reverse sequence numbers e5, e4, e3,.

判定情報抽出検査部15aは、第1のメモリ11aから読み出すデータ列のヘッダーに付加されたシーケンス番号と、データ列と、フッターに付加された反転シーケンス番号とを順次読み出す。判定情報抽出検査部15aは、フッターに付加された反転シーケンス番号をさらにビット反転したデータとヘッダーに付加されたシーケンス番号とを比較し、これらのデータが一致するか否かを判定する。   The determination information extraction / inspection unit 15a sequentially reads the sequence number added to the header of the data string read from the first memory 11a, the data string, and the inverted sequence number added to the footer. The determination information extraction / inspection unit 15a compares data obtained by further bit-inverting the inverted sequence number added to the footer and the sequence number added to the header, and determines whether or not these data match.

図8は、データ列2の同期性が保たれない場合の例を時間軸に沿って示した図である。   FIG. 8 is a diagram illustrating an example in which the synchronization of the data string 2 is not maintained along the time axis.

図9は、第1のメモリ11a内のデータ列2の同期性が保たれない場合のデータ列配置例を示す図である。   FIG. 9 is a diagram illustrating a data string arrangement example when the synchronization of the data string 2 in the first memory 11a is not maintained.

ヘッダーに付加されたシーケンス番号とフッターに付加された反転シーケンス番号とは、判定情報生成付加部13により付加された時点では一致する。これに対し、図8に示すように、ヘッダーのシーケンス番号、データ列、フッターの反転シーケンス番号を順次読み出している最中に第1のメモリ11aに対してデータ列の書き込みが行われデータ列が更新される場合が起こり得る。   The sequence number added to the header and the inverted sequence number added to the footer match when added by the determination information generation / addition unit 13. On the other hand, as shown in FIG. 8, the data sequence is written to the first memory 11a while the header sequence number, the data sequence, and the inverted sequence number of the footer are being read sequentially. It can happen that it is updated.

具体的には、第1のメモリ11aに蓄積されたデータ列に対してリードアクセスが開始された直後に、リード速度より若干速い速度でライトアクセスが開始された。読み出し完了前に書き込みが完了したような場合、読み出しているデータに更新前の古いデータと更新後の新しいデータとが混在してしまう。   Specifically, immediately after the read access is started with respect to the data string stored in the first memory 11a, the write access is started at a speed slightly higher than the read speed. When writing is completed before reading is completed, old data before update and new data after update are mixed in the data being read.

なお、例えばリード側でデータ列nがリードされ、ライト側でデータ列n−1がライトされる場合には、このような問題は生じない。   For example, such a problem does not occur when the data string n is read on the read side and the data string n-1 is written on the write side.

この場合、図9に示すように、データ列2のデータは、更新前のデータと更新後のデータとが混在する。また、フッターに付加される反転シーケンス番号は、更新後の新しいライトデータに付与されたシーケンス番号がビット反転されたデータとなる。このため、ヘッダーのシーケンス番号とフッターの反転シーケンス番号をビット反転したデータとは不一致となる。   In this case, as shown in FIG. 9, the data in the data string 2 includes a mixture of data before update and data after update. The inverted sequence number added to the footer is data obtained by bit-inverting the sequence number assigned to the updated new write data. For this reason, the sequence number of the header does not match the data obtained by bit-inverting the inverted sequence number of the footer.

判定情報抽出検査部15aは、フッターに付加された反転シーケンス番号をさらにビット反転したデータとヘッダーに付加されたシーケンス番号とを比較し、これらのデータが一致すると判定した場合、読み出したデータは同期性が確保されており有効である旨の信号を演算処理部12に供給する。   The determination information extraction inspection unit 15a compares the data obtained by further inverting the inverted sequence number added to the footer with the sequence number added to the header, and determines that these data match, the read data is synchronized. A signal indicating that the performance is secured and effective is supplied to the arithmetic processing unit 12.

一方、判定情報抽出検査部15aは、これらのデータが不一致であると判定した場合、データの同期性は確保されていないと判定し、データは無効である旨の信号を演算処理部12に供給する。判定情報抽出検査部15aは、データとともにデータが無効である旨の信号を演算処理部12に供給してもよいし、無効である旨の信号のみを供給してもよい。   On the other hand, if the determination information extraction / inspection unit 15a determines that these data do not match, the determination information extraction / inspection unit 15a determines that the data synchronism is not secured, and supplies a signal indicating that the data is invalid to the arithmetic processing unit 12. To do. The determination information extraction / inspection unit 15a may supply a signal indicating that the data is invalid together with the data to the arithmetic processing unit 12 or may supply only a signal indicating that the data is invalid.

また、判定情報抽出検査部15aは、有効と判定されたデータ列のシーケンス番号を保持する。判定情報抽出検査部15aは、この保持されたシーケンス番号と次の周期で第1のメモリ11aより読み出されたデータに付加されたシーケンス番号とを比較する。判定情報抽出検査部15aは、保持するシーケンス番号と、読み出されたデータ列に付加されたシーケンス番号とが一致する場合、スキップ信号を演算処理部12に対して出力する。これにより、判定情報抽出検査部15aは、データが更新されておらず既に読み出し終えたデータと同一のデータが第1のメモリ11aに蓄積されていることを通知し、演算処理部12が不要な読み出しを行わないようにすることができる。   The determination information extraction / inspection unit 15a holds the sequence number of the data string determined to be valid. The determination information extraction inspection unit 15a compares the held sequence number with the sequence number added to the data read from the first memory 11a in the next cycle. The determination information extraction / inspection unit 15a outputs a skip signal to the arithmetic processing unit 12 when the stored sequence number matches the sequence number added to the read data string. Thereby, the determination information extraction inspection unit 15a notifies that the same data as the data that has not been updated and has already been read is accumulated in the first memory 11a, and the arithmetic processing unit 12 is unnecessary. It is possible to prevent reading.

なお、図1のデータ転送装置1は、データ受信部10がデータの送信側(ライト側)、演算処理部12がデータの受信側(リード側)である例を説明したが、もちろんライト側とリード側とを入れ替えることもできる。   In the data transfer apparatus 1 of FIG. 1, the example in which the data receiving unit 10 is the data transmission side (write side) and the arithmetic processing unit 12 is the data reception side (read side) has been described. You can also replace the lead side.

次に、データ転送装置1が書き込みおよび読み出しを行う際にメモリ11を切り替える場合の動作について説明する。   Next, an operation in the case where the memory 11 is switched when the data transfer apparatus 1 performs writing and reading will be described.

第1実施形態におけるデータ転送装置1の動作の説明に先立ち、想定され得るデータ転送装置の課題について説明する。   Prior to the description of the operation of the data transfer apparatus 1 in the first embodiment, a problem of the data transfer apparatus that can be assumed will be described.

図10は、比較例としてのデータ転送装置100を示す説明図である。データ転送装置100は、2面のメモリを有する。2面のメモリは、面切替信号によりいずれか一方のメモリがライト側、他方がリード側となるように切り替わる。デュアルポートメモリ101a、101bおよびセレクター102a、102bについては、図1のメモリ11およびセレクター14a、14bとほぼ同様である。   FIG. 10 is an explanatory diagram showing a data transfer apparatus 100 as a comparative example. The data transfer apparatus 100 has two memories. The two-plane memory is switched by the plane switching signal so that one of the memories is the write side and the other is the read side. The dual port memories 101a and 101b and the selectors 102a and 102b are substantially the same as the memory 11 and the selectors 14a and 14b in FIG.

図11は、メモリのライト側およびリード側の切替タイミングが依存関係にある場合のタイミング図である。図12は、メモリのライト側およびリード側の切替タイミングが依存関係にない場合のタイミング図である。   FIG. 11 is a timing chart when the switching timing of the write side and the read side of the memory has a dependency relationship. FIG. 12 is a timing chart when the switching timing of the write side and the read side of the memory is not dependent.

メモリ101a、101bはアドレス領域が分割され、または物理的に異なるメモリを有することによりメモリ領域が2分割されている。これにより、データ転送装置100は一方のメモリ領域にライトアクセスしている場合には、他方のメモリ領域にリードアクセスするようになっている。   In the memories 101a and 101b, the address area is divided, or the memory area is divided into two by having physically different memories. As a result, when the data transfer apparatus 100 has write access to one memory area, the data transfer apparatus 100 performs read access to the other memory area.

ライトおよびリードアクセスを行うメモリ領域の切替は、データ列単位の書き込みが完了した後に面切替信号によりリード側に面切替を許可することで行われる。これにより、図11に示すように、有意なデータ列の更新中には、そのデータ列を読み込みさせないようにライトアクセスとリードアクセスのタイミングとが同時に切り替わる。   Switching between memory areas for writing and reading access is performed by permitting surface switching to the read side by a surface switching signal after completion of writing in units of data strings. As a result, as shown in FIG. 11, during the update of a significant data string, the timing of write access and read access is switched simultaneously so that the data string is not read.

しかし、ライト側においてデータ列のライトアクセスが完了しないとリード側で面を切替えられないため、ライトアクセスとリードアクセスはお互いの状況を確認しあわなければならないという制約がある。   However, if the write access of the data string is not completed on the write side, the surface cannot be switched on the read side, so there is a restriction that the write access and the read access must confirm each other's situation.

一方、図12に示すように2面のデュアルポートメモリの面切替えをライト側とリード側で任意のタイミングで行う場合、図中矢印Aで示すライトアクセスとリードアクセスとが同一面で行われる区間のデータ列の同期性が確保できない。   On the other hand, as shown in FIG. 12, when the surface switching of the dual port memory of two surfaces is performed at an arbitrary timing on the write side and the read side, the write access and the read access indicated by the arrow A in the figure are performed on the same surface Cannot synchronize the data column.

これに対し、第1実施形態におけるデータ転送装置1は、メモリ11を3面設けることにより、読み出されたデータに更新前と更新後とのデータが混在することを防止、すなわち同期性を維持することができる。   On the other hand, the data transfer device 1 according to the first embodiment prevents the data before and after the update from being mixed in the read data by providing three surfaces of the memory 11, that is, maintains the synchronization. can do.

図13は、第1実施形態におけるデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。   FIG. 13 is a timing diagram of write access and read access of the data transfer apparatus 1 according to the first embodiment.

データ転送装置1は、ライト側においては、第1のメモリ(第1面)11a、第2のメモリ(第2面)11b、第3のメモリ(第3面)11cの順番にデータを書き込む。リード側においては、演算処理部12の任意のタイミングにおいて、第1のメモリ11a、第2のメモリ11bおよび第3のメモリ11cを同時に読み出す。以下、ライト側およびリード側の処理の流れをフローチャートを用いて説明する。   On the write side, the data transfer device 1 writes data in the order of the first memory (first surface) 11a, the second memory (second surface) 11b, and the third memory (third surface) 11c. On the read side, the first memory 11a, the second memory 11b, and the third memory 11c are simultaneously read at an arbitrary timing of the arithmetic processing unit 12. Hereinafter, the flow of processing on the write side and read side will be described with reference to flowcharts.

図14は、第1実施形態におけるデータ転送装置1のライト側の処理を説明するフローチャートである。   FIG. 14 is a flowchart for explaining processing on the write side of the data transfer apparatus 1 in the first embodiment.

ステップS1において、データ転送装置1は、データ受信部10において外部ネットワークより随時更新されるデータを受信したか否かの判定を行う。データ転送装置1は、データを受信していないと判定した場合、受信するまで待機する。一方、データ転送装置1はデータを受信した場合、ステップS2において、受信したデータを判定情報生成付加部13へ供給する。   In step S <b> 1, the data transfer apparatus 1 determines whether or not the data receiving unit 10 has received data that is updated as needed from an external network. If the data transfer apparatus 1 determines that data has not been received, the data transfer apparatus 1 waits until it is received. On the other hand, when receiving data, the data transfer apparatus 1 supplies the received data to the determination information generation / addition unit 13 in step S2.

ステップS3において、判定情報生成付加部13は、シーケンス番号を生成し、受信したデータのヘッダーに付加する。また、判定情報生成付加部13は、シーケンス番号をビット反転した反転シーケンス番号をデータのフッターに付加する。   In step S3, the determination information generation / addition unit 13 generates a sequence number and adds it to the header of the received data. The determination information generation / addition unit 13 adds an inverted sequence number obtained by bit-inverting the sequence number to the data footer.

ステップS4において、判定情報生成付加部13は、面切替信号Aに基づいてメモリ11にデータを書き込む。   In step S <b> 4, the determination information generation / addition unit 13 writes data in the memory 11 based on the surface switching signal A.

図15は、第1実施形態におけるデータ転送装置1のリード側の処理を説明するフローチャートである。このリード側の処理は、演算処理部12の任意のタイミングで実行される。   FIG. 15 is a flowchart illustrating processing on the read side of the data transfer apparatus 1 in the first embodiment. This processing on the read side is executed at an arbitrary timing of the arithmetic processing unit 12.

ステップS11において、判定情報抽出検査部15a〜15cは、演算処理部12の制御に基づいて第1〜第3のメモリ11a〜11cより同時にデータを読み出す。ステップS12において、判定情報抽出検査部15a〜15cは、読み出したデータよりシーケンス番号および反転シーケンス番号を抽出する。   In step S11, the determination information extraction inspection units 15a to 15c simultaneously read data from the first to third memories 11a to 11c based on the control of the arithmetic processing unit 12. In step S12, the determination information extraction / inspection units 15a to 15c extract the sequence number and the inverted sequence number from the read data.

ステップS13において、判定情報抽出検査部15a〜15cは、抽出したシーケンス番号および反転シーケンス番号より読み出したデータが有効であるか否かの判定を行う。判定情報抽出検査部15はデータが有効であると判定した場合には、ステップS14において、データが有効である旨の信号を演算処理部12へ供給する。一方、判定情報抽出検査部15は、データが無効であると判定した場合には、ステップS15において、データが無効である旨の信号を供給する。   In step S13, the determination information extraction / inspection units 15a to 15c determine whether or not the data read from the extracted sequence number and inverted sequence number is valid. If the determination information extraction / inspection unit 15 determines that the data is valid, it supplies a signal indicating that the data is valid to the arithmetic processing unit 12 in step S14. On the other hand, when determining that the data is invalid, the determination information extraction / inspection unit 15 supplies a signal indicating that the data is invalid in step S15.

なお、複数のメモリ11より読み出されたデータのうち有効なデータが複数ある場合、最新のシーケンス番号が付与されているデータ列を使用することにより、外部ネットワークより受信した最新のデータを以降の演算処理に使用することができる。この場合、演算処理部12またはセレクター14bは、読み出されたデータおよびシーケンス番号を受け取り、シーケンス番号よりデータの新しさを判定する機能を備える。   In addition, when there are a plurality of valid data among the data read from the plurality of memories 11, the latest data received from the external network can be obtained by using the data sequence to which the latest sequence number is assigned. It can be used for arithmetic processing. In this case, the arithmetic processing unit 12 or the selector 14b has a function of receiving the read data and the sequence number and determining the newness of the data from the sequence number.

ステップS16において、判定情報抽出検査部15a〜15cは、前回読み出したデータ列に付加されたシーケンス番号と今回読み出したデータ列に付加されたデータ列に付加されたシーケンス番号とが一致するか否かの判定を行う。判定情報抽出検査部15a〜15cは各シーケンス番号が不一致であると判定した場合処理を終了する。   In step S16, the determination information extraction / inspection units 15a to 15c determine whether or not the sequence number added to the previously read data string matches the sequence number added to the data string read this time. Judgment is made. If the determination information extraction / inspection units 15a to 15c determine that the sequence numbers do not match, the process ends.

一方、判定情報抽出検査部15は、各シーケンス番号が一致すると判定した場合、ステップS17において、スキップ信号を生成し、演算処理部12に出力する。   On the other hand, if it is determined that the sequence numbers match, the determination information extraction / inspection unit 15 generates a skip signal and outputs it to the arithmetic processing unit 12 in step S17.

なお、メモリ11が3面設けられた例を適用して説明したが、メモリ11の面数は3面以上であればよい。この場合、同時に読み出しを行うメモリ数は少なくとも3面であればよい。   Although an example in which three memories 11 are provided has been described, the number of the memories 11 may be three or more. In this case, the number of memories to be read simultaneously may be at least three.

このデータ転送装置1によれば、3面設けられたメモリ11より同時にデータを読み出すことにより、同期性の確保された有効なデータを取得することができる。具体的には、図13に示すように、第1のメモリ(第1面)11aに対する書き込み(ライト)が行われている場合、第1のメモリ11aより読み出されるデータは矢印Bで示す区間において書き込みと読み出しが競合するため更新前と更新後とのデータとが混在してしまう。一方、第2のメモリ11bおよび第3のメモリ11cより読み出されるデータは矢印Bで示す区間においては、同期性が確保される。   According to the data transfer apparatus 1, it is possible to acquire effective data with ensured synchronism by simultaneously reading data from the memories 11 provided on the three surfaces. Specifically, as shown in FIG. 13, when writing (writing) to the first memory (first surface) 11a is performed, the data read from the first memory 11a is in the section indicated by the arrow B. Since writing and reading conflict, data before and after updating are mixed. On the other hand, the data read from the second memory 11b and the third memory 11c is synchronized in the section indicated by the arrow B.

ライトアクセスとリードアクセスとがライト側およびリード側で任意のタイミングで行われる場合においては、リード側がデータの読み出し中に書き込みの対象となるメモリ11が切り替わる可能性がある。図13においては、リード側が第1〜第3のメモリ11a〜11cより読み出し中に、ライト側が書き込み先を第1のメモリ11aから第2のメモリ11bに切り替える場合である。この場合、第2のメモリ11bより読み出されるデータは矢印Cの区間において書き込みと読み出しとが競合するため更新前と更新後とのデータとが混在してしまう。   When the write access and the read access are performed at an arbitrary timing on the write side and the read side, there is a possibility that the memory 11 to be written is switched while the read side is reading data. In FIG. 13, the read side switches from the first memory 11a to the second memory 11b while the read side is reading from the first to third memories 11a to 11c. In this case, since the data read from the second memory 11b competes for writing and reading in the section indicated by the arrow C, the data before and after the update are mixed.

これに対し、第1実施形態におけるデータ転送装置1は、読み出し中において書き込みが行われるメモリが第1のメモリ11aから第2のメモリ11bに切り替わる場合においても、第3のメモリ11cについては書き込みと読み出しとが競合しないため、同期性の確保された有効なデータの読み出しを行うことができる。   On the other hand, the data transfer device 1 according to the first embodiment does not write to the third memory 11c even when the memory to which writing is performed during reading is switched from the first memory 11a to the second memory 11b. Since there is no contention with reading, it is possible to read effective data with ensured synchronization.

上述したデータ転送装置1は、3面のメモリより同時にデータを読み出すものである。これに対し、以下に説明するように、読み出しの順序を考慮することにより2面を同時に読み出すようにしてもよい。   The above-described data transfer device 1 reads data simultaneously from three memories. On the other hand, as described below, the two surfaces may be read simultaneously by considering the reading order.

図16は、同時に2面のメモリ11より読み出しを行う場合のデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。   FIG. 16 is a timing diagram of write access and read access of the data transfer apparatus 1 when reading from the memory 11 on two sides at the same time.

データ転送装置1は、ライト側においては、第1のメモリ(第1面)11a、第2のメモリ(第2面)11b、第3のメモリ(第3面)11cに順次データを書き込む。リード側においては、演算処理部12の各リードタイミングにおいて、第1のメモリ11a、第2のメモリ11bおよび第3のメモリ11cのうち2つのメモリより同時に読み出す。例えば、データが読み出される1つ目のメモリは、第1のメモリ11a、第2のメモリ11b、第3のメモリ11cの順で切り替えられる。データが読み出される2つ目のメモリは、第3のメモリ11c、第1のメモリ11a、第2のメモリ11bの順で切り替えられる。   On the write side, the data transfer device 1 sequentially writes data to the first memory (first surface) 11a, the second memory (second surface) 11b, and the third memory (third surface) 11c. On the read side, at each read timing of the arithmetic processing unit 12, data is read simultaneously from two of the first memory 11a, the second memory 11b, and the third memory 11c. For example, the first memory from which data is read is switched in the order of the first memory 11a, the second memory 11b, and the third memory 11c. The second memory from which data is read is switched in the order of the third memory 11c, the first memory 11a, and the second memory 11b.

第1のメモリ(第1面)11aに対する書き込みが行われている場合、第1のメモリ11aより読み出されるデータは矢印Dで示す区間において読み出しと書き込みとが競合し更新前と更新後とのデータが混在してしまう。一方、第3のメモリ11cより読み出されるデータは、同期性が確保される。   When writing to the first memory (first surface) 11a is performed, the data read from the first memory 11a is data before and after the update because the reading and writing compete in the section indicated by the arrow D. Will be mixed. On the other hand, the data read from the third memory 11c is ensured in synchronism.

図17は、同時に2面のメモリ11より読み出しを行う場合であって、同期性が確保されない場合のデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。   FIG. 17 is a timing diagram of write access and read access of the data transfer apparatus 1 in the case where reading is simultaneously performed from two memories 11 and synchronization is not ensured.

2つのメモリ11より同時に読み出す場合においては、読み出しを行うメモリ11の組み合わせによってはいずれのメモリ11から読み出したデータも更新前と更新後とのデータが混在してしまう可能性がある。   When reading from the two memories 11 at the same time, depending on the combination of the memories 11 to be read, there is a possibility that the data read from either memory 11 is mixed before and after the update.

例えば、データが読み出される1つ目のメモリが第2のメモリ11b、第3のメモリ11c、第1のメモリ11aの順で切り替えられ、2つ目のメモリが第1のメモリ11a、第2のメモリ11b、第3のメモリ11cの順で切り替えられる場合である。   For example, the first memory from which data is read is switched in the order of the second memory 11b, the third memory 11c, and the first memory 11a, and the second memory is switched to the first memory 11a and the second memory 11a. This is a case where the memory 11b and the third memory 11c are switched in this order.

この場合、第1のメモリ(第1面)11aに対する書き込みが行われている場合、第1のメモリ11aより読み出されるデータは矢印Eで示す区間において書き込みと読み出しとが競合してしまう。また、書き込みが行われるメモリ11が第1のメモリ11aから第2のメモリ11bに切り替えられた場合、読み出し中のメモリ11のうち第2のメモリ11bにおいては矢印Fで示す区間において書き込みと読み出しとが競合してしまう。   In this case, when writing to the first memory (first surface) 11a is performed, the data read from the first memory 11a competes between writing and reading in the section indicated by the arrow E. Further, when the memory 11 to be written is switched from the first memory 11a to the second memory 11b, the second memory 11b of the memory 11 being read is written and read in the section indicated by the arrow F. Will compete.

図18は、同時に2面のメモリより読み出しを行う場合であって、同期性が確保され得る場合のデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。   FIG. 18 is a timing diagram of write access and read access of the data transfer apparatus 1 in the case where reading is simultaneously performed from two memories and synchronization can be ensured.

図18に示すライト側の動作については、図13および図14で説明したものとほぼ同様である。リード側の動作については、同時に読み出したデータの双方が無効と判定された場合、次回読み出すメモリの組合せを考慮することにより無効と判定された次回の読み出しタイミングにおいては有効なデータを読み出す。図18における矢印で示す区間は、書き込みと読み出しとが競合する区間である。   The operation on the write side shown in FIG. 18 is substantially the same as that described with reference to FIGS. Regarding the read side operation, when it is determined that both of the simultaneously read data are invalid, valid data is read at the next read timing determined to be invalid by considering the combination of memories to be read next time. A section indicated by an arrow in FIG. 18 is a section in which writing and reading compete.

以下、リード側の処理をフローチャートを用いて説明する。   Hereinafter, the processing on the read side will be described with reference to flowcharts.

図19は、データ転送装置1が2面のメモリに対し同時に読み出しを行う場合のリード側の処理を説明するフローチャートである。なお、判定情報抽出検査部15がスキップ信号を生成するステップについては図示および説明を省略した。   FIG. 19 is a flowchart for explaining processing on the read side when the data transfer apparatus 1 reads data from two memories simultaneously. In addition, illustration and description were abbreviate | omitted about the step which the determination information extraction test | inspection part 15 produces | generates a skip signal.

ステップS21〜S25は、図14の読出ステップS11〜無効信号送信ステップS15とほぼ同様であるため、ここでは説明を省略する。   Steps S21 to S25 are substantially the same as the reading step S11 to the invalid signal transmission step S15 in FIG.

ステップS26において、データ転送装置1は、読み出した全てのデータが無効と判定されたか否かの判定を行う。この判定は、セレクター14bまたは演算処理部12で行われる。データ転送装置1は全てのデータが無効ではないと判定した場合、すなわち今回の読み出しのタイミングで有効なデータが得られたと判定した場合、処理を終了する。   In step S <b> 26, the data transfer apparatus 1 determines whether all the read data is determined to be invalid. This determination is performed by the selector 14b or the arithmetic processing unit 12. If the data transfer apparatus 1 determines that all data is not invalid, that is, if it is determined that valid data is obtained at the current read timing, the process is terminated.

一方、データ転送装置1は、全てのデータが無効であると判定した場合、ステップS27において、次回の読み出しのタイミングにおいてデータを読み出すメモリ11について、今回読み出しを行ったメモリの一方を他方のメモリと異なるメモリにシフトする。   On the other hand, if the data transfer apparatus 1 determines that all data is invalid, in step S27, regarding the memory 11 that reads data at the next read timing, one of the memories that has been read this time is replaced with the other memory. Shift to a different memory.

例えば、図18においては、データが読み出される1つ目のメモリが第2のメモリ11b、第3のメモリ11c、第1のメモリ11aの順で切り替えられ、2つ目のメモリが第1のメモリ11a、第2のメモリ11b、第3のメモリ11cの順で切り替えられるとする。第2のメモリ11bと第1のメモリ11aとの2つのメモリ11よりデータが読み出されると、次回の読み出しのタイミングにおいては本来であれば図17に示すように第3のメモリ11cと第2のメモリ11bとからデータが読み出される。   For example, in FIG. 18, the first memory from which data is read is switched in the order of the second memory 11b, the third memory 11c, and the first memory 11a, and the second memory is the first memory. Assume that switching is performed in the order of 11a, second memory 11b, and third memory 11c. When data is read from the two memories 11, the second memory 11 b and the first memory 11 a, the next read timing is normally the third memory 11 c and the second memory as shown in FIG. 17. Data is read from the memory 11b.

しかし、1つ目のメモリである第2のメモリ11b、2つ目のメモリである第1のメモリ11aの双方のデータが無効であると判定された場合には、データ転送装置1は一方のメモリである1つ目のメモリ(第2のメモリ11b)を他方のメモリである2つ目のメモリ(第1のメモリ11a)とは異なるメモリである第3のメモリ11cにシフトする。   However, if it is determined that the data in both the second memory 11b, which is the first memory, and the first memory 11a, which is the second memory, are invalid, the data transfer device 1 The first memory (second memory 11b) which is a memory is shifted to the third memory 11c which is a different memory from the second memory (first memory 11a) which is the other memory.

言い換えると、一方のメモリ(第1のメモリ11a)をシフトせず、他方のメモリ(第2のメモリ11b)を次の順位のメモリ(第3のメモリ11c)にシフトする。シフトする側のメモリは、次の順位のメモリが今回の読み出しのタイミングにおいて読み出しが行われないメモリとなっているメモリとする。   In other words, one memory (first memory 11a) is not shifted, and the other memory (second memory 11b) is shifted to the next-ranked memory (third memory 11c). The memory on the shift side is a memory in which the next rank memory is a memory that is not read at the current read timing.

このため、今回の読み出しのタイミングでデータが読み出されていないメモリ11(第3のメモリ11c)と、データが読み出されたメモリ11(第1のメモリ11a)とから次回のタイミングで読み出しを行うこととなり、次回からはいずれか一方のメモリ11から確実に有効なデータを読み出すことができる。   Therefore, reading is performed at the next timing from the memory 11 (third memory 11c) from which data has not been read at the current reading timing and the memory 11 (first memory 11a) from which data has been read. Therefore, effective data can be reliably read from either one of the memories 11 from the next time.

このデータ転送装置1によれば、読み出すデータの有効性を向上させることができる。また、データを同時に読み出すメモリ11の面数を2面と削減できるためメモリ11より読み出されたデータを一次保持するためのバッファ(図示せず)の容量を削減できる。   According to the data transfer device 1, the validity of the data to be read can be improved. Further, since the number of the memory 11 that simultaneously reads data can be reduced to two, the capacity of a buffer (not shown) for temporarily storing the data read from the memory 11 can be reduced.

なお、データ列の有効性を判定するための判定情報は、シーケンス番号および反転シーケンス番号に限らない。   Note that the determination information for determining the validity of the data string is not limited to the sequence number and the inverted sequence number.

図20は、データの有効性を判定するためのデータのデータ列配置例を示す図である。   FIG. 20 is a diagram illustrating an example of data string arrangement for determining the validity of data.

判定情報生成付加部13は、データ受信部10より供給されたデータ列に基づいて、このデータ列をビット反転した反転データ列を生成する。反転データ列が格納されるメモリ11の領域は、ライト側とリード側とで予め取り決められる。例えば、反転データ列を記憶する領域は、データ列のアドレスnに100を足したn+100と取り決める。   Based on the data string supplied from the data receiver 10, the determination information generation / addition unit 13 generates an inverted data string obtained by bit-inversion of the data string. The area of the memory 11 in which the inverted data string is stored is determined in advance on the write side and the read side. For example, the area for storing the inverted data string is determined as n + 100 obtained by adding 100 to the address n of the data string.

判定情報抽出検査部15は、予め取り決められたアドレス領域からデータ列と反転データ列とを順次読み出す。判定情報抽出検査部15は、読み出したデータ列と、反転データ列をさらに反転したデータとを比較する。判定情報抽出検査部15は、これらのデータが一致すると判定した場合、同期性が確保され有効なデータである旨の信号を演算処理部12に供給する。判定情報抽出検査部15は、これらのデータが不一致であると判定した場合、データの同期性は確保されていないと判定し、データは無効である旨の信号を演算処理部12に供給する。   The determination information extraction / inspection unit 15 sequentially reads the data string and the inverted data string from the predetermined address area. The determination information extraction inspection unit 15 compares the read data string with data obtained by further inverting the inverted data string. If the determination information extraction and inspection unit 15 determines that these data match, the determination information extraction / inspection unit 15 supplies a signal indicating that the synchronization is ensured and is valid data to the arithmetic processing unit 12. If the determination information extraction / inspection unit 15 determines that these data do not match, the determination information extraction / inspection unit 15 determines that the synchronization of the data is not secured, and supplies a signal indicating that the data is invalid to the arithmetic processing unit 12.

[第2実施形態]
本発明に係るデータ転送装置40の実施形態を添付図面に基づいて説明する。
[Second Embodiment]
An embodiment of a data transfer device 40 according to the present invention will be described with reference to the accompanying drawings.

図21は、本発明に係るデータ転送装置の第2実施形態を示すブロック図である。   FIG. 21 is a block diagram showing a second embodiment of the data transfer apparatus according to the present invention.

第2実施形態におけるデータ転送装置40が第1実施形態と異なる点は、2面の物理的に異なるメモリである第1および第2のメモリ11a、11bを有する点と、セレクター14aに代えて遅延制御部46を有する点である。第1実施形態と対応する構成および部分については同一の符号を付し、重複する説明を省略する。   The data transfer device 40 in the second embodiment differs from the first embodiment in that it has first and second memories 11a and 11b which are two physically different memories, and a delay instead of the selector 14a. This is a point having a control unit 46. Components and parts corresponding to those in the first embodiment are denoted by the same reference numerals, and redundant description is omitted.

遅延制御部46は、第1のメモリ11aに書き込みが行われ所定時間が経過した後に第1のメモリ11aに書き込まれたデータと同一のデータが第2のメモリ11bに書き込まれるよう、遅延を発生させる。遅延時間は、例えば演算処理部12の読み出しのタイミングや種々の要因により決定される。   The delay control unit 46 generates a delay so that the same data as the data written to the first memory 11a is written to the second memory 11b after a predetermined time has elapsed after the writing to the first memory 11a. Let The delay time is determined by, for example, the read timing of the arithmetic processing unit 12 and various factors.

データ受信部10は、一回の書き込みタイミング(データ更新タイミング)において、同一のデータを異なるメモリ11に遅延時間を持って書き込む。   The data receiving unit 10 writes the same data in different memories 11 with a delay time at one write timing (data update timing).

図22は、第2実施形態におけるデータ転送装置40のライトアクセスおよびリードアクセスのタイミング図である。   FIG. 22 is a timing diagram of write access and read access of the data transfer device 40 in the second embodiment.

ライト側においては、遅延制御部46の作用により第1のメモリ11aへデータが書き込まれた後、遅延時間T経過後に同一のデータが第2のメモリ11bへ書き込まれる。   On the write side, after the data is written to the first memory 11a by the action of the delay control unit 46, the same data is written to the second memory 11b after the delay time T has elapsed.

リード側においては、書き込みに依存しないタイミングで第1のメモリ11aと第2のメモリ11bとが同時に読み出しを行う。矢印Gに示す区間においては、第1のメモリ11aに対する書き込みと読み出しとが競合し有効なデータが得られない。しかし、第2のメモリ11bについては遅延時間Tを設けることにより書き込みと読み出しとが競合することなく有効なデータを得ることができる。この結果、演算処理部12は読み出されたデータのうち有効なデータを選択して演算処理に使用することができる。   On the read side, the first memory 11a and the second memory 11b simultaneously read at a timing independent of writing. In the section indicated by the arrow G, writing and reading with respect to the first memory 11a compete with each other, and effective data cannot be obtained. However, for the second memory 11b, by providing the delay time T, effective data can be obtained without contention between writing and reading. As a result, the arithmetic processing unit 12 can select valid data from the read data and use it for the arithmetic processing.

なお、データ転送装置40は、2面のメモリを設けた例を説明したが、2面以上のメモリを有してもよい。   In addition, although the example which provided the memory of 2 surfaces was demonstrated for the data transfer apparatus 40, you may have a memory of 2 surfaces or more.

1、40 データ転送装置
10 データ受信部
11a〜11c 第1〜第3のメモリ
12 演算処理部
13 判定情報生成付加部
14a セレクター(SELA)
14b セレクター(SELB)
15a〜15c 判定情報抽出検査部
46 遅延制御部
DESCRIPTION OF SYMBOLS 1, 40 Data transfer apparatus 10 Data receiving part 11a-11c 1st-3rd memory 12 Arithmetic processing part 13 Determination information production | generation addition part 14a Selector (SELA)
14b Selector (SELB)
15a to 15c Determination information extraction and inspection unit 46 Delay control unit

Claims (9)

少なくとも2面からなる複数のメモリと、
書き込み先の前記メモリを所定の順番で切り替えて、かつ所定の周期でデータを送信し前記メモリに書き込ませるデータ送信部と、
前記書き込みの周期に依存しない周期で、前記複数のメモリのうち少なくとも2面の前記メモリより同時に前記データを受信するデータ受信部と、
前記データ送信部が前記メモリに送信する前記データに対して各データに固有な判定情報を付加する判定情報付加部と、
前記データ受信部が前記メモリより受信する前記データに付加された前記判定情報を用いて前記データが有効であるか否かを判定し、判定結果を前記データ受信部に通知する判定情報検査部とを備えたことを特徴とするデータ転送装置。
A plurality of memories of at least two sides;
A data transmission unit that switches the memory of the write destination in a predetermined order and transmits data in a predetermined cycle and writes the data in the memory;
A data receiver that receives the data simultaneously from at least two of the plurality of memories in a cycle that does not depend on the write cycle;
A determination information adding unit that adds determination information unique to each data to the data that the data transmitting unit transmits to the memory;
A determination information inspecting unit that determines whether the data is valid using the determination information added to the data received from the memory by the data receiving unit and notifies the data receiving unit of a determination result; A data transfer device comprising:
前記データ受信部は、少なくとも2面の前記メモリより同時にデータを受信し、いずれのデータも無効である旨の判定結果が通知された場合、次回の前記読み出しの周期において前記データを読み出すメモリを、今回読み出しを行ったメモリの一方を他方のメモリと異なるメモリに切り替える請求項1記載のデータ転送装置。 The data receiving unit receives data simultaneously from at least two of the memories, and when a determination result indicating that both data are invalid is notified, a memory that reads the data in the next read cycle, 2. The data transfer device according to claim 1, wherein one of the memories read this time is switched to a memory different from the other memory. 前記データ受信部は、前記データを読み出す各メモリをそれぞれの所定の順序で切り替え、次回の前記読み出しの周期において切り替えられる前記メモリは、次の順位の前記メモリが今回の前記読み出しの周期において読み出しが行われていないメモリとなっているメモリである請求項2記載のデータ転送装置。 The data receiving unit switches each memory from which the data is read out in a predetermined order, and the memory to be switched in the next reading cycle is such that the memory in the next order is read in the current reading cycle. 3. The data transfer device according to claim 2, wherein the data transfer device is a memory that is not used. 前記データ送信部は、一回の前記書き込みの周期において、同一の前記データを異なる2面以上の前記メモリに遅延時間を持って書き込む請求項1記載のデータ転送装置。 The data transfer device according to claim 1, wherein the data transmission unit writes the same data to the two or more different memories with a delay time in one writing period. 前記判定情報は、前記データが更新される前後でデータの新旧が識別可能な特有の番号であるシーケンス番号であり、
前記判定情報付加部は、前記データのヘッダーに前記シーケンス番号を付加し、前記データのヘッターに前記シーケンス番号をビット反転した反転シーケンス番号を付加し、
前記判定情報検査部は、前記シーケンス番号と前記反転シーケンス番号とを読み出し、前記シーケンス番号と、前記反転シーケンス番号をビット反転した情報とを比較し、一致する場合には前記データが有効であると判定する請求項1記載のデータ転送装置。
The determination information is a sequence number that is a unique number that can identify whether the data is new or old before and after the data is updated.
The determination information adding unit adds the sequence number to the header of the data, adds an inverted sequence number obtained by bit-inverting the sequence number to the header of the data,
The determination information inspection unit reads the sequence number and the inverted sequence number, compares the sequence number with information obtained by bit-inverting the inverted sequence number, and if the data match, the data is valid. The data transfer device according to claim 1 for determination.
前記データ受信部は、同時に受信した前記データに有効と判定された前記データが複数ある場合、最新の前記シーケンス番号が付与されているデータ列を使用する請求項5記載のデータ転送装置。 6. The data transfer device according to claim 5, wherein the data receiving unit uses a data string to which the latest sequence number is assigned when there are a plurality of the data determined to be valid in the simultaneously received data. 前記判定情報検査部は、今回読み出した前記シーケンス番号を保持し、保持した前記シーケンス番号と次回読み出した前記シーケンス番号とが一致する場合、前記データ受信部に対して前記データの読み出しを停止する旨を通知する請求項5記載のデータ転送装置。 The determination information inspecting unit holds the sequence number read this time, and when the held sequence number matches the sequence number read next time, the data receiving unit stops reading the data 6. The data transfer device according to claim 5, wherein 前記判定情報は、前記データをビット反転した反転データであり、
前記判定情報付加部は、前記反転データを前記メモリの予め取り決められた領域に蓄積し、
前記判定情報検査部は、前記予め取り決められた領域より前記反転データを読み出し、前記データと、前記反転データをビット反転した情報とを比較し、一致する場合には前記データが有効であると判定する請求項1記載のデータ転送装置。
The determination information is inverted data obtained by bit inverting the data,
The determination information adding unit accumulates the inverted data in a predetermined area of the memory,
The determination information inspection unit reads the inverted data from the predetermined area, compares the data with information obtained by bit-inverting the inverted data, and determines that the data is valid if they match. The data transfer device according to claim 1.
少なくとも2面からなる複数のメモリを準備するステップと、
書き込み先の前記メモリを所定の順番で切り替えて、かつ所定の周期でデータを送信し前記メモリに書き込むステップと、
前記書き込みの周期に依存しない周期で、前記複数のメモリのうち少なくとも2面の前記メモリより同時に前記データを受信するステップと、
前記メモリに送信する前記データに対して各データに固有な判定情報を付加するステップと、
前記メモリより受信する前記データに付加された前記判定情報を用いて前記データが有効であるか否かを判定し、判定結果を前記データの受信先に通知するステップとを備えることを特徴とするデータ転送方法。
Preparing a plurality of memories of at least two sides;
Switching the write destination memory in a predetermined order, and transmitting data in a predetermined cycle and writing to the memory;
Receiving the data simultaneously from at least two of the plurality of memories in a cycle independent of the write cycle; and
Adding determination information specific to each data to the data to be transmitted to the memory;
And determining whether or not the data is valid using the determination information added to the data received from the memory, and notifying a determination result to a destination of the data. Data transfer method.
JP2010288080A 2010-12-24 2010-12-24 Data transfer apparatus and data transfer method Expired - Fee Related JP5667867B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010288080A JP5667867B2 (en) 2010-12-24 2010-12-24 Data transfer apparatus and data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010288080A JP5667867B2 (en) 2010-12-24 2010-12-24 Data transfer apparatus and data transfer method

Publications (2)

Publication Number Publication Date
JP2012137832A true JP2012137832A (en) 2012-07-19
JP5667867B2 JP5667867B2 (en) 2015-02-12

Family

ID=46675222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010288080A Expired - Fee Related JP5667867B2 (en) 2010-12-24 2010-12-24 Data transfer apparatus and data transfer method

Country Status (1)

Country Link
JP (1) JP5667867B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014085820A (en) * 2012-10-23 2014-05-12 Toshiba Corp Shared memory access system and shared memory access method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6278645A (en) * 1985-10-02 1987-04-10 Mitsubishi Electric Corp Main storage controller
JP2001022603A (en) * 1999-07-08 2001-01-26 Matsushita Electric Ind Co Ltd Device and method for detecting out-of-synchronism of delay memory

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6278645A (en) * 1985-10-02 1987-04-10 Mitsubishi Electric Corp Main storage controller
JP2001022603A (en) * 1999-07-08 2001-01-26 Matsushita Electric Ind Co Ltd Device and method for detecting out-of-synchronism of delay memory

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014085820A (en) * 2012-10-23 2014-05-12 Toshiba Corp Shared memory access system and shared memory access method

Also Published As

Publication number Publication date
JP5667867B2 (en) 2015-02-12

Similar Documents

Publication Publication Date Title
US7436728B2 (en) Fast random access DRAM management method including a method of comparing the address and suspending and storing requests
US7082499B2 (en) External memory control device regularly reading ahead data from external memory for storage in cache memory, and data driven type information processing apparatus including the same
KR100573256B1 (en) Multiple address holding memory device
WO2013187191A1 (en) I/o device, programmable logic controller and calculation method
JP2010176442A (en) Descriptor transfer device, i/o controller and descriptor transfer method
US20080301537A1 (en) Packet transmission device and packet transmission method
JP5667867B2 (en) Data transfer apparatus and data transfer method
US9798492B2 (en) Semiconductor device including a plurality of function blocks
EP1211603A1 (en) Interface for multi-processor
JP2006251916A (en) Dma transfer system and dma transfer method
JP2009217714A (en) Data processing circuit, cache system and data transfer device
JP6757717B2 (en) Memory management in multiprocessor systems
JP5126010B2 (en) Memory access control circuit and image processing apparatus
JP3897028B2 (en) Information processing system, shared data processing method, and shared data processing program
JP2008152580A (en) Communication device and communication method
JP2004146051A (en) Integrated circuit and method which can execute read operation and write operation of data concurrently
JP2011022781A (en) Data transfer apparatus, data transfer method and data transfer program
JP5093986B2 (en) Interprocessor communication method and interprocessor communication apparatus
US7941604B2 (en) Distributed memory usage for a system having multiple integrated circuits each including processors
JP5788093B2 (en) I / O device, programmable logic controller, and calculation method
JP2007156935A (en) Data input/output system, slave equipment, and signal processing method thereof
JP2012022567A (en) Cache memory
JP4240299B2 (en) Multi-station synchronous communication device
JP2023084904A (en) Processor, information processing device and information processing method
JP2007328647A (en) Data transfer method between cpus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130711

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140909

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141017

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141118

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141215

R151 Written notification of patent or utility model registration

Ref document number: 5667867

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees