JPH04205873A - Fifo memory device - Google Patents

Fifo memory device

Info

Publication number
JPH04205873A
JPH04205873A JP2335182A JP33518290A JPH04205873A JP H04205873 A JPH04205873 A JP H04205873A JP 2335182 A JP2335182 A JP 2335182A JP 33518290 A JP33518290 A JP 33518290A JP H04205873 A JPH04205873 A JP H04205873A
Authority
JP
Japan
Prior art keywords
data
memory
amount
memory device
flag
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
JP2335182A
Other languages
Japanese (ja)
Inventor
Satoshi Takahashi
学志 高橋
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 JP2335182A priority Critical patent/JPH04205873A/en
Publication of JPH04205873A publication Critical patent/JPH04205873A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

PURPOSE:To eliminate a futile memory area by controlling the number of outputted flags by means of the amount of the data written in a memory when the writing speed in the memory is different from the reading-out speed from the memory. CONSTITUTION:In the case of data transfer where the writing data transferring speed is different from the read-out data transferring speed, the number of outputted flags is controlled by the amount of the data stored in a memory and the data transfer is controlled by using the flags. Namely, flag sections 3 and 12 always compare the amount of the data stored in the memory with the amounts of data stored in registers 4 and 13 and, when the actual amount of data becomes equal to the values of the registers 4 and 13, output the flags. When the amounts of data written in the registers 4 and 13 are changed from each other and the registers 4 and 13 are selected, the amount of the data stored in the memory can be optimized. Therefore, the area of a futile memory area which is generated when the number of outputted flags is fixed can be reduced.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、メモリに蓄えられたデータ量によりフラグを
出力する機能を有し、フラグ出力の制御を行うFIFO
メモリ装置(先入れ先出しメモリ装置)に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention is directed to a FIFO which has a function of outputting a flag according to the amount of data stored in a memory and which controls flag output.
The present invention relates to a memory device (first-in, first-out memory device).

従来の技術 従来のFIFOメモリ装置は、メモリに蓄えられたデー
タ量を計算する部分からの出力を入力とするフラグ部に
おいて、FIFOメモリ装置のメモリに蓄えられたデー
タ量と一定した値との比較によりフラグ出力を制御する
2. Prior Art A conventional FIFO memory device compares the amount of data stored in the memory of the FIFO memory device with a constant value in a flag section that receives the output from a section that calculates the amount of data stored in the memory. controls the flag output.

第4図は従来のFIFOメモリ装Wの一例を示す。FI
FOメモリ装置1に入力されたデータ量は、書き込み点
と読みたし点の値が入力されてデータ量計算部2で計算
される。データ量計算部2の出力5はデータ量の値を表
わし、フラグ部3に入力される。フラグ部3ではデータ
量5がある値以上になったときにフラグ出カフを出力す
る。
FIG. 4 shows an example of a conventional FIFO memory device W. FI
The amount of data input to the FO memory device 1 is calculated by the data amount calculating section 2 by inputting the values of the write point and the read point. The output 5 of the data amount calculation section 2 represents the value of the data amount, and is input to the flag section 3. The flag unit 3 outputs a flag output when the data amount 5 exceeds a certain value.

発明が解決しようとする課題 従来のメモリに蓄えられたデータ量によってフラグを出
力する機能を持つFIFOメモリ装置では、フラグを出
力するデータ量が固定されていた。
Problems to be Solved by the Invention In a conventional FIFO memory device that has a function of outputting a flag depending on the amount of data stored in the memory, the amount of data for outputting the flag is fixed.

FIFOメモリ装置のメモリに蓄えられたデータ量によ
り出力されるフラグを用いて、FIFOメモリ装置に書
き込むデータ転送速度とPIFOメモリ装置から読み出
すデータ転送速度の異なるデータ転送の制御を行なう場
合、たとえば、書き込みが低速で、読み出しはDMA転
送を行うために高速である場合を考えてみる。FIFO
メモリ装!に低速のデータ書き込みがあり、メモリに蓄
えられたデータ量によるフラグの出力でDMA転送を要
求する。このとき、フラグの出力が固定されているため
に、フラグが出力されてからDMA転送を開始するまで
の時間に書き込まれるデータ量は、低速のデータ書き込
みが行われるために、第5図のFIFOメモリ装置のメ
モリマツプに示しているように少ないメモリ領域が使わ
れ、残りの領域は使用されないために無駄なメモリ部分
が生じていた。第5図のメモリマツプは、メモリに書き
込まれたデータ量によりフラグを出力してDMA転送の
要求をし、要求があってからDMA転送が始まるまでの
間に書き込まれるデータ量と、無駄になるメモリ領域を
示している。
When controlling data transfer in which the data transfer rate for writing to the FIFO memory device and the data transfer rate for reading from the PIFO memory device are different using a flag output according to the amount of data stored in the memory of the FIFO memory device, for example, write Let us consider the case where the read speed is low and reading is fast due to DMA transfer. FIFO
Memory device! There is low-speed data writing, and a DMA transfer is requested by outputting a flag depending on the amount of data stored in the memory. At this time, since the output of the flag is fixed, the amount of data written in the time from the output of the flag until the start of DMA transfer is limited to the FIFO shown in FIG. As shown in the memory map of the memory device, a small memory area is used and the remaining area is not used, resulting in wasted memory. The memory map in Figure 5 shows how a flag is output to request DMA transfer depending on the amount of data written to the memory, the amount of data written between the request and the start of DMA transfer, and the amount of wasted memory. It shows the area.

また、異なった書き込み速度が複数存在し、上記FIF
Oメモリ装置につながっている場合において、複数の転
送速度に応じたフラグを出力することができないので、
複数の転送速度に対して無駄になるメモリ領域か生じて
いた。
In addition, there are multiple different writing speeds, and the above FIF
When connected to an O memory device, it is not possible to output flags corresponding to multiple transfer speeds.
Memory space was wasted for multiple transfer speeds.

本発明は上記問題を解決するもので、メモリに書き込ま
れたデータ量によってフラグ出力を制御し、無駄になる
メモリ領域をなくしたF I FOメモリ装置を提供す
ることを目的とするものである。
The present invention solves the above problem, and aims to provide a FIFO memory device that controls flag output according to the amount of data written to the memory and eliminates wasted memory area.

課題を解決するための手段 上記課題を解決するために、本発明のFIFOメモリ装
置は、FIFOメモリ装置のメモリに書き込まれたデー
タ量によってフラグ出力を制御する場合において、フラ
グ出力を制御するデータ量を蓄えておく複数のレジスタ
を設け、メモリへの書き込み点と読みだし点の値を入力
し、メモリに蓄えられたデータ量を計算して出力するデ
ータ量計算部を設け、上記データ量計算部の出力を入力
としかつ上記レジスタの出力を入力として2つの入力を
比較し、フラグ出力を制御する複数のフラグ部を設けた
ものである。
Means for Solving the Problems In order to solve the above problems, the FIFO memory device of the present invention provides a method for controlling the flag output based on the amount of data written in the memory of the FIFO memory device. A plurality of registers are provided to store the data, and a data amount calculation unit is provided that inputs the values of the write point and read point to the memory, calculates and outputs the amount of data stored in the memory, and the data amount calculation unit A plurality of flag units are provided which take the output of the register as an input and the output of the register as an input, compare the two inputs, and control the flag output.

作用 本発明は、上述の構成により、FIFOメモリ装置に書
き込むデータ転送速度とFIFOメモリ装置から読み出
すデータ転送速度の異なるデータ転送において、メモリ
に蓄えられるデータ量によりフラグ出力が制御され、こ
のフラグを用いてデータ転送の制御が行われる。すなわ
ち、メモリに蓄えられるデータ量とレジスタで記憶され
ているデータ量とをフラグ部で常に比較し、実際のデー
タ量がレジスタの値と等しいか大きくなったときに、フ
ラグ部からフラグが出力されるが、このとき、複数のレ
ジスタに書き込まれたデータ量を変えておき、このレジ
スタを選択することによりメモリに蓄えられるデータ量
を最適な値にすることができ、したがって固定したフラ
グ出力時に生じていた無駄なメモリの領域を減少させる
ことができる。したがって、複数の転送速度に対して、
1つのFIFOメモリ装置で最適なフラグ出力を行うこ
とができる。
Effect of the Invention With the above-described configuration, the present invention controls the flag output according to the amount of data stored in the memory during data transfer in which the data transfer rate for writing to the FIFO memory device and the data transfer rate for reading from the FIFO memory device are different. Data transfer is controlled by In other words, the flag section constantly compares the amount of data stored in memory and the amount of data stored in the register, and when the actual amount of data is equal to or larger than the value in the register, a flag is output from the flag section. However, at this time, by changing the amount of data written to multiple registers and selecting this register, the amount of data stored in memory can be set to the optimal value. The wasted memory area can be reduced. Therefore, for multiple transfer rates,
Optimal flag output can be performed with one FIFO memory device.

実施例 以下本発明の一実緒例を図面に基づいて説明する。Example An example of the present invention will be explained below based on the drawings.

第1図は本発明の一実施例に係わるFIFOメモリ装!
の概略構成図である。第1図において、FIFOメモリ
装W1はたとえばデータを512個書き込むことのでき
るものとする。また、第3図に示すように、このFIF
Oメモリ装置1には複数の装置がそれぞれの転送速度で
書き込み19.20を行い、メモリに蓄えられたデータ
量がある値まで溜ったらフラグ18を出力してDMAコ
ントローラ10にDMA転送の要求21を工し、DMA
コントローラ10は転送要求を受けてDMA転送22を
行うように構成されている。たとえば、入力レート8に
Hzのときのデータ転送と、入力レート10にHzのと
きのデータ転送があり、FIFOメモリ装置1に書き込
まれるものとする。また、高速に読み出しを行うために
DMA転送22はFIFOメモリ装置1のメモリに蓄え
られたデータ量によって行われるものとする。
FIG. 1 shows a FIFO memory device according to an embodiment of the present invention!
FIG. In FIG. 1, it is assumed that the FIFO memory device W1 is capable of writing, for example, 512 pieces of data. Also, as shown in Figure 3, this FIF
A plurality of devices perform writing 19.20 to the memory device 1 at their respective transfer speeds, and when the amount of data stored in the memory reaches a certain value, a flag 18 is output and a request 21 for DMA transfer is sent to the DMA controller 10. and DMA
The controller 10 is configured to perform a DMA transfer 22 upon receiving a transfer request. For example, it is assumed that there are data transfers when the input rate is 8 Hz and data transfers when the input rate is 10 Hz, which are written to the FIFO memory device 1. It is also assumed that the DMA transfer 22 is performed using the amount of data stored in the memory of the FIFO memory device 1 in order to read data at high speed.

すなわち、第3図において、8にHzの速度の書き込み
19があった場合、FIFOメモリ装置1は、メモリに
蓄えられたデータ量かある一定の値に達したときに、8
KHz用フラグ7を出力し、8KHz装置の選択信号1
6により選択されてフラグ出力18として]) M A
コントローラ10に入力される。また、10にHzの速
度の書き込み20があった場合、FIFOメモリ装置1
は、メモリに蓄えられたデータ量が別のある一定の値に
達したときに、10にHz用フラグ14を出力し、10
にlZ装置の選択信号17により選択されてフラグ出力
18としてDMAコントローラ10に入力される。一方
、FIFOメモリ装置1はフラグ7.14を出力したと
きにDMA転送の要求21を出力する。このとき、DM
Aコントローラ10はDMA転送のフラグ出力18が入
力されてから、DMA転送22を開始するまでにかかる
時間を最大10ミリ秒とする。つまり、第2図に示すF
IFOメモリ装置のメモリマツプにおいて、フラグが出
力されてからFIFOメモリ装!1のメモリに書き込ま
れるデータが溢れるまでの許容量を10ミリ秒以上に設
定すれば良い。10ミリ秒の間に、8KHzの周期では
80個のデータ量が格納可能であり、10KHzの周期
では100個のデータ量が格納可能であるので、メモリ
総量の512個から、80個を引いた値432個と、5
12個から100個を引いた値412個かそれぞれ最適
のDMA転送開始時のデータ量となる。したがって、こ
のI&適のフラグ出カフ。
That is, in FIG. 3, if there is a write 19 at 8 Hz, the FIFO memory device 1 will write 8 when the amount of data stored in the memory reaches a certain value.
Output KHz flag 7 and select signal 1 for 8KHz device
6 as flag output 18]) M A
It is input to the controller 10. Also, if there is a write 20 with a speed of Hz in 10, then the FIFO memory device 1
outputs the Hz flag 14 to 10 when the amount of data stored in the memory reaches another certain value;
It is selected by the selection signal 17 of the lZ device and inputted to the DMA controller 10 as a flag output 18. On the other hand, the FIFO memory device 1 outputs a DMA transfer request 21 when outputting the flag 7.14. At this time, DM
The A controller 10 takes a maximum of 10 milliseconds from when the DMA transfer flag output 18 is input to when it starts the DMA transfer 22. In other words, F shown in Figure 2
In the memory map of the IFO memory device, after the flag is output, the FIFO memory device! It is sufficient to set the allowable amount of data written in memory 1 to 10 milliseconds or more until the data overflows. During 10 milliseconds, 80 pieces of data can be stored in a cycle of 8KHz, and 100 pieces can be stored in a cycle of 10KHz, so 80 pieces are subtracted from the total memory size of 512 pieces. 432 values and 5
The value obtained by subtracting 100 from 12 is 412, or the optimal amount of data at the start of DMA transfer. Therefore, this I&suit flag out cuff.

14 (8KHzのとき7.10にH2)とき14)を
制御する値をFIFOメモリ装置1の外部からレジスタ
(第1図において、8にHzのときは4.10KHzの
ときは13)に書き込むことにより、無駄なメモリ領域
を減少できるDMA転送開始のタイミングを決定できる
14 (H2 at 7.10 at 8 KHz) from outside the FIFO memory device 1 to the register (13 at 8 at Hz and 4.10 KHz in FIG. 1). Accordingly, it is possible to determine the timing of starting DMA transfer, which can reduce wasted memory area.

次に、実際の動作を第1図を用いて説明する。Next, the actual operation will be explained using FIG.

レジスタ4にはFIFOメモリ装置1の外部からたとえ
ば432が、またレジスタ13にはFIFOメモリ装置
1の外部からたとえば412がそれぞれ書き込まれる。
For example, 432 is written into register 4 from outside of FIFO memory device 1, and 412, for example, is written into register 13 from outside of FIFO memory device 1.

8KHzの装置か選択信号16により選択されていると
きに、8にH2″C″FIFOメモリ装置1のメモリに
データが書き込まれていくと、次第にデータが溜ってい
き、FIFOメモリ装置1のメモリに書き込まれたデー
タ量5が、レジスタ4の設定値6すなわち432個を越
えると、フラグ部3でフラグ7が出力される。そのフラ
グ出カフを用いたDMA転送の要求により、DMAコン
トローラ10はDMA転送を開始し、F I FOメモ
リ装置1のメモリから高速に読み出す。また、10K)
Izの装置が選択信号17により選択されているときは
、メモリに書き込まれたデータ量りがレジスタ13の設
定値11すなわち412個を越えると、同様にフラグ1
4が出力される。DMA転送の要求を出してからDMA
転送が開始するまでにかかる時間の最大値は10ミリ秒
であり、それまでに書き込まれるデータ量は、最大8K
Hzのとき80個で、10KHzのとき100個である
。よって、無駄になるメモリ空間が複数の装置に対して
最小の値ですむことになり、無駄なメモリ領域を複数の
書き込み速度に対して最小に抑えることができる。
When the 8KHz device is selected by the selection signal 16, when data is written to the memory of the H2"C" FIFO memory device 1 at 8, the data gradually accumulates and is stored in the memory of the FIFO memory device 1. When the written data amount 5 exceeds the set value 6 of the register 4, that is, 432 pieces, the flag unit 3 outputs a flag 7. In response to a request for DMA transfer using the flag output, the DMA controller 10 starts DMA transfer and reads data from the memory of the FIFO memory device 1 at high speed. Also, 10K)
When the Iz device is selected by the selection signal 17, if the amount of data written to the memory exceeds the set value 11 of the register 13, that is, 412 pieces, the flag 1 is similarly set.
4 is output. DMA after issuing a DMA transfer request
The maximum time it takes for the transfer to start is 10 milliseconds, and the amount of data written by then is up to 8K.
At Hz, there are 80 pieces, and at 10 KHz, there are 100 pieces. Therefore, the wasted memory space is kept to a minimum value for a plurality of devices, and the wasted memory area can be suppressed to a minimum value for a plurality of writing speeds.

発明の効果 以上のように、本発明によれば、FIFOメモロ装置の
メモリへの書き込み速度が複数あり、それらの書き込み
速度とFIFOメモリ装置のメモリからの読みだし速度
の異なる場合に、FIFOメモリ装置のメモリに書き込
まれたデータ量によってフラグ出力を制御することによ
り、読みだしまたは書き込みの高速な転送を行なう場合
に生ずる無駄なメモリ領域を、複数の書き込み速度に対
して最小に抑えることができる。
Effects of the Invention As described above, according to the present invention, when there are multiple writing speeds to the memory of the FIFO memory device and the writing speeds and the reading speed from the memory of the FIFO memory device are different, the FIFO memory device By controlling the flag output according to the amount of data written in the memory, the wasted memory area that occurs when performing high-speed read or write transfer can be minimized for multiple write speeds.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例におけるFIFOメモリ装置
の概略構成図、第2図は同FIFOメモリ装置における
フラグ出力の制御が複数の装置に対して最適な位置に設
定できることを説明するメモリマツプ、第3図は同FI
FOメモリ装置を用いてDMA転送を行う場合の一例を
説明するブロック図、第4図は従来のフラグ出力を制御
する機能を持つFIFOメモリ装置の概略構成図、第5
図は従来方式における低速で入力されるデータを高速で
転送するときのタイミングを取るために用いられるフラ
グ固定方式のメモリ領域を説明するメモリマツプである
。 1・・・FIFOメモリ装!、2・・・データ量計算部
、3.12・・・フラグ部、4.13・・・レジスタ。 代理人   森  本  義  弘 第7図 / 第2図 フラグ出力を制御して DMA転送を開始させる DMA転送が始まるまでの 時間に書き込まれる データ量 FIFOメモリ装置のメモリマツプ 第3図 /1 /1.−FIFO〆L9暮!#、17つフラ7”辻−力 第4図 FIFOメモリ装置 第5図 DMA転送を開始させる ↑ データ量 FIFOメモリ装置のメモリマップ
FIG. 1 is a schematic configuration diagram of a FIFO memory device according to an embodiment of the present invention, and FIG. 2 is a memory map illustrating that flag output control in the FIFO memory device can be set at an optimal position for a plurality of devices. Figure 3 shows the FI
A block diagram illustrating an example of DMA transfer using an FO memory device, FIG. 4 is a schematic configuration diagram of a conventional FIFO memory device having a function of controlling flag output, and FIG.
The figure is a memory map illustrating the memory area of the flag fixed method used to determine the timing when data input at low speed is transferred at high speed in the conventional method. 1...FIFO memory device! , 2... Data amount calculation section, 3.12... Flag section, 4.13... Register. Agent Yoshihiro Morimoto Figure 7/Figure 2 Controlling flag output to start DMA transfer Amount of data written during the time until DMA transfer starts Memory map of the FIFO memory device Figure 3/1 /1. -FIFO end L9! #, 17 pieces 7” Tsuji-Riki Figure 4 FIFO memory device Figure 5 Starting DMA transfer ↑ Data amount Memory map of FIFO memory device

Claims (1)

【特許請求の範囲】[Claims] 1)メモリに蓄えられたデータ量によってフラグを出力
する機能を有するFIFOメモリ装置であって、フラグ
出力を制御するデータ量を記憶する複数のレジスタと、
前記メモリへの書き込み点と読みだし点からメモリに蓄
えられたデータ量を計算する手段と、前記レジスタから
の出力と前記データ量計算手段からの出力を入力して比
較し、その比較結果に基づいてフラグ出力を制御する複
数のフラグ部とを具備したFIFOメモリ装置。
1) A FIFO memory device that has a function of outputting a flag depending on the amount of data stored in the memory, and a plurality of registers that store the amount of data that controls flag output;
means for calculating the amount of data stored in the memory from the write point and the read point to the memory; input and compare the output from the register and the output from the data amount calculation means; and based on the comparison result. A FIFO memory device comprising a plurality of flag units for controlling flag output.
JP2335182A 1990-11-29 1990-11-29 Fifo memory device Pending JPH04205873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2335182A JPH04205873A (en) 1990-11-29 1990-11-29 Fifo memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2335182A JPH04205873A (en) 1990-11-29 1990-11-29 Fifo memory device

Publications (1)

Publication Number Publication Date
JPH04205873A true JPH04205873A (en) 1992-07-28

Family

ID=18285676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2335182A Pending JPH04205873A (en) 1990-11-29 1990-11-29 Fifo memory device

Country Status (1)

Country Link
JP (1) JPH04205873A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681314B1 (en) 1998-09-08 2004-01-20 Nec Electronics Corporation FIFO memory device suitable for data transfer apparatuses with different data bus widths and method for controlling the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681314B1 (en) 1998-09-08 2004-01-20 Nec Electronics Corporation FIFO memory device suitable for data transfer apparatuses with different data bus widths and method for controlling the same

Similar Documents

Publication Publication Date Title
JP2545482B2 (en) Interface device transfer parameter setting method
JPH05173932A (en) Data transfer device
CA2289192C (en) Communication dma device
JPH04205873A (en) Fifo memory device
JPH0479011B2 (en)
JPS61123970A (en) Data transmission control system
JP2597040B2 (en) FIFO memory device
JPWO2008105494A1 (en) DMA transfer apparatus and method
JP2568048B2 (en) Data transfer controller
JPS61224063A (en) Data transfer controller
JP2577604Y2 (en) Image memory and data processing device
JP2001167084A (en) Vector operation processor and vector data moving method
JPH01119823A (en) First-in first-out storage device
JPS6017547A (en) Action history memory device
JP2553128B2 (en) Data buffer device
JPH0485786A (en) Fifo memory device
JPH07253920A (en) Fifo ram controller
JPS63107399A (en) Time division switch holding memory control system
JPH06103026A (en) Memory system
JPS6263351A (en) Disk cache device
JP2826780B2 (en) Data transfer method
JP2000132498A (en) Dma transfer controller
JPH03211655A (en) Multistage wait control central processing unit
JPH04333950A (en) Information processing system
JPH01226250A (en) Data communication system