JP3931384B2 - FIFO memory controller - Google Patents

FIFO memory controller Download PDF

Info

Publication number
JP3931384B2
JP3931384B2 JP17835097A JP17835097A JP3931384B2 JP 3931384 B2 JP3931384 B2 JP 3931384B2 JP 17835097 A JP17835097 A JP 17835097A JP 17835097 A JP17835097 A JP 17835097A JP 3931384 B2 JP3931384 B2 JP 3931384B2
Authority
JP
Japan
Prior art keywords
data
write
buffer memories
fifo memory
bytes
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.)
Expired - Fee Related
Application number
JP17835097A
Other languages
Japanese (ja)
Other versions
JPH1124888A (en
Inventor
正博 土渕
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP17835097A priority Critical patent/JP3931384B2/en
Publication of JPH1124888A publication Critical patent/JPH1124888A/en
Application granted granted Critical
Publication of JP3931384B2 publication Critical patent/JP3931384B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はFIFOメモリ制御装置に関する。
FIFOメモリは入出力装置間における高速のデータ転送に一般的に用いられているが、シリアル転送を行うためデータ幅の異なるデータを連続して転送するときには不必要なデータまで転送することになって実効的なデータ転送速度が低下しその解決が望まれている。
【0002】
【従来の技術】
図4はFIFOメモリ制御装置を用いてデータ転送を行うシステムの構成を示したものである。同図において、11は転送元システム全体を制御するプロセッサ、12は転送すべきデータが格納されている転送元RAM、13はFIFOメモリ制御装置、14は転送先システム内の転送先RAM、15はプロセッサ1に代わって転送元RAM12から転送先RAM14へのデータ転送を制御するDMACであり、転送元RAM12に格納されているデータをFIFOメモリ制御装置13に送り、さらにFIFOメモリ制御装置13から転送先RAM14へ転送するようにしている。転送元及び転送先の記憶装置としてRAM以外にハードディスク等の記憶装置が用いられる。
【0003】
図5は上記FIFOメモリ制御装置13の構成を示すブロック図である。入力データはRAM等のバッファメモリで構成されるFIFOメモリ部16に格納される。FIFOメモリ部16における入力データの書込アドレスと読出アドレスはそれぞれライトポインタWとリードポインタRで指定される。ライトポインタWは1バイトのデータが書き込まれるつど+1されて次の書込アドレスを指定し、また、リードポインタRは1バイトのデータが読み出されるつど+1されて次の読出アドレスを指定する。
【0004】
図6は上記FIFOメモリ制御装置を用いて転送元RAMから転送先RAMへ32ビット幅のデータバスラインを通してデータ転送を行う場合におけるデータの流れを模式的に示したものである。同図に示した転送元RAMの1つのます目には8ビットのデータが格納され、各列に4バイト(1ワード)のデータが格納される。従って、32ビット幅を有する1ワード分のデータは、最下位ビットを示すD0から最上位ビットを示すD32までの8ビットごとに区切られて同一列の4つのます目に格納されることになる。
【0005】
上記構成において、転送されるデータが全て32ビット幅である場合には転送元RAMの全てのます目に有効なデータが格納されることになる。しかし、16ビット幅あるいは8ビット幅のデータが混在している場合には転送する必要のない無効なデータが転送元RAMに含まれる場合が生じ、例えば、図6に見られるように、転送元RAMの各ます目には1から8までの番号を付した有効なデータの他に、”x”で示した無効なデータが含まれる場合が生じる。
【0006】
同図(1) に示した例では、4行3列のます目からなる転送元RAMに全部で3ワード分のデータが格納されており、そのうち1列目に格納されている点線で囲んだ1ワード目のデータはデータ幅が16ビットであり、番号1、2を付した上位2バイトが有効なデータ、”x”で示した下位2バイトが無効なデータである。2列目に格納されている2ワード目のデータはデータ幅が32ビットであり、番号3、4、5、6を付した全4バイトとも有効である。3ワード目のデータはデータ幅が16ビットであり、”x”を付した上位2バイトが無効なデータ、番号7、8を付した下位2バイトが有効なデータである。
【0007】
FIFOメモリ部は8ビット×nワード(n=1、2・・・)の容量を有する4個のバッファメモリ#1〜#4を並列に配置したものから成っており、32ビット幅の入力データを並列転送することができる。バッファメモリの並列配置数はデータバスライン幅に応じて設定される。
【0008】
転送元RAMに格納されているデータをFIFOメモリ部に書き込む場合、同図(1) に示したように、まず、ライトポインタW及びリートポインタRがクリアされ、バッファメモリ#1〜#4に対する書込アドレス及び読出アドレスは”0”に指定される。同図中バッファメモリ#1の上部に付されている番号1、2・・・nは書き込み・読み出しのアドレスを示しており、他のバッファメモリ#2、#3、#4に対しても共通に用いられる。
【0009】
次に、図中点線で囲まれた1ワード目の4バイトがそれぞれバッファメモリ#1〜#4の書込アドレス”0”に書き込まれる。ついで、同図(2) に示したように、ライトポインタWは+1されて次の書込みアドレス”1”を指定し、点線で囲まれた2ワード目の4バイトが書き込まれる。ついで、同図(3) に示したように、ライトポインタWは+1されて次の書込みアドレス”2”を指定し、点線で囲んだ3ワード目のデータが書き込まれる。以上の過程によって転送元RAMに格納されている3ワード分のデータがバッファメモリ#1〜#4に書き込まれることになる。
【0010】
データの読み出しの際には、同図(4) に示したように、バッファメモリ#1〜#4に書き込まれたデータは、リードポインタRで指定された読出アドレス”0”から順次転送先RAMに送られる。
【0011】
【発明が解決しようとする課題】
以上述べたように、所定のデータ幅のデータバスラインを通してデータを転送する場合、データ幅に応じた複数のバッファメモリを並列に配置したものでFIFOメモリ部を構成し、上記所定のデータ幅のデータを並列処理する。従来はこれらのバッファメモリへの書込アドレスを1個のライトポインタで指定していた。そのため、図6で説明したように32ビット幅のデータバスラインを通して16ビット幅のデータが入力された場合にも4個のバッファメモリ#1〜#4の全てに対して一つのライトポインタが割り振られ、4個のバッファメモリ#1〜#4の全てに同一の書込アドレスが指定されることになる。
【0012】
従って、4個のバッファメモリのうち2個のバッファメモリ#1、#2には、16ビット幅のデータが書き込まれることになるが、残りの2個のバッファメモリ#3、#4には転送する必要のない無効なデータが書き込まれるか、あるいはデータが書き込まれることなく空きが生じることとなる。即ち、上述した無効なデータを含む全てのデータについて書き込みが行われ、かつ、同じ順序で読みだされていた。その結果、無効なデータの格納のためにFIFOメモリ部の容量が無駄に費やされ、これらの無効なデータの書き込み・読み出しのため実効的な転送速度が低下するという問題があった。
【0013】
そこで本発明は、データ幅の異なるデータを連続して転送することを可能にし以て実効的なデータ転送速度を向上させることを目的とする。
【0014】
【課題を解決するための手段】
上記課題の解決は、所定データ幅のバスラインを通して入力されるデータの書き込み・読み出しを行うFIFOメモリ制御装置において、上記所定データ幅に応じた複数のバッファメモリが並列に配置されたFIFOメモリ部と、上記各バッファメモリへの書込アドレスを指定する複数のライトポインタと、入力データのデータ幅情報に基づき上記各バッファメモリに上記各ライトポインタを割り振るとともに上記各バッファメモリの指定された書込アドレスへデータを書き込むか否かを選択するセレクタを備え、任意のデータ幅の入力データを、上記セレクタで割り振られたライトポインタにより上記各バッファメモリに詰めて書き込むことを特徴とするFIFOメモリ制御装置、
あるいは、入力データのデータ幅情報に基づき上記バッファメモリ間でデータの並び替えを行うデータ並替部を備え、上記各バッファメモリに書き込まれたデータを入力された順に並び替えて読み出すことを特徴とする上記FIFOメモリ制御装置によって達成される。
【0015】
本発明では、各バッファメモリに異なるライトポインタを割り振ることができ、また、各バッファメモリの指定された書込アドレスへデータを書き込むか否かを入力データのデータ幅情報に基づいて選択することができるので、例えば、図6で説明した例において、32ビット幅のデータバスラインを通して16ビット幅のデータが入力されたとき2個のバッファメモリ#1、#2に1つのライトポインタを割り振って書込アドレスを指定し、この書込アドレスに16ビット幅のデータを書き込むようにする。そして、残りの2個のバッファメモリ#3、#4にはデータの書き込みを行わず、次に入力されるデータを書き込むようにすれば、各バッファメモリに無効なデータを書き込むことなく有効なデータのみを詰めて書き込むことが可能となる。
【0016】
また、データ幅の異なるデータが詰めて書き込まれた場合、入力されたデータの上位ビットと下位ビットの関係が正しく反映されずにバッファメモリに格納される場合が生じる。そこで、各バッファメモリに格納されているデータを入力データのデータ幅情報に基づいて並び替えることにより上位ビットと下位ビットの関係を修正して外部へ読み出すことができる。
【0017】
【発明の実施の形態】
図1は本発明の実施例に係るFIFOメモリ制御装置の構成を示すブロック図であり、1は1個当たり8ビット×nワード(n=1、2・・・)の容量を有する4個のバッファメモリ#1〜#4が並列に配置されたFIFOメモリ部、2はバッファメモリ#1〜#4への書込アドレスを指定する2つのライトポインタW1、W2を制御するライトポインタ制御部、3は入力データのデータ幅情報に基づきバッファメモリ#1〜#4にライトポインタW1、W2を割り振るとともに、バッファメモリ#1〜#4の指定された書込アドレスへデータを書き込むか否かを選択するセレクタ、4は入力データのデータ幅情報に基づきバッファメモリ#1〜#4間でデータの並び替えを指示する並替コードを発生する並替コード部、5は並替コードに基づいてバッファメモリ#1〜#4間でデータの並替えを行うデータ並替部、6はデータ並替部5から出力されたデータをラッチするデータラッチ部、7はリードポインタRを制御するリードポインタ制御部である。
【0018】
図2、図3は上記FIFOメモリ制御装置を用いて32ビット幅のデータバスラインを通して3ワード分のデータを転送元RAMから転送先RAMへ転送する場合におけるデータの流れを説明するものであり、図2はデータの書き込み固定を説明する図、図3はデータの読み出し過程を説明する図である。図6と同一機能を有するものには同一記号を付している。以下、図1〜図3を参照して本発明の実施例を説明する。
【0019】
まず、図2(1) に示したように、転送元RAMに格納されている点線で囲んだ1ワード目の4バイトが32ビットバスラインを通して入力され、これと同期してバイトイネーブル(BE)信号とライトイネーブル(WE)信号が入力される。BE信号は入力データのデータ幅情報を示すものである。
【0020】
上記1ワード目の入力データとともに入力されたBE信号は”1100”で表され、右から順に最下位バイトから最上位バイトまでのデータが有効か無効かを示すビットを並べたものである。ここで、ビット”1”は有効なデータ、”0”は無効なデータであることを示している。従って、上述のBE信号は1ワード目の入力データのデータ幅が16ビットであって、番号1、2が付されている上位2バイトが有効であり、”x”が付されている下位2バイトが無効であることを示している。
【0021】
ライトポインタ制御部2はデータ転送開始時にライトポインタW1、W2の指定する書込アドレスをクリアしてそれぞれ”0”に設定しセレクタ3へ送る。セレクタ3はBE信号に基づいてライトポインタ制御部2から送られてきたライトポインタW1、W2をバッファメモリ#1〜#4へ割り振る。即ち、セレクタ3は、送られてきたBE信号から1ワード目の上位2バイトが有効、下位2バイトが無効であることを認識し、上位2バイトを格納するバッファメモリ#1、#2にライトポインタW1を割り振り、下位2バイトを格納するバッファメモリ#3、#4にライトポインタW2を割り振る。そして、有効なデータである上位2バイトが格納されるバッファメモリ#1、#2にイネーブル信号を送ってライトポインタW1によるデータの書込みを許可する。これによってバッファメモリ#1、#2に上位2バイトが書き込まれる。
【0022】
ついで、ライトポインタ制御部2にはライトポインタW1によりデータの書き込みが行われたことが通知され、ライトポインタ制御部2はライトポインタW1の書込アドレスを+1する。一方、無効なデータである下位2バイトに割り振られたバッファメモリ#3、#4にはイネーブル信号は送られず、書込アドレス”0”も変わらない。以上のようにして、FIFOメモリ部1には有効なデータである上位2バイトが書き込まれ、無効なデータである下位2バイトは書き込まれないことになる。
【0023】
続いて、同図(2) に示したように、点線で囲んだ2ワード目の入力データが送られてくる。2ワード目の入力データは4バイト全てが有効であり、BE信号は”1111”となっている。上記BE信号の意味は前述と同様である。セレクタ3は、上位2バイトを格納するバッファメモリ#1、#2にライトポインタW1を割り振り、下位2バイトを格納するバッファメモリ#3、#4にライトポインタW2を割り振る。そして、全てのバッファメモリ#1〜#4にイネーブル信号を送ってデータの書込みを許可する。これによってバッファメモリ#1、#2の書込アドレス”1”に上位2バイトが書き込まれ、バッファメモリ#3、#4の書込アドレス”0”に下位2バイトが書き込まれる。
【0024】
ついで、ライトポインタ制御部2はライトポインタW1、W2の書込アドレスをそれぞれ+1する。以上のようにして、2ワード目の4バイトはそれぞれバッファメモリ#1〜#4に詰めて書き込まれることになる。
【0025】
同図(3) に示したように、点線で囲んだ3ワード目の入力データは上位2バイトが無効、下位2バイトが有効であり、BE信号は”0011”となっている。セレクタは上位2バイトを格納するバッファメモリ#1、#2にライトポインタW1を割り振り、下位2バイトを格納するバッファメモリ#3、#4にライトポインタW2を割り振る。そして、有効なデータである下位2バイトに割り振られたバッファメモリ#3、#4にのみイネーブル信号を送ってデータの書込みを許可する。これによってバッファメモリ#3、#4に下位2バイトが書き込まれ、ライトポインタ制御部2はライトポインタW2の書込アドレスを+1する。無効なデータである上位2バイトに割り振られたバッファメモリ#1、#2にはイネーブル信号は送られず、書込アドレス”1”は変わらない。以上のようにして、FIFOメモリ部1には有効なデータである下位2バイトが書き込まれ、無効なデータである上位2バイトは書き込まれないことになる。
【0026】
以上のように2つのライトポインタW1、W2を用いて書き込まれたデータはFIFOメモリ部1の内部で各ワードの上位ビットと下位ビットとの関係が正しく反映されない状態で書き込まれている。そこで、BE信号に基づいてデータの並び替えを指示するための並替コードを生成し、読み出しの際には並替コードを用いてデータを並び替えて出力し転送先RAMに送る。即ち、図3に示したようにバッファメモリ#1、#2のアドレス”0”に格納されているデータは下位バイトであり、バッファメモリ#3、#4のアドレス”0”に格納されているデータは上位バイトであることがBE信号によって認識できるので、上位2バイトと下位2バイトを並び替える並替コードを作成し並替コード部4に格納する。そして、読み出しの際には、上記並替コードとともにバッファメモリ#1〜#4のアドレス”0”に格納されているデータがデータ並替部5に入力され、下位2バイトと上位2バイトの並び替えが行われる。以下同様にしてデータの並び替えを行うことにより上位ビットと下位ビットの関係が修正されて転送先RAMへ送られることになる。
【0027】
なお、上述の読み出し過程はリードポインタRをバッファメモリ#1〜#4に割り振ることによって行われ、図1においてリードポインタ制御部7からバッファメモリ#1〜#4へアドレスを割り振る信号及びデータの読み出しを許可するイネーブル信号が送られるが、リードポインタRの動作は従来例と同様なのでここでは動作の説明及び図1における信号線等は省略してある。
【0028】
上記実施例は32ビット幅と16ビット幅のデータを混在させて転送する場合を示したものであり、2つのライトポインタを用いることによって無効なデータの転送を阻止することができるが、8ビット幅のデータが混在している場合等には3つ以上のライトポインタを用いることによって同様な効果を得ることができる。
【0029】
【発明の効果】
以上述べたように、本発明によればFIFOメモリを用いてデータのシリアル転送を行う場合に、無効なデータの転送を行うことなく有効なデータのみを転送することができるので、データ幅の異なるデータを連続して転送することが可能となり実効的なデータ転送速度の向上を図る上で有益である。
【図面の簡単な説明】
【図1】 本発明に係るFIFOメモリ制御装置の構成を示すブロック図
【図2】 FIFOメモリ部へのデータ書き込み過程を説明する図
【図3】 FIFOメモリ部からのデータ読み出し過程を説明する図
【図4】 データ転送システムの構成を示すブロック図
【図5】 従来のFIFOメモリ制御装置の構成を示すブロック図
【図6】 従来のデータ書き込み・読み出し過程を説明する図
【符号の説明】
1、16 FIFOメモリ部 7 リードポインタ制御部
2 ライトポインタ制御部 11 プロセッサ
3 セレクタ 12 転送元RAM
4 並替コード部 13 FIFOメモリ制御装置
5 データ並替部 14 転送先RAM
6 データラッチ部 15 DMAC
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a FIFO memory control device.
The FIFO memory is generally used for high-speed data transfer between input / output devices. However, since serial transfer is performed, unnecessary data is transferred when data having different data widths is transferred continuously. An effective data transfer rate is lowered and a solution is desired.
[0002]
[Prior art]
FIG. 4 shows the configuration of a system that performs data transfer using a FIFO memory control device. In the figure, 11 is a processor that controls the entire transfer source system, 12 is a transfer source RAM that stores data to be transferred, 13 is a FIFO memory control device, 14 is a transfer destination RAM in the transfer destination system, and 15 is A DMAC that controls data transfer from the transfer source RAM 12 to the transfer destination RAM 14 on behalf of the processor 1, sends data stored in the transfer source RAM 12 to the FIFO memory control device 13, and further transfers data from the FIFO memory control device 13 to the transfer destination. The data is transferred to the RAM 14. In addition to the RAM, a storage device such as a hard disk is used as a transfer source and transfer destination storage device.
[0003]
FIG. 5 is a block diagram showing the configuration of the FIFO memory control device 13. Input data is stored in a FIFO memory unit 16 composed of a buffer memory such as a RAM. The write address and read address of the input data in the FIFO memory unit 16 are designated by the write pointer W and the read pointer R, respectively. The write pointer W is incremented by 1 every time 1 byte of data is written and designates the next write address, and the read pointer R is incremented by 1 every time 1 byte of data is read and designates the next read address.
[0004]
FIG. 6 schematically shows the flow of data when data transfer is performed from the transfer source RAM to the transfer destination RAM through the 32-bit data bus line using the FIFO memory control device. One bit of the transfer source RAM shown in the figure stores 8-bit data, and each column stores 4 bytes (1 word) of data. Therefore, one word of data having a 32-bit width is stored in four squares of the same column, divided into 8 bits from D0 indicating the least significant bit to D32 indicating the most significant bit. .
[0005]
In the above configuration, when all the data to be transferred is 32 bits wide, effective data is stored in all squares of the transfer source RAM. However, when 16-bit or 8-bit width data is mixed, invalid data that does not need to be transferred may be included in the transfer source RAM. For example, as shown in FIG. Each square of the RAM may contain invalid data indicated by “x” in addition to valid data numbered from 1 to 8.
[0006]
In the example shown in (1) in the figure, data for 3 words is stored in the transfer source RAM consisting of the first row of 4 rows and 3 columns, and the data is surrounded by the dotted line stored in the first column. The data of the first word has a data width of 16 bits, the upper 2 bytes numbered 1 and 2 are valid data, and the lower 2 bytes indicated by “x” are invalid data. The data of the second word stored in the second column has a data width of 32 bits, and all 4 bytes numbered 3, 4, 5, and 6 are valid. The data of the third word has a data width of 16 bits, the upper 2 bytes with “x” are invalid data, and the lower 2 bytes with numbers 7 and 8 are valid data.
[0007]
The FIFO memory section is composed of four buffer memories # 1 to # 4 having a capacity of 8 bits × n words (n = 1, 2,...) Arranged in parallel, and 32 bits wide input data. Can be transferred in parallel. The number of buffer memories arranged in parallel is set according to the data bus line width.
[0008]
When writing the data stored in the transfer source RAM to the FIFO memory unit, as shown in FIG. 2A, first, the write pointer W and the read pointer R are cleared, and the write to the buffer memories # 1 to # 4 is performed. The read address and the read address are designated as “0”. In the figure, numbers 1, 2,... N attached to the upper part of the buffer memory # 1 indicate write / read addresses, and are common to the other buffer memories # 2, # 3, and # 4. Used for.
[0009]
Next, 4 bytes of the first word surrounded by a dotted line in the figure are written to the write addresses “0” of the buffer memories # 1 to # 4, respectively. Next, as shown in FIG. 2B, the write pointer W is incremented by 1 to designate the next write address “1”, and the 4 bytes of the second word surrounded by the dotted line are written. Next, as shown in FIG. 3C, the write pointer W is incremented by 1 to designate the next write address “2”, and the data of the third word surrounded by the dotted line is written. Through the above process, data for three words stored in the transfer source RAM is written into the buffer memories # 1 to # 4.
[0010]
When data is read, as shown in FIG. 4 (4), the data written in the buffer memories # 1 to # 4 are sequentially transferred from the read address “0” designated by the read pointer R to the transfer destination RAM. Sent to.
[0011]
[Problems to be solved by the invention]
As described above, when transferring data through a data bus line having a predetermined data width, a FIFO memory unit is configured by arranging a plurality of buffer memories corresponding to the data width in parallel. Process data in parallel. Conventionally, a write address to these buffer memories has been designated by one write pointer. Therefore, as described with reference to FIG. 6, even when 16-bit width data is input through the 32-bit width data bus line, one write pointer is allocated to all of the four buffer memories # 1 to # 4. Thus, the same write address is designated for all of the four buffer memories # 1 to # 4.
[0012]
Accordingly, 16-bit data is written in two buffer memories # 1 and # 2 of the four buffer memories, but transferred to the remaining two buffer memories # 3 and # 4. Invalid data that does not need to be written is written, or a vacancy occurs without data being written. That is, all the data including the invalid data described above are written and read out in the same order. As a result, there is a problem that the capacity of the FIFO memory unit is wasted for storing invalid data, and the effective transfer rate is lowered for writing / reading these invalid data.
[0013]
Accordingly, an object of the present invention is to improve the effective data transfer rate by enabling continuous transfer of data having different data widths.
[0014]
[Means for Solving the Problems]
In order to solve the above problem, in a FIFO memory control apparatus for writing / reading data input through a bus line having a predetermined data width, a FIFO memory unit in which a plurality of buffer memories corresponding to the predetermined data width are arranged in parallel , A plurality of write pointers for designating write addresses to the buffer memories, and the write pointers assigned to the buffer memories based on data width information of input data, and designated write addresses of the buffer memories A FIFO memory control device comprising a selector for selecting whether or not to write data to the buffer memory, and writing input data having an arbitrary data width into the respective buffer memories by using a write pointer allocated by the selector,
Alternatively, a data rearrangement unit that rearranges data between the buffer memories based on the data width information of the input data is provided, and the data written in each buffer memory is rearranged in the input order and read. This is achieved by the FIFO memory control device.
[0015]
In the present invention, a different write pointer can be allocated to each buffer memory, and whether to write data to a specified write address in each buffer memory can be selected based on the data width information of the input data. Therefore, for example, in the example described with reference to FIG. 6, when 16-bit width data is input through a 32-bit width data bus line, one write pointer is allocated to two buffer memories # 1 and # 2 and written. A 16-bit width data is written to this write address. If data is not written to the remaining two buffer memories # 3 and # 4, and the next input data is written, valid data without writing invalid data to each buffer memory. It becomes possible to write only by packing.
[0016]
In addition, when data having different data widths are written together, the relationship between the upper and lower bits of the input data may not be correctly reflected and stored in the buffer memory. Therefore, by rearranging the data stored in each buffer memory based on the data width information of the input data, the relationship between the upper bits and the lower bits can be corrected and read out to the outside.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a configuration of a FIFO memory control device according to an embodiment of the present invention. 1 is a block of 4 bits each having a capacity of 8 bits × n words (n = 1, 2,...). A FIFO memory unit in which buffer memories # 1 to # 4 are arranged in parallel, 2 is a write pointer control unit for controlling two write pointers W1 and W2 for designating write addresses to the buffer memories # 1 to # 4, 3 Allocates write pointers W1 and W2 to the buffer memories # 1 to # 4 based on the data width information of the input data, and selects whether to write data to the designated write addresses of the buffer memories # 1 to # 4. The selector 4 is a rearrangement code section for generating a rearrangement code for instructing rearrangement of data between the buffer memories # 1 to # 4 based on the data width information of the input data, and 5 is based on the rearrangement code. A data rearrangement unit for rearranging data between the buffer memories # 1 to # 4, 6 a data latch unit for latching data output from the data rearrangement unit 5, and 7 a read pointer for controlling the read pointer R It is a control unit.
[0018]
FIGS. 2 and 3 illustrate the flow of data when transferring three words of data from a transfer source RAM to a transfer destination RAM through a 32-bit data bus line using the FIFO memory control device. FIG. 2 is a diagram for explaining data writing and fixing, and FIG. 3 is a diagram for explaining a data reading process. Components having the same functions as those in FIG. Hereinafter, embodiments of the present invention will be described with reference to FIGS.
[0019]
First, as shown in FIG. 2 (1), 4 bytes of the first word surrounded by a dotted line stored in the transfer source RAM are inputted through the 32-bit bus line, and byte enable (BE) is synchronized with this. A signal and a write enable (WE) signal are input. The BE signal indicates data width information of input data.
[0020]
The BE signal input together with the input data of the first word is represented by “1100”, in which bits indicating whether the data from the least significant byte to the most significant byte are valid or invalid are arranged in order from the right. Here, bit “1” indicates valid data, and “0” indicates invalid data. Therefore, in the above BE signal, the data width of the input data of the first word is 16 bits, the upper 2 bytes with numbers 1 and 2 are valid, and the lower 2 with “x” attached. Indicates that the byte is invalid.
[0021]
The write pointer control unit 2 clears the write addresses designated by the write pointers W1 and W2 at the start of data transfer, sets them to “0”, and sends them to the selector 3. The selector 3 allocates the write pointers W1 and W2 sent from the write pointer control unit 2 to the buffer memories # 1 to # 4 based on the BE signal. That is, the selector 3 recognizes from the transmitted BE signal that the upper 2 bytes of the first word are valid and the lower 2 bytes are invalid, and writes to the buffer memories # 1 and # 2 storing the upper 2 bytes. The pointer W1 is allocated, and the write pointer W2 is allocated to the buffer memories # 3 and # 4 that store the lower 2 bytes. Then, an enable signal is sent to the buffer memories # 1 and # 2 in which the upper 2 bytes, which are valid data, are stored, and writing of data by the write pointer W1 is permitted. As a result, the upper 2 bytes are written in the buffer memories # 1 and # 2.
[0022]
Next, the write pointer control unit 2 is notified that data has been written by the write pointer W1, and the write pointer control unit 2 increments the write address of the write pointer W1 by one. On the other hand, the enable signal is not sent to the buffer memories # 3 and # 4 allocated to the lower 2 bytes which are invalid data, and the write address “0” is not changed. As described above, the upper 2 bytes that are valid data are written to the FIFO memory unit 1 and the lower 2 bytes that are invalid data are not written.
[0023]
Subsequently, as shown in FIG. 2 (2), the input data of the second word surrounded by the dotted line is sent. All 4 bytes of the input data of the second word are valid, and the BE signal is “1111”. The meaning of the BE signal is the same as described above. The selector 3 allocates the write pointer W1 to the buffer memories # 1 and # 2 that store the upper 2 bytes, and allocates the write pointer W2 to the buffer memories # 3 and # 4 that store the lower 2 bytes. Then, an enable signal is sent to all the buffer memories # 1 to # 4 to allow data writing. As a result, the upper 2 bytes are written to the write addresses “1” of the buffer memories # 1 and # 2, and the lower 2 bytes are written to the write addresses “0” of the buffer memories # 3 and # 4.
[0024]
Next, the write pointer controller 2 increments the write addresses of the write pointers W1 and W2 by one. As described above, the 4 bytes of the second word are written in the buffer memories # 1 to # 4, respectively.
[0025]
As shown in FIG. 3 (3), in the input data of the third word surrounded by a dotted line, the upper 2 bytes are invalid, the lower 2 bytes are valid, and the BE signal is “0011”. The selector allocates the write pointer W1 to the buffer memories # 1 and # 2 that store the upper 2 bytes, and allocates the write pointer W2 to the buffer memories # 3 and # 4 that store the lower 2 bytes. Then, an enable signal is sent only to the buffer memories # 3 and # 4 allocated to the lower 2 bytes, which are valid data, to permit data writing. As a result, the lower 2 bytes are written in the buffer memories # 3 and # 4, and the write pointer control unit 2 increments the write address of the write pointer W2. The enable signal is not sent to the buffer memories # 1 and # 2 allocated to the upper 2 bytes which are invalid data, and the write address “1” is not changed. As described above, the lower 2 bytes that are valid data are written in the FIFO memory unit 1, and the upper 2 bytes that are invalid data are not written.
[0026]
As described above, the data written using the two write pointers W1 and W2 is written in the FIFO memory unit 1 in a state in which the relationship between the upper and lower bits of each word is not correctly reflected. Therefore, a rearrangement code for instructing data rearrangement is generated based on the BE signal, and at the time of reading, data is rearranged using the rearrangement code, and is output and sent to the transfer destination RAM. That is, as shown in FIG. 3, the data stored in the address “0” of the buffer memories # 1 and # 2 is the lower byte and is stored in the address “0” of the buffer memories # 3 and # 4. Since it can be recognized from the BE signal that the data is the upper byte, a rearrangement code for rearranging the upper 2 bytes and the lower 2 bytes is created and stored in the rearrangement code unit 4. At the time of reading, the data stored in the address “0” of the buffer memories # 1 to # 4 together with the above rearrangement code is input to the data rearrangement unit 5, and the lower 2 bytes and the upper 2 bytes are arranged. Replacement is performed. Thereafter, the data is rearranged in the same manner, so that the relationship between the upper bits and the lower bits is corrected and sent to the transfer destination RAM.
[0027]
Note that the reading process described above is performed by assigning the read pointer R to the buffer memories # 1 to # 4. In FIG. 1, the read pointer control unit 7 assigns addresses to the buffer memories # 1 to # 4 and reads data and data. However, since the operation of the read pointer R is the same as that of the conventional example, the description of the operation and the signal lines in FIG. 1 are omitted here.
[0028]
The above embodiment shows a case where data of 32 bit width and 16 bit width are mixed and transferred, and the transfer of invalid data can be prevented by using two write pointers. When width data are mixed, the same effect can be obtained by using three or more write pointers.
[0029]
【The invention's effect】
As described above, according to the present invention, when data is serially transferred using a FIFO memory, only valid data can be transferred without transferring invalid data. Data can be transferred continuously, which is useful for improving the effective data transfer rate.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a FIFO memory control device according to the present invention. FIG. 2 is a diagram for explaining a data write process to a FIFO memory unit. FIG. 3 is a diagram for explaining a data read process from a FIFO memory unit. FIG. 4 is a block diagram showing a configuration of a data transfer system. FIG. 5 is a block diagram showing a configuration of a conventional FIFO memory control device. FIG. 6 is a diagram explaining a conventional data writing / reading process.
1, 16 FIFO memory section 7 Read pointer control section 2 Write pointer control section 11 Processor 3 Selector 12 Transfer source RAM
4 Rearrangement code section 13 FIFO memory control device 5 Data rearrangement section 14 Transfer destination RAM
6 Data latch 15 DMAC

Claims (2)

所定データ幅のバスラインを通して入力されるデータの書込・読み出しを行うFIFOメモリ制御装置において、
上記所定データ幅に応じた2以上のバッファメモリが並列に配置されたFIFOメモリ部と、
前記各バッファメモリへの書込アドレスを指定する2以上のライトポインタと、
入力データのデータ幅情報に基づき、前記2以上のバッファメモリの内、有効なデータに対応したバッファメモリと、無効なデータに対応したバッファメモリとに、それぞれ前記ライトポインタを割り振るとともに、前記有効なデータに対応したバッファメモリの指定された書込アドレスへデータの書き込みを許可するセレクタと、を備え、
任意のデータ幅の入力データを、前記セレクタで割り振られたライトポインタにより前記各バッファメモリに詰めて書き込むことを特徴とするFIFOメモリ制御装置。
In a FIFO memory control device for writing / reading data input through a bus line having a predetermined data width,
A FIFO memory unit in which two or more buffer memories corresponding to the predetermined data width are arranged in parallel;
The 2 and more write pointer for designating a write address to the buffer memory,
Based on the data width information of the input data, among the two or more buffer memories, and a buffer memory corresponding to valid data, in the buffer memory corresponding to the invalid data, with each assigned the write pointer, the effective comprising a selector which enables writing data to the write address specified in the buffer memory corresponding to such data, and
The input data of arbitrary data widths, FIFO memory controller, wherein the write pointer allocated by said selector by writing packed to the each buffer memory.
入力データのデータ幅情報に基づき前記各バッファメモリ間でデータの並べ替えを行うデータ並替部を備え、
前記各バッファメモリに書き込まれたデータを入力された順に並べ替えて読み出すことを特徴とする請求項1記載のFIFOメモリ制御装置。
A data shuffle play unit for rearranging data between the respective buffer memory on the basis of the data width information of the input data,
2. The FIFO memory control device according to claim 1, wherein the data written in each of the buffer memories is read out in the order of input.
JP17835097A 1997-07-03 1997-07-03 FIFO memory controller Expired - Fee Related JP3931384B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17835097A JP3931384B2 (en) 1997-07-03 1997-07-03 FIFO memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17835097A JP3931384B2 (en) 1997-07-03 1997-07-03 FIFO memory controller

Publications (2)

Publication Number Publication Date
JPH1124888A JPH1124888A (en) 1999-01-29
JP3931384B2 true JP3931384B2 (en) 2007-06-13

Family

ID=16046963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17835097A Expired - Fee Related JP3931384B2 (en) 1997-07-03 1997-07-03 FIFO memory controller

Country Status (1)

Country Link
JP (1) JP3931384B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3308912B2 (en) 1998-09-08 2002-07-29 エヌイーシーマイクロシステム株式会社 FIFO memory device and control method therefor
JP4920559B2 (en) * 2007-11-15 2012-04-18 日本電信電話株式会社 Data processing device

Also Published As

Publication number Publication date
JPH1124888A (en) 1999-01-29

Similar Documents

Publication Publication Date Title
JP2703668B2 (en) Data transfer control device and magnetic disk control device
JPS618785A (en) Access control system for storage device
JPH02227763A (en) Data transfer control system
US5585863A (en) Memory organizing and addressing method for digital video images
JPH0719426B2 (en) Disk controller
JPS6362054A (en) Multichannel memory access circuit
EP0674266A2 (en) Method and apparatus for interfacing with ram
JP3931384B2 (en) FIFO memory controller
JPH06124231A (en) Semiconductor filing device
US5875299A (en) disk access apparatus for performing a stride processing of data
JP2531822B2 (en) Instruction read-ahead device
JP2005258874A (en) Main storage system controlling correspondence to cpu, and main storage device
JPS5920049A (en) Arithmetic processor
JPH09231347A (en) Image processor
JPS5987567A (en) Variable length data storage controlling system
JP2540844B2 (en) Data transfer control method
JPS61120260A (en) Access device for sequential data memory circuit
JP2826780B2 (en) Data transfer method
JP2590695B2 (en) Time division switch circuit
JPS6336021B2 (en)
JPH0736806A (en) Dma system
GB2287808A (en) Addressing and accessing RAM and data buffering
JP3439504B2 (en) Data transfer device and data transfer method using the same
JPS60253083A (en) Storage device controlling system
JPH04274537A (en) Addresse assigning device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061019

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061024

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061221

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: 20070220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070305

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100323

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100323

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110323

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110323

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110323

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110323

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120323

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130323

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140323

Year of fee payment: 7

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees