JP2012137832A - Data transfer device and data transfer method - Google Patents
Data transfer device and data transfer method Download PDFInfo
- 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
Links
Images
Landscapes
- Static Random-Access Memory (AREA)
- Information Transfer Systems (AREA)
Abstract
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). .
データの混在を回避するため、メモリのアドレス領域を分割、または物理的に異なるメモリとすることでメモリの領域を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.
本発明に係るデータ転送装置およびその方法の各実施形態について、図面を参照して説明する。 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
データ受信部10は、外部ネットワークより、随時更新されるデータを受信する。データ受信部10は、受信したデータを判定情報生成付加部13に供給する。データ受信部10は、データを書き込むアドレス(アドレスA)と、メモリ11に書き込み(ライト)を行わせるための制御信号(ライトA)とをセレクター(SELA)14aを介してメモリ11へ供給する。また、データ受信部10は、セレクター14aに対してデータを記憶するメモリ11の切替を指示するための面切替信号(面切替A)を供給する。第1実施形態においては、データ受信部10は、書き込み先のメモリを所定の順番で切り替えて、かつ所定の周期でデータを送信し、メモリ11にデータを書き込ませるデータ送信部である。
The
判定情報生成付加部13は、判定情報としてのシーケンス番号および反転シーケンス番号を生成し、データ受信部10より供給されたデータに付加してセレクター14aに供給する。
The determination information generation /
セレクター14aは、データ受信部10より通知された面切替信号に基づいてデータを蓄積するメモリ11を切り替える。
The
メモリ11は、書き込みおよび読み出しが同時に実行可能であるメモリである。メモリ11は、例えばデュアルポートメモリ、またはSRAM(Static Random Access Memory)やSDRAM(Synchronous DRAM)などのメモリを用いてデュアルポートメモリ相当の機能を実現させたもので構成される。メモリ11は、少なくとも3面設けられ、それぞれが物理的に異なるメモリである。
The
図2は、デュアルポートメモリ20の構成例を示す説明図である。
FIG. 2 is an explanatory diagram showing a configuration example of the
図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
「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
例えば、アクセス調停部22は、A側のアクセス発生時にはA側にメモリ21のアクセス権を与え、B側のアクセス発生時にはB側にメモリ21のアクセス権を与える。また、アクセス調停部22は、一方のアクセス時に他方のアクセスが発生した場合、他方のアクセスを一時待機させ、一方のアクセス終了後に他方にアクセス権を与える。アクセス権の与え方は、先着優先であったり、必ず交互であったりする。
For example, the
判定情報抽出検査部15a〜15c(特に区別しない場合は単に「判定情報抽出検査部15」という。)は、判定情報生成付加部13によりデータ列に付加されたシーケンス番号および反転シーケンス番号を抽出し、データ列が有効であるか否かを検査し、その結果を演算処理部12に供給する。
Determination information extraction /
セレクター(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
演算処理部12は、セレクター14bを介してデータ列をメモリ11より読み出し(リードし)、読み出されたデータ列に対して所要の演算処理を行う。演算処理部12は、データを読み出すアドレス(アドレスB)と、メモリ11より読み出しを行わせるための制御信号(リードB)とをセレクター(SELB)14bを介してメモリ11へ供給する。演算処理部12は、データ受信部10の受信タイミング(書き込みタイミング)に依存することなく、任意のタイミング(周期)でデータの読み出しを行うようになっている。第1実施形態においては、演算処理部12は、書き込みの周期に依存しない周期で、少なくとも2面のメモリより同時にデータを受信するデータ受信部である。
The
次に、メモリ11、判定情報生成付加部13、および判定情報抽出検査部15の詳細について説明する。
Next, details of the
図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
図5は、第1のメモリ11aのメモリ構造の一例を示す図である。
FIG. 5 is a diagram illustrating an example of the memory structure of the
図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
第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
判定情報生成付加部13は、データ受信部10より供給されるライトデータAのヘッダー(先頭)にシーケンス番号を付加する。また、判定情報生成付加部13は、ヘッダーに付加されるシーケンス番号をビット反転させた反転シーケンス番号をライトデータAのフッター(最後尾)に付加する。すなわち、判定情報生成付加部13は、ヘッダーとフッターとが付加されたヘッダー・フッター付ライトデータを生成する。
The determination information generation /
図7は、シーケンス番号および反転シーケンス番号がヘッダーおよびフッターに付加されたデータ列(データ列2)の第1のメモリ11aへのデータ列配置例を示す図である。
FIG. 7 is a diagram illustrating a data string arrangement example in the
シーケンス番号は、第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
判定情報抽出検査部15aは、第1のメモリ11aから読み出すデータ列のヘッダーに付加されたシーケンス番号と、データ列と、フッターに付加された反転シーケンス番号とを順次読み出す。判定情報抽出検査部15aは、フッターに付加された反転シーケンス番号をさらにビット反転したデータとヘッダーに付加されたシーケンス番号とを比較し、これらのデータが一致するか否かを判定する。
The determination information extraction /
図8は、データ列2の同期性が保たれない場合の例を時間軸に沿って示した図である。
FIG. 8 is a diagram illustrating an example in which the synchronization of the
図9は、第1のメモリ11a内のデータ列2の同期性が保たれない場合のデータ列配置例を示す図である。
FIG. 9 is a diagram illustrating a data string arrangement example when the synchronization of the
ヘッダーに付加されたシーケンス番号とフッターに付加された反転シーケンス番号とは、判定情報生成付加部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 /
具体的には、第1のメモリ11aに蓄積されたデータ列に対してリードアクセスが開始された直後に、リード速度より若干速い速度でライトアクセスが開始された。読み出し完了前に書き込みが完了したような場合、読み出しているデータに更新前の古いデータと更新後の新しいデータとが混在してしまう。
Specifically, immediately after the read access is started with respect to the data string stored in the
なお、例えばリード側でデータ列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
判定情報抽出検査部15aは、フッターに付加された反転シーケンス番号をさらにビット反転したデータとヘッダーに付加されたシーケンス番号とを比較し、これらのデータが一致すると判定した場合、読み出したデータは同期性が確保されており有効である旨の信号を演算処理部12に供給する。
The determination information
一方、判定情報抽出検査部15aは、これらのデータが不一致であると判定した場合、データの同期性は確保されていないと判定し、データは無効である旨の信号を演算処理部12に供給する。判定情報抽出検査部15aは、データとともにデータが無効である旨の信号を演算処理部12に供給してもよいし、無効である旨の信号のみを供給してもよい。
On the other hand, if the determination information extraction /
また、判定情報抽出検査部15aは、有効と判定されたデータ列のシーケンス番号を保持する。判定情報抽出検査部15aは、この保持されたシーケンス番号と次の周期で第1のメモリ11aより読み出されたデータに付加されたシーケンス番号とを比較する。判定情報抽出検査部15aは、保持するシーケンス番号と、読み出されたデータ列に付加されたシーケンス番号とが一致する場合、スキップ信号を演算処理部12に対して出力する。これにより、判定情報抽出検査部15aは、データが更新されておらず既に読み出し終えたデータと同一のデータが第1のメモリ11aに蓄積されていることを通知し、演算処理部12が不要な読み出しを行わないようにすることができる。
The determination information extraction /
なお、図1のデータ転送装置1は、データ受信部10がデータの送信側(ライト側)、演算処理部12がデータの受信側(リード側)である例を説明したが、もちろんライト側とリード側とを入れ替えることもできる。
In the
次に、データ転送装置1が書き込みおよび読み出しを行う際にメモリ11を切り替える場合の動作について説明する。
Next, an operation in the case where the
第1実施形態におけるデータ転送装置1の動作の説明に先立ち、想定され得るデータ転送装置の課題について説明する。
Prior to the description of the operation of the
図10は、比較例としてのデータ転送装置100を示す説明図である。データ転送装置100は、2面のメモリを有する。2面のメモリは、面切替信号によりいずれか一方のメモリがライト側、他方がリード側となるように切り替わる。デュアルポートメモリ101a、101bおよびセレクター102a、102bについては、図1のメモリ11およびセレクター14a、14bとほぼ同様である。
FIG. 10 is an explanatory diagram showing a
図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
ライトおよびリードアクセスを行うメモリ領域の切替は、データ列単位の書き込みが完了した後に面切替信号によりリード側に面切替を許可することで行われる。これにより、図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
図13は、第1実施形態におけるデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。
FIG. 13 is a timing diagram of write access and read access of the
データ転送装置1は、ライト側においては、第1のメモリ(第1面)11a、第2のメモリ(第2面)11b、第3のメモリ(第3面)11cの順番にデータを書き込む。リード側においては、演算処理部12の任意のタイミングにおいて、第1のメモリ11a、第2のメモリ11bおよび第3のメモリ11cを同時に読み出す。以下、ライト側およびリード側の処理の流れをフローチャートを用いて説明する。
On the write side, the
図14は、第1実施形態におけるデータ転送装置1のライト側の処理を説明するフローチャートである。
FIG. 14 is a flowchart for explaining processing on the write side of the
ステップS1において、データ転送装置1は、データ受信部10において外部ネットワークより随時更新されるデータを受信したか否かの判定を行う。データ転送装置1は、データを受信していないと判定した場合、受信するまで待機する。一方、データ転送装置1はデータを受信した場合、ステップS2において、受信したデータを判定情報生成付加部13へ供給する。
In step S <b> 1, the
ステップS3において、判定情報生成付加部13は、シーケンス番号を生成し、受信したデータのヘッダーに付加する。また、判定情報生成付加部13は、シーケンス番号をビット反転した反転シーケンス番号をデータのフッターに付加する。
In step S3, the determination information generation /
ステップS4において、判定情報生成付加部13は、面切替信号Aに基づいてメモリ11にデータを書き込む。
In step S <b> 4, the determination information generation /
図15は、第1実施形態におけるデータ転送装置1のリード側の処理を説明するフローチャートである。このリード側の処理は、演算処理部12の任意のタイミングで実行される。
FIG. 15 is a flowchart illustrating processing on the read side of the
ステップS11において、判定情報抽出検査部15a〜15cは、演算処理部12の制御に基づいて第1〜第3のメモリ11a〜11cより同時にデータを読み出す。ステップS12において、判定情報抽出検査部15a〜15cは、読み出したデータよりシーケンス番号および反転シーケンス番号を抽出する。
In step S11, the determination information
ステップS13において、判定情報抽出検査部15a〜15cは、抽出したシーケンス番号および反転シーケンス番号より読み出したデータが有効であるか否かの判定を行う。判定情報抽出検査部15はデータが有効であると判定した場合には、ステップS14において、データが有効である旨の信号を演算処理部12へ供給する。一方、判定情報抽出検査部15は、データが無効であると判定した場合には、ステップS15において、データが無効である旨の信号を供給する。
In step S13, the determination information extraction /
なお、複数のメモリ11より読み出されたデータのうち有効なデータが複数ある場合、最新のシーケンス番号が付与されているデータ列を使用することにより、外部ネットワークより受信した最新のデータを以降の演算処理に使用することができる。この場合、演算処理部12またはセレクター14bは、読み出されたデータおよびシーケンス番号を受け取り、シーケンス番号よりデータの新しさを判定する機能を備える。
In addition, when there are a plurality of valid data among the data read from the plurality of
ステップS16において、判定情報抽出検査部15a〜15cは、前回読み出したデータ列に付加されたシーケンス番号と今回読み出したデータ列に付加されたデータ列に付加されたシーケンス番号とが一致するか否かの判定を行う。判定情報抽出検査部15a〜15cは各シーケンス番号が不一致であると判定した場合処理を終了する。
In step S16, the determination information extraction /
一方、判定情報抽出検査部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
なお、メモリ11が3面設けられた例を適用して説明したが、メモリ11の面数は3面以上であればよい。この場合、同時に読み出しを行うメモリ数は少なくとも3面であればよい。
Although an example in which three
このデータ転送装置1によれば、3面設けられたメモリ11より同時にデータを読み出すことにより、同期性の確保された有効なデータを取得することができる。具体的には、図13に示すように、第1のメモリ(第1面)11aに対する書き込み(ライト)が行われている場合、第1のメモリ11aより読み出されるデータは矢印Bで示す区間において書き込みと読み出しが競合するため更新前と更新後とのデータとが混在してしまう。一方、第2のメモリ11bおよび第3のメモリ11cより読み出されるデータは矢印Bで示す区間においては、同期性が確保される。
According to the
ライトアクセスとリードアクセスとがライト側およびリード側で任意のタイミングで行われる場合においては、リード側がデータの読み出し中に書き込みの対象となるメモリ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
これに対し、第1実施形態におけるデータ転送装置1は、読み出し中において書き込みが行われるメモリが第1のメモリ11aから第2のメモリ11bに切り替わる場合においても、第3のメモリ11cについては書き込みと読み出しとが競合しないため、同期性の確保された有効なデータの読み出しを行うことができる。
On the other hand, the
上述したデータ転送装置1は、3面のメモリより同時にデータを読み出すものである。これに対し、以下に説明するように、読み出しの順序を考慮することにより2面を同時に読み出すようにしてもよい。
The above-described
図16は、同時に2面のメモリ11より読み出しを行う場合のデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。
FIG. 16 is a timing diagram of write access and read access of the
データ転送装置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
第1のメモリ(第1面)11aに対する書き込みが行われている場合、第1のメモリ11aより読み出されるデータは矢印Dで示す区間において読み出しと書き込みとが競合し更新前と更新後とのデータが混在してしまう。一方、第3のメモリ11cより読み出されるデータは、同期性が確保される。
When writing to the first memory (first surface) 11a is performed, the data read from the
図17は、同時に2面のメモリ11より読み出しを行う場合であって、同期性が確保されない場合のデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。
FIG. 17 is a timing diagram of write access and read access of the
2つのメモリ11より同時に読み出す場合においては、読み出しを行うメモリ11の組み合わせによってはいずれのメモリ11から読み出したデータも更新前と更新後とのデータが混在してしまう可能性がある。
When reading from the two
例えば、データが読み出される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
この場合、第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
図18は、同時に2面のメモリより読み出しを行う場合であって、同期性が確保され得る場合のデータ転送装置1のライトアクセスおよびリードアクセスのタイミング図である。
FIG. 18 is a timing diagram of write access and read access of the
図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
ステップ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
一方、データ転送装置1は、全てのデータが無効であると判定した場合、ステップS27において、次回の読み出しのタイミングにおいてデータを読み出すメモリ11について、今回読み出しを行ったメモリの一方を他方のメモリと異なるメモリにシフトする。
On the other hand, if the
例えば、図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
しかし、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
言い換えると、一方のメモリ(第1のメモリ11a)をシフトせず、他方のメモリ(第2のメモリ11b)を次の順位のメモリ(第3のメモリ11c)にシフトする。シフトする側のメモリは、次の順位のメモリが今回の読み出しのタイミングにおいて読み出しが行われないメモリとなっているメモリとする。
In other words, one memory (
このため、今回の読み出しのタイミングでデータが読み出されていないメモリ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 (
このデータ転送装置1によれば、読み出すデータの有効性を向上させることができる。また、データを同時に読み出すメモリ11の面数を2面と削減できるためメモリ11より読み出されたデータを一次保持するためのバッファ(図示せず)の容量を削減できる。
According to the
なお、データ列の有効性を判定するための判定情報は、シーケンス番号および反転シーケンス番号に限らない。 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
判定情報抽出検査部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
[第2実施形態]
本発明に係るデータ転送装置40の実施形態を添付図面に基づいて説明する。
[Second Embodiment]
An embodiment of a
図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
遅延制御部46は、第1のメモリ11aに書き込みが行われ所定時間が経過した後に第1のメモリ11aに書き込まれたデータと同一のデータが第2のメモリ11bに書き込まれるよう、遅延を発生させる。遅延時間は、例えば演算処理部12の読み出しのタイミングや種々の要因により決定される。
The
データ受信部10は、一回の書き込みタイミング(データ更新タイミング)において、同一のデータを異なるメモリ11に遅延時間を持って書き込む。
The
図22は、第2実施形態におけるデータ転送装置40のライトアクセスおよびリードアクセスのタイミング図である。
FIG. 22 is a timing diagram of write access and read access of the
ライト側においては、遅延制御部46の作用により第1のメモリ11aへデータが書き込まれた後、遅延時間T経過後に同一のデータが第2のメモリ11bへ書き込まれる。
On the write side, after the data is written to the
リード側においては、書き込みに依存しないタイミングで第1のメモリ11aと第2のメモリ11bとが同時に読み出しを行う。矢印Gに示す区間においては、第1のメモリ11aに対する書き込みと読み出しとが競合し有効なデータが得られない。しかし、第2のメモリ11bについては遅延時間Tを設けることにより書き込みと読み出しとが競合することなく有効なデータを得ることができる。この結果、演算処理部12は読み出されたデータのうち有効なデータを選択して演算処理に使用することができる。
On the read side, the
なお、データ転送装置40は、2面のメモリを設けた例を説明したが、2面以上のメモリを有してもよい。
In addition, although the example which provided the memory of 2 surfaces was demonstrated for the
1、40 データ転送装置
10 データ受信部
11a〜11c 第1〜第3のメモリ
12 演算処理部
13 判定情報生成付加部
14a セレクター(SELA)
14b セレクター(SELB)
15a〜15c 判定情報抽出検査部
46 遅延制御部
DESCRIPTION OF
14b Selector (SELB)
15a to 15c Determination information extraction and
Claims (9)
書き込み先の前記メモリを所定の順番で切り替えて、かつ所定の周期でデータを送信し前記メモリに書き込ませるデータ送信部と、
前記書き込みの周期に依存しない周期で、前記複数のメモリのうち少なくとも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:
前記判定情報付加部は、前記データのヘッダーに前記シーケンス番号を付加し、前記データのヘッターに前記シーケンス番号をビット反転した反転シーケンス番号を付加し、
前記判定情報検査部は、前記シーケンス番号と前記反転シーケンス番号とを読み出し、前記シーケンス番号と、前記反転シーケンス番号をビット反転した情報とを比較し、一致する場合には前記データが有効であると判定する請求項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.
前記判定情報付加部は、前記反転データを前記メモリの予め取り決められた領域に蓄積し、
前記判定情報検査部は、前記予め取り決められた領域より前記反転データを読み出し、前記データと、前記反転データをビット反転した情報とを比較し、一致する場合には前記データが有効であると判定する請求項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面の前記メモリより同時に前記データを受信するステップと、
前記メモリに送信する前記データに対して各データに固有な判定情報を付加するステップと、
前記メモリより受信する前記データに付加された前記判定情報を用いて前記データが有効であるか否かを判定し、判定結果を前記データの受信先に通知するステップとを備えることを特徴とするデータ転送方法。 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.
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)
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)
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 |
-
2010
- 2010-12-24 JP JP2010288080A patent/JP5667867B2/en not_active Expired - Fee Related
Patent Citations (2)
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)
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 |