JPH0895751A - Fifo memory - Google Patents

Fifo memory

Info

Publication number
JPH0895751A
JPH0895751A JP6234763A JP23476394A JPH0895751A JP H0895751 A JPH0895751 A JP H0895751A JP 6234763 A JP6234763 A JP 6234763A JP 23476394 A JP23476394 A JP 23476394A JP H0895751 A JPH0895751 A JP H0895751A
Authority
JP
Japan
Prior art keywords
pointer
memory
word
data
words
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
JP6234763A
Other languages
Japanese (ja)
Inventor
Yoshinori Minamide
宜徳 南出
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6234763A priority Critical patent/JPH0895751A/en
Publication of JPH0895751A publication Critical patent/JPH0895751A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To initiating an efficient interruption when the FIFO memory is used for the transmitting and receiving buffer of a serial interface the and to easily make a serial communication based upon word quantity protocol. CONSTITUTION: The word quantity flag control part 105 of the FIFO memory 204 consists of a write painter which stores the RAM address of write data, a read pointer 104 which stores the RAM address of read data, a subtracter 107 which calculates the number of data words stored in the memory 204 from the write pointer 103 and read pointer 104, a word quantity pointer 101 which can set an optional value within the range of the memory capacity, and a comparator which compares the number of the data word stored in the memory with the number of words set in the word quantity pointer 101 and asserts a word quantity flag output when the number of data words stored in the memory is larger than the number of words set in the word quantity pointer.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はファーストインファース
トアウト(以下FIFO)メモリに係り、特に、FIF
Oメモリをシリアルインタフェースの送・受信バッファ
に使用した場合に、効率の良い割り込みを発行し、およ
び、語数制御プロトコルを用いたシリアル通信を容易に
行う方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a first-in first-out (FIFO) memory, and more particularly to a FIFO.
The present invention relates to a method for issuing an efficient interrupt and easily performing serial communication using a word number control protocol when an O memory is used as a send / receive buffer of a serial interface.

【0002】[0002]

【従来の技術】従来、FIFOメモリには、その中に蓄
積されているデータ語数に応じて、EMPTY(語数が
0の時アサート),FULL(語数がメモリ容量いっぱ
いの時アサート),HALF FULL(語数がメモリ容量の半分
以上の時アサート),ALMOST(EMPTY,FULLが
成立する例えば16語数手前でアサート)等の種々のフ
ラグを出力していた。しかし、どのフラグについても語
数の値が固定されていたため、例えば、FIFOメモリ
をシリアルインタフェースの送・受信バッファに使用し
た場合、効率の良い割り込みを発行すること、および、
語数制御プロトコルによるシリアル通信を行うことが困
難であった。
2. Description of the Related Art Conventionally, in a FIFO memory, depending on the number of data words stored therein, EMPTY (asserted when the number of words is 0), FULL (asserted when the number of words is full of memory capacity), and HALF FULL ( Various flags such as asserted when the number of words is more than half the memory capacity), ALMOST (asserted before the number of 16 words before EMPTY, FULL are satisfied) are output. However, since the value of the number of words is fixed for each flag, for example, when the FIFO memory is used as the send / receive buffer of the serial interface, issuing an efficient interrupt, and
It was difficult to perform serial communication using the word number control protocol.

【0003】[0003]

【発明が解決しようとする課題】本発明の課題は、FI
FOメモリをシリアルインタフェースの送・受信バッフ
ァに使用した場合に、効率の良い割り込みを発行し、お
よび、語数制御プロトコルによるシリアル通信を容易に
行うことができるようにするために、メモリに蓄積され
ているデータ語数が、メモリ容量の範囲で任意の値を設
定できる語数ポインタに設定されている語数以上である
場合に、語数フラグ出力がアサートされるFIFOメモ
リを提供することである。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention
When the FO memory is used for the send / receive buffer of the serial interface, it is stored in the memory in order to issue an efficient interrupt and to facilitate serial communication by the word number control protocol. To provide a FIFO memory in which the word count flag output is asserted when the number of data words present is equal to or larger than the number of words set in the word count pointer that can set an arbitrary value within the range of the memory capacity.

【0004】[0004]

【課題を解決するための手段】上記課題を解決するため
に、本発明はFIFOメモリの語数フラグ制御部に、ラ
イトデータのRAMアドレスを格納するライトポイン
タ,リードデータのRAMアドレスを格納するリードポイ
ンタ、そのライトポインタおよびリードポインタからメ
モリに蓄積されているデータ語数を算出する減算器,メ
モリ容量の範囲で任意の値を設定できる語数ポインタ、
および、その語数ポインタに設定された語数とメモリに
蓄積されているデータ語数を比較し、その比較結果に応
じ、メモリに蓄積されているデータ語数が語数ポインタ
に設定された語数以上ならば語数フラグ出力をアサート
する比較器を設ける。
In order to solve the above-mentioned problems, the present invention provides a word pointer control unit of a FIFO memory with a write pointer for storing a RAM address of write data and a read pointer for storing a RAM address of read data. , A subtractor that calculates the number of data words stored in the memory from the write pointer and the read pointer, a word number pointer that can set an arbitrary value within the range of the memory capacity,
Also, the number of words set in the word count pointer is compared with the number of data words stored in the memory, and if the number of data words stored in the memory is greater than or equal to the number of words set in the word count pointer, the word count flag is compared. Provide a comparator that asserts the output.

【0005】[0005]

【作用】ライトポインタおよびリードポインタから算出
されたメモリに蓄積されているデータ語数と、語数ポイ
ンタに設定された語数を比較器により比較することによ
り、メモリに蓄積されているデータ語数が語数ポインタ
に設定された語数以上ならばアサートされる語数フラグ
出力を得る。
By comparing the number of data words accumulated in the memory calculated from the write pointer and the read pointer with the number of words set in the word number pointer by the comparator, the number of data words accumulated in the memory becomes the word number pointer. If the number of words is equal to or more than the set number of words, an asserted word number flag output is obtained.

【0006】[0006]

【実施例】本発明の実施例を、図1ないし図3を用いて
説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to FIGS.

【0007】まず、図1にFIFOメモリの構成例を示
す。FIFOメモリは、語数ポインタ101,ライトポ
インタ103,リードポインタ104,語数フラグ制御
部105,語数フラグ出力112,アービタ114,RA
M117,FIFOリード/ライトデータレジスタ123等
で構成される。語数ポインタ112は、メモリ容量の範
囲で任意の値を設定できる。ライトポインタ103はラ
イトデータのRAMアドレスを格納し、リードポインタ
104はリードデータのRAMアドレスを格納する。語
数フラグ制御部105は、メモリ容量語数106,減算
器107,加算器108,ポインタ符号検出器109,
マルチプレクサ110、および、比較器111から構成
される。ライトポインタ103およびリードポインタ1
04はサーキュラバッファのアドレスポインタを構成す
る。ポインタ符号検出器109は、ライトポインタ10
3とリードポインタ104がサーキュラアドレスの同一
周回にいるか、もしくは、ライトポインタ103がリー
ドポインタ104より一つ先の周回にいるかを検出す
る。ライトポインタ103とリードポインタ104がサ
ーキュラアドレスの同一周回にいる場合、メモリに蓄積
されているデータ語数は、“ライトポインタ103”−
“リードポインタ104”であり、ライトポインタ10
3がリードポインタ104より一つ先の周回にいる場
合、メモリに蓄積されているデータ語数は、“メモリ容
量語数106”+“ライトポインタ103"−“リードポイ
ンタ104”である。こうしてマルチプレクサ110か
らはメモリに蓄積されているデータ語数が出力される。
比較器111には、語数ポインタ101とマルチプレク
サ110の出力であるメモリに蓄積されているデータ語
数が入力され、比較器111により、メモリに蓄積され
ているデータ語数が語数ポインタ101以上ならば、語
数フラグ出力112がアサートされる。以上のように、
メモリに蓄積されているデータ語数が、語数ポインタに
設定された語数以上である場合に、語数フラグ出力がア
サートされるFIFOメモリを構成することができる。
First, FIG. 1 shows a configuration example of a FIFO memory. The FIFO memory includes a word number pointer 101, a write pointer 103, a read pointer 104, a word number flag control unit 105, a word number flag output 112, an arbiter 114, and RA.
It is composed of an M117, a FIFO read / write data register 123 and the like. The word number pointer 112 can set an arbitrary value within the range of the memory capacity. The write pointer 103 stores the RAM address of write data, and the read pointer 104 stores the RAM address of read data. The word count flag control unit 105 includes a memory capacity word count 106, a subtractor 107, an adder 108, a pointer code detector 109,
It is composed of a multiplexer 110 and a comparator 111. Write pointer 103 and read pointer 1
04 constitutes the address pointer of the circular buffer. The pointer code detector 109 uses the write pointer 10
3 and the read pointer 104 are in the same circle of the circular address, or the write pointer 103 is in the circle one ahead of the read pointer 104. When the write pointer 103 and the read pointer 104 are in the same circle of the circular address, the number of data words accumulated in the memory is "write pointer 103"-
It is the "read pointer 104" and the write pointer 10
When 3 is one round ahead of the read pointer 104, the number of data words stored in the memory is "memory capacity word number 106" + "write pointer 103"-"read pointer 104". Thus, the number of data words stored in the memory is output from the multiplexer 110.
The word number pointer 101 and the number of data words stored in the memory, which is the output of the multiplexer 110, are input to the comparator 111. If the number of data words stored in the memory is greater than or equal to the word number pointer 101, the number of words Flag output 112 is asserted. As mentioned above,
It is possible to configure a FIFO memory in which the word count flag output is asserted when the number of data words stored in the memory is equal to or larger than the number of words set in the word count pointer.

【0008】図2にFIFOメモリをシリアルインタフ
ェースの送・受信バッファに用いた例を示す。データ送
・受信装置205からの、語数制御プロトコルのシリア
ルデータをCPU201が受信する場合を考える。語数制御プ
ロトコルのデータブロック構成を図3に示す。この場
合、CPU201は、1語目を読んでそれを、FIFOメモリ
の語数ポインタに設定する。FIFOメモリはN語バッ
ファリングしたところで語数フラグ出力をアサートす
る。CPU201はそれを割り込み検出して、FIFOメモリ
からデータを読みだす。このように、語数制御プロトコ
ルによるシリアル通信を容易に行うことが可能である。
FIG. 2 shows an example in which a FIFO memory is used as a transmission / reception buffer of a serial interface. Consider a case where the CPU 201 receives serial data of the word number control protocol from the data transmission / reception device 205. The data block structure of the word number control protocol is shown in FIG. In this case, the CPU 201 reads the first word and sets it to the word number pointer of the FIFO memory. The FIFO memory asserts the word number flag output after buffering N words. The CPU 201 detects the interrupt and reads the data from the FIFO memory. Thus, it is possible to easily perform serial communication by the word number control protocol.

【0009】[0009]

【発明の効果】本発明により、FIFOメモリをシリア
ルインタフェースの送・受信バッファに使用した場合
に、効率の良い割り込みを発行し、および、語数制御プ
ロトコルによるシリアル通信を容易に行うことが可能で
ある。
According to the present invention, when the FIFO memory is used as the send / receive buffer of the serial interface, it is possible to issue an efficient interrupt and easily perform serial communication by the word number control protocol. .

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

【図1】FIFOメモリのブロック図。FIG. 1 is a block diagram of a FIFO memory.

【図2】FIFOメモリをシリアルインタフェースの送
・受信バッファに用いた例のブロック図。
FIG. 2 is a block diagram of an example in which a FIFO memory is used as a transmission / reception buffer of a serial interface.

【図3】語数制御プロトコルのデータブロック構成の説
明図。
FIG. 3 is an explanatory diagram of a data block configuration of a word number control protocol.

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

101…語数ポインタ、102…語数ポインタリード/
ライトデータ、103…ライトポインタ、104…リー
ドポインタ、105…語数フラグ制御部。
101 ... word number pointer, 102 ... word number pointer read /
Write data, 103 ... Write pointer, 104 ... Read pointer, 105 ... Word number flag control unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】メモリ容量の範囲で任意の値を設定できる
語数ポインタ、および、語数フラグ出力を有するFIF
O方式のメモリ素子およびその制御回路において、メモ
リに蓄積されているデータ語数が、前記語数ポインタに
設定されている語数以上である場合に、語数フラグ出力
がアサートされることを特徴とするFIFOメモリ。
1. A FIF having a word number pointer capable of setting an arbitrary value within a memory capacity range and a word number flag output.
In an O type memory device and its control circuit, a FIFO memory wherein a word count flag output is asserted when the number of data words stored in the memory is equal to or greater than the number of words set in the word count pointer. .
JP6234763A 1994-09-29 1994-09-29 Fifo memory Pending JPH0895751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6234763A JPH0895751A (en) 1994-09-29 1994-09-29 Fifo memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6234763A JPH0895751A (en) 1994-09-29 1994-09-29 Fifo memory

Publications (1)

Publication Number Publication Date
JPH0895751A true JPH0895751A (en) 1996-04-12

Family

ID=16975980

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6234763A Pending JPH0895751A (en) 1994-09-29 1994-09-29 Fifo memory

Country Status (1)

Country Link
JP (1) JPH0895751A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19980086711A (en) * 1997-05-01 1998-12-05 조오지 떠블유 하우스위어트 Universal Serial Bus Peripheral Microcontroller
EP0949808A2 (en) * 1998-02-20 1999-10-13 Nec Corporation PID filter circuit and FIFO circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19980086711A (en) * 1997-05-01 1998-12-05 조오지 떠블유 하우스위어트 Universal Serial Bus Peripheral Microcontroller
EP0949808A2 (en) * 1998-02-20 1999-10-13 Nec Corporation PID filter circuit and FIFO circuit
EP0949808A3 (en) * 1998-02-20 2008-11-19 Nec Corporation PID filter circuit and FIFO circuit

Similar Documents

Publication Publication Date Title
US5918073A (en) System and method for equalizing data buffer storage and fetch rates of peripheral devices
US6016513A (en) Method of preventing packet loss during transfers of data packets between a network interface card and an operating system of a computer
JP2829807B2 (en) Cell delay addition circuit
CN110830388B (en) Data scheduling method, device, network equipment and computer storage medium
KR100944892B1 (en) Bus system and bus interface for connection to a bus
CN114048152A (en) Data caching method and device, electronic equipment and storage medium
US20080148087A1 (en) Apparatus and method of time keeping for non-real-time operating system
CN113923519B (en) Video rendering method, device, computer equipment and storage medium
JPH11266274A (en) Method for transmitting asynchronous data stream through synchronous data bus and circuit device executing such method
US20030005242A1 (en) Memory control for multiple read requests
US6035361A (en) Cell bus arbitration device and method arbitrating the same
JPH0895751A (en) Fifo memory
US6094696A (en) Virtual serial data transfer mechanism
US7729302B2 (en) Adaptive control of multiplexed input buffer channels
US6314485B1 (en) Automatic status register
US7050446B2 (en) Communication control device and method
US6490676B1 (en) Method and apparatus for protecting against failures due to data unavailability in real-time data processing
JP3190800B2 (en) Asynchronous transfer circuit with transfer speed switching function
JP4328223B2 (en) Data transmitting apparatus and data receiving apparatus
US7574543B2 (en) Method for operating a processor bus
US20040001510A1 (en) Method and system for processing communications data
JP2751811B2 (en) Data transmission / reception method and device
JPH0432922A (en) Interface control circuit
JP3193202B2 (en) FIFO type memory
JPH05324529A (en) Method and device for data transfer