JPH05224881A - Fifo buffer circuit - Google Patents

Fifo buffer circuit

Info

Publication number
JPH05224881A
JPH05224881A JP4024197A JP2419792A JPH05224881A JP H05224881 A JPH05224881 A JP H05224881A JP 4024197 A JP4024197 A JP 4024197A JP 2419792 A JP2419792 A JP 2419792A JP H05224881 A JPH05224881 A JP H05224881A
Authority
JP
Japan
Prior art keywords
data
write
read
unit
address
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.)
Pending
Application number
JP4024197A
Other languages
Japanese (ja)
Inventor
Shinsaku Jinnai
晋作 陣内
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4024197A priority Critical patent/JPH05224881A/en
Publication of JPH05224881A publication Critical patent/JPH05224881A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To preferentially output urgent data as well as the operation of first-in first-out (FIFO). CONSTITUTION:A write data detection part 25 detects whether data to be written in a memory part 24 are normal data or preferential data. Write pointers WP 26 and 27 count up at the same time and designate the write addresses of the normal data and preferential data. At the time when inputting the preferential data, the WP26 is set on standby temporarily at that address and with the standby address of the WP26 as a reference, the WP27 designates the write address from there. An output data detection part 29 detects whether data are normal data or preferential data, a read pointer RP30 designates a normal read address, and a read pointer RP31 is immediately started after write is completed in the case of the preferential data and designates the read address with the standby address of the WP26 as a reference. A comparator part 33 compares the outputs of the WP and RP and detects whether any preferential data exists or not, etc.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、非同期に動作するマル
チプロセッサ間でデータ通信を行なうためのFIFOバ
ッファ回路の構成に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a structure of a FIFO buffer circuit for performing data communication between multiprocessors operating asynchronously.

【0002】[0002]

【従来の技術】図3は従来のFIFOバッファ回路の構
成例を示すブロック図である。図3において、1はFI
FOバッファ回路、2,3はそれぞれマイクロプロセッ
サなどで構成されてFIFOバッファ回路1にデータを
書込むライト側制御部およびデータを読出すリード側制
御部である。FIFOバッファ回路1は、書込み側と読
出し側とを別々に持ちかつマイクロプロセッサから非同
期にライトアクセスおよびリードアクセスが可能なデュ
アルポートメモリ部(以降メモリ部という)4と、メモ
リ部4へのデータの書込みアドレスを指定するためのラ
イトポインタ(以降WPという)5と、データの読出し
アドレスを指定するリードポインタ(以降RPという)
6と、WP5の出力とRP6の出力を比較して、メモリ
部4内の保持データが“空”の状態のとき、または、
“満”の状態となったときに有効となる信号を出力する
比較部7から構成されている。
2. Description of the Related Art FIG. 3 is a block diagram showing a configuration example of a conventional FIFO buffer circuit. In FIG. 3, 1 is FI
The FO buffer circuits 2 and 3 are respectively composed of a microprocessor and the like, and are a write side control unit for writing data into the FIFO buffer circuit 1 and a read side control unit for reading out data. The FIFO buffer circuit 1 has a write side and a read side separately and is capable of asynchronous write access and read access from a microprocessor (hereinafter referred to as a memory section) 4 and a data transfer to the memory section 4. A write pointer (hereinafter referred to as WP) 5 for designating a write address and a read pointer (hereinafter referred to as RP) for designating a data read address
6 and the output of WP5 and the output of RP6 are compared, and when the held data in the memory unit 4 is in the "empty" state, or
It is composed of a comparison unit 7 which outputs a signal which becomes effective when it is in a "full" state.

【0003】以下、理解を容易にするためにライト側制
御部2およびリード側制御部3は8ビット幅のデータを
取扱うものとし、メモリ部4の最大記憶データ数(以
下、深さと呼ぶ)を4096ワードとする。したがって、W
P5およびRP6により出力されるメモリ部4のアドレ
ス幅は12ビットとなる。
Hereinafter, for ease of understanding, the write side control unit 2 and the read side control unit 3 handle 8-bit width data, and the maximum number of data stored in the memory unit 4 (hereinafter referred to as depth) is set. 4096 words. Therefore, W
The address width of the memory section 4 output by P5 and RP6 is 12 bits.

【0004】WP5はライト側制御部2からメモリ部4
にデータを書込むときの選択信号10で有効となり、ライ
ト信号9により順次カウントアップされるリングタイプ
のアップカウンタにより構成され、その出力はライト側
制御部2からのデータをメモリ部4に保持するアドレス
として使用される。WP5およびRP6はメモリ部4へ
の最初のライトアクセスの前に、ライト側制御部2より
セット信号12でリセットされ、その出力は初期出力が
“000h(16進数、以下同様)”となっている。した
がって、ライト側制御部2からのデータバス8を介した
書込みデータはメモリ部4に下位アドレスから昇順に保
持されて、WP5は最大値“FFFh”までカウントア
ップした後に、次の更新クロックで回転し、その出力は
再び“00h”となり、ライト側制御部2からのデータ
バス8を介した書込みデータは、再びメモリ部4に下位
アドレスから昇順に保持されていく。したがって、メモ
リ部4の深さが4096ワードとした本来従来例では、WP
5の出力はライト側制御部2のデータ書込み回数X−40
96x(x:WPの回転回数、つまり、000h→FFFh→
000hまでの回数)の値を示している。
The WP 5 includes a write side control unit 2 to a memory unit 4
The ring type up-counter is enabled by the selection signal 10 when writing data to and is sequentially counted up by the write signal 9, and its output holds the data from the write-side control unit 2 in the memory unit 4. Used as an address. WP5 and RP6 are reset by the set signal 12 from the write side control unit 2 before the first write access to the memory unit 4, and the output thereof is "000h (hexadecimal number, the same applies below)". .. Therefore, the write data from the write-side control unit 2 via the data bus 8 is held in the memory unit 4 in ascending order from the lower address, and WP5 is counted up to the maximum value "FFFh" and then rotated at the next update clock. Then, the output becomes "00h" again, and the write data from the write side control unit 2 via the data bus 8 is held in the memory unit 4 again in ascending order from the lower address. Therefore, in the case of the conventional example where the depth of the memory unit 4 is 4096 words, the WP
The output of 5 is the number of times data is written by the write-side controller 2 X-40
96x (x: number of rotations of WP, that is, 000h → FFFh →
The number of times up to 000h) is shown.

【0005】RP6はWP5と同様なアップカウンタに
より構成され、その出力はリード側制御部3がメモリ部
4に保持されているデータを読出すアドレスとして使用
され、ライト側制御部2からのリセット信号12によって
WP5と同時にリセットされ、その出力は初期出力“0
00h”となっている。RP6はリード側制御部3がメ
モリ部4からデータを読出すときの選択信号15により有
効となり、リード信号14によりその出力を順次カウント
アップする。したがって、リード側制御部3のリードア
クセスにより、メモリ部4に保持されたデータが下位ア
ドレスより昇順にデータバス13に出力される。RP6は
最大値“FFFh”までカウントアップした後に、次の
更新クロックが来ると回転し、その出力はまた“000
h”となり、再び、メモリ部4の下位アドレスより昇順
に保持データを出力する。したがって、RP6の出力は
リード側制御部3がメモリ部4から読出したデータ読出
し回数Y−4096y(y:RPの回転回数、x−1≦
y≦x)の値を示している。
The RP6 is composed of an up-counter similar to the WP5, and its output is used as an address for the read side control section 3 to read the data held in the memory section 4, and a reset signal from the write side control section 2 is used. It is reset at the same time as WP5 by 12 and its output is the initial output "0.
00h ". RP6 becomes valid by the selection signal 15 when the read side control section 3 reads data from the memory section 4, and its output is sequentially counted up by the read signal 14. Therefore, the read side control section By the read access of 3, the data held in the memory unit 4 is output in ascending order from the lower address to the data bus 13. After counting up to the maximum value "FFFh", RP6 rotates when the next update clock comes. , Its output is also "000
Then, the held data is output again in ascending order from the lower address of the memory unit 4. Therefore, the output of RP6 is the number of data read times Y-4096y (y: RP of the read side control unit 3 read from the memory unit 4). Number of rotations, x-1 ≤
The value of y ≦ x) is shown.

【0006】WP5の出力の値(x−4096x)とR
P6の出力の値(Y−4096y)が同じになった場
合、比較部7はメモリ部4内にリード側制御部3からの
読出し待ちの有効データが保持されていない状態、すな
わちメモリ部4が“空”の状態であることを検出し、エ
ンプティ信号18でリード側制御部3に通知する。また、
WP5の出力+1の値(X+1−4069x)とRP6
の出力の値(Y−4096y)が同じになった場合、比
較部7はメモリ部4内のライト側制御部からの書込みデ
ータが“満”の状態であることを検出し、フル信号17で
ライト側制御部2に通知する。
WP5 output value (x-4096x) and R
When the output value of P6 (Y-4096y) is the same, the comparison unit 7 determines that the memory unit 4 is not holding valid data waiting to be read from the read-side control unit 3, that is, the memory unit 4 is The empty state is detected, and the read side control unit 3 is notified by the empty signal 18. Also,
Output of WP5 + 1 value (X + 1-4069x) and RP6
When the output value (Y-4096y) becomes the same, the comparison unit 7 detects that the write data from the write-side control unit in the memory unit 4 is in the “full” state, and the full signal 17 is output. Notify the write control unit 2.

【0007】[0007]

【発明が解決しようとする課題】上述のような従来のF
IFOバッファ回路1を使用して非同期に動作するマル
チプロセッサ間の通信を行うと、FIFOバッファ回路
内部のメモリ部4にまだ保持データが有るときに、ライ
ト側制御部2からリード側制御部3に緊急を要する送信
データが発生した場合、1つのFIFOバッファ回路だ
けではリード側制御部3はメモリ部4内の保持データを
全て読出した後でしか緊急データを受信することができ
ない。したがって、緊急データを優先的にリード側制御
部3が読み出すためには、通常データ用のFIFOバッ
ファ回路と優先データ用のFIFOバッファ回路という
ように複数のFIFOバッファ回路を使用しなければな
らず、マルチプロセッサ間通信の際の入出力ポートが複
数となり、リード側制御部3はデータの種別によってポ
ートを意識しなければならないという問題を有してい
た。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention
When communication between multiprocessors that operate asynchronously using the IFO buffer circuit 1 is performed, when there is still held data in the memory unit 4 inside the FIFO buffer circuit, the write side control unit 2 transfers to the read side control unit 3. When urgent transmission data occurs, the read-side control unit 3 can receive the urgent data only after reading all the held data in the memory unit 4 with only one FIFO buffer circuit. Therefore, in order for the read-side control unit 3 to preferentially read the emergency data, it is necessary to use a plurality of FIFO buffer circuits such as a normal data FIFO buffer circuit and a priority data FIFO buffer circuit. There has been a problem that the read side control unit 3 has to be aware of the port depending on the type of data, because there are a plurality of input / output ports for communication between multiprocessors.

【0008】本発明は上記問題を解決し、1個のバッフ
ァで通常データと優先データの区別を行い、ライト側制
御部からの緊急データをリード側制御部がポートの区別
をすること無く読出すことが可能なFIFOバッファ回
路を提供することを目的とするものである。
The present invention solves the above problem and distinguishes normal data and priority data with one buffer, and the read side control section reads out emergency data from the write side control section without distinguishing the port. It is an object of the present invention to provide a FIFO buffer circuit capable of realizing the above.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、本発明のFIFOバッファ回路は、ライト側制御部
からの書込みデータが通常データか優先データかを検出
する書込みデータ検出部と、優先データの書込みアドレ
スを生成する第2のライトポインタ部と、書込みアドレ
スが通常データの書込みアドレスか優先データの書込み
アドレスかを選択するライトポインタ選択部と、リード
側制御部へ出力するデータが通常データか優先データか
を検出する出力データ検出部と、リード側制御部からの
優先データの読出しアドレスを生成する第2のリードポ
インタ部と、読出しアドレスが通常データの読出しアド
レスか優先データの読出しアドレスかを選択するリード
ポインタ選択部と、ライトポインタ部とリードポインタ
部との出力を比較することにより、FIFOバッファ回
路の保持データの有無および優先データの有無を検出す
る比較部とを備えたものである。
In order to achieve the above object, a FIFO buffer circuit of the present invention includes a write data detection unit for detecting whether write data from a write side control unit is normal data or priority data, and a priority A second write pointer unit that generates a data write address, a write pointer selection unit that selects whether the write address is a normal data write address or a priority data write address, and data that is output to the read-side control unit is normal data. Output data detection unit for detecting whether the read address is normal data or a priority data read address, and a second read pointer unit for generating a priority data read address from the read-side control unit. Compare the output of the read pointer selection part that selects the and the output of the write pointer part and the read pointer part The Rukoto, in which a comparison unit for detecting the presence or absence of presence and priority data of the data held in the FIFO buffer circuit.

【0010】[0010]

【作用】上記の構成により、書込みデータ検出部はライ
ト側制御部からの書込みデータが通常データか優先デー
タかを検出しており、ライト側制御部からの書込みデー
タが優先データの場合、第2のライトポインタ部がカウ
ントアップを開始すると同時に、ライトポインタ選択部
により第2のライトポインタ部の示すアドレスが選択さ
れることで、優先データは第2のライトポインタ部が示
すアドレスに順次書込まれ、それと同時にリード側制御
部およびライト側制御部へFIFOバッファ回路内に優
先データが保持されていることを通知する。そして優先
データが書込まれた直後に出力データ検出部によって第
2のリードポインタ部が起動すると同時に、リードポイ
ンタ選択部によって第2のリードポインタが示すアドレ
スが選択されることで、リード側制御部に優先データが
出力される。また、比較部により、FIFOバッファ回
路の保持データの有無および優先データの有無が検出さ
れる。
With the above configuration, the write data detection unit detects whether the write data from the write side control unit is normal data or priority data, and when the write data from the write side control unit is the priority data, the second data When the write pointer selection unit starts counting up and the address indicated by the second write pointer unit is selected by the write pointer selection unit, the priority data is sequentially written to the address indicated by the second write pointer unit. At the same time, the read side control unit and the write side control unit are notified that the priority data is held in the FIFO buffer circuit. Then, immediately after the priority data is written, the output data detection unit activates the second read pointer unit, and at the same time, the read pointer selection unit selects the address indicated by the second read pointer, whereby the read-side control unit Priority data is output to. Further, the comparator detects the presence / absence of data held in the FIFO buffer circuit and the presence / absence of priority data.

【0011】[0011]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図1は本発明の一実施例のFIFOバッファ回
路の構成を示すブロック図である。図1において、21は
FIFOバッファ回路、22および23はそれぞれ前述の従
来例同様に、マイクロプロセッサなどにより構成される
ライト側制御部およびリード側制御部である。FIFO
バッファ回路21は、従来例と同様のメモリ部24と、ライ
ト側制御部22からの書込みデータが通常データか優先デ
ータかを検出する書込みデータ検出部25と、書込みデー
タ検出部25で通常データと判断された場合、メモリ部24
への通常データ書込みアドレスを指定する、従来例で示
したWP5と同じ機能を有するWP26と、書込みデータ
検出部25で優先データと判断された場合、メモリ部24へ
の優先データ書込みアドレスを指定する、従来例で示し
たWP5に入力データが出力として設定できる機能が付
加されたWP27と、メモリ部24への書込みデータが通常
データの場合WP26が示すアドレスを、メモリ部24への
書込みデータが優先データの場合WP27が示すアドレス
を選択し、メモリ部24へ出力するWP選択部28と、メモ
リ部24に保持されている通常データの読出しアドレスを
指定する、従来例で示したRP7と同じ機能を有するR
P30と、メモリ部24に優先データが書込まれた場合、優
先データの読出しアドレスを指定する、従来例で示した
RP6に入力データが出力として設定できる機能が付加
されたRP31と、メモリ部24に優先データが書込まれた
直後に、RP31を起動させるための出力データ検出部29
と、メモリ部24の保持データが通常データだけの場合は
RP30が示すアドレスを、またメモリ部24に優先データ
が書込まれたらその直後にRP31が示すアドレスを選択
し、メモリ部24へ出力するRP選択部32と、WP26,W
P27,WP30,WP31のそれぞれの出力を比較すること
により、メモリ部24の保持データの有無および優先デー
タの有無を検出する比較部とより構成されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a FIFO buffer circuit according to an embodiment of the present invention. In FIG. 1, reference numeral 21 is a FIFO buffer circuit, and 22 and 23 are respectively a write-side control section and a read-side control section which are constituted by a microprocessor or the like, as in the conventional example described above. FIFO
The buffer circuit 21 includes a memory unit 24 similar to the conventional example, a write data detection unit 25 that detects whether the write data from the write-side control unit 22 is normal data or priority data, and normal data in the write data detection unit 25. If judged, the memory section 24
When the write data detection unit 25 determines that the normal data write address to the WP 26 has the same function as the WP 5 shown in the conventional example and the write data detection unit 25 determines the priority data write address, the priority data write address to the memory unit 24 is specified. , The WP5 shown in the conventional example is provided with a function for setting input data as an output, and the address indicated by WP26 when the write data to the memory section 24 is normal data, the write data to the memory section 24 has priority. In the case of data, the same function as the RP7 shown in the conventional example for selecting the address indicated by the WP27 and designating the WP selecting section 28 for outputting to the memory section 24 and the read address of the normal data held in the memory section 24 is provided. Have R
P30, an RP31 having a function of setting input data as an output to the RP6 shown in the conventional example for designating a read address of the priority data when the priority data is written in the memory section 24, and the memory section 24 Immediately after the priority data is written in the output data detection unit 29 for activating the RP31.
When the data held in the memory unit 24 is only normal data, the address indicated by RP30 is selected, and immediately after the priority data is written in the memory unit 24, the address indicated by RP31 is selected and output to the memory unit 24. RP selector 32 and WP26, W
It comprises a comparator for detecting the presence / absence of data held in the memory unit 24 and the presence / absence of priority data by comparing the outputs of P27, WP30 and WP31.

【0012】まず最初に、FIFOバッファ回路21内の
動作の説明を容易にするために比較部33の動作について
説明する。第1の動作は、書込み優先データの最終アド
レスを示すWP27の出力の値(B−4096b)〈B:
優先データ書込み回数、b:WP27の回転回数〉と、読
出し通常データの先頭アドレスを示すRP30の出力の値
(C−4096c)〈C:通常データ読出し回数、c:
RP30の回転回数〉を比較し同じになった場合、比較部
33はメモリ部24が“空”の状態であることを検出し、
“L”レベルで有効となるエンプティ信号54でリード側
制御部23に通知する。
First, in order to facilitate the description of the operation in the FIFO buffer circuit 21, the operation of the comparison section 33 will be described. The first operation is a value (B-4096b) <B: output value of WP27 indicating the final address of write priority data.
Priority data write count, b: WP27 rotation count>, and output value of RP30 indicating the start address of read normal data (C-4096c) <C: Normal data read count, c:
RP30 rotations> and if they are the same, the comparison section
33 detects that the memory section 24 is "empty",
The read side control unit 23 is notified by the empty signal 54 which becomes effective at the “L” level.

【0013】第2の動作は、書込み優先データの最終ア
ドレスを示すWP27の出力+1の値(B+1−4069
b)と、読出し通常データの先頭アドレスを示すRP30
の出力の値(C−4096c)が同じになった場合、比
較部33はメモリ部24内のライト側制御部22からの書込み
データが“満”の状態であることを検出し、“L”レベ
ルで有効となるフル信号53によってライト側制御部22に
通知する。なお、第1の動作および第2の動作ではWP
27の出力値とRP30の値とを比較しているが、これは後
述するように、優先データの保持データの保持アドレス
は必ず通常データの保持アドレスの後にきて、これより
大きいアドレスに保持される構成をとっているたるめ、
優先データ書込み最終アドレスと通常データ読出し最終
アドレス、すなわちWP27とRP30の出力を比較するこ
とにより、メモリ部24の“空”および“満”の状態を検
出する。
The second operation is the output +1 value (B + 1-4069) of WP27 indicating the final address of the write priority data.
b) and RP30 indicating the start address of the read normal data
When the output value (C-4096c) becomes the same, the comparison unit 33 detects that the write data from the write-side control unit 22 in the memory unit 24 is in the "full" state, and the "L" level is obtained. The write side control unit 22 is notified by the full signal 53 that is valid at the level. In the first operation and the second operation, WP
Although the output value of 27 and the value of RP30 are compared, this is as will be described later. The retention address of the priority data retention data always comes after the normal data retention address and is retained at a higher address. Sagging that has a
The "empty" and "full" states of the memory unit 24 are detected by comparing the priority data write final address and the normal data read final address, that is, the outputs of WP27 and RP30.

【0014】第3の動作は、書込み通常データの最終ア
ドレスを示すWP26の出力の値(A−4096a)と、
書込み優先データの最終アドレスを示すWP27の出力の
値(B−4069b)とを比較し、等しくない場合メモ
リ部24に保持優先データが有ることを検出し“L”レベ
ルで有効な優先データ有信号52を生成し、WP27、出力
データ検出部29、RP31、RP選択部32に出力し、また
ライト側制御部22およびリード側制御部23に通知する。
The third operation is the value (A-4096a) of the output of WP26 indicating the final address of the write normal data,
The value (B-4069b) of the output of WP27 indicating the final address of the write priority data is compared, and if they are not equal, it is detected that there is retained priority data in the memory unit 24, and a valid priority data present signal at the "L" level. 52 is generated and output to the WP 27, the output data detection unit 29, the RP 31, and the RP selection unit 32, and the write side control unit 22 and the read side control unit 23 are notified.

【0015】次に、ライト側制御部22からの書込み動作
およびリード側制御部23からの読出し動作について、図
2に示す流れ図、および〔表1〕と〔表2〕に示す書込
みデータ検出部25と読出しデータ検出部29のそれぞれの
入出力の関係を表す真理値表を用いて、説明する。
Next, regarding the write operation from the write side control section 22 and the read operation from the read side control section 23, the flow chart shown in FIG. 2 and the write data detection section 25 shown in [Table 1] and [Table 2]. This will be described with reference to the truth table showing the relationship between the input and output of the read data detection unit 29 and the read data detection unit 29.

【0016】[0016]

【表1】 [Table 1]

【0017】[0017]

【表2】 [Table 2]

【0018】ライト側制御部22からメモリ部24へ通常デ
ータが書込まれる場合(図2:状態A)、まずFIFO
バッファ回路21内のWP26、WP27,RP30,RP31は
ライト側制御部22からのリセット信号37によってリセッ
トされ初期値が“000H(16 進数)”の初期状態となる。
その後の書込みデータ検出部25にはライト側制御部22か
ら“H”レベルの優先信号38と、“L”レベルで有効と
なる選択信号36が入力される。これらの信号を書込みデ
ータ検出部25に入力すると、この書込みデータ検出部25
は通常データ書込み状態を検出し、“L”レベルで有効
となる選択信号39および選択信号40を同時にWP26およ
びWP27へ出力する(表1:状態2)。このことで同時
に有効となったWP26およびWP27は、ライト信号35に
より同時に順次カウントアップされる。このとき、WP
選択部28は“H”レベルの優先信号38が入力されること
によってWP26の出力であるWP出力41が選択され、こ
れにより、WP26の出力が通常データの書込みアドレス
としてメモリ部24に出力され、WP26が示すアドレスに
通常データが順次書込まれる。
When normal data is written from the write side control unit 22 to the memory unit 24 (FIG. 2: state A), first the FIFO
The WP26, WP27, RP30, and RP31 in the buffer circuit 21 are reset by the reset signal 37 from the write-side control unit 22 and have an initial value of "000H (hexadecimal number)".
After that, the write side control unit 22 receives the "H" level priority signal 38 and the "L" level valid selection signal 36 from the write side control unit 22. When these signals are input to the write data detector 25, the write data detector 25
Normally detects a data write state, and simultaneously outputs the selection signal 39 and the selection signal 40 which are valid at the "L" level to WP26 and WP27 (Table 1: state 2). As a result, WP26 and WP27, which are simultaneously effective, are sequentially counted up simultaneously by the write signal 35. At this time, WP
The selection unit 28 selects the WP output 41, which is the output of the WP 26, when the priority signal 38 of the “H” level is input, whereby the output of the WP 26 is output to the memory unit 24 as the write address of the normal data, Normal data is sequentially written to the address indicated by WP26.

【0019】なお、このときWP27の出力もWP26の出
力と同時にカウントアップされているので、前述した比
較部33の第2の動作で示したように、通常データ書込み
動作が繰り返され、WP27の出力+1の値(B+1−4
096b)とRP30の出力の値(C−4096c)が等
しくなると、比較部33によってメモリ部24の“満”の状
態が検出され、“L”レベルで有効となるフル信号53で
ライト側制御部22に通知する。
At this time, since the output of WP27 is also counted up at the same time as the output of WP26, the normal data write operation is repeated and the output of WP27 is output as shown in the second operation of the comparison unit 33. +1 value (B + 1-4
096b) and the value of the output of RP30 (C-4096c) become equal, the comparing section 33 detects the "full" state of the memory section 24, and the write side control section is activated by the full signal 53 which becomes effective at the "L" level. Notify 22.

【0020】リード側制御部23からメモリ部24内に保持
されている通常データが読出される場合(図2:状態
B)、まずFIFOバッファ回路21内の出力データ検出
部29には、リード側制御部23から“L”レベルで有効と
なる選択信号45と、比較部33から“H”レベルの優先デ
ータ有信号52が入力される。これらの信号を出力データ
検出部29に入力すると、この出力データ検出部29は通常
データ読出し状態を検出し、“L”レベルで有効となる
選択信号48をRP30へ出力する(表2:状態6)。この
ことで有効となったRP30は、リード信号44により順次
カウントアップされる。このときRP選択部32は“H”
レベルの優先データ有信号52が入力されることによって
RP30の出力であるRP出力50が選択され、このことに
よりRP30の出力が通常データの読出しアドレスとして
メモリ部24に出力され、RP30が示すアドレスから順次
読み出される。
When the normal data held in the memory section 24 is read from the read side control section 23 (FIG. 2: state B), first, the output data detecting section 29 in the FIFO buffer circuit 21 is read by the read side. The control unit 23 inputs the selection signal 45 which becomes valid at the “L” level, and the comparison unit 33 inputs the priority data presence signal 52 at the “H” level. When these signals are input to the output data detection unit 29, the output data detection unit 29 detects the normal data read state and outputs the selection signal 48 which becomes valid at the “L” level to the RP 30 (Table 2: State 6). ). The RP 30 that has become valid by this is sequentially counted up by the read signal 44. At this time, the RP selector 32 is "H".
The RP output 50, which is the output of the RP 30, is selected by inputting the level priority data present signal 52, whereby the output of the RP 30 is output to the memory unit 24 as the read address of the normal data, and the address indicated by the RP 30 It is read out sequentially.

【0021】なお前述した比較部33の第1の動作で示し
たように、通常データ読出し動作が繰り返されWP27の
出力の値(B−4096b)とRP30の出力の値(C−
4096c)が等しくなると、比較部33によってメモリ
部24の“空”の状態が検出され、“L”レベルで有効と
なるエンプティ信号54をライト側制御部23に通知する。
As described in the first operation of the comparison unit 33, the normal data read operation is repeated and the output value of WP27 (B-4096b) and the output value of RP30 (C-
4096c) are equal, the comparing unit 33 detects the "empty" state of the memory unit 24 and notifies the write side control unit 23 of the empty signal 54 which becomes valid at the "L" level.

【0022】FIFOバッファ回路21内のメモリ部24が
“空”の状態ではないとき、すなわちライト側制御部22
からの書込み通常データがリード側制御部23から全て読
出される前の状態のときに、ライト側制御部22からメモ
リ部24に優先データが書込まれる場合(図2:状態
C)、まず書込みデータ検出部25にはライト側制御部22
から、“L”レベルで有効となる優先信号38と、“L”
レベルで有効となるライト側制御部22からの選択信号36
が入力される。これらの信号を書込みデータ検出部25が
入力すると、この書込みデータ検出部25は優先データ書
込み状態を検出し、“H”レベルの選択信号39と“L”
レベルの選択信号40をWP26およびWP27へ出力する
(表1:状態4)。“H”レベルの選択信号39を入力し
たWP26は非有効状態となり、カウントアップを停止す
ることで、通常データ書込み最終アドレス+1の値で待
機する。また、“L”レベルの選択信号40を入力したW
P27は有効状態となり、WP26が示すアドレスを基準と
しライト信号35によって順次カウントアップされる。こ
のときWP選択部28が“L”レベルの優先信号38を入力
することによってWP27の出力であるWP出力42が選択
され、そのことにより、WP27の出力が優先データの書
込みアドレスとしてメモリ部24に出力され、WP27が示
すアドレスに優先データが順次書き込まれる。このとき
待機しているWP26が示すアドレスから、カウントアッ
プされたWP27が示すアドレスまでの領域が優先データ
が書込まれている領域となる。
When the memory section 24 in the FIFO buffer circuit 21 is not in the "empty" state, that is, the write side control section 22.
If the priority data is written from the write-side control unit 22 to the memory unit 24 in the state before all the normal data is read from the read-side control unit 23 (FIG. 2: state C), first write The data detection unit 25 includes a write-side control unit 22.
From the priority signal 38 that becomes valid at the "L" level,
Selection signal 36 from the light side control unit 22 that becomes valid at the level
Is entered. When the write data detector 25 inputs these signals, the write data detector 25 detects the priority data write state and selects the "H" level selection signal 39 and "L".
The level selection signal 40 is output to WP26 and WP27 (Table 1: State 4). The WP 26, to which the selection signal 39 of "H" level is input, becomes inactive and stops counting up, and waits at the value of the normal data write final address + 1. In addition, when the “L” level selection signal 40 is input,
P27 becomes valid and is sequentially counted up by the write signal 35 based on the address indicated by WP26. At this time, the WP selecting section 28 inputs the "L" level priority signal 38 to select the WP output 42 which is the output of the WP 27, whereby the output of the WP 27 is stored in the memory section 24 as the write address of the priority data. The priority data is output and sequentially written to the address indicated by WP27. At this time, the area from the address indicated by WP26 on standby to the counted up address indicated by WP27 is the area in which the priority data is written.

【0023】なお、前述した比較部33の第3の動作で示
したように、このとき比較部33によってWP26の出力値
とWP27の出力値が等しくないことが検出されとると優
先データ有信号52が“L”レベルで有効となり、リード
側制御部23およびライト側制御部22に優先データが書込
まれたということを通知する。また、ここで通常データ
書込みのときと同様、WP27の出力+1の値(B+1−
4096b)とRP30の出力の値(C−4096c)が
等しくなると、比較部33によってメモリ部24の“満”の
状態が検出され、“L”レベルで有効となるフル信号53
をライト側制御部22に出力する。また、比較部33はメモ
リ部24に優先データが保持されている間、書込みデータ
ライト側制御部にも“L”レベルの優先データ有信号52
を出力し続けるが、ライト側制御部22はこの優先データ
有信号52が“L”レベルの状態の間は新たに通常データ
を書き込むことはできない。ここで、優先データはすぐ
にリード側制御部から読出されるので、メモリ部24が優
先データを保持している時間はごくわずかであるので通
信効率が悪くなるということは無い。
As described in the third operation of the comparison unit 33, if the comparison unit 33 detects that the output value of WP26 and the output value of WP27 are not equal at this time, the priority data present signal 52 Becomes valid at the "L" level and notifies the read side control unit 23 and the write side control unit 22 that the priority data has been written. In addition, here, as in the case of normal data writing, the value of the output of WP27 + 1 (B + 1-
4096b) and the value of the output of RP30 (C-4096c) become equal, the comparator section 33 detects the "full" state of the memory section 24, and the full signal 53 becomes effective at the "L" level.
Is output to the light side control unit 22. Further, the comparison unit 33 also causes the write data write side control unit 52 to have the priority data presence signal 52 of the “L” level while the priority data is held in the memory unit 24.
However, the write-side control unit 22 cannot write new normal data while the priority data presence signal 52 is at the "L" level. Here, since the priority data is immediately read from the read-side control unit, the memory unit 24 holds the priority data for a very short time, so that the communication efficiency does not deteriorate.

【0024】FIFOバッファ回路21内のメモリ部24に
通常データに加え優先データが保持されているときに、
リード側制御部23からメモリ部24内に保持されている優
先データが読出される場合(図2:状態D)、出力デー
タ検出部29にはリード側制御部23から“L”レベルで有
効となる選択信号45と、比較部33から優先データ有信号
52が入力される。これらの信号を出力データ検出部29が
入力すると、この出力データ検出部29は優先データ読出
しを検出し、“H”レベルの選択信号48と“L”レベル
の選択信号49をRP30およびRP31へ出力する(表2:
状態7)。“H”レベルの選択信号48を入力したRP30
は非有効状態となり、カウントアップを停止すること
で、通常データ読出し最終アドレス+1の値で待機す
る。また、“L”レベルの選択信号49を入力したRP31
は有効状態となり、リード信号44によって順次カウント
アップされる。このときRP選択部32は“L”レベルの
優先データ有信号52を入力されることによって、RP31
の出力であるRP出力51が選択され、そのことにより、
RP31の出力が優先データの読出しアドレスとしてメモ
リ部24に出力され、RP31が示すアドレスから優先デー
タが順次読出されていく。
When priority data is held in addition to normal data in the memory section 24 in the FIFO buffer circuit 21,
When the priority data held in the memory unit 24 is read from the read-side control unit 23 (FIG. 2: state D), the output data detection unit 29 determines that the read-side control unit 23 is valid at the “L” level. Selection signal 45 and the signal with priority data from the comparison unit 33
52 is entered. When these signals are input to the output data detection unit 29, the output data detection unit 29 detects priority data read and outputs the "H" level selection signal 48 and the "L" level selection signal 49 to RP30 and RP31. Yes (Table 2:
State 7). RP30 which input the selection signal 48 of "H" level
Becomes an invalid state, and by stopping the count-up, it waits at the value of the normal data read final address + 1. In addition, the RP31 inputting the selection signal 49 of "L" level
Becomes valid and is sequentially counted up by the read signal 44. At this time, the RP selecting section 32 receives the priority data presence signal 52 of "L" level, and the RP31
The RP output 51, which is the output of, is selected.
The output of RP31 is output to the memory unit 24 as the read address of the priority data, and the priority data is sequentially read from the address indicated by RP31.

【0025】このとき、WP26の出力をデータ入力とし
ているRP31は、比較部33から出力されメモリ部24に優
先データが保持されている間“L”レベルとなる優先デ
ータ有信号52をロード入力としており、優先データ有信
号52の立ち下がりエッジで前記データ入力を出力データ
として設定することで、WP26が示していたアドレス、
すなわち書込まれた優先データの先頭アドレスからカウ
ントアップを始めることになる。よって、リード側制御
部23はメモリ部24内に優先データが書込まれると、優先
データが保持されたという通知を受け、優先データ用の
ポートを設けること無く即座にメモリ部24内の優先デー
タを先に読出すことができる。
At this time, the RP 31 which receives the output of the WP 26 as a data input receives the priority data present signal 52 which is output from the comparison section 33 and is at the “L” level while the priority data is held in the memory section 24 as a load input. Therefore, by setting the data input as output data at the falling edge of the priority data present signal 52, the address indicated by WP26,
That is, the count-up is started from the top address of the written priority data. Therefore, when the priority data is written in the memory unit 24, the read-side control unit 23 receives a notification that the priority data is held, and immediately outputs the priority data in the memory unit 24 without providing a port for the priority data. Can be read first.

【0026】なお、メモリ部24内の保持優先データがす
べて読み出され、WP26の出力値とWP27の出力値が等
しくなった場合(図2:状態E)、優先データ有信号52
は“H”レベルとなり、WP27およびRP31に出力し、
またリード側制御部23およびライト側制御部22にメモリ
部24内の保持優先データが無くなったことを通知する。
このとき、WP26の出力をデータ入力としているWP27
は優先データ有信号52をロード入力とすることにより、
優先データ有信号52の立ち上がりエッジで前記データ入
力を出力することで、WP27の出力値はWP26の出力値
と同じになり、前述した通り、ライト側制御部22は通常
データ書込み動作、リード側制御部23は通常データ読出
し動作を始める。
When all the retained priority data in the memory section 24 have been read and the output value of WP26 and the output value of WP27 become equal (FIG. 2: state E), the priority data present signal 52
Becomes "H" level and output to WP27 and RP31,
It also notifies the read-side control unit 23 and the write-side control unit 22 that the retention priority data in the memory unit 24 has run out.
At this time, WP27 that uses the output of WP26 as data input
By setting the priority data present signal 52 as the load input,
By outputting the data input at the rising edge of the priority data presence signal 52, the output value of WP27 becomes the same as the output value of WP26, and as described above, the write side control unit 22 performs the normal data write operation and read side control. The unit 23 starts the normal data read operation.

【0027】[0027]

【発明の効果】以上のように、本発明によれば、1つの
FIFOバッファ回路で通常データと優先データを混在
させかつ区別を行い、優先データを先に送信することが
できるので、FIFOバッファ回路を使用してマルチプ
ロセッサ間データ通信を行う場合、通常データ用と優先
データ用の複数のポートが必要ではなくなるので、読出
し側は緊急を要する送信データが発生したときでも、ポ
ートを意識すること無く緊急データを受信でき、通信ソ
フトウェアの処理効率を大幅に改善することが可能とな
る。
As described above, according to the present invention, one FIFO buffer circuit can mix and distinguish normal data and priority data, and the priority data can be transmitted first, so that the FIFO buffer circuit can be transmitted first. When performing data communication between multiprocessors using, it is not necessary to have multiple ports for normal data and priority data, so the reading side does not need to be aware of the port even when urgent transmission data occurs. Emergency data can be received, and the processing efficiency of communication software can be greatly improved.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例のFIFOバッファ回路の構
成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a FIFO buffer circuit according to an embodiment of the present invention.

【図2】本発明の一実施例のFIFOバッファ回路にお
ける動作の流れを示す図である。
FIG. 2 is a diagram showing a flow of operations in the FIFO buffer circuit according to the embodiment of the present invention.

【図3】従来のFIFOバッファ回路の構成を示すブロ
ック図である。
FIG. 3 is a block diagram showing a configuration of a conventional FIFO buffer circuit.

【符号の説明】[Explanation of symbols]

21 FIFOバッファ回路 22 ライト側制御部 23 リード側制御部 24 メモリ部 25 書込みデータ検出部 26 ライトポインタ部(WP) 27 ライトポインタ部(WP) 28 ライトポインタ選択部 29 出力データ検出部 30 リードポインタ部(RP) 31 リードポインタ部(RP) 32 リードポインタ選択部 33 比較部 35 ライト信号 36 選択信号 37 リセット信号 38 優先信号 39,40 選択信号 41,42 WP出力 44 リード信号 45 選択信号 48,49 選択信号 50,51 RP出力 52 優先データ有信号 53 フル信号 54 エンプティ信号 21 FIFO buffer circuit 22 Write side control section 23 Read side control section 24 Memory section 25 Write data detection section 26 Write pointer section (WP) 27 Write pointer section (WP) 28 Write pointer selection section 29 Output data detection section 30 Read pointer section (RP) 31 Read pointer section (RP) 32 Read pointer selection section 33 Comparison section 35 Write signal 36 Selection signal 37 Reset signal 38 Priority signal 39,40 Selection signal 41,42 WP output 44 Read signal 45 Selection signal 48,49 selection Signal 50,51 RP output 52 Signal with priority data 53 Full signal 54 Empty signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 非同期に動作する第1のプロセッサと第
2のプロセッサもしくはそれに類する回路(以降、第2
のプロセッサという)との間に介在されて、ファースト
イン・ファーストアウト形式にデータの受渡しを行うF
IFOバッファ回路であって、前記第1のプロセッサか
ら前記第2のプロセッサへ送るデータを一時保持するメ
モリ部と、第1のプロセッサからの書込みデータが通常
データか優先データかを判断するための書込みデータ検
出部と、前記書込みデータ検出部で通常データと判断さ
れた場合、前記メモリ部への通常データの書込みアドレ
スを管理する第1のライトポインタ部と、前記書込みデ
ータ検出部で優先データと判断された場合、前記メモリ
部への優先データの書込みアドレスを管理する第2のラ
イトポインタ部と、前記メモリ部への書込みデータが通
常データの場合は第1のライトポインタ部が示すアドレ
スを、また前記メモリ部への書込みデータが優先データ
の場合は第2のライトポインタ部が示すアドレスを選択
するライトポインタ選択部と、前記メモリ部に優先デー
タが書き込まれた場合、第2のプロセッサへ優先データ
を出力させるための出力データ検出部と、前記メモリ部
の通常データの読出しアドレスを管理する第1のリード
ポインタ部と、前記メモリ部の優先データの読出しアド
レスを管理する第2のリードポインタ部と、前記メモリ
部へ優先データが書き込まれた場合、優先データの読出
しアドレスを選択するリードポインタ選択部と、前述し
た各ライトポインタ部およびリードポインタ部のそれぞ
れの出力を比較することにより、メモリ部内の保持デー
タの有無および優先データの有無を検出する比較部とを
備え、前記第1のプロセッサから前記メモリ部内に書込
まれているデータが通常データだけであればファースト
イン・ファーストアウト動作を行い、この動作の途中で
前記第1のプロセッサから前記メモリ部内に優先データ
が書込まれたら、前記メモリ部内の保持データの有無に
関わらず第2のプロセッサへ通知し、通知を受けた第2
のプロセッサは前記メモリ内に書込まれている通常デー
タを全て読出さなくても、優先データを先に読出すこと
が可能であることを特徴とするFIFOバッファ回路。
1. A first processor and a second processor which operate asynchronously or a circuit similar thereto (hereinafter, referred to as a second processor).
(Which is referred to as a "processor"), and delivers data in a first-in / first-out format.
An IFO buffer circuit, a memory unit for temporarily holding data to be sent from the first processor to the second processor, and writing for determining whether write data from the first processor is normal data or priority data When the data detection unit and the write data detection unit determine that the data is normal data, the first write pointer unit that manages the write address of the normal data to the memory unit and the write data detection unit determine that the data is priority data. When the write data is written to the memory unit, the second write pointer unit that manages the write address of the priority data and the address indicated by the first write pointer unit when the write data to the memory unit is normal data, A write point for selecting the address indicated by the second write pointer section when the write data to the memory section is priority data. A selection unit, an output data detection unit for outputting priority data to a second processor when priority data is written in the memory unit, and a first read for managing a read address of normal data of the memory unit. A pointer section, a second read pointer section for managing a priority data read address of the memory section, and a read pointer selection section for selecting a priority data read address when priority data is written to the memory section, A comparison unit for detecting the presence / absence of retained data in the memory unit and the presence / absence of priority data by comparing the outputs of the write pointer unit and the read pointer unit described above, and If the data written in is only normal data, the first-in / first-out operation is performed. When the priority data in the memory unit from the first processor in the course of this operation is written, and notifies the second processor regardless of whether the data held in the memory unit, the second receiving the notification
The FIFO buffer circuit can read out the priority data first without reading all the normal data written in the memory.
JP4024197A 1992-02-12 1992-02-12 Fifo buffer circuit Pending JPH05224881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4024197A JPH05224881A (en) 1992-02-12 1992-02-12 Fifo buffer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4024197A JPH05224881A (en) 1992-02-12 1992-02-12 Fifo buffer circuit

Publications (1)

Publication Number Publication Date
JPH05224881A true JPH05224881A (en) 1993-09-03

Family

ID=12131603

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4024197A Pending JPH05224881A (en) 1992-02-12 1992-02-12 Fifo buffer circuit

Country Status (1)

Country Link
JP (1) JPH05224881A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073644A (en) * 2011-09-27 2013-04-22 Of Networks:Kk Buffer memory device and communication device
JP2017010319A (en) * 2015-06-23 2017-01-12 富士通株式会社 Arithmetic processing device, information processing device, and information processing device control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073644A (en) * 2011-09-27 2013-04-22 Of Networks:Kk Buffer memory device and communication device
JP2017010319A (en) * 2015-06-23 2017-01-12 富士通株式会社 Arithmetic processing device, information processing device, and information processing device control method

Similar Documents

Publication Publication Date Title
JPH09244980A (en) Communication data output device
JPH05224881A (en) Fifo buffer circuit
US5889948A (en) Apparatus and method for inserting an address in a data stream through a FIFO buffer
KR100202170B1 (en) Receiving method and its apparatus of data for serial interface
US20040039971A1 (en) Dumping using limited system address space
JP3218659B2 (en) FIFO buffer circuit
JPH0683581A (en) First-in first-out buffer circuit
JPS63164554A (en) Automatic recognizing system for data speed
JPH04306755A (en) Fifo buffer device
JPH05289847A (en) Ring buffer control device
JPH05224880A (en) Fifo buffer circuit
KR930005124B1 (en) Image data page end mark checking method
JPH0721102A (en) Message transmitter/receiver
JPS6049465A (en) Data transfer method between microcomputers
WO1999059074A1 (en) Multi-function uart
JPS63167949A (en) Data transfer system
JPH06187123A (en) Data input/output device
JPH03280084A (en) Control circuit for display device
JPH0432922A (en) Interface control circuit
JPH05108543A (en) Dma controller
JPH0620463A (en) First-in first-out buffer circuit
JPH11175312A (en) Data transfer control unit
JPH05143521A (en) Information processing system and input/output instruction responsing system using the same
JP2000105737A (en) Microcomputer
JPH05274245A (en) Microcontroller unit