JPH10207687A - First in first out memory device - Google Patents

First in first out memory device

Info

Publication number
JPH10207687A
JPH10207687A JP9019639A JP1963997A JPH10207687A JP H10207687 A JPH10207687 A JP H10207687A JP 9019639 A JP9019639 A JP 9019639A JP 1963997 A JP1963997 A JP 1963997A JP H10207687 A JPH10207687 A JP H10207687A
Authority
JP
Japan
Prior art keywords
out memory
holding unit
address
unit
data amount
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
JP9019639A
Other languages
Japanese (ja)
Inventor
Takashi Yoshikawa
隆 吉川
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP9019639A priority Critical patent/JPH10207687A/en
Publication of JPH10207687A publication Critical patent/JPH10207687A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

(57)【要約】 【課題】データの量を表すフラグを出力する際に用いる
閾値が固定であると設計上の柔軟性が無くなる。そこ
で、閾値を変更できるようにする。 【解決手段】FIFOメモリ2は先入れ先出しでデータ
の書き込み及び読み出しを行う。ライトアドレス保持部
4はFIFOメモリ2に対するライト信号を基にFIF
Oメモリ2のライトアドレスを求めて保持する。リード
アドレス保持部6はFIFOメモリ2に対するリード信
号を基にFIFOメモリ2のリードアドレス求めてを保
持する。データ量計算部7はライトアドレスとリードア
ドレスとを基にFIFOメモリ2内のデータ量を算出す
る。比較部8はFIFOメモリ2内のデータ量と外部か
ら入力した閾値とを比較して、その比較結果を出力す
る。
(57) [Summary] If a threshold used when outputting a flag indicating the amount of data is fixed, flexibility in design is lost. Therefore, the threshold can be changed. A FIFO memory performs writing and reading of data on a first-in first-out basis. The write address holding unit 4 performs FIFO based on a write signal to the FIFO memory 2.
The write address of the O memory 2 is obtained and held. The read address holding unit 6 obtains and holds a read address of the FIFO memory 2 based on a read signal to the FIFO memory 2. The data amount calculator 7 calculates the amount of data in the FIFO memory 2 based on the write address and the read address. The comparing unit 8 compares the amount of data in the FIFO memory 2 with a threshold value input from the outside, and outputs the comparison result.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は先に書き込んだデ
ータを先に読み出す先入れ先出しメモリ装置に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a first-in first-out memory device for reading data written first.

【0002】[0002]

【従来の技術】先に記憶したデータを先に読み出す先入
れ先出しメモリ装置では、記憶した有効なデータの量を
表すのにFULL、HALFFULL及びEMPTY等のフラグを用いて
表している。先入れ先出しメモリ装置の周辺装置ではこ
のフラグを用いてデータの書き込み及び読み出しタイミ
ング等を図っている。ここで、FULLはメモリ内の有効な
データ量がメモリ容量と一致していることを示す。HALF
FULLはメモリ内の有効なデータ量がメモリ容量の半分で
あることを示す。EMPTYはメモリ内の有効なデータ量が
ゼロであることを示す。さらに、その拡張でALMOSTFULL
及びALMOSTEMPTY等のフラグを用いることがある。ここ
で、ALMOSTFULLは、メモリ容量>メモリ内の有効なデー
タ量>(メモリ容量−閾値)の関係が成り立つことを示
し、ALMOSTEMPTYは、閾値>メモリ内の有効なデータ量
>0の関係が成り立つことを示す。
2. Description of the Related Art In a first-in, first-out memory device for reading out previously stored data first, the amount of stored valid data is represented by using flags such as FULL, HALFFULL, and EMPTY. Peripheral devices of the first-in first-out memory device use this flag to determine the timing of writing and reading data. Here, FULL indicates that the effective data amount in the memory matches the memory capacity. HALF
FULL indicates that the effective data amount in the memory is half the memory capacity. EMPTY indicates that the amount of valid data in the memory is zero. In addition, with its extension ALMOSTFULL
And a flag such as ALMOSTEMPTY. Here, ALMOSTFULL indicates that the relationship of memory capacity> effective data amount in memory> (memory capacity−threshold) holds, and ALMOSTEMPTY indicates that the relationship of threshold> effective data amount in memory> 0 holds. Is shown.

【0003】上記閾値が固定であると設計上の柔軟性が
無くなることから、例えば特開平6-110653号公報に掲
載されたメモリシステム及びそれを用いたメモリ制御方
法のように閾値を変更できる装置及び方法が開発され
た。特開平6-110653号公報に掲載されたメモリシステ
ムでは、図4に示すように任意の閾値をレジスタ22に
記憶し、出力カウンタ6aが記憶したリードアドレスと
入力カウンタ4aが記憶したライトアドレスとの差から
デュアルポートRAM1cに記憶したデータ量を算出
し、その算出したデータ量をレジスタ22に記憶した閾
値と比較することによって上記フラグを得ている。
[0003] If the threshold value is fixed, the design flexibility is lost. For example, a memory system disclosed in Japanese Patent Application Laid-Open No. 6-110653 and a device capable of changing the threshold value using a memory control method using the memory system are disclosed. And methods have been developed. In the memory system disclosed in Japanese Patent Laid-Open No. 6-110653, an arbitrary threshold value is stored in a register 22 as shown in FIG. 4, and a read address stored by an output counter 6a and a write address stored by an input counter 4a are stored. The amount of data stored in the dual port RAM 1c is calculated from the difference, and the flag is obtained by comparing the calculated amount of data with the threshold value stored in the register 22.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、特開平
6-110653号公報に掲載されたメモリシステムでは、閾
値を記憶するレジスタを必要とすることから回路規模が
大きくなっていた。
However, the memory system disclosed in Japanese Patent Application Laid-Open No. 6-110653 requires a register for storing a threshold value, so that the circuit scale is large.

【0005】特に、有効なデータの量を表す上記各フラ
グを得るためには複数のレジスタが必要になり、回路規
模がさらに大きくなる。
In particular, a plurality of registers are required to obtain each of the flags indicating the amount of valid data, which further increases the circuit size.

【0006】この発明はかかる短所を解消するためにな
されたものであり、回路規模を大きくせずに閾値を自由
に変更できる先入れ先出しメモリ装置を得ることを目的
とする。
SUMMARY OF THE INVENTION The present invention has been made to solve such a disadvantage, and has as its object to provide a first-in first-out memory device in which a threshold can be freely changed without increasing the circuit scale.

【0007】[0007]

【課題を解決するための手段】この発明に係る先入れ先
出しメモリ装置は、先入れ先出しメモリとライトアドレ
ス保持部とリードアドレス保持部とデータ量計算部と比
較部を有し、先入れ先出しメモリはライトアドレス及び
リードアドレスを基に先入れ先出しでデータの書き込み
及び読み出しを行い、ライトアドレス保持部は先入れ先
出しメモリのライトアドレスを保持する部分であり、保
持したライトアドレスを先入れ先出しメモリに対するラ
イト信号を基に更新し、リードアドレス保持部は先入れ
先出しメモリのリードアドレスを保持する部分であり、
保持したリードアドレスを先入れ先出しメモリに対する
リード信号を基に更新し、データ量計算部はライトアド
レス保持部で保持したライトアドレスとリードアドレス
保持部で保持したリードアドレスとを基に先入れ先出し
メモリ内のデータ量を算出し、比較部はデータ量計算部
が算出した先入れ先出しメモリ内のデータ量と外部から
入力した閾値とを比較し、その比較結果を出力して、必
要な場合に任意の値の閾値を入力して先入れ先出しメモ
リのデータ記憶状態を出力することができるようにす
る。
A first-in first-out memory device according to the present invention has a first-in first-out memory, a write address holding unit, a read address holding unit, a data amount calculation unit, and a comparison unit, and the first-in first-out memory has a write address and a read address. The write address holding unit is a unit for holding the write address of the first-in, first-out memory based on the first-in first-out memory, and updates the held write address based on the write signal to the first-in-first-out memory; Is the part that holds the read address of the first-in first-out memory,
The held read address is updated based on the read signal for the first-in first-out memory, and the data amount calculating unit calculates the data amount in the first-in first-out memory based on the write address held in the write address holding unit and the read address held in the read address holding unit. The comparison unit compares the data amount in the first-in first-out memory calculated by the data amount calculation unit with a threshold value input from the outside, outputs the comparison result, and inputs a threshold value of an arbitrary value when necessary. Then, the data storage state of the first-in first-out memory can be output.

【0008】また、先入れ先出しメモリ装置は、先入れ
先出しメモリとライトアドレス保持部とデータ量保持部
とリードアドレス計算部と比較部を有し、先入れ先出し
メモリはライトアドレス及びリードアドレスを基に先入
れ先出しでデータの書き込み及び読み出しを行い、ライ
トアドレス保持部は先入れ先出しメモリのライトアドレ
スを保持する部分であり、保持したライトアドレスを先
入れ先出しメモリに対するライト信号を基に更新し、デ
ータ量保持部は先入れ先出しメモリに記憶したデータ量
を表す値を保持する部分であり、保持したデータ量を表
す値を先入れ先出しメモリに対するライト信号及び先入
れ先出しメモリに対するリード信号を基に更新し、リー
ドアドレス計算部はライトアドレス保持部で保持したラ
イトアドレスとデータ量保持部で保持した先入れ先出し
メモリのデータ量を示す値とを基に先入れ先出しメモリ
のリードアドレスを算出し、比較部はデータ量保持部で
保持した先入れ先出しメモリ内のデータ量と外部から入
力した閾値とを比較し、その比較結果を出力する。
The first-in first-out memory device has a first-in first-out memory, a write address holding unit, a data amount holding unit, a read address calculation unit, and a comparison unit. The first-in first-out memory writes data in a first-in first-out manner based on a write address and a read address. The write address holding unit is a unit for holding the write address of the first-in first-out memory, updates the held write address based on a write signal to the first-in-first-out memory, and the data amount holding unit stores the data amount stored in the first-in-first-out memory. Is a part that holds a value indicating the amount of data held, based on a write signal to the first-in first-out memory and a read signal to the first-in-first-out memory, and the read address calculation unit uses the write address held in the write address holding unit and De The read address of the first-in first-out memory is calculated based on the value indicating the data amount of the first-in first-out memory held by the data amount holding unit, and the comparison unit calculates the data amount in the first-in first-out memory held by the data amount holding unit and a threshold value input from the outside. And outputs the result of the comparison.

【0009】また、先入れ先出しメモリ装置は、先入れ
先出しメモリとリードアドレス保持部とデータ量保持部
とライトアドレス計算部と比較部を有し、先入れ先出し
メモリはライトアドレス及びリードアドレスを基に先入
れ先出しでデータの書き込み及び読み出しを行い、リー
ドアドレス保持部は先入れ先出しメモリのリードアドレ
スを保持する部分であり、保持したリードアドレスを先
入れ先出しメモリに対するリード信号を基に更新し、デ
ータ量保持部は先入れ先出しメモリに記憶したデータ量
を表す値を保持する部分であり、保持したデータ量を表
す値を先入れ先出しメモリに対するライト信号及び先入
れ先出しメモリに対するリード信号を基に更新し、ライ
トアドレス計算部はリードアドレス保持部で保持したリ
ードアドレスとデータ量保持部で保持した先入れ先出し
メモリのデータ量を示す値とを基に先入れ先出しメモリ
のライトアドレスを算出し、比較部はデータ量保持部で
保持した先入れ先出しメモリ内のデータ量と外部から入
力した閾値とを比較し、その比較結果を出力する。
The first-in first-out memory device has a first-in first-out memory, a read address holding unit, a data amount holding unit, a write address calculating unit, and a comparing unit. The first-in first-out memory writes data in a first-in first-out manner based on a write address and a read address. The read address holding unit is a unit for holding the read address of the first-in first-out memory, updates the held read address based on a read signal for the first-in first-out memory, and the data amount holding unit updates the data amount stored in the first-in first-out memory. Is a part that holds a value representing the amount of data held, based on a write signal to the first-in first-out memory and a read signal to the first-in-first-out memory, and the write address calculation unit reads the read address held by the read address holding unit. De The write address of the first-in first-out memory is calculated based on the value indicating the data amount of the first-in first-out memory held by the data amount holding unit, and the comparison unit calculates the data amount in the first-in first-out memory held by the data amount holding unit and a threshold value input from the outside. And outputs the result of the comparison.

【0010】[0010]

【発明の実施の形態】この発明の先入れ先出しメモリ装
置は、先入れ先出しでデータの書き込み及び読み出しを
するものであって、記憶容量と実際のデータ記憶量との
関係を表すFULL,ALMOSTFULL,HALFFULL,ALMOSTEMPTY
及びEMPTY等のフラグに相当する結果を出力するもので
ある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first-in first-out memory device according to the present invention writes and reads data in a first-in first-out manner, and indicates FULL, ALMOSTFULL, HALFFULL, and ALMOSTEMPTY representing the relationship between storage capacity and actual data storage capacity.
And a result corresponding to a flag such as EMPTY.

【0011】先入れ先出しメモリ装置は、例えば先入れ
先出しメモリ(以後、「FIFOメモリ」という。)、
入力制御回路、ライトアドレス保持部、出力制御回路、
リードアドレス保持部、データ量計算部及び比較部を有
する。FIFOメモリは入力制御回路及び出力制御回路
の制御並びにライトアドレス保持部で保持したライトア
ドレス及びリードアドレス保持部で保持したリードアド
レスに応じて、先入れ先出しでデータの書き込み及び読
み出しをする。入力制御回路は外部からのライト信号を
基にFIFOメモリに対してライト信号を出力し、FI
FOメモリに対するデータの書き込みを制御する。ライ
トアドレス保持部はFIFOメモリのライトアドレスを
保持する部分であり、入力制御回路からのFIFOメモ
リに対するライト信号を受けると保持したFIFOメモ
リのライトアドレスを更新する。ここで、ライトアドレ
スとはFIFOメモリのデータ書き込み先を示すアドレ
スである。出力制御回路は外部からのリード信号を基に
FIFOメモリに対してリード信号を出力し、FIFO
メモリからのデータの読み出しを制御する。リードアド
レス保持部はFIFOメモリのリードアドレスを保持す
る部分であり、保持したFIFOメモリのリードアドレ
スを出力制御回路からのFIFOメモリに対するリード
信号を基に更新する。ここで、リードアドレスとはFI
FOメモリのデータ読み出しアドレスである。
The first-in first-out memory device is, for example, a first-in first-out memory (hereinafter, referred to as a “FIFO memory”).
Input control circuit, write address holding unit, output control circuit,
It has a read address holding unit, a data amount calculation unit, and a comparison unit. The FIFO memory writes and reads data on a first-in first-out basis in accordance with the control of the input control circuit and the output control circuit, and the write address held by the write address holding unit and the read address held by the read address holding unit. The input control circuit outputs a write signal to the FIFO memory based on the external write signal,
It controls writing of data to the FO memory. The write address holding unit is a unit that holds the write address of the FIFO memory, and updates the held write address of the FIFO memory when receiving a write signal to the FIFO memory from the input control circuit. Here, the write address is an address indicating a data write destination of the FIFO memory. The output control circuit outputs a read signal to the FIFO memory based on an external read signal, and outputs the read signal to the FIFO memory.
Controls reading of data from memory. The read address holding unit holds the read address of the FIFO memory, and updates the held read address of the FIFO memory based on a read signal from the output control circuit to the FIFO memory. Here, the read address is FI
This is a data read address of the FO memory.

【0012】データ量計算部はライトアドレス保持部に
保持したライトアドレスとリードアドレス保持部で保持
したリードアドレスとを基にFIFOメモリ内のデータ
量を算出する。比較部はデータ量計算部が算出したFI
FOメモリ内のデータ量を表す値と外部から入力した閾
値とを比較し、その比較結果を出力する。先入れ先出し
メモリ装置の周辺の装置が先入れ先出しメモリ装置の記
憶容量と実際のデータの記憶量との関係を示す情報を必
要とする場合は周辺の装置から閾値を入力し、そのタイ
ミングに合わせて、比較部からの比較結果を読み出す。
このように、任意の値の閾値を入力することができるの
で、周辺の装置の処理単位等に応じて種々な比較結果を
得ることができる。また、先入れ先出しメモリ装置で閾
値を記憶する必要がないので、回路規模が大きくなるこ
とを防止できる。
The data amount calculation unit calculates the data amount in the FIFO memory based on the write address stored in the write address storage unit and the read address stored in the read address storage unit. The comparison unit is the FI calculated by the data amount calculation unit.
The value indicating the amount of data in the FO memory is compared with an externally input threshold value, and the comparison result is output. If the peripheral device of the first-in first-out memory device needs information indicating the relationship between the storage capacity of the first-in-first-out memory device and the actual data storage amount, a threshold value is input from the peripheral device, and the comparing unit is adjusted in accordance with the timing. Read the comparison result from.
As described above, since an arbitrary threshold value can be input, various comparison results can be obtained according to the processing units of peripheral devices and the like. Further, since it is not necessary to store the threshold value in the first-in first-out memory device, it is possible to prevent an increase in circuit scale.

【0013】また、先入れ先出しメモリ装置は、FIF
Oメモリ、入力制御回路、ライトアドレス保持部、出力
制御回路、データ量保持部、リードアドレス計算部及び
比較部を有するようにしても良い。データ量保持部は入
力制御回路からのFIFOメモリに対するライト信号及
び出力制御回路からのFIFOメモリに対するリード信
号を基にFIFO内のデータ量を求めて保持する。リー
ドアドレス計算部はライトアドレス保持部で保持したラ
イトアドレスとデータ量保持部で保持したFIFOメモ
リ内のデータ量を表す値からFIFOメモリのリードア
ドレスを算出する。比較部はデータ量保持部で保持した
FIFOメモリ内のデータ量を表す値と閾値入力部が入
力した閾値とを比較し、その比較結果を出力する。
The first-in first-out memory device is a FIFO
An O memory, an input control circuit, a write address holding unit, an output control circuit, a data amount holding unit, a read address calculation unit, and a comparison unit may be provided. The data amount holding unit obtains and holds the data amount in the FIFO based on a write signal to the FIFO memory from the input control circuit and a read signal to the FIFO memory from the output control circuit. The read address calculation unit calculates the read address of the FIFO memory from the write address held by the write address holding unit and the value indicating the amount of data in the FIFO memory held by the data amount holding unit. The comparing section compares the value indicating the data amount in the FIFO memory held by the data amount holding section with the threshold value input by the threshold value input section, and outputs the comparison result.

【0014】また、先入れ先出しメモリ装置は、FIF
Oメモリ、入力制御回路、出力制御回路、リードアドレ
ス保持部、データ量保持部、ライトアドレス計算部及び
比較部を有するようにしても良い。ライトアドレス計算
部はリードアドレス保持部で保持したリードアドレスと
データ量保持部で保持したFIFOメモリ内のデータ量
を示す値からFIFOメモリのライトアドレスを算出す
る。
The first-in first-out memory device is a FIFO
An O memory, an input control circuit, an output control circuit, a read address holding unit, a data amount holding unit, a write address calculation unit, and a comparison unit may be provided. The write address calculation unit calculates the write address of the FIFO memory from the read address held by the read address holding unit and the value indicating the amount of data in the FIFO memory held by the data amount holding unit.

【0015】[0015]

【実施例】図1はこの発明の一実施例の先入れ先出しメ
モリ装置1の構成図である。図に示すように、先入れ先
出しメモリ装置1はFIFOメモリ2、入力制御回路
3、ライトアドレス保持部4、出力制御回路5、リード
アドレス保持部6、データ量計算部7及び比較部8を有
する。FIFOメモリ2は入力制御回路3からのライト
信号及び出力制御回路5からのリード信号に応じて、ラ
イトアドレス保持部4で保持したライトアドレスに対す
るデータ書き込み及びリードアドレス保持部6で保持し
たリードアドレスからのデータの読み出しを行い、先入
れ先出しでデータの書き込み及び読み出しをする。入力
制御回路3は外部からのライト信号に応じてFIFOメ
モリ2に対してライト信号を出力して、FIFOメモリ
2に対するデータの書き込みを制御する。ライトアドレ
ス保持部4はFIFOメモリ2のライトアドレスを保持
する部分であり、例えば入力制御回路3からライト信号
を受け、FIFOメモリ2がデータの書き込みを行なっ
た後に、保持したライトアドレスをインクリメントす
る。ここで、ライトアドレスがFIFOメモリ2の記憶
領域の上限のアドレスに達した場合は、ライトアドレス
保持部4はFIFOメモリ2の記憶領域の先頭アドレス
から続きを計算する。出力制御回路5は外部からのリー
ド信号に応じてFIFOメモリ2に対してリード信号を
出力して、FIFOメモリ2からのデータの読み出しを
制御する。リードアドレス保持部6はFIFOメモリ2
のリードアドレスを保持する部分であり、例えば出力制
御回路5からリード信号を受け、FIFOメモリ2から
データの読み出しがあった後に、保持したリードアドレ
スをインクリメントする。ここで、リードアドレスがF
IFOメモリ2の記憶領域の上限のアドレスに達した場
合は、ライトアドレスの場合と同様の処理をする。
FIG. 1 is a block diagram of a first-in first-out memory device 1 according to one embodiment of the present invention. As shown in the figure, the first-in first-out memory device 1 includes a FIFO memory 2, an input control circuit 3, a write address holding unit 4, an output control circuit 5, a read address holding unit 6, a data amount calculation unit 7, and a comparison unit 8. In response to a write signal from the input control circuit 3 and a read signal from the output control circuit 5, the FIFO memory 2 writes data to the write address held by the write address holding unit 4 and reads data from the read address held by the read address holding unit 6. , And the data is written and read out on a first-in first-out basis. The input control circuit 3 outputs a write signal to the FIFO memory 2 in response to an external write signal, and controls writing of data to the FIFO memory 2. The write address holding unit 4 is a unit that holds a write address of the FIFO memory 2 and, for example, receives a write signal from the input control circuit 3 and, after the FIFO memory 2 writes data, increments the held write address. Here, when the write address reaches the upper limit address of the storage area of the FIFO memory 2, the write address holding unit 4 calculates the continuation from the start address of the storage area of the FIFO memory 2. The output control circuit 5 outputs a read signal to the FIFO memory 2 in response to an external read signal, and controls reading of data from the FIFO memory 2. The read address holding unit 6 is a FIFO memory 2
The read address is, for example, received from the output control circuit 5, and after reading data from the FIFO memory 2, the held read address is incremented. Here, the read address is F
When the upper limit address of the storage area of the IFO memory 2 is reached, the same processing as in the case of the write address is performed.

【0016】データ量計算部7はライトアドレス保持部
4で保持したライトアドレスとリードアドレス保持部6
で保持したリードアドレスとを基にFIFOメモリ2内
の有効なデータ量を算出する。例えば、FIFOメモリ
2のアドレスの小さい方からデータを記憶している場合
において、データ量計算部7はライトアドレスがリード
アドレスより大きい場合はライトアドレスからリードア
ドレスを引いてデータ量を求め、ライトアドレスがリー
ドアドレスより小さい場合はFIFOメモリ2の最終ア
ドレスからリードアドレスを引いた値とライトアドレス
からFIFOメモリ2の先頭アドレスを引いた値を足し
てFIFOメモリ2に記憶したデータ量を求める。
The data amount calculation unit 7 stores the write address stored in the write address storage unit 4 and the read address storage unit 6.
The valid data amount in the FIFO memory 2 is calculated based on the read address held in the step (1). For example, when data is stored from the smaller address of the FIFO memory 2 and the write address is larger than the read address, the data amount calculator 7 subtracts the read address from the write address to obtain the data amount, and Is smaller than the read address, the amount of data stored in the FIFO memory 2 is obtained by adding the value obtained by subtracting the read address from the last address of the FIFO memory 2 and the value obtained by subtracting the start address of the FIFO memory 2 from the write address.

【0017】比較部8はデータ量計算部7が算出したF
IFOメモリ2内のデータ量と周辺の装置(不図示)か
ら入力した閾値とを比較し、その比較結果を出力する。
ここで、比較部8の比較結果としては、FIFOメモリ
2内のデータ量を示す値が閾値より大きいことを示す場
合、FIFOメモリ2内のデータ量を示す値と閾値が等
しいことを示す場合、FIFOメモリ2内のデータ量を
示す値が閾値より小さいことを示す場合の3通りある。
したがって、例えば閾値をFIFOメモリ2の容量より
小さい範囲内でFIFOメモリ2の容量に近い値にすれ
ばALMOSTFULLのフラグと同様の結果を得ることができ、
閾値をゼロに近い値にすればALMOSTEMPTYのフラグと同
様の結果を得ることができる。同様に閾値を変えること
により、FULL,HALFFULL,EMPTYのフラグと同様な結果
を得ることができる。
The comparing unit 8 calculates the F calculated by the data amount calculating unit 7.
The data amount in the IFO memory 2 is compared with a threshold value input from a peripheral device (not shown), and the comparison result is output.
Here, the comparison result of the comparison unit 8 indicates that the value indicating the data amount in the FIFO memory 2 is larger than the threshold value, the value indicating the data amount in the FIFO memory 2 is equal to the threshold value, There are three cases where the value indicating the amount of data in the FIFO memory 2 indicates that the value is smaller than the threshold value.
Therefore, for example, if the threshold is set to a value close to the capacity of the FIFO memory 2 within a range smaller than the capacity of the FIFO memory 2, the same result as the flag of the ALMOSTFULL can be obtained.
If the threshold value is set to a value close to zero, a result similar to that of the ALMOSTEMPTY flag can be obtained. Similarly, by changing the threshold value, a result similar to the FULL, HALFFULL, and EMPTY flags can be obtained.

【0018】周辺の装置で上記比較結果を必要とする場
合は、周辺の装置から比較部8に閾値を入力し、その閾
値を入力したタイミングに合わせて比較部8からの比較
結果を読み込むようにする。このように、周辺の装置で
比較結果を読み込む際に閾値を入力することにより、閾
値を記憶する必要がなくなり、回路規模を小さくするこ
とができる。また、任意の閾値を入力することができる
ので、周辺の装置のワードの構成ビット数等に応じて最
適の比較結果を得ることができる。
When a peripheral device needs the comparison result, a threshold value is input from the peripheral device to the comparison unit 8, and the comparison result from the comparison unit 8 is read in time with the input of the threshold value. I do. As described above, by inputting the threshold value when the comparison result is read by the peripheral device, it is not necessary to store the threshold value, and the circuit scale can be reduced. Also, since an arbitrary threshold can be input, an optimum comparison result can be obtained according to the number of bits constituting a word of a peripheral device.

【0019】また、図2に示すように先入れ先出しメモ
リ装置1aは、FIFOメモリ2、入力制御回路3、ラ
イトアドレス保持部4、出力制御回路5、データ量保持
部9、リードアドレス計算部10及び比較部8を有する
ようにしても良い。データ量保持部9はFIFOメモリ
2内のデータ量を示す値を保持する部分であり、入力制
御回路3からのFIFOメモリ2に対するライト信号を
受けると保持したデータ量を示す値をインクリメント
し、出力制御回路5からのFIFOメモリ2に対するリ
ード信号を受けると保持したデータ量を示す値をデクリ
メントする。リードアドレス計算部10はライトアドレ
ス保持部4で保持したライトアドレスとデータ量保持部
9で保持したFIFOメモリ2内のデータ量を示す値と
からFIFOメモリ2のリードアドレスを算出する。こ
のため、リードアドレスを保持しなくともFIFOメモ
リ2からのデータの読み出しアドレスを得ることができ
る。比較部8はデータ量保持部9で保持したFIFOメ
モリ2内のデータ量を示す値と外部から入力した閾値と
を比較し、既に説明したようにしてその比較結果を出力
する。
As shown in FIG. 2, the first-in first-out memory device 1a comprises a FIFO memory 2, an input control circuit 3, a write address holding unit 4, an output control circuit 5, a data amount holding unit 9, a read address calculation unit 10, and a comparison unit. A section 8 may be provided. The data amount holding unit 9 is a unit for holding a value indicating the data amount in the FIFO memory 2, and upon receiving a write signal to the FIFO memory 2 from the input control circuit 3, increments the value indicating the held data amount and outputs the value. When a read signal from the control circuit 5 to the FIFO memory 2 is received, the value indicating the held data amount is decremented. The read address calculator 10 calculates a read address of the FIFO memory 2 from the write address held by the write address holder 4 and a value indicating the amount of data in the FIFO memory 2 held by the data amount holder 9. Therefore, the read address of the data from the FIFO memory 2 can be obtained without holding the read address. The comparison unit 8 compares the value indicating the data amount in the FIFO memory 2 held by the data amount holding unit 9 with a threshold value input from the outside, and outputs the comparison result as described above.

【0020】また、図3に示すように先入れ先出しメモ
リ装置1bは、FIFOメモリ2、入力制御回路3、出
力制御回路5、リードアドレス保持部6、データ量保持
部9、ライトアドレス計算部11及び比較部8を有する
ようにしても良い。ライトアドレス計算部11はリード
アドレス保持部6で保持したリードアドレスとデータ量
保持部9で保持したFIFOメモリ2内のデータ量を示
す値からFIFOメモリ2のライトアドレスを算出す
る。このため、ライトアドレスを保持しなくともFIF
Oメモリ2に対するデータの書き込み先のアドレスを得
ることができる。
As shown in FIG. 3, the first-in first-out memory device 1b includes a FIFO memory 2, an input control circuit 3, an output control circuit 5, a read address holding unit 6, a data amount holding unit 9, a write address calculation unit 11, and a comparison unit. A section 8 may be provided. The write address calculation unit 11 calculates the write address of the FIFO memory 2 from the read address held by the read address holding unit 6 and the value indicating the amount of data in the FIFO memory 2 held by the data amount holding unit 9. Therefore, even if the write address is not held,
The address at which data is written to the O memory 2 can be obtained.

【0021】[0021]

【発明の効果】この発明は以上説明したように、データ
のライトアドレスとリードアドレスを保持し、保持した
ライトアドレスとリードアドレスとを基にデータの量を
算出し、算出したデータ量を示す値と外部から入力した
閾値とを比較し、その比較結果を出力するので、必要な
場合に任意の値の閾値を入力してデータ記憶状態を出力
することができる。
As described above, the present invention holds a write address and a read address of data, calculates an amount of data based on the held write address and read address, and sets a value indicating the calculated data amount. Is compared with a threshold value input from the outside, and the comparison result is output. Therefore, when necessary, a threshold value of an arbitrary value can be input to output a data storage state.

【0022】さらに、任意の閾値を入力できるので、周
辺装置のデータ処理単位等に合わせて閾値を自由に選択
でき、周辺の設計の自由度を高めることができる。
Furthermore, since an arbitrary threshold value can be input, the threshold value can be freely selected in accordance with the data processing unit of the peripheral device, and the degree of freedom in peripheral design can be increased.

【0023】さらに、閾値を記憶しないので、閾値記憶
回路が必要なく、装置構成を小さくすることができる。
Further, since no threshold value is stored, a threshold value storage circuit is not required, and the device configuration can be reduced.

【0024】また、ライトアドレスとデータ量を表す値
を保持し、保持したライトアドレスとデータ量を示す値
とを基にリードアドレスを算出し、保持したライトアド
レス及び算出したリードアドレスに応じて先入れ先出し
でデータの書き込み及び読み出しを行い、保持したデー
タ量を示す値と外部から入力した閾値とを比較し、その
比較結果を出力するので、リードアドレスを保持する手
段を持たずとも、必要な場合に任意の値の閾値を入力し
てデータ記憶状態を出力することができる。
Further, the write address and a value indicating the data amount are held, and the read address is calculated based on the held write address and the value indicating the data amount, and a first-in first-out operation is performed according to the held write address and the calculated read address. Performs writing and reading of data, compares the value indicating the amount of data held with an externally input threshold value, and outputs the comparison result, so if there is no need to hold a read address, The data storage state can be output by inputting an arbitrary threshold value.

【0025】また、リードアドレスとデータ量を表す値
を保持し、保持したリードアドレスとデータ量を示す値
とを基にライトアドレスを算出し、算出したライトアド
レス及び保持したリードアドレスに応じて先入れ先出し
でデータの書き込み及び読み出しを行い、保持したデー
タ量を示す値と外部から入力した閾値とを比較し、その
比較結果を出力するので、ライトアドレスを保持する手
段を持たずとも、必要な場合に任意の値の閾値を入力し
てデータ記憶状態を出力することができる。
Also, a read address and a value indicating a data amount are held, a write address is calculated based on the held read address and a value indicating the data amount, and a first-in first-out operation is performed according to the calculated write address and the held read address. Write and read data, compare the value indicating the amount of data held with a threshold value input from the outside, and output the comparison result, so if it is necessary to have no means for holding the write address, The data storage state can be output by inputting an arbitrary threshold value.

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

【図1】この発明の実施例を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of the present invention.

【図2】リードアドレス計算部を備える先入れ先出しメ
モリ装置の構成図である。
FIG. 2 is a configuration diagram of a first-in first-out memory device including a read address calculation unit;

【図3】ライトアドレス計算部を備える先入れ先出しメ
モリ装置の構成図である。
FIG. 3 is a configuration diagram of a first-in first-out memory device including a write address calculation unit;

【図4】従来のメモリシステムの構成図である。FIG. 4 is a configuration diagram of a conventional memory system.

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

1 先入れ先出しメモリ装置 2 FIFOメモリ 3 入力制御回路 4 ライトアドレス保持部 5 出力制御回路 6 リードアドレス保持部 7 データ量計算部 8 比較部 9 データ量保持部 10 リードアドレス計算部 11 ライトアドレス計算部 DESCRIPTION OF SYMBOLS 1 First-in first-out memory device 2 FIFO memory 3 Input control circuit 4 Write address holding part 5 Output control circuit 6 Read address holding part 7 Data amount calculation part 8 Comparison part 9 Data amount holding part 10 Read address calculation part 11 Write address calculation part

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 先入れ先出しメモリとライトアドレス保
持部とリードアドレス保持部とデータ量計算部と比較部
を有し、先入れ先出しメモリはライトアドレス及びリー
ドアドレスを基に先入れ先出しでデータの書き込み及び
読み出しを行い、ライトアドレス保持部は先入れ先出し
メモリのライトアドレスを保持する部分であり、保持し
たライトアドレスを先入れ先出しメモリに対するライト
信号を基に更新し、リードアドレス保持部は先入れ先出
しメモリのリードアドレスを保持する部分であり、保持
したリードアドレスを先入れ先出しメモリに対するリー
ド信号を基に更新し、データ量計算部はライトアドレス
保持部で保持したライトアドレスとリードアドレス保持
部で保持したリードアドレスとを基に先入れ先出しメモ
リ内のデータ量を算出し、比較部はデータ量計算部が算
出した先入れ先出しメモリ内のデータ量を示す値と外部
から入力した閾値とを比較し、その比較結果を出力する
ことを特徴とする先入れ先出しメモリ装置。
A first-in first-out memory, a write address holding unit, a read address holding unit, a data amount calculation unit, and a comparison unit, wherein the first-in first-out memory writes and reads data on a first-in first-out basis based on a write address and a read address; The write address holding unit is a unit that holds the write address of the first-in first-out memory, updates the held write address based on a write signal to the first-in-first-out memory, and the read address holding unit is a unit that holds the read address of the first-in-first-out memory, The held read address is updated based on the read signal for the first-in first-out memory, and the data amount calculating unit calculates the data amount in the first-in first-out memory based on the write address held in the write address holding unit and the read address held in the read address holding unit. Is calculated A first-in first-out memory device, wherein the comparison unit compares a value indicating the data amount in the first-in first-out memory calculated by the data amount calculation unit with a threshold value input from the outside, and outputs the comparison result.
【請求項2】 先入れ先出しメモリとライトアドレス保
持部とデータ量保持部とリードアドレス計算部と比較部
を有し、先入れ先出しメモリはライトアドレス及びリー
ドアドレスを基に先入れ先出しでデータの書き込み及び
読み出しを行い、ライトアドレス保持部は先入れ先出し
メモリのライトアドレスを保持する部分であり、保持し
たライトアドレスを先入れ先出しメモリに対するライト
信号を基に更新し、データ量保持部は先入れ先出しメモ
リに記憶したデータ量を表す値を保持する部分であり、
保持したデータ量を表す値を先入れ先出しメモリに対す
るライト信号及び先入れ先出しメモリに対するリード信
号を基に更新し、リードアドレス計算部はライトアドレ
ス保持部で保持したライトアドレスとデータ量保持部で
保持した先入れ先出しメモリのデータ量を示す値とを基
に先入れ先出しメモリのリードアドレスを算出し、比較
部はデータ量保持部で保持した先入れ先出しメモリ内の
データ量を示す値と外部から入力した閾値とを比較し、
その比較結果を出力することを特徴とする先入れ先出し
メモリ装置。
2. A first-in first-out memory, a write address holding unit, a data amount holding unit, a read address calculating unit, and a comparing unit. The first-in first-out memory writes and reads data on a first-in first-out basis based on a write address and a read address. The write address holding unit is a unit that holds the write address of the first-in first-out memory, updates the held write address based on a write signal to the first-in-first-out memory, and the data amount holding unit holds a value that indicates the amount of data stored in the first-in-first-out memory Part to do
The value representing the amount of data held is updated based on the write signal to the first-in first-out memory and the read signal to the first-in-first-out memory, and the read address calculation unit writes the write address held in the write address holding unit and the first-in first-out memory held in the data amount holding unit A read address of the first-in first-out memory is calculated based on the value indicating the data amount, and the comparing unit compares the value indicating the data amount in the first-in first-out memory held by the data amount holding unit with a threshold value input from the outside,
A first-in, first-out memory device for outputting the comparison result.
【請求項3】 先入れ先出しメモリとリードアドレス保
持部とデータ量保持部とライトアドレス計算部と比較部
を有し、先入れ先出しメモリはライトアドレス及びリー
ドアドレスを基に先入れ先出しでデータの書き込み及び
読み出しを行い、リードアドレス保持部は先入れ先出し
メモリのリードアドレスを保持する部分であり、保持し
たリードアドレスを先入れ先出しメモリに対するリード
信号を基に更新し、データ量保持部は先入れ先出しメモ
リに記憶したデータ量を表す値を保持する部分であり、
保持したデータ量を表す値を先入れ先出しメモリに対す
るライト信号及び先入れ先出しメモリに対するリード信
号を基に更新し、ライトアドレス計算部はリードアドレ
ス保持部で保持したリードアドレスとデータ量保持部で
保持した先入れ先出しメモリのデータ量を示す値とを基
に先入れ先出しメモリのライトアドレスを算出し、比較
部はデータ量保持部で保持した先入れ先出しメモリ内の
データ量を示す値と外部から入力した閾値とを比較し、
その比較結果を出力することを特徴とする先入れ先出し
メモリ装置。
3. A first-in first-out memory, a read address holding unit, a data amount holding unit, a write address calculating unit, and a comparing unit. The first-in first-out memory writes and reads data on a first-in first-out basis based on the write address and the read address. The read address holding unit is a unit that holds the read address of the first-in first-out memory, updates the held read address based on a read signal to the first-in-first-out memory, and the data amount holding unit holds a value that indicates the amount of data stored in the first-in-first-out memory Part to do
The value representing the held data amount is updated based on the write signal to the first-in first-out memory and the read signal to the first-in-first-out memory, and the write address calculation unit reads the read address held in the read address holding unit and the first-in first-out memory held in the data amount holding unit. The write address of the first-in first-out memory is calculated based on the value indicating the data amount, and the comparing unit compares the value indicating the data amount in the first-in first-out memory held by the data amount holding unit with a threshold value input from the outside,
A first-in, first-out memory device for outputting the comparison result.
JP9019639A 1997-01-20 1997-01-20 First in first out memory device Pending JPH10207687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9019639A JPH10207687A (en) 1997-01-20 1997-01-20 First in first out memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9019639A JPH10207687A (en) 1997-01-20 1997-01-20 First in first out memory device

Publications (1)

Publication Number Publication Date
JPH10207687A true JPH10207687A (en) 1998-08-07

Family

ID=12004803

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9019639A Pending JPH10207687A (en) 1997-01-20 1997-01-20 First in first out memory device

Country Status (1)

Country Link
JP (1) JPH10207687A (en)

Similar Documents

Publication Publication Date Title
US4800524A (en) Modulo address generator
US5587953A (en) First-in-first-out buffer memory
JPH02226579A (en) Fifo memory device
EP0509722B1 (en) Data transfer system
US6728797B2 (en) DMA controller
JPH10207687A (en) First in first out memory device
US6215558B1 (en) Data processing apparatus and method
SE9501015D0 (en) Arrangement and method relating to handling of digital signals and a processing arrangement comprising such
JPS6211736B2 (en)
JPH04121891A (en) Fifo memory device
JP2908331B2 (en) List vector processing system
JPH01119823A (en) first in first out storage
JPH06103026A (en) Memory system
JP2002050172A (en) Fifo control circuit
JPH07182849A (en) FIFO memory
JPH09185882A (en) First-in first-out memory device having different input / output data size and method thereof
JP2723843B2 (en) Dual port memory control circuit
JPH0326413B2 (en)
JPH0833869B2 (en) Data processing device
JPH06215557A (en) Semiconductor memory device
JP2980163B2 (en) Data transfer method
JP3374772B2 (en) Size determination circuit and FIFO circuit using the same
JPH02189627A (en) Access circuit for data memory
JPH01300490A (en) First-in first-out memory
JPH05289931A (en) Information processor