JPH1173299A - Buffer memory controller - Google Patents

Buffer memory controller

Info

Publication number
JPH1173299A
JPH1173299A JP10160250A JP16025098A JPH1173299A JP H1173299 A JPH1173299 A JP H1173299A JP 10160250 A JP10160250 A JP 10160250A JP 16025098 A JP16025098 A JP 16025098A JP H1173299 A JPH1173299 A JP H1173299A
Authority
JP
Japan
Prior art keywords
buffer memory
data
address
read
circuit
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.)
Granted
Application number
JP10160250A
Other languages
Japanese (ja)
Other versions
JP2873229B2 (en
Inventor
Masahiro Ohashi
政宏 大橋
Takashi Yamamoto
隆 山元
Toshihiro Moriiwa
俊博 森岩
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 JP10160250A priority Critical patent/JP2873229B2/en
Publication of JPH1173299A publication Critical patent/JPH1173299A/en
Application granted granted Critical
Publication of JP2873229B2 publication Critical patent/JP2873229B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent the loss of data, and to attain the control of overflow and empty by dividing a buffer memory into memory areas of certain data units, and operating data transfer by each data unit. SOLUTION: A buffer memory 1 is divided into memory areas of each certain data unit, and the empty of the buffer memory 1 is detected by a data discriminating circuit 29 by using flag signals 22, 23, and 24 for operating write and read control by each data unit, and data transfer is operated by each data unit by operating read control. Thus, the loss of data can be prevented, and also the control of overflow can be attained by the flag signals 22, 23, and 24.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データを一時、バ
ッファメモリに蓄えた後、データ転送を行うバッファメ
モリ制御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a buffer memory control device for temporarily storing data in a buffer memory and then performing data transfer.

【0002】[0002]

【従来の技術】一般に、バッファメモリはデータ転送速
度が異なる2つの通信系の間にこれを設けることでデー
タの転送速度の調整を行うものであり、例えばデータの
転送元のバッファメモリへの書き込み速度が、データの
転送先のバッファメモリからの読み出し速度よりも速い
場合等に用いる。
2. Description of the Related Art Generally, a buffer memory is provided between two communication systems having different data transfer speeds to adjust the data transfer speed. For example, a buffer memory of a data transfer source is written. This is used when the speed is faster than the speed of reading data from the buffer memory at the destination of the data transfer.

【0003】図8は従来のデータを一時、バッファメモ
リに蓄えた後、 データ転送を行うバッファメモリ制御装
置の構成を示すブロック図である。 図8において、1は
3つのセル(1セル=53バイト、1バイト=8ビッ
ト)容量を持つバッファメモリ(8ビットデータ入力/
出力、8ビットリード/ライトアドレス入力、リード/
ライトイネーブル入力)、2はこのバッファメモリ1の
ライトアドレスを生成するライトアドレス生成回路、3
はこのライトアドレス生成回路2によって生成されたラ
イトアドレス、4はバッファメモリ1に書き込まれるラ
イトデータ、5はバッファメモリ1を書き込み可能とす
るライトイネーブル、6はバッファメモリ1のリードア
ドレスを生成するリードアドレス生成回路、7はリード
アドレス生成回路6により生成されたリードアドレス、
8はバッファメモリ1から読み出されるリードデータ、
9はバッファメモリ1を読み出し可能とするリードイネ
ーブル、149はバッファメモリ1のライトアドレス3
とリードアドレス7とを比較するアドレス比較回路であ
り、これは、加算器を2個用いて2の補数をとり、減算
を行うものである。150はアドレス比較回路149に
よりライトアドレス3からリードアドレス7を減算して
得られた減算結果、151はこの減算結果150がマイ
ナス1から0へ変化した時にバッファメモリ1にオーバ
ーフローが発生したことを検出するオーバーフロー発生
通知回路、152はこの減算結果150がプラス1から
0へ変化した時にバッファメモリ1にエンプティーが発
生したことを検出するエンプティー発生通知回路であ
る。 また、図10(a),図10(b),図10(c) は図8のアドレ
ス比較回路, オーバーフロー発生通知回路, エンプティ
ー発生通知回路の構成をそれぞれ示すものであり、図1
0(a) において、EX01, EX02, EX11, EX12,
…,EXn1, EXn2は排他的論理和回路、AD01, AD
02, AD11, AD12, …,ADn1, ADn2は論理積回
路、OR01, OR11, …,ORn1は論理和回路である。
また、A0,A1,…,An はライトアドレスの各ビット、
0,B1,…,Bn はリードアドレスの各ビット、S0,S
1,…,Sn は減算結果の各ビット、C0,C1,…,Cn
桁上げの各ビットである。
FIG. 8 is a block diagram showing a configuration of a conventional buffer memory control device which temporarily stores data in a buffer memory and then performs data transfer. In FIG. 8, reference numeral 1 denotes a buffer memory (8-bit data input / output) having a capacity of 3 cells (1 cell = 53 bytes, 1 byte = 8 bits).
Output, 8-bit read / write address input, read /
A write address input circuit for generating a write address of the buffer memory 1;
Is a write address generated by the write address generation circuit 2, 4 is write data to be written to the buffer memory 1, 5 is a write enable that enables the buffer memory 1 to be written, and 6 is a read that generates a read address of the buffer memory 1. An address generation circuit 7 for a read address generated by the read address generation circuit 6;
8 is read data read from the buffer memory 1,
9 is a read enable to enable reading of the buffer memory 1, and 149 is a write address 3 of the buffer memory 1.
And an address comparison circuit for comparing the read address 7 with a read address 7. This address comparison circuit takes two's complement by using two adders and performs subtraction. Reference numeral 150 denotes a subtraction result obtained by subtracting the read address 7 from the write address 3 by the address comparison circuit 149, and 151 detects that an overflow has occurred in the buffer memory 1 when the subtraction result 150 changes from -1 to 0. An overflow occurrence notifying circuit 152 is an empty occurrence notifying circuit for detecting that an empty has occurred in the buffer memory 1 when the subtraction result 150 changes from +1 to 0. 10 (a), 10 (b), and 10 (c) show the configurations of the address comparison circuit, the overflow occurrence notification circuit, and the empty occurrence notification circuit of FIG. 8, respectively.
0 (a), EX 01 , EX 02 , EX 11 , EX 12 ,
, EX n1 and EX n2 are exclusive OR circuits, AD 01 and AD
02, AD 11, AD 12, ..., AD n1, AD n2 is an AND circuit, OR 01, OR 11, ... , OR n1 is an OR circuit.
A 0 , A 1 ,..., An are the bits of the write address,
B 0 , B 1 ,..., B n are each bit of the read address, S 0 , S
1, ..., each bit of the S n is the subtraction result, C 0, C 1, ..., C n is the bit carry.

【0004】また、図10(b) において、51aはアド
レス比較回路の減算結果が0であることをデコードする
デコーダ、51bはアドレス比較回路の減算結果が−1
であることをデコードするデコーダ、51cはこのデコ
ーダ51bが−1を検出したときセットされるフラグレ
ジスタ、51dはデコーダ51aとフラグレジスタ51
cの出力がともにHになったときにオーバーフローの発
生を通知する論理積回路である。
In FIG. 10 (b), 51a is a decoder for decoding that the subtraction result of the address comparison circuit is 0, and 51b is a decoder for subtracting -1 from the address comparison circuit.
51c is a flag register that is set when the decoder 51b detects -1, 51d is a decoder 51a and a flag register 51d.
This is an AND circuit for notifying the occurrence of an overflow when both outputs of c become H.

【0005】また、図10(c) において、52aはアド
レス比較回路の減算結果が0であることをデコードする
デコーダ、52bはアドレス比較回路の減算結果が+1
であることをデコードするデコーダ、52cはこのデコ
ーダ52bが+1を検出したときセットされるフラグレ
ジスタ、52dはデコーダ52aとフラグレジスタ52
cの出力がともにHになったときにオーバーフローの発
生を通知する論理積回路である。
In FIG. 10 (c), 52a is a decoder for decoding that the subtraction result of the address comparator is 0, and 52b is a decoder for subtracting +1 from the address comparator.
52c is a flag register set when the decoder 52b detects +1. 52d is a decoder 52a and a flag register 52.
This is an AND circuit for notifying the occurrence of an overflow when both outputs of c become H.

【0006】以上のように構成されたバッファメモリ制
御装置について、以下その動作について説明する。 図8
に示すように、バッファメモリ1は、ライトイネーブル
5がLOWレベル(以下、Lレベルと称す)の時に、ラ
イトアドレス生成回路2が出力するライトアドレス3に
ライトデータ4をライトクロックに同期してライトす
る。ライトアドレス生成回路2は、ライトイネーブル5
がLレベルの時にライトクロックに同期して0〜158
のアドレスを0から順番に出力し、これを繰り返す。 一方、バッファメモリ1は、リードイネーブル9がLレ
ベルの時に、リードアドレス生成回路6が出力するリー
ドアドレス7からリードデータ8をリードクロックに同
期してリードする。リードアドレス生成回路6はリード
イネーブル9がLレベルの時にリードクロックに同期し
て0〜158のアドレスを0から順番に出力し、これを
繰り返す。
The operation of the buffer memory control device configured as described above will be described below. FIG.
As shown in (1), when the write enable 5 is at the LOW level (hereinafter referred to as L level), the buffer memory 1 writes the write data 4 to the write address 3 output from the write address generation circuit 2 in synchronization with the write clock. I do. The write address generation circuit 2 has a write enable 5
0 to 158 in synchronization with the write clock when
Are sequentially output from 0, and this is repeated. On the other hand, when the read enable 9 is at the L level, the buffer memory 1 reads the read data 8 from the read address 7 output by the read address generation circuit 6 in synchronization with the read clock. When the read enable 9 is at the L level, the read address generation circuit 6 outputs addresses 0 to 158 in order from 0 in synchronization with the read clock, and repeats this.

【0007】このバッファメモリ制御装置において、バ
ッファメモリ1のオーバーフローの発生を検出するに
は、アドレス比較回路149によりライトアドレス3か
らリードアドレス7の減算を行い、その減算結果150
をオーバーフロー発生通知回路151とエンプティー発
生通知回路152に出力する。この減算結果は、通常動
作の場合はライトアドレスがリードアドレスよりも大き
な値をとるため正の値をとるが、オーバーフローが発生
する場合は、図9(a) に示すように、ライトアドレスW
ADがリードアドレスRADを追い越してメモリ領域の
最上位アドレスに達し、一旦メモリ領域の最下位アドレ
スに戻った後にここからリードアドレスRADに向けて
アドレスが増加してゆく場合であるので、オーバーフロ
ー発生通知回路151は減算結果150がマイナス1か
ら0へ変化した時にオーバーフローを検出する。またエ
ンプティーが発生する場合は、逆に、図9(b) に示すよ
うに、ライトアドレスWADにリードアドレスRADが
追いつく場合であるので、エンプティー発生通知回路1
52はプラス1から0へ変化した時にエンプティーを検
出し、リードを停止させる。
In this buffer memory control device, in order to detect the occurrence of overflow in the buffer memory 1, the address comparison circuit 149 subtracts the read address 7 from the write address 3 and the subtraction result 150
To the overflow occurrence notifying circuit 151 and the empty occurrence notifying circuit 152. The result of the subtraction takes a positive value in the normal operation because the write address takes a larger value than the read address, but when an overflow occurs, as shown in FIG.
This is a case where the AD overtakes the read address RAD to reach the highest address of the memory area, and once returns to the lowest address of the memory area, the address increases from there to the read address RAD. The circuit 151 detects an overflow when the subtraction result 150 changes from -1 to 0. On the other hand, when an empty occurs, the read address RAD catches up with the write address WAD as shown in FIG.
Numeral 52 detects the empty state when the value changes from plus 1 to 0, and stops reading.

【0008】この従来の技術によるバッファメモリ制御
装置では、複数のデータを単位としたデータの集合であ
るセルを単位とするデータをバッファメモリにライトす
る途中でライトデータの転送が中止された場合、ライト
されたデータまでをリードするために、セルの途中であ
ってもそれ以降のデータに対し疑似データを挿入し、デ
ータ転送を行うが、受信側では疑似データが含まれるセ
ル単位を廃棄してしまうため、送信したセルデータに損
失が生じる。
In the buffer memory control device according to the prior art, when the transfer of write data is interrupted while data in units of cells, which is a set of data in units of data, is written to the buffer memory, In order to read the written data, even in the middle of the cell, pseudo data is inserted into the subsequent data and data transfer is performed, but the receiving side discards the cell unit containing the pseudo data and discards it. Therefore, a loss occurs in the transmitted cell data.

【0009】また、バッファメモリのオーバーフローま
たはエンプティーを、図10(a) に示すようなアドレス
比較回路を用いて検出するが、このアドレス比較回路は
ライトアドレスAからリードアドレスBを減算する際に
A+(Bの2の補数)+1を実行する減算回路からなる
ために、アドレスのビット数が増えると回路規模が大き
くなる。 また、この減算回路の他に、図10(b) に示す
ような2個のデコーダとフラグレジスタ、論理積回路を
1個ずつ要し、減算結果が−1になった後に0になるこ
とを検出することでオーバーフローを検出するオーバー
フロー発生通知回路や、図10(c) に示すような2個の
デコーダとフラグレジスタ、論理積回路を1個ずつ要
し、減算結果が+1になった後に0になることを検出す
ることでエンプティーを検出するエンプティー発生通知
回路をも設ける必要がある。
The overflow or empty state of the buffer memory is detected by using an address comparison circuit as shown in FIG. 10A. When the address comparison circuit subtracts the read address B from the write address A, A + Since the subtraction circuit executes (2's complement of B) +1, the circuit scale increases as the number of address bits increases. Further, in addition to this subtraction circuit, two decoders, a flag register, and an AND circuit as shown in FIG. 10 (b) are required one by one, and it is assumed that the subtraction result becomes 0 after -1. An overflow occurrence notifying circuit for detecting an overflow by detection, two decoders, a flag register, and an AND circuit as shown in FIG. 10C are required one by one. It is also necessary to provide an empty generation notifying circuit for detecting the empty state by detecting the occurrence of the empty state.

【0010】更に、バッファメモリのオーバーフローが
発生した後、ライトデータの転送中止を知らせるため
に、転送中止までのライトデータを再度送信する必要が
あるため、転送中止までのライトデータの損失もしくは
バッファメモリへのオーバーライトによるデータの損失
が生じるという問題点があった。 ところで、このような問題を解決できるものとして、従
来、特開平8−223168号公報のセルバッファ制御
回路がすでに開発されており、図11にこれを転載して
いる。図11はこの特開平8−223168号公報に示
されたセルバッファ制御回路の構成を示したもので、図
において、書き込み側バンクアドレス101をデコード
するイネーブル付きのデコーダ105と、読み出し側バ
ンクアドレス103をデコードするイネーブル付きのデ
コーダ106と、各バンクに対応してそのバンクにセル
データが存在するか否かを示す情報の保持を行う情報保
持手段1091〜109nと、書き込み側バンクアドレ
ス101の値に1を加算する加算回路112と、その加
算回路112の値により情報保持手段1091〜109
nからの出力1101〜110nを選択するセレクタ1
14と、読み出し側バンクアドレス103の値に1を加
算する加算回路113と、その加算回路の値により情報
保持手段1091〜109nからの出力1101〜11
0nを選択するセレクタ115と、セルバッファの異常
状態を検出する異常状態検出手段116とを備えて構成
されている。
Further, after an overflow of the buffer memory occurs, it is necessary to retransmit the write data until the transfer is stopped in order to notify the stop of the transfer of the write data. However, there is a problem that data loss occurs due to overwriting to the data. Incidentally, a cell buffer control circuit disclosed in Japanese Patent Application Laid-Open No. 8-223168 has already been developed as a device capable of solving such a problem, and is reproduced in FIG. FIG. 11 shows the configuration of the cell buffer control circuit disclosed in Japanese Patent Application Laid-Open No. 8-223168. In FIG. 11, a decoder 105 with an enable for decoding a write-side bank address 101 and a read-side bank address 103 are shown. Decoder 106 with an enable for decoding the data, information holding means 1091 to 109n for holding information indicating whether or not there is cell data in each bank corresponding to each bank; An addition circuit 112 for adding 1, and information holding means 1091 to 109 based on the value of the addition circuit 112
selector 1 for selecting outputs 1101 to 110n from n
14, an addition circuit 113 for adding 1 to the value of the read-side bank address 103, and outputs 1101 to 11 from the information holding means 1091 to 109n according to the value of the addition circuit.
0n and an abnormal state detecting means 116 for detecting an abnormal state of the cell buffer.

【0011】図11に示すセルバッファ制御回路は、図
示しないセルバッファ全体をn個のバンクに分けて構成
し、書き込み側または読み出し側のアドレスを各バンク
に対応させてバンク数だけ備えられた情報保持手段10
91〜109nに対し、デコーダ105が書き込み側バ
ンクアドレス101とバンク書き込み終了信号102を
用いて、各バンクへのセルデータの書き込み終了を検出
した時点で、該当するバンクに対応した情報保持手段に
書き込み終了が入力され、これにより、セルデータの存
在を示すフラグを立てる。また、デコーダ106が、読
み出し側バンクアドレス103とバンク読み出し終了信
号104を用いて、各バンクからのセルの読み出し終了
時点で該当バンクに対応した情報保持手段に保持されて
いるフラグを解除する処理を行うことにより、各情報保
持手段が、対応する各バンクにセルデータが書き込まれ
て存在しているか、あるいは読み出されてセルデータが
存在しないかを表すことができる。
The cell buffer control circuit shown in FIG. 11 is constructed by dividing the entire cell buffer (not shown) into n banks, and has a write-side or read-side address corresponding to each bank, and information corresponding to the number of banks. Holding means 10
When the decoder 105 detects the end of the writing of the cell data to each bank using the write-side bank address 101 and the bank write end signal 102, the data is written to the information holding means corresponding to the corresponding bank. The end is input, thereby setting a flag indicating the presence of cell data. Also, the decoder 106 uses the read-side bank address 103 and the bank read end signal 104 to release the flag held in the information holding means corresponding to the bank at the end of reading cells from each bank. By doing so, each information holding means can indicate whether the cell data is written and exists in the corresponding bank, or read and indicates whether the cell data does not exist.

【0012】また、加算回路112により書き込み側バ
ンクアドレス101に1を加えた値をセレクタ114の
制御信号として、セレクタ114は情報保持手段109
1〜109nの出力1101〜110nを選択するの
で、セレクタ114は現在書き込みを行おうとするバン
クより1つ先のバンクに対応した情報保持手段を選択す
ることになる。従って、セレクタ114の出力信号11
7がHのときはセルバッファがオーバーフローしている
こととなり、このため、この信号をセルバッファへの書
き込み禁止信号として用いることができる。
The selector 114 uses the value obtained by adding 1 to the write-side bank address 101 by the adding circuit 112 as a control signal for the selector 114, and the selector 114
Since the outputs 1101 to 110n of 1 to 109n are selected, the selector 114 selects an information holding unit corresponding to a bank one bank ahead of the bank to which writing is currently performed. Therefore, the output signal 11 of the selector 114
When 7 is H, the cell buffer has overflowed, and this signal can be used as a write inhibit signal for the cell buffer.

【0013】さらに、加算回路113により読み出し側
バンクアドレス103に1を加えた値をセレクタ115
の制御信号として、セレクタ115は情報保持手段10
91〜109nの出力1101〜110nを選択するの
で、セレクタ115は現在読み出しを行おうとするバン
クより1つ先のバンクに対応した情報保持手段を選択す
ることになる。従って、セレクタ115の出力信号11
7がLのときはセルバッファがエンプティーになってい
ることとなり、このため、この信号の反転信号をセルバ
ッファからの読み出し禁止信号として用いることができ
る。
Further, a value obtained by adding 1 to the read-side bank address 103 by the adding circuit 113 is supplied to the selector 115.
Selector 115 is the information holding means 10
Since the outputs 1101 to 110n of 91 to 109n are selected, the selector 115 selects the information holding unit corresponding to the bank one bank ahead of the bank from which the current reading is to be performed. Therefore, the output signal 11 of the selector 115
When 7 is L, it means that the cell buffer is empty, so that an inverted signal of this signal can be used as a read inhibition signal from the cell buffer.

【0014】[0014]

【発明が解決しようとする課題】しかしながら、この従
来のセルバッファ制御回路は、現在書き込み中のバンク
の次の情報保持手段の情報を検査することで、オーバー
フロー,アンダーフローの制御を行うようにしており、
このため、現在書き込み中のバンクは、これに書き込み
を開始した時点で、すぐに、オーバーフロー,アンダー
フローが生じているという検査結果を出力してしまう。
このため、バンクの個数が少数になるほどセルバッファ
の容量を有効利用できずにオーバーフロー,アンダーフ
ローの検出結果を出力してしまうものであり、例えばバ
ンクの個数が2の場合では、セルバッファの全容量の半
分しか活用することができない。従って、このセルバッ
ファ制御回路が出力するオーバーフロー,アンダーフロ
ーの検出結果を用いてデータの転送制御を行った場合、
転送効率が良くないという問題があった。また、この従
来のセルバッファ制御回路は固定長のバンク領域にしか
対応できない,という問題があった。
However, this conventional cell buffer control circuit controls overflow and underflow by checking the information of the next information holding means of the bank currently being written. Yes,
For this reason, the bank that is currently writing immediately outputs an inspection result indicating that overflow or underflow has occurred at the time of starting writing to the bank.
For this reason, as the number of banks becomes smaller, the capacity of the cell buffer cannot be effectively used, and overflow and underflow detection results are output. For example, when the number of banks is two, the total number of banks in the cell buffer is reduced. Only half of the capacity can be utilized. Therefore, when data transfer control is performed using the overflow / underflow detection result output from the cell buffer control circuit,
There was a problem that transfer efficiency was not good. In addition, there is a problem that this conventional cell buffer control circuit can cope only with a fixed-length bank area.

【0015】本発明は、上記従来の問題点を解決するた
めになされたもので、データの転送制御に用いた場合に
転送効率が良く、回路規模を大きくすることなくバッフ
ァメモリのオーバーフローを検出することが可能な、あ
るいは、バッファメモリのオーバーフローを前もって検
出し、これを相手側に伝えることが可能なバッファメモ
リ制御装置を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problems. When used for data transfer control, the transfer efficiency is high and the overflow of the buffer memory is detected without increasing the circuit scale. It is an object of the present invention to provide a buffer memory control device capable of detecting an overflow of a buffer memory in advance or transmitting the overflow to a partner.

【0016】[0016]

【課題を解決するための手段】本発明は、上記課題を解
決し目的を達成するためになされたもので、本願の請求
項1に係る発明によるバッファメモリ制御装置は、アド
レスにより複数のデータ単位であるセル単位のメモリ領
域に分割されたバッファメモリと、前記バッファメモリ
のライトアドレスを出力するライトアドレス生成回路
と、前記バッファメモリのリードアドレスを出力するリ
ードアドレス生成回路と、前記ライトアドレスをデコー
ドすることによりセル単位毎のデータのライトが終了す
る前のライトアドレスを示すフラグ信号を出力する第1
のレジスタと、前記フラグ信号により前記バッファメモ
リ内にセル単位のデータの有無を判別し前記バッファメ
モリのリード制御を行うデータ判別回路と、前記リード
アドレスをデコードすることによりセル単位毎のデータ
のリード終了を示し、前記フラグ信号のリセットを行う
フラグリセット信号を出力する第2のレジスタと、前記
フラグ信号によりバッファメモリのオーバーフローの発
生を知らせるオーバーフロー発生通知回路とを有し、前
記データ判別回路により前記バッファメモリのリード制
御を行い、バッファメモリのオーバーフローが発生する
前にライトデータの転送中止を知らせ、かつ、セル単位
でデータの転送を行いデータの損失を防止するようにし
たので、バッファメモリをあるセル単位に分割し、セル
単位ごとにデータ転送を行い、オーバーフローおよびエ
ンプティーの制御を行うことでセルデータの損失を防止
できる。 また、バッファメモリのオーバーフローを比較
回路を用いず検出するために回路規模を小さく構成でき
る。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems and attain the object, and a buffer memory control device according to the invention of claim 1 of the present application comprises a plurality of data units by an address. A buffer memory divided into a memory area of a cell unit, a write address generating circuit for outputting a write address of the buffer memory, a read address generating circuit for outputting a read address of the buffer memory, and decoding the write address To output a flag signal indicating a write address before the end of data writing for each cell unit.
A data discriminating circuit for discriminating the presence / absence of data in cell units in the buffer memory based on the flag signal, and performing read control of the buffer memory; and reading data in cell units by decoding the read address. A second register that indicates the end, outputs a flag reset signal for resetting the flag signal, and an overflow occurrence notifying circuit that notifies the occurrence of an overflow in the buffer memory by the flag signal. Buffer memory read control is performed, write data transfer stop is notified before the buffer memory overflows, and data is transferred in units of cells to prevent data loss. Divided into cell units and data for each cell unit Feeding was carried out, the loss of cell data can be prevented by controlling the overflow and empty. Further, since the overflow of the buffer memory is detected without using the comparison circuit, the circuit scale can be reduced.

【0017】また、本願の請求項2に係る発明によるバ
ッファメモリ制御装置は、請求項1記載のバッファメモ
リ制御装置において、フラグ信号を入力とし、バッファ
メモリにセル単位のデータが無い場合にバッファメモリ
のリード制御を行うと同時に疑似データ選択信号とセル
単位の疑似データを出力する疑似データ生成回路と、前
記疑似データ選択信号により前記疑似データと前記バッ
ファメモリのリードデータのいずれかを選択する選択回
路とを有するようにしたので、転送先でこのセル全体が
廃棄されてしまうという不具合が発生することはなく、
セルデータの損失を防ぐことができる。
According to a second aspect of the present invention, there is provided the buffer memory control device according to the first aspect of the present invention, wherein a flag signal is input and the buffer memory has no data in a unit of cell in the buffer memory. A pseudo data generation circuit that outputs a pseudo data selection signal and pseudo data in units of cells at the same time as performing read control of the data, and a selection circuit that selects one of the pseudo data and the read data of the buffer memory based on the pseudo data selection signal Since there is no problem that the entire cell is discarded at the transfer destination,
Cell data loss can be prevented.

【0018】また、本願の請求項3に係る発明によるバ
ッファメモリ制御装置は、請求項1記載のバッファメモ
リ制御装置において、外部からアドレス値を設定可能な
レジスタと、前記レジスタの値とライトアドレスの一致
を検出する第1の一致検出回路と、前記レジスタの値と
リードアドレスの一致を検出する第2の一致検出回路と
を有し、バッファメモリのメモリ領域を任意の単位で分
割可能とするようにしたので、任意の単位で分割したバ
ッファメモリのメモリ領域のオーバーフローを検出でき
る。
According to a third aspect of the present invention, there is provided a buffer memory control device according to the first aspect, wherein a register capable of setting an address value from the outside, and a register value and a write address which are externally set. It has a first match detection circuit for detecting a match and a second match detection circuit for detecting a match between the register value and the read address so that the memory area of the buffer memory can be divided into arbitrary units. Therefore, an overflow in the memory area of the buffer memory divided into arbitrary units can be detected.

【0019】また、本願の請求項4に係る発明によるバ
ッファメモリ制御装置は、アドレスにより複数のデータ
単位であるセル単位のメモリ領域に分割されたバッファ
メモリと、前記バッファメモリのライトアドレスを出力
するライトアドレス生成回路と、前記バッファメモリの
リードアドレスを出力するリードアドレス生成回路と、
前記ライトアドレスをデコードすることによりセル単位
毎のデータのライトが終了した時点もしくはこれより前
のライトアドレスを示すフラグ信号を出力する第1のレ
ジスタと、前記フラグ信号により前記バッファメモリ内
にセル単位のデータの有無を判別し前記バッファメモリ
のリード制御を行うデータ判別回路と、前記リードアド
レスをデコードすることによりセル単位毎のデータのリ
ード終了を示し、前記フラグ信号のリセットを行うフラ
グリセット信号を出力する第2のレジスタと、フラグ信
号とライトアドレスを入力とし、前記フラグ信号と前記
ライトアドレスによりオーバーフローが発生する前にラ
イトデータの転送停止を知らせるオーバーフロー発生検
出回路とを有し、前記データ判別回路により前記バッフ
ァメモリのリード制御を行い、バッファメモリのオーバ
ーフローが発生する前にライトデータの転送中止を知ら
せ、かつ、セル単位でデータの転送を行いデータの損失
を防止するようにしたので、バッファメモリをあるセル
単位に分割し、セル単位ごとにデータ転送を行い、オー
バーフローおよびエンプティーの制御を行うことでセル
データの損失を防止できる。 また、バッファメモリのオ
ーバーフローを前もって検出できる。
A buffer memory control device according to a fourth aspect of the present invention outputs a buffer memory divided into a plurality of memory areas in units of cells, which are a plurality of data units, and a write address of the buffer memory. A write address generation circuit, a read address generation circuit that outputs a read address of the buffer memory,
A first register that outputs a flag signal indicating a write address at or before the writing of data in each cell unit by decoding the write address, and a cell unit in the buffer memory according to the flag signal. A data discriminating circuit for discriminating the presence / absence of data and performing a read control of the buffer memory; and a flag reset signal for indicating the end of reading of data for each cell unit by decoding the read address and resetting the flag signal. A second register to be output, and an overflow occurrence detection circuit that receives a flag signal and a write address, and notifies a stop of write data transfer before an overflow occurs due to the flag signal and the write address; Read the buffer memory by the circuit The buffer memory is divided into a certain cell unit because the transfer of write data is notified before the buffer memory overflow occurs, and the data transfer is performed in cell units to prevent data loss. However, by performing data transfer on a cell-by-cell basis and controlling overflow and empty, loss of cell data can be prevented. Further, the overflow of the buffer memory can be detected in advance.

【0020】また、本願の請求項5に係る発明によるバ
ッファメモリ制御装置は、請求項4記載のバッファメモ
リ制御装置において、フラグ信号を入力とし、バッファ
メモリにセル単位のデータが無い場合にバッファメモリ
のリード制御を行うと同時に疑似データ選択信号とセル
単位の疑似データを出力する疑似データ生成回路と、前
記疑似データ選択信号により前記疑似データと前記バッ
ファメモリのリードデータのいずれかを選択する選択回
路とを有するようにしたので、転送先でこのセル全体が
廃棄されてしまうという不具合が発生することはなく、
セルデータの損失を防ぐことができる。
According to a fifth aspect of the present invention, there is provided the buffer memory control device according to the fourth aspect of the present invention, wherein a flag signal is input, and when there is no cell unit data in the buffer memory, A pseudo data generation circuit that outputs a pseudo data selection signal and pseudo data in units of cells at the same time as performing read control of the data, and a selection circuit that selects one of the pseudo data and the read data of the buffer memory based on the pseudo data selection signal Since there is no problem that the entire cell is discarded at the transfer destination,
Cell data loss can be prevented.

【0021】また、本願の請求項6に係る発明によるバ
ッファメモリ制御装置は、請求項4記載のバッファメモ
リ制御装置において、外部からアドレス値を設定可能な
レジスタと、前記レジスタの値とライトアドレスの一致
を検出する第1の一致検出回路と、前記レジスタの値と
リードアドレスの一致を検出する第2の一致検出回路と
を有し、バッファメモリのメモリ領域を任意の単位で分
割可能とするようにしたので、任意の単位で分割したバ
ッファメモリのメモリ領域のオーバーフローを検出でき
る。
According to a sixth aspect of the present invention, in the buffer memory control device according to the fourth aspect of the present invention, there is provided a buffer memory control device, comprising: a register capable of setting an address value from the outside; It has a first match detection circuit for detecting a match and a second match detection circuit for detecting a match between the register value and the read address so that the memory area of the buffer memory can be divided into arbitrary units. Therefore, an overflow in the memory area of the buffer memory divided into arbitrary units can be detected.

【0022】[0022]

【発明の実施の形態】以下、本発明の各実施の形態につ
いて、図1ないし図5を用いて説明する。 (実施の形態1)この実施の形態1は、バッファメモリ
のライトアドレスおよびリードアドレスをデコーダによ
りデコードしてセルに対応する複数のフラグレジスタを
セットあるいはリセットし、これらのフラグレジスタの
出力の論理積をとることにより、バッファメモリのオー
バーフローを、小さい回路規模で検出できるようにした
ものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below with reference to FIGS. (Embodiment 1) In Embodiment 1, a write address and a read address of a buffer memory are decoded by a decoder to set or reset a plurality of flag registers corresponding to a cell, and an AND of outputs of these flag registers is set. Thus, the overflow of the buffer memory can be detected with a small circuit scale.

【0023】図1は本発明の実施の形態1におけるバッ
ファメモリ制御装置の構成を示すブロック図である。 図
1において、1は3つのセル(1セル=53バイト、1
バイト=8ビット)に相当する容量を持つバッファメモ
リ(8ビットデータ入力/出力、8ビットリード/ライ
トアドレス入力、リード/ライトイネーブル入力)であ
り、これは1つのメモリで構成してもよいが、複数のメ
モリで構成してもよい。
FIG. 1 is a block diagram showing a configuration of the buffer memory control device according to the first embodiment of the present invention. In FIG. 1, 1 indicates three cells (1 cell = 53 bytes, 1
A buffer memory (8-bit data input / output, 8-bit read / write address input, read / write enable input) having a capacity equivalent to a byte (8 bits), which may be constituted by one memory. , A plurality of memories.

【0024】また、2はバッファメモリ1のライトアド
レスを生成するライトアドレス生成回路、3はこのライ
トアドレス生成回路2により生成されたライトアドレ
ス、4はバッファメモリ1に書き込むライトデータ、5
はバッファメモリ1を書き込み可能な状態に設定するた
めのライトイネーブル、6はバッファメモリ1のリード
アドレスを生成するリードアドレス生成回路、7はこの
リードアドレス生成回路6により生成されたリードアド
レス、8はバッファメモリ1から読み出されたリードデ
ータ、9はバッファメモリ1を読み出し可能な状態に設
定するリードイネーブルであって、これらは前記従来例
の図6と同様のものである。
Reference numeral 2 denotes a write address generation circuit for generating a write address of the buffer memory 1, 3 denotes a write address generated by the write address generation circuit 2, 4 denotes write data to be written to the buffer memory 1, and 5
Is a write enable for setting the buffer memory 1 to a writable state, 6 is a read address generation circuit for generating a read address of the buffer memory 1, 7 is a read address generated by the read address generation circuit 6, and 8 is a read address. Read data 9 read from the buffer memory 1 is a read enable for setting the buffer memory 1 in a readable state, and these are the same as those in FIG. 6 of the conventional example.

【0025】次に、10〜12はライトアドレス生成回
路2により生成されたライトアドレスをデコードし、こ
れがバッファメモリ1のセル単位のメモリ領域1a〜1
cの最上位アドレスに一致するか否かを検出するライト
アドレスデコーダ、13〜15はライトアドレスデコー
ダ10〜12によりセットされるフラグレジスタ、16
〜18はリードアドレス生成回路6により生成されたリ
ードアドレスをデコードし、これがバッファメモリ1の
メモリ領域1a〜1cの最上位アドレスに一致するか否
かを検出するリードアドレスデコーダ、19〜21はリ
ードアドレスデコーダ16〜18によりセットされ、セ
ットされた時に該当するメモリ領域1a〜1cが空であ
る旨を示すフラグリセットレジスタ、22〜24はフラ
グレジスタ13〜15から出力され、Hレベルの時に該
当するメモリ領域1a〜1cが満杯である旨を示すとと
もに、Lレベルの時にフラグリセットレジスタをリセッ
トするフラグ信号、25〜27はフラグリセットレジス
タ19〜21から出力され、Hレベルの時に該当するメ
モリ領域1a〜1cが空である旨を示すとともに、フラ
グレジスタ13〜15をリセットするフラグリセット信
号、28は3入力論理積回路からなり、フラグ信号22
〜24が全てHになった時にバッファメモリ1にオーバ
ーフローが発生したことを通知するオーバーフロー発生
通知回路、29はフラグ信号22〜24の少なくとも1
つがHになったことを判別し、その時にリードイネーブ
ル9を発生するデータ判別回路であり、これは排他的論
理和回路により構成できる。
Next, reference numerals 10 to 12 decode the write addresses generated by the write address generation circuit 2, and these are decoded into memory areas 1a to 1 of the buffer memory 1 in units of cells.
a write address decoder for detecting whether or not the address matches the highest address of c; 13 to 15 are flag registers set by the write address decoders 10 to 12;
Reference numerals 18 to 18 decode the read address generated by the read address generation circuit 6 and detect whether or not the read address matches the highest address of the memory areas 1a to 1c of the buffer memory 1. A flag reset register, which is set by the address decoders 16 to 18 and indicates that the corresponding memory area 1a to 1c is empty when set, is output from the flag register 13 to 15 and corresponds to an H level. A flag signal indicating that the memory areas 1a to 1c are full and resetting the flag reset register when the level is low is output from the flag reset registers 19 to 21. When the level is high, the corresponding memory area 1a is output. 1c is empty, and the flag register 13 Flag reset signal for resetting the 5, 28 consists of three input AND circuit, a flag signal 22
An overflow occurrence notifying circuit for notifying that an overflow has occurred in the buffer memory 1 when all of the signals H to H become H. At least one of the flag signals 22 to 24 is provided.
This is a data discrimination circuit that discriminates that one has become H and generates a read enable 9 at that time, and can be constituted by an exclusive OR circuit.

【0026】また、図2は図1のデコーダの構成例を示
す回路図であり、ここでは、52,105,158をデ
コードする場合を例にとって示している。図2(a) にお
いて、101 はデータ“1" とライトアドレス3の第5
ビット35 の論理積をとる論理積回路、102 はデータ
“1" とライトアドレス3の第4ビット34 の論理積を
とる論理積回路、103 はデータ“0" とライトアドレ
ス3の第3ビット33 の論理積をとる論理積回路、10
4 はデータ“1" とライトアドレス3の第2ビット32
の論理積をとる論理積回路、105 はデータ“0"とラ
イトアドレス3の第1ビット31 の論理積をとる論理積
回路、106 はデータ“0" とライトアドレス3の第0
ビット30 の論理積をとる論理積回路、107 は論理積
回路101 ないし106 の論理積をとる論理積回路であ
る。
FIG. 2 is a circuit diagram showing an example of the configuration of the decoder of FIG. 1. Here, the case of decoding 52, 105, and 158 is shown as an example. In FIG. 2A, 10 1 is the data “1” and the fifth address of the write address 3.
A logical product circuit for calculating the logical product of bit 3 5 , 10 2 is a logical product circuit for calculating the logical product of data “1” and the fourth bit 3 4 of write address 3, and 10 3 is a logical product circuit for calculating data “0” and write address 3 AND circuit for calculating the logical product of the third bit 3 3 , 10
4 is data “1” and second bit 3 2 of write address 3
AND circuit taking the logical product, logical product circuit 105 takes the first bit 3 1 logical product of the write address 3 and data "0", 10 6 0th write address 3 and data "0"
AND circuit which takes the logical product of the bit 3 0, 10 7 is a logical product circuit for taking a logical product of the AND circuit 10 1 to 10 6.

【0027】このデコーダ回路は、ライトアドレス3に
入力されたデータが52に一致する場合、これを2進数
に展開した“1" ,“1" ,“0" ,“1" ,“0" ,
“0" が論理積回路101 ないし106 のライトアドレ
ス3の第5ビット35 ,第4ビット34 ,第3ビット3
3 ,第2ビット32 ,第1ビット31 ,第0ビット30
に入力され、これと論理積回路101 ないし106 に予
め与えられているデータ“1" ,“1" ,“0" ,
“1" ,“0" ,“0" が全て一致するため、論理積回
路101 ないし106 の出力が全てHとなり、これによ
り、論理積回路107 の出力がHとなり、ライトアドレ
ス3に入力されたデータが52に一致することを検出す
ることができる。
When the data inputted to the write address 3 coincides with 52, this decoder circuit expands the data into binary numbers "1", "1", "0", "1", "0",
"0" is the fifth bit 3 5 of the AND circuit 10 1 to 10 6 write address 3, the fourth bit 3 4, the third bit 3
3, the second bit 3 2, the first bit 3 1, zeroth bit 3 0
Is input, this AND circuit 10 1 to 10 6 data "1" is given in advance to "1", "0",
Since "1", "0", and "0" all match, the outputs of the AND circuits 10 1 to 10 6 all become H, whereby the output of the AND circuit 10 7 becomes H, and the write address 3 It can be detected that the input data matches 52.

【0028】図2(b) は図2(a) と同様の構成により、
ライトアドレス3に入力されたデータが105に一致す
ることを検出することができるデコーダであり、図2
(b) において、111 はデータ“1" とライトアドレス
3の第6ビット36 の論理積をとる論理積回路、112
はデータ“1" とライトアドレス3の第5ビット35
論理積をとる論理積回路、113 はデータ“0" とライ
トアドレス3の第4ビット34 の論理積をとる論理積回
路、114 はデータ“1" とライトアドレス3の第3ビ
ット33 の論理積をとる論理積回路、115 はデータ
“0" とライトアドレス3の第2ビット32 の論理積を
とる論理積回路、116 はデータ“0" とライトアドレ
ス3の第1ビット31 の論理積をとる論理積回路、11
7 はデータ“1" とライトアドレス3の第0ビット30
の論理積をとる論理積回路、118 は論理積回路111
ないし117 の論理積をとる論理積回路である。
FIG. 2 (b) shows a configuration similar to that of FIG. 2 (a).
2 is a decoder that can detect that the data input to the write address 3 matches 105.
(b), the logical product circuit 11 1 takes the logical product of the sixth bit 3 6 of the write address 3 and data "1", 11 2
AND circuit which is a logic product circuit for taking a logical product of the fifth bit 3 5 of the write address 3 and data "1", 11 3 ANDing the fourth bit 3 4 of the write address 3 and data "0", 11 logical product circuits 4 ANDing the third bit 3 3 of the write address 3 and data "1", 11 5 logical to take the second bit 3 2 logical product of the write address 3 and data "0" circuit, the logical product circuit 11 6 takes the first bit 3 1 logical product of the write address 3 and data "0", 11
7 is the data “1” and the 0th bit 3 0 of the write address 3
A logical product circuit for calculating a logical product of the logical product circuit 11 8 is a logical product circuit 11 1
To a logical product circuit for taking a logical product of 11 7.

【0029】図2(c) は図2(a) と同様の構成により、
ライトアドレス3に入力されたデータが158に一致す
ることを検出することができるデコーダであり、図2
(c) において、121 はデータ“1" とライトアドレス
3の第7ビット37 の論理積をとる論理積回路、122
はデータ“0" とライトアドレス3の第6ビット36
論理積をとる論理積回路、123 はデータ“0" とライ
トアドレス3の第5ビット35 の論理積をとる論理積回
路、124 はデータ“1" とライトアドレス3の第4ビ
ット34 の論理積をとる論理積回路、125 はデータ
“1" とライトアドレス3の第3ビット33 の論理積を
とる論理積回路、126 はデータ“1" とライトアドレ
ス3の第2ビット32 の論理積をとる論理積回路、12
7 はデータ“1" とライトアドレス3の第1ビット31
の論理積をとる論理積回路、128 はデータ“0" とラ
イトアドレス3の第0ビット30 の論理積をとる論理積
回路、129 は論理積回路121 ないし128 の論理積
をとる論理積回路である。
FIG. 2 (c) shows a configuration similar to that of FIG.
FIG. 2 is a decoder that can detect that the data input to the write address 3 matches 158.
In (c), 12 1 is AND circuit which takes the logical product of the seventh bit 3 7 of the write address 3 and data "1", 12 2
AND circuit, 12 3 AND circuit taking the logical product of the fifth bit 3 5 of the write address 3 and data "0" which is the logical product of the sixth bit 3 6 of the write address 3 and data "0", 12 4 aND circuit taking the logical product of the fourth bit 3 4 of the write address 3 and data "1", 12 5 logical ANDing of the third bit 3 3 of the write address 3 and data "1" circuit, 12 an aND circuit which 6 takes the second bit 3 2 logical product of the write address 3 and data "1", 12
7 is data “1” and first bit 3 1 of write address 3
AND circuit taking the logical product, 12 8 The data "0" the AND circuit taking the logical product of the zeroth bit 3 0 of the write address 3, 12 9 a logical product of the AND circuit 12 1 to 12 8 This is a logical product circuit.

【0030】以上のように構成されたバッファメモリ制
御装置について、以下、その動作について説明する。 図1に示すように、バッファメモリ1は、ライトイネー
ブル5がLレベルの時に、ライトアドレス生成回路2が
出力するライトアドレス3に、図示しないライトクロッ
クに同期してライトデータ4をライトする。 ライトアドレス生成回路2は、ライトイネーブル5がL
レベルの時にライトクロックに同期して0〜158のア
ドレスを0から順番に出力し、これを繰り返す。
The operation of the buffer memory control device configured as described above will be described below. As shown in FIG. 1, when the write enable 5 is at the L level, the buffer memory 1 writes the write data 4 to the write address 3 output from the write address generation circuit 2 in synchronization with a write clock (not shown). In the write address generation circuit 2, when the write enable 5
At the level, addresses 0 to 158 are sequentially output from 0 in synchronization with the write clock, and this is repeated.

【0031】ライトアドレスデコーダ10,11,12
はライトアドレス3をデコードし、これがバッファメモ
リ1の1セルの最上位アドレスを示す値52, 105、
158にそれぞれ一致した時、Hレベル信号を出力す
る。従って、ライトアドレスデコーダ10,11,12
はそれぞれバッファメモリ1に1セル分のデータがライ
トされた時、つまりライトアドレス3が示すアドレスが
0からライトを開始して、52, 105、 158のアド
レスへのライトが終了してはじめて、デコードしたHレ
ベル信号をそれぞれ対応するフラグレジスタ13, 1
4, 15へ出力する。 そして、フラグレジスタ13, 1
4、 15はそれぞれのフラグ信号22, 23, 24をH
レベルとする。
Write address decoders 10, 11, 12
Decodes the write address 3, which is the value 52, 105 indicating the highest address of one cell of the buffer memory 1,
When each of the values matches 158, an H level signal is output. Therefore, the write address decoders 10, 11, 12
When the data of one cell is written in the buffer memory 1, that is, when the address indicated by the write address 3 starts writing from 0, and the writing to the addresses 52, 105, and 158 is completed, the decoding starts. The corresponding H level signals are respectively stored in the corresponding flag registers 13, 1
Output to 4 and 15. Then, the flag registers 13, 1
4 and 15 set the respective flag signals 22, 23 and 24 to H
Level.

【0032】一方、バッファメモリ1は、リードイネー
ブル9がLレベルの時に、リードアドレス生成回路6が
出力するリードアドレス7から、図示しないリードクロ
ックに同期してリードデータ8をリードする。リードア
ドレス生成回路6はリードイネーブル9がLレベルの時
にリードクロックに同期して0〜158のアドレスを0
から順番に出力し、これを繰り返す。
On the other hand, when the read enable 9 is at the L level, the buffer memory 1 reads the read data 8 from the read address 7 output from the read address generation circuit 6 in synchronization with a read clock (not shown). When the read enable 9 is at the L level, the read address generation circuit 6 sets addresses 0 to 158 to 0 in synchronization with the read clock.
And then repeat this.

【0033】リードアドレスデコーダ16,17,18
はリードアドレス7をデコードしこれがバッファメモリ
1の1セルの最上位アドレスを示す値52, 105、 1
58にそれぞれ一致した時、Hレベル信号を出力する。
従って、リードアドレスデコーダ16, 17, 18は、
それぞれバッファメモリ1から1セル分のデータをリー
ドした時、つまりリードアドレス7が示すアドレスが0
からリードを開始して、52, 105、 158のアドレ
スまでのリードが終了してはじめて、デコードしたHレ
ベル信号をそれぞれ対応するフラグリセットレジスタ1
9, 20、 21へ出力する。
Read address decoders 16, 17, 18
Decodes the read address 7, which is the value 52, 105, 1 indicating the highest address of one cell of the buffer memory 1.
When they match with each other, an H level signal is output.
Therefore, the read address decoders 16, 17, 18
When one cell of data is read from the buffer memory 1, that is, when the address indicated by the read address 7 is 0
, The decoded H-level signals are stored in the corresponding flag reset registers 1 only after the reading up to the addresses 52, 105, and 158 is completed.
Output to 9, 20, 21.

【0034】そして、フラグリセットレジスタ19, 2
0, 21はそれぞれ対応するフラグレジスタ13, 1
4, 15をリセットするためのフラグリセット信号2
5、26、27をHレベルとする。フラグリセットレジ
スタ19, 20, 21はそれぞれ対応するフラグレジス
タ13, 14, 15をリセットするまでフラグリセット
信号25, 26, 27をHレベルで出力し、フラグレジ
スタ13, 14, 15をリセットした後Lレベルとな
る。
Then, the flag reset registers 19, 2
0 and 21 are the corresponding flag registers 13 and 1 respectively.
Flag reset signal 2 for resetting 4 and 15
5, 26 and 27 are set to the H level. The flag reset registers 19, 20, and 21 output the flag reset signals 25, 26, and 27 at the H level until the corresponding flag registers 13, 14, and 15 are reset, and reset the flag registers 13, 14, and 15 after resetting the flag registers 13, 14, and 15, respectively. Level.

【0035】フラグレジスタ13, 14, 15から出力
されるフラグ信号22, 23, 24はこれがHレベルで
あればバッファメモリ1の対応するメモリ領域1a,1
b,1cにデータの書き込みが終了しているので、フラ
グ信号22, 23, 24の内1つ以上がHレベルの場合
のみデータ判別回路29はリードイネーブル9を出力す
る。
If the flag signals 22, 23, 24 output from the flag registers 13, 14, 15 are at H level, the corresponding memory areas 1a, 1 of the buffer memory 1
Since data writing to b and 1c has been completed, the data discriminating circuit 29 outputs the read enable 9 only when at least one of the flag signals 22, 23 and 24 is at the H level.

【0036】このように、フラグ信号22, 23、 24
の内1つ以上がHレベルの場合のみデータ判別回路29
でバッファメモリ1のデータをリード可能とすること
で、セル単位でデータを転送することが可能となる。こ
のため、セルを転送する途中でバッファメモリ1のデー
タが途切れた場合、転送元で途切れたデータの後に疑似
データを挿入してセルを構成するために、転送先でこの
セル全体が廃棄されてしまうという不具合が発生するこ
とはなく、セルデータの損失を防ぐことができる。
Thus, the flag signals 22, 23, 24
Data determination circuit 29 only when at least one of
Thus, data in the buffer memory 1 can be read, so that data can be transferred in units of cells. For this reason, if the data in the buffer memory 1 is interrupted during the transfer of a cell, the entire cell is discarded at the transfer destination in order to form a cell by inserting pseudo data after the interrupted data at the transfer source. The cell data can be prevented from being lost.

【0037】また、フラグ信号22, 23, 24がすべ
てHレベルであれば、バッファメモリ1の対応するメモ
リ領域1a,1b,1cにデータの書き込みが終了して
いるので、オーバーフロー発生通知回路28を3入力論
理積により構成してバッファメモリ1のオーバーフロー
を検出することができる。
If the flag signals 22, 23, and 24 are all at the H level, the data writing to the corresponding memory areas 1a, 1b, and 1c of the buffer memory 1 has been completed. The overflow of the buffer memory 1 can be detected by using a three-input logical product.

【0038】従って、例えばATMに本バッファメモリ
制御装置を適用する場合、ライトアドレスデコーダ1
0,11,12がデコードする値を前述の52,10
5,158より小さな値、即ち、図1に示すように同期
回路で本バッファメモリ制御装置を構成する場合はこれ
らより5ずつ小さい47,100,153に設定するこ
とにより、また、非同期回路で本バッファメモリ制御装
置を構成する場合は、前述の52,105,158より
4ずつ小さい48,101,154に設定することによ
り、バッファメモリ1のオーバーフローを前もって検出
することができる。
Therefore, for example, when the present buffer memory control device is applied to an ATM, the write address decoder 1
The values to be decoded by 0, 11, and 12 are
When the buffer memory control device is constituted by a synchronous circuit as shown in FIG. 1, that is, 47, 100, and 153, which are smaller by 5, respectively, the value is smaller than 5, 158. When the buffer memory control device is configured, overflow of the buffer memory 1 can be detected in advance by setting the buffer memory controller to 48, 101, or 154, which is smaller by 4 than the aforementioned 52, 105, or 158.

【0039】このように、本実施の形態1によれば、バ
ッファメモリに入力するライトアドレスをセル単位でデ
コードしてフラグレジスタをセットし、バッファメモリ
に入力するリードアドレスをセル単位でデコードしてフ
ラグリセットレジスタをセットし、このフラグリセット
レジスタの出力によりフラグレジスタをリセットし、フ
ラグレジスタの出力がバッファメモリの全てのセルに相
当する分Hレベルとなることにより、オーバーフローと
なったことを検出するようにしたので、データの転送制
御に用いた場合に転送効率が良く、またアドレスデコー
ダとレジスタおよび論理積回路により回路を構成できる
ため、従来例がライトアドレスとリードアドレスを比較
し、これらの差が−1から0に変化するか、+1から0
に変化することを検出するのに比べ回路規模を小さく構
成でき、しかも、セルを単位としてバッファメモリのデ
ータの有無を検知できる。さらに、ライトアドレスデコ
ーダのデコードするアドレスをセルの最上位アドレスよ
り手前のアドレスに設定しておくことにより、オーバー
フローをこれが実際に発生するよりも前に検出すること
が可能となる。
As described above, according to the first embodiment, the write address input to the buffer memory is decoded in units of cells, the flag register is set, and the read address input to the buffer memory is decoded in units of cells. The flag reset register is set, the flag register is reset by the output of the flag reset register, and the overflow of the flag register is detected when the output of the flag register becomes H level corresponding to all cells in the buffer memory. As a result, when used for data transfer control, transfer efficiency is high, and a circuit can be configured by an address decoder, a register, and an AND circuit. Changes from -1 to 0 or from +1 to 0
The circuit size can be made smaller than that of detecting the change in the data, and the presence or absence of data in the buffer memory can be detected in units of cells. Furthermore, by setting the address to be decoded by the write address decoder to an address before the highest address of the cell, it is possible to detect an overflow before this actually occurs.

【0040】(実施の形態2)この実施の形態2は、バ
ッファメモリのライトアドレスおよびリードアドレスを
デコーダによりデコードしてメモリ領域に対応する複数
のフラグレジスタをセットあるいはリセットし、これら
のフラグレジスタの出力が1つを除いて全てHになり、
かつ残り1つのフラグレジスタに対応するメモリ領域の
ライトアドレスがオーバーフローしかけていることをデ
コーダで検知することにより、バッファメモリのオーバ
ーフローを、これが実際に生じるよりも前もって検出で
きるようにしたものである。
(Embodiment 2) In Embodiment 2, a write address and a read address of a buffer memory are decoded by a decoder, and a plurality of flag registers corresponding to a memory area are set or reset. All outputs become H except one,
The decoder detects that the write address of the memory area corresponding to the remaining one flag register is about to overflow, so that the overflow of the buffer memory can be detected in advance before this actually occurs.

【0041】図3は本発明の実施の形態2におけるバッ
ファメモリ制御装置の構成を示すブロック図である。 図
3において、バッファメモリ1、ライトアドレス生成回
路2、ライトアドレス3、ライトデータ4、ライトイネ
ーブル5、リードアドレス生成回路6、リードアドレス
7、リードデータ8、リードイネーブル9、ライトアド
レスデコーダ10〜12、フラグレジスタ13〜15、
リードアドレスデコーダ16〜18、フラグリセットレ
ジスタ19〜21、フラグ信号22〜24、フラグリセ
ット信号25〜27、データ判別回路29の構成は実施
の形態1で示した図1の対応する部分と実質的に同じで
ある。また、30は図2と同様のデコーダにより構成さ
れ、フラグ信号22〜24が書き込み中の1つを除いて
Hレベルになり、かつその1つに対応するメモリ領域の
ライトアドレスが当該メモリ領域の最上位アドレスに近
い所定のアドレスになったことをデコードしたときに、
バッファメモリ1にオーバーフローが発生したことを前
もって通知するオーバーフロー発生検出回路である。
FIG. 3 is a block diagram showing a configuration of the buffer memory control device according to the second embodiment of the present invention. 3, a buffer memory 1, a write address generator 2, a write address 3, write data 4, a write enable 5, a read address generator 6, a read address 7, a read data 8, a read enable 9, and write address decoders 10 to 12 are shown. , Flag registers 13 to 15,
The configurations of the read address decoders 16 to 18, the flag reset registers 19 to 21, the flag signals 22 to 24, the flag reset signals 25 to 27, and the data discrimination circuit 29 are substantially the same as those of the first embodiment shown in FIG. Is the same as Reference numeral 30 denotes a decoder similar to that shown in FIG. 2, in which the flag signals 22 to 24 become H level except one during writing, and the write address of the memory area corresponding to one of the flag signals 22 to 24 is set in the memory area. When decoding that a predetermined address close to the highest address is reached,
An overflow occurrence detection circuit for notifying in advance that an overflow has occurred in the buffer memory 1.

【0042】以上のように構成されたバッファメモリ制
御装置について、以下その動作について説明する。図3
に示すように、バッファメモリ1は、ライトイネーブル
5がLレベルの時に、ライトアドレス生成回路2が出力
するライトアドレス3に図示しないライトクロックに同
期してライトデータ4をライトする。ライトアドレス生
成回路2は、ライトイネーブル5がLレベルの時にライ
トクロックに同期して0〜158のアドレスを0から順
番に出力し、これを繰り返す。
The operation of the buffer memory control device configured as described above will be described below. FIG.
When the write enable 5 is at the L level, the buffer memory 1 writes the write data 4 to the write address 3 output from the write address generation circuit 2 in synchronization with a write clock (not shown). When the write enable 5 is at the L level, the write address generation circuit 2 outputs addresses 0 to 158 in order from 0 in synchronization with the write clock, and repeats this.

【0043】ライトアドレスデコーダ10, 11, 12
はライトアドレス3をデコードし、これがバッファメモ
リの1セルの最上位アドレスを示す値52,105,1
58にそれぞれ一致した時、Hレベル信号を出力する。
従って、ライトアドレスデコーダ10,11,12はそ
れぞれバッファメモリ1に1セル分のデータがライトさ
れた時、つまりライトアドレス3が示すアドレスが0か
らライトを開始して、52, 105, 158のアドレス
へのライトが終了してはじめて、デコードしたHレベル
信号をそれぞれ対応するフラグレジスタ13, 14, 1
5へ出力する。そして、フラグレジスタ13, 14, 1
5はそれぞれのフラグ信号22, 23、24をHレベル
とする。
Write address decoders 10, 11, 12
Decodes the write address 3, which is the value 52, 105, 1 indicating the highest address of one cell of the buffer memory.
When they match with each other, an H level signal is output.
Therefore, the write address decoders 10, 11, and 12 start writing when the data of one cell is written in the buffer memory 1, that is, when the address indicated by the write address 3 starts from 0, and write the addresses 52, 105, and 158. Only after the writing to the corresponding flag registers 13, 14, 1
Output to 5 Then, the flag registers 13, 14, 1
5 sets each flag signal 22, 23, 24 to H level.

【0044】一方、バッファメモリ1は、リードイネー
ブル9がLレベルの時に、リードアドレス生成回路6が
出力するリードアドレス7からリードデータ8をリード
クロックに同期してリードする。
On the other hand, when the read enable 9 is at the L level, the buffer memory 1 reads the read data 8 from the read address 7 output by the read address generation circuit 6 in synchronization with the read clock.

【0045】リードアドレス生成回路6はリードイネー
ブル信号9がLレベルの時に、リードアドレス生成回路
6が生成するリードアドレス7から、図示しないリード
クロックに同期して0〜158のアドレスを0から順番
に出力し、これを繰り返す。
When the read enable signal 9 is at the L level, the read address generation circuit 6 sequentially starts from 0 to 158 from 0 to 158 in synchronization with a read clock (not shown) from the read address 7 generated by the read address generation circuit 6. Output and repeat.

【0046】リードアドレスデコーダ16, 17, 18
はリードアドレス7をデコードしこれがバッファメモリ
1の1セルの最上位アドレスを示す値52,105,1
58にそれぞれ一致した時、Hレベル信号を出力する。
従って、リードアドレスデコーダ16, 17, 18は、
それぞれバッファメモリ1から1セル分のデータをリー
ドした時、つまりリードアドレスが示すアドレスが0か
らリードを開始して、52, 105、 158のアドレス
までのリードが終了してはじめて、デコードしたHレベ
ル信号をそれぞれ対応するフラグリセットレジスタ1
9, 20, 21へ出力する。
Read address decoders 16, 17, 18
Decodes the read address 7, which is the value 52, 105, 1 indicating the highest address of one cell of the buffer memory 1.
When they match with each other, an H level signal is output.
Therefore, the read address decoders 16, 17, 18
When the data of one cell is read from the buffer memory 1, that is, when the address indicated by the read address starts reading from 0 and the reading up to the addresses 52, 105, and 158 is completed, the decoded H level Flag reset register 1 corresponding to each signal
Output to 9, 20, 21.

【0047】そして、フラグリセットレジスタ19, 2
0, 21はそれぞれ対応するフラグレジスタ13, 1
4, 15をリセットするためのフラグリセット信号2
5、26、27をHレベルとする。フラグリセットレジ
スタ19, 20, 21はそれぞれ対応するフラグレジス
タ13, 14, 15をリセットするまでフラグリセット
信号25, 26, 27をHレベルで出力し、フラグレジ
スタ13, 14, 15をリセットした後Lレベルとな
る。フラグ信号22, 23, 24の内1つ以上がHレベ
ルの場合のみデータ判別回路29はリードイネーブル9
を出力する。
Then, the flag reset registers 19, 2
0 and 21 are the corresponding flag registers 13 and 1 respectively.
Flag reset signal 2 for resetting 4 and 15
5, 26 and 27 are set to the H level. The flag reset registers 19, 20, and 21 output the flag reset signals 25, 26, and 27 at the H level until the corresponding flag registers 13, 14, and 15 are reset, and reset the flag registers 13, 14, and 15 after resetting the flag registers 13, 14, and 15, respectively. Level. Only when at least one of the flag signals 22, 23, 24 is at the H level, the data discriminating circuit 29
Is output.

【0048】このように、フラグ信号22、23、24
の内1つ以上がHレベルの場合のみデータ判別回路29
でバッファメモリ1のデータをリード可能とすること
で、セル単位のデータ転送が可能となる。このため、セ
ルを転送する途中でバッファメモリ1のデータが途切れ
た場合、転送元で途切れたデータの後に疑似データを挿
入してセルを構成するために、転送先でこのセル全体が
廃棄されてしまうという不具合が発生することはなく、
セルデータの損失を防ぐことができる。
As described above, the flag signals 22, 23, 24
Data determination circuit 29 only when at least one of
By making the data of the buffer memory 1 readable, data transfer on a cell basis becomes possible. For this reason, if the data in the buffer memory 1 is interrupted during the transfer of a cell, the entire cell is discarded at the transfer destination in order to form a cell by inserting pseudo data after the interrupted data at the transfer source. There is no problem that it will
Cell data loss can be prevented.

【0049】また、オーバーフロー発生検出回路30に
より、フラグ信号22、23、24の内いずれか2つが
Hレベルの時で現在ライト中のメモリ領域のあるアドレ
ス値が該当するメモリ領域内の最上位アドレスに達する
前である旨をデコードすることにより、バッファメモリ
1がオーバーフローを起こす前にオーバーフローの通知
を発することが可能であり、これによりライトデータの
転送を中止できるため、ライトデータに損失が生じてし
まうことをなくすことができる。
Also, when any two of the flag signals 22, 23, and 24 are at the H level, the overflow address detection circuit 30 sets the highest address in the memory area to which a certain address value of the memory area currently being written corresponds. Is decoded before the buffer memory 1 overflows, it is possible to issue an overflow notification before the buffer memory 1 overflows, and the transfer of the write data can be stopped. Can be eliminated.

【0050】このため、例えば、フラグ信号23、24
がHレベルの時で、ライトアドレスが、現在ライト中の
メモリ領域1aの最上位アドレス52より5手前の47
に達したとき、この状態をデコードできるように、デコ
ーダからなるオーバーフロー発生検出回路30を、図2
に示すように設定しておくことにより、オーバーフロー
の発生を前もって検出でき、ライトデータに損失が生じ
てしまうことをなくすことができる。
For this reason, for example, the flag signals 23 and 24
Is at the H level, and the write address is 47, which is five before the highest address 52 of the memory area 1a currently being written.
Is reached, the overflow occurrence detection circuit 30 composed of a decoder is connected to the circuit shown in FIG.
, The occurrence of overflow can be detected in advance, and loss of write data can be prevented.

【0051】このように、本実施の形態2によれば、バ
ッファメモリに入力するライトアドレスをセル単位でデ
コードしてフラグレジスタをセットし、バッファメモリ
に入力するリードアドレスをセル単位でデコードしてフ
ラグリセットレジスタをセットし、このフラグリセット
レジスタの出力によりフラグレジスタをリセットし、フ
ラグレジスタの出力がバッファメモリの全てのセルより
1つ少ない分Hレベルとなり、かつ、残りの1つのセル
に対応するライトアドレスが該当するアドレスの最大値
に達するより前の値であることをデコードすることによ
り、オーバーフローとなったことを検出するようにした
ので、セルを単位としてバッファメモリのデータの有無
を検知でき、データの転送制御に用いた場合に転送効率
が良く、しかも、オーバーフローを前もって検出するこ
とが可能となる。
As described above, according to the second embodiment, the write address input to the buffer memory is decoded in units of cells, the flag register is set, and the read address input to the buffer memory is decoded in units of cells. The flag reset register is set, the flag register is reset by the output of the flag reset register, and the output of the flag register becomes H level by one less than all the cells of the buffer memory, and corresponds to the remaining one cell. By decoding that the write address is a value before reaching the maximum value of the corresponding address, the overflow is detected, so the presence or absence of data in the buffer memory can be detected in units of cells. When used for data transfer control, the transfer efficiency is good, and Bafuro it is possible to advance detect.

【0052】(実施の形態3)この実施の形態3は、バ
ッファメモリのライトアドレスおよびリードアドレスを
デコーダによりデコードしてメモリ領域に対応する複数
のフラグレジスタをセットあるいはリセットし、これら
のフラグレジスタの出力が1つを除いて全てHになり、
かつ残り1つのフラグレジスタに対応するメモリ領域の
ライトアドレスがオーバーフローしかかっていることを
デコーダで検知するとともに、これらのフラグレジスタ
の出力が全てLである場合には転送先で廃棄される疑似
データを送出することにより、バッファメモリのオーバ
ーフローを、これが実際に生じるよりも前もって検出で
きるとともに、誤データの送信を防止できるようにした
ものである。
(Third Embodiment) In a third embodiment, a write address and a read address of a buffer memory are decoded by a decoder to set or reset a plurality of flag registers corresponding to a memory area. All outputs become H except one,
In addition, the decoder detects that the write address of the memory area corresponding to the remaining one flag register is about to overflow, and if all the outputs of these flag registers are L, the pseudo data discarded at the transfer destination is deleted. By transmitting the data, the overflow of the buffer memory can be detected in advance before the overflow actually occurs, and the transmission of erroneous data can be prevented.

【0053】図4は本発明の実施の形態3におけるバッ
ファメモリ制御装置の構成を示すブロック図である。図
4において、バッファメモリ1、ライトアドレス生成回
路2、ライトアドレス3、ライトデータ4、ライトイネ
ーブル5、リードアドレス生成回路6、リードアドレス
7、リードデータ8、リードイネーブル9、ライトアド
レスデコーダ10〜12、フラグレジスタ13〜15、
リードアドレスデコーダ16〜18、フラグリセットレ
ジスタ19〜21、フラグ信号22〜24、フラグリセ
ット信号25〜27、オーバーフロー発生検出回路30
の構成は実施の形態2で示した図3の対応する部分と実
質的に同じであり、31はフラグ信号22、23、24
の内1つ以上がHレベルの場合のみリードイネーブル9
を出力し、データのリードを可能とするとともに、フラ
グ信号22、23、24の全てがHレベルの場合のみ転
送先で廃棄される疑似データを生成する疑似データ生成
回路、32はこの疑似データ生成回路31により生成さ
れる疑似データ、34はバッファメモリ8からのリード
データ8と疑似データ32とを選択する選択回路、33
はこの選択回路34を選択させる疑似データ選択信号、
35は選択回路34により選択され転送先に転送される
転送データである。
FIG. 4 is a block diagram showing a configuration of a buffer memory control device according to the third embodiment of the present invention. 4, a buffer memory 1, a write address generation circuit 2, a write address 3, write data 4, a write enable 5, a read address generation circuit 6, a read address 7, a read data 8, a read enable 9, a write address decoders 10 to 12 , Flag registers 13 to 15,
Read address decoders 16-18, flag reset registers 19-21, flag signals 22-24, flag reset signals 25-27, overflow occurrence detection circuit 30
Is substantially the same as the corresponding part of FIG. 3 shown in the second embodiment, and reference numeral 31 denotes flag signals 22, 23, and 24.
Read enable 9 only when at least one of them is at H level
To output data, and a pseudo data generation circuit for generating pseudo data to be discarded at the transfer destination only when all of the flag signals 22, 23, and 24 are at the H level. Pseudo data generated by the circuit 31; 34 is a selection circuit for selecting the read data 8 from the buffer memory 8 and the pseudo data 32;
Is a pseudo data selection signal for selecting the selection circuit 34,
Reference numeral 35 denotes transfer data selected by the selection circuit 34 and transferred to the transfer destination.

【0054】以上のように構成されたバッファメモリ制
御装置について、以下にその動作について説明する。図
4に示すようにバッファメモリ1は、ライトイネーブル
5がLレベルの時に、ライトアドレス生成回路2が出力
するライトアドレス3に図示しないライトクロックに同
期してライトデータ4をライトする。ライトアドレス生
成回路2は、ライトイネーブル5がLレベルの時にライ
トクロックに同期して0〜158のアドレスを0から順
番に出力し、これを繰り返す。
The operation of the buffer memory control device configured as described above will be described below. As shown in FIG. 4, when the write enable 5 is at the L level, the buffer memory 1 writes the write data 4 to the write address 3 output from the write address generation circuit 2 in synchronization with a write clock (not shown). When the write enable 5 is at the L level, the write address generation circuit 2 outputs addresses 0 to 158 in order from 0 in synchronization with the write clock, and repeats this.

【0055】ライトアドレスデコーダ10、11、12
はライトアドレス3をデコードし、これがバッファメモ
リ1の1セルの最上位アドレスを示す値52、105、
158にそれぞれ一致した時、Hレベル信号を出力す
る。従って、ライトアドレスデコーダ10、11、12
はそれぞれバッファメモリ1に1セル分のデータがライ
トされた時、つまりライトアドレス3が示すアドレスが
0からライトを開始して、52、105、158のアド
レスへのライトが終了してはじめて、デコードしたHレ
ベル信号をそれぞれ対応するフラグレジスタ13、1
4、15へ出力する。そして、フラグレジスタ13、1
4、15はそれぞれのフラグ信号22、23、24をH
レベルとする。
Write address decoders 10, 11, 12
Decodes the write address 3, which is the value 52, 105, indicating the highest address of one cell of the buffer memory 1.
When each of the values matches 158, an H level signal is output. Therefore, the write address decoders 10, 11, 12
When the data of one cell is written to the buffer memory 1, that is, when the address indicated by the write address 3 starts writing from 0, and the writing to the addresses 52, 105, and 158 is completed, the decoding The corresponding H level signals are stored in the corresponding flag registers 13, 1
Output to 4 and 15. Then, the flag registers 13, 1
4 and 15 set the respective flag signals 22, 23 and 24 to H level.
Level.

【0056】一方、バッファメモリ1は、リードイネー
ブル9がLレベルの時に、リードアドレス生成回路6が
出力するリードアドレス7から、図示しないリードクロ
ックに同期してリードデータ8をリードする。
On the other hand, when the read enable 9 is at the L level, the buffer memory 1 reads the read data 8 from the read address 7 output by the read address generation circuit 6 in synchronization with a read clock (not shown).

【0057】リードアドレス生成回路6はリードイネー
ブル9がLレベルの時に、リードクロックに同期して0
〜158のアドレスを0から順番に出力し、これを繰り
返す。
When the read enable 9 is at the L level, the read address generation circuit 6 sets the read address 9 to 0 in synchronization with the read clock.
158 are sequentially output from 0, and this is repeated.

【0058】リードアドレスデコーダ16、17、18
はリードアドレス7をデコードしこれがバッファメモリ
1の1セルの最上位アドレスを示す値52、105,1
58にそれぞれ一致した時、Hレベル信号を出力する。
従って、リードアドレスデコーダ16、17、18は、
それぞれバッファメモリ1から1セル分のデータをリー
ドした時、つまりリードアドレス7が示すアドレスが0
からリードを開始して、52、105、158のアドレ
スまでのリードが終了してはじめて、デコードしたHレ
ベル信号をそれぞれ対応するフラグリセットレジスタ1
9、20、21へ出力する。
Read address decoders 16, 17, 18
Decodes the read address 7, which is the value 52, 105, 1 indicating the highest address of one cell of the buffer memory 1.
When they match with each other, an H level signal is output.
Therefore, the read address decoders 16, 17, 18
When one cell of data is read from the buffer memory 1, that is, when the address indicated by the read address 7 is 0
, And the decoded H level signals are not stored in the corresponding flag reset register 1 until the read up to the addresses 52, 105, and 158 is completed.
Output to 9, 20, 21.

【0059】そして、フラグリセットレジスタ19、2
0、21はそれぞれ対応するフラグレジスタ13、1
4、15をリセットするためのフラグリセット信号2
5、26、27をHレベルとする。フラグリセットレジ
スタ19、20、21はそれぞれ対応するフラグレジス
タ13、14、15をリセットするまでフラグリセット
信号25、26、27をHレベルで出力し、フラグレジ
スタ13、14、15をリセットした後Lレベルとな
る。フラグ信号22、23、24の内1つ以上がHレベ
ルの場合のみ疑似データ生成回路31はリードイネーブ
ル9を出力し、データのリードを可能とする。
Then, the flag reset registers 19, 2
0, 21 are the corresponding flag registers 13, 1,
Flag reset signal 2 for resetting 4 and 15
5, 26 and 27 are set to the H level. The flag reset registers 19, 20, and 21 output the flag reset signals 25, 26, and 27 at the H level until the corresponding flag registers 13, 14, and 15 are reset, and reset the flag registers 13, 14, and 15 after resetting the flag registers 13, 14, and 15, respectively. Level. Only when one or more of the flag signals 22, 23, and 24 is at the H level, the pseudo data generation circuit 31 outputs the read enable 9 to enable data reading.

【0060】このように、フラグ信号22、23、24
の内1つ以上がHレベルの場合のみバッファメモリ1の
データをリードすることでセル単位のデータ転送が可能
となる。このため、セルを転送する途中でバッファメモ
リ1のデータが途切れた場合、転送元で途切れたデータ
の後に疑似データを挿入してセルを構成するために、転
送先でこのセル全体が廃棄されてしまうという不具合が
発生することはなく、セルデータの損失を防ぐことがで
きる。
As described above, the flag signals 22, 23, 24
By reading the data in the buffer memory 1 only when at least one of them is at the H level, data transfer in cell units becomes possible. For this reason, if the data in the buffer memory 1 is interrupted during the transfer of a cell, the entire cell is discarded at the transfer destination in order to form a cell by inserting pseudo data after the interrupted data at the transfer source. The cell data can be prevented from being lost.

【0061】そして、フラグ信号22、23、24のす
べてがLレベルの場合は、例えばATM(Asynchronous
Transfer Mode:非同期転送モード)通信等において
使用される,空きセルと呼ばれる疑似データ、即ち、転
送先で廃棄されるセル単位の疑似データ32を疑似デー
タ生成回路31により出力すると同時に疑似データ選択
信号33を出力し、選択回路34で転送データ35をリ
ードデータ8から疑似データ32に切換えることで、疑
似データ32を転送先に向けて出力する。
When all of the flag signals 22, 23 and 24 are at the L level, for example, the ATM (Asynchronous)
Transfer Mode: Asynchronous transfer mode) Pseudo data called empty cells, that is, pseudo data 32 in cell units to be discarded at the transfer destination is output by the pseudo data generation circuit 31 and a pseudo data selection signal 33 at the same time. And the selector 34 switches the transfer data 35 from the read data 8 to the pseudo data 32, thereby outputting the pseudo data 32 to the transfer destination.

【0062】疑似データ生成回路31は、空きセルを転
送した後、再度フラグ信号22、23、24の内1つ以
上がHレベルかどうかを検出し、Hレベルの場合はバッ
ファメモリ1からデータをリードし、すべてLレベルの
場合は再び空きセルを転送し、この動作を繰り返す。こ
れにより誤データの転送を防ぐことができる。
After transferring the empty cell, the pseudo data generating circuit 31 again detects whether or not one or more of the flag signals 22, 23, 24 is at the H level. Read, and if all are at L level, empty cells are transferred again, and this operation is repeated. Thereby, transfer of erroneous data can be prevented.

【0063】また、オーバーフロー発生検出回路30に
より、フラグ信号22、23、24の内いずれか2つが
Hレベルの時で現在ライト中のメモリ領域のあるアドレ
ス値が該当するメモリ領域内の最上位アドレスに達する
前である旨をデコードすることにより、バッファメモリ
1がオーバーフローを起こす前にオーバーフローの通知
を発することが可能であり、これによりライトデータの
転送を中止できるため、ライトデータに損失が生じてし
まうことをなくすことができる。
Also, when any two of the flag signals 22, 23, and 24 are at the H level, the overflow address detection circuit 30 sets the highest address in the memory area to which a certain address value of the memory area currently being written corresponds. Is decoded before the buffer memory 1 overflows, it is possible to issue an overflow notification before the buffer memory 1 overflows, and the transfer of the write data can be stopped. Can be eliminated.

【0064】このため、例えば、フラグ信号23、24
がHレベルの時で、ライトアドレスが、現在ライト中の
メモリ領域1aの最上位アドレス52より5手前の47
に達したとき、この状態をデコードできるように、デコ
ーダからなるオーバーフロー発生検出回路30を、図2
に示すように設定しておくことにより、オーバーフロー
の発生を前もって検出でき、ライトデータに損失が生じ
てしまうことをなくすことができる。
Therefore, for example, the flag signals 23 and 24
Is at the H level, and the write address is 47, which is five before the highest address 52 of the memory area 1a currently being written.
Is reached, the overflow occurrence detection circuit 30 composed of a decoder is connected to the circuit shown in FIG.
, The occurrence of overflow can be detected in advance, and loss of write data can be prevented.

【0065】このように、本実施の形態3によれば、バ
ッファメモリに入力するライトアドレスをセル単位でデ
コードしてフラグレジスタをセットし、バッファメモリ
に入力するリードアドレスをセル単位でデコードしてフ
ラグリセットレジスタをセットし、このフラグリセット
レジスタの出力によりフラグレジスタをリセットし、フ
ラグレジスタの出力がバッファメモリの全てのセルより
1つ少ない分Hレベルとなり、かつ、残りの1つのセル
に対応するライトアドレスが該当するアドレスの最大値
に達するより前の値であることをデコードすることによ
り、オーバーフローとなったことを検出するとともに、
フラグレジスタの出力が全てLレベルとなった場合、疑
似データを転送先に向けて転送するようにしたので、セ
ルを単位としてバッファメモリのデータの有無を検知で
き、データの転送制御に用いた場合に転送効率が良く、
誤ったデータの転送を防止できるとともに、オーバーフ
ローを前もって検出することが可能となる。
As described above, according to the third embodiment, the write address input to the buffer memory is decoded in units of cells, the flag register is set, and the read address input to the buffer memory is decoded in units of cells. The flag reset register is set, the flag register is reset by the output of the flag reset register, and the output of the flag register becomes H level by one less than all the cells of the buffer memory, and corresponds to the remaining one cell. By decoding that the write address is a value before reaching the maximum value of the corresponding address, it is detected that an overflow has occurred,
When all the outputs of the flag registers are at the L level, pseudo data is transferred to the transfer destination, so that the presence or absence of data in the buffer memory can be detected in units of cells and used for data transfer control. Good transfer efficiency
It is possible to prevent erroneous data transfer and to detect an overflow in advance.

【0066】なお、図5に示すように、オーバーフロー
発生通知回路を図1に示すような論理積回路28で構成
するようにしてもよく、この場合、ライトアドレスデコ
ーダ10,11,12を、各メモリ領域1a,1b,1
cの最上位アドレス、例えば52,105,158に設
定すれば、オーバーフローを前もって検出することはで
きないが、セルを単位としてバッファメモリのデータの
有無を検知でき、誤ったデータの転送を防止することは
可能である。従って、これより、例えば5ずつ前の4
7,100,153に設定しておけば、オーバーフロー
を前もって検出することが可能となり、かつ、3つのメ
モリ領域1a,1b,1cのうちの2つに対応するフラ
グレジスタの出力がHレベルの時に限り1つのメモリ領
域からデータを読み出せる。
As shown in FIG. 5, the overflow occurrence notifying circuit may be constituted by an AND circuit 28 as shown in FIG. 1. In this case, the write address decoders 10, 11, and 12 are connected to each other. Memory areas 1a, 1b, 1
If the highest address of c is set to, for example, 52, 105, 158, overflow cannot be detected in advance, but the presence or absence of data in the buffer memory can be detected on a cell-by-cell basis to prevent erroneous data transfer. Is possible. Therefore, from this, for example, 4 before 5
7, 100, 153, it is possible to detect the overflow in advance, and when the output of the flag register corresponding to two of the three memory areas 1a, 1b, 1c is at the H level. Data can be read from one memory area as long as it is.

【0067】(実施の形態4)この実施の形態4は、バ
ッファメモリのライトアドレスおよびリードアドレスと
アドレス設定レジスタに設定した任意の設定データとの
一致を検出することによりメモリ領域に対応する複数の
フラグレジスタをセットあるいはリセットし、これらの
フラグレジスタの出力が1つを除いて全てHになり、か
つ残り1つのフラグレジスタに対応するメモリ領域のラ
イトアドレスがオーバーフローしかかっていることを、
これとアドレス設定レジスタに設定した設定データとを
デコードすることにより検知するとともに、これらのフ
ラグレジスタの出力が少なくとも1つ以上Hである場合
にバッファメモリを読み出し可能とすることにより、バ
ッファメモリのオーバーフローを、これが実際に生じる
よりも前もって検出できるとともに、バッファメモリを
任意の個数のセルに分割し、かつその分割したセルを単
位としてバッファメモリのデータの有無を検知できるよ
うにしたものである。
(Embodiment 4) In Embodiment 4, a plurality of addresses corresponding to a memory area are detected by detecting a match between a write address and a read address of a buffer memory and arbitrary setting data set in an address setting register. Set or reset the flag registers, and confirm that all but one of the outputs of these flag registers are H, and that the write address of the memory area corresponding to the remaining one flag register is about to overflow.
This is detected by decoding this and the setting data set in the address setting register, and when at least one of the outputs of these flag registers is at H, the buffer memory can be read out, thereby overflowing the buffer memory. Can be detected before this actually occurs, the buffer memory is divided into an arbitrary number of cells, and the presence or absence of data in the buffer memory can be detected in units of the divided cells.

【0068】図6は本発明の実施の形態4におけるバッ
ファメモリ制御装置の構成を示すブロック図である。図
6において、バッファメモリ1、ライトアドレス生成回
路2、ライトアドレス3、ライトデータ4、ライトイネ
ーブル5、リードアドレス生成回路6、リードアドレス
7、リードデータ8、リードイネーブル9、フラグレジ
スタ13〜15、フラグリセットレジスタ19〜21、
フラグ信号22〜24、フラグリセット信号25〜2
7、データ判別回路29、オーバーフロー発生検出回路
30の構成は実施の形態2で示した図2の対応する部分
と実質的に同じであり、36〜38は排他的論理和回路
等からなり、ライトアドレス3とアドレス設定レジスタ
に設定されたアドレスとの一致を検出する一致検出回
路、39〜41は排他的論理和回路等からなり、リード
アドレス7とアドレス設定レジスタに設定されたアドレ
スとの一致を検出する一致検出回路、42〜44は一致
検出回路36〜41により一致が検出されるアドレスが
設定されるアドレス設定レジスタ、45〜47はアドレ
ス設定レジスタ42〜44に設定される設定データ、4
9〜51はオーバーフロー検出回路30に設定されるア
ドレスが設定されるアドレス設定レジスタ、48はこれ
らのアドレス設定レジスタ42〜44および49〜51
に設定される設定データとなる外部入力データ、55は
CPU等からなり、この外部入力データを設定するアド
レス設定手段である。
FIG. 6 is a block diagram showing a configuration of the buffer memory control device according to the fourth embodiment of the present invention. 6, a buffer memory 1, a write address generator 2, a write address 3, a write data 4, a write enable 5, a read address generator 6, a read address 7, a read data 8, a read enable 9, flag registers 13 to 15, Flag reset registers 19 to 21,
Flag signals 22 to 24, flag reset signals 25 to 2
7. The configurations of the data discriminating circuit 29 and the overflow occurrence detecting circuit 30 are substantially the same as the corresponding portions in FIG. 2 shown in the second embodiment, and 36 to 38 comprise exclusive OR circuits and the like. A match detecting circuit for detecting a match between the address 3 and the address set in the address setting register. Reference numerals 39 to 41 each include an exclusive OR circuit or the like, and determine whether the read address 7 matches the address set in the address setting register. Match detection circuits for detection, 42 to 44 are address setting registers in which addresses where a match is detected by the match detection circuits 36 to 41 are set, and 45 to 47 are setting data set in the address setting registers 42 to 44,
9 to 51 are address setting registers for setting addresses set in the overflow detection circuit 30, and 48 are these address setting registers 42 to 44 and 49 to 51.
The external input data 55, which is the setting data to be set, is constituted by a CPU or the like, and is an address setting means for setting the external input data.

【0069】以上のように構成されたバッファメモリ制
御装置について以下その動作について説明する。図6に
示すように、バッファメモリ1は、ライトイネーブル5
がLレベルの時に、ライトアドレス生成回路2が出力す
るライトアドレス3に、図示しないライトクロックに同
期してライトデータ4をライトする。ライトアドレス生
成回路2は、ライトイネーブル5がLレベルの時にライ
トクロックに同期して0〜158のアドレスを0から順
番に出力し、これを繰り返す。
The operation of the buffer memory control device configured as described above will be described below. As shown in FIG. 6, the buffer memory 1 has a write enable 5
Is at the L level, the write data 4 is written to the write address 3 output from the write address generation circuit 2 in synchronization with a write clock (not shown). When the write enable 5 is at the L level, the write address generation circuit 2 outputs addresses 0 to 158 in order from 0 in synchronization with the write clock, and repeats this.

【0070】アドレス設定レジスタ42、43、44は
それぞれアドレス設定手段55からの外部入力データ4
8により設定され、各メモリ領域1a,1b,1cの最
上位アドレスを示す。従って、一致検出回路36、3
7、38は、それぞれアドレス設定レジスタ42、4
3、44に設定された設定データ45、46、47とラ
イトアドレス3が一致し、そのメモリ領域1a,1b,
1cの最上位アドレスまでのライトが終了した時、Hレ
ベル信号をそれぞれ対応するフラグレジスタ13、1
4、15へ出力する。そして、フラグレジスタ13、1
4、15はそれぞれのフラグ信号22、23、24をH
レベルとする。
The address setting registers 42, 43 and 44 respectively store the external input data 4 from the address setting means 55.
8 and indicates the highest address of each memory area 1a, 1b, 1c. Therefore, the match detection circuits 36, 3
7, 38 are address setting registers 42, 4
The write data 3 matches the setting data 45, 46, 47 set in the memory areas 1a, 1b,
When the writing to the highest address of 1c is completed, the H level signal is set to the corresponding flag register 13, 1
Output to 4 and 15. Then, the flag registers 13, 1
4 and 15 set the respective flag signals 22, 23 and 24 to H level.
Level.

【0071】一方、バッファメモリ1は、リードイネー
ブル9がLレベルの時にリードアドレス生成回路6が出
力するリードアドレス7から、図示しないリードクロッ
クに同期してリードデータ8をリードする。リードアド
レス生成回路6はリードイネーブル9がLレベルの時に
リードクロックに同期して0〜158のアドレスを0か
ら順番に出力し、これを繰り返す。
On the other hand, the buffer memory 1 reads the read data 8 from the read address 7 output from the read address generation circuit 6 when the read enable 9 is at the L level in synchronization with a read clock (not shown). When the read enable 9 is at the L level, the read address generation circuit 6 outputs addresses 0 to 158 in order from 0 in synchronization with the read clock, and repeats this.

【0072】アドレス設定レジスタ42、43、44に
は、上述のように、各メモリ領域1a,1b,1cの最
上位アドレス、例えば40,110,158が設定され
ており、一致検出回路39、40、41は、それぞれ対
応したアドレス設定レジスタ42、43、44に設定さ
れた設定データ45、46、47とリードアドレス7が
一致し、そのメモリ領域1a,1b,1cの最上位アド
レスまでのリードが終了した時、Hレベル信号をそれぞ
れ対応するフラグリセットレジスタ19、20、21へ
出力する。
In the address setting registers 42, 43, and 44, as described above, the highest addresses of the memory areas 1a, 1b, and 1c, for example, 40, 110, and 158 are set. , 41, the read address 7 matches the setting data 45, 46, 47 set in the corresponding address setting registers 42, 43, 44, and the read up to the highest address of the memory areas 1a, 1b, 1c is performed. When the processing is completed, the H level signals are output to the corresponding flag reset registers 19, 20, and 21, respectively.

【0073】そして、これにより、フラグリセットレジ
スタ19、20、21がセットされると、それぞれ対応
するフラグレジスタ13、14、15をリセットするま
でフラグリセット信号25、26、27をHレベルで出
力し、フラグレジスタ13、14、15をリセットした
後Lレベルとなる。
When the flag reset registers 19, 20, and 21 are set, the flag reset signals 25, 26, and 27 are output at H level until the corresponding flag registers 13, 14, and 15 are reset. After the flag registers 13, 14, and 15 are reset, they go low.

【0074】フラグ信号22、23、24はその内1つ
以上がHレベルの場合のみデータ判別回路29はリード
イネーブル9を出力する。このように、フラグ信号2
2、23、24の内1つ以上がHレベルの場合のみデー
タ判別回路29でバッファメモリ1のデータをリードす
ることにより、外部よりアドレス設定レジスタに42〜
44に設定する任意のセル単位での転送が可能となり、
セルデータの損失を防ぐことができる。
The data discriminating circuit 29 outputs the read enable 9 only when at least one of the flag signals 22, 23, 24 is at the H level. Thus, the flag signal 2
Only when at least one of 2, 23 and 24 is at H level, the data in the buffer memory 1 is read by the data discriminating circuit 29 so that the address setting register 42 to
It is possible to transfer in arbitrary cell units set to 44,
Cell data loss can be prevented.

【0075】また、オーバーフロー発生検出回路30は
フラグ信号22、23、24の内いずれか2つがHレベ
ルの時で現在ライト中のメモリ領域のあるアドレス値が
該当するメモリ領域内の最上位アドレスに達する前であ
る旨をデコードするように、2つがHレベルで、かつ、
書き込み中のライトアドレスが外部入力データ48によ
りアドレス設定レジスタ49〜51に一致するように、
デコーダからなる当該オーバーフロー発生検出回路30
を設定し、かつ、アドレス設定レジスタ49〜51にバ
ッファメモリ1のメモリ領域1a,1b,1cの最上位
アドレスより手前のアドレスを設定しておくことによ
り、バッファメモリ1のオーバーフローを前もって検出
できる。
When any two of the flag signals 22, 23, and 24 are at the H level, the overflow occurrence detection circuit 30 sets the address value of the memory area currently being written to the highest address in the corresponding memory area. Two are at the H level, and
In order that the write address during writing matches the address setting registers 49 to 51 by the external input data 48,
The overflow occurrence detection circuit 30 comprising a decoder
Is set, and an address before the highest address of the memory areas 1a, 1b, 1c of the buffer memory 1 is set in the address setting registers 49 to 51, whereby an overflow of the buffer memory 1 can be detected in advance.

【0076】例えば、設定データ52〜54を、バッフ
ァメモリ1のメモリ領域1a,1b,1cの最上位アド
レスが40,110,158の場合、これより5手前の
35,106,153に設定しておくことにより、オー
バーフロー発生検出回路(デコーダ)30によりバッフ
ァメモリ1のオーバーフローを前もって任意のセル単位
で検出可能となる。
For example, when the highest addresses of the memory areas 1a, 1b, and 1c of the buffer memory 1 are 40, 110, and 158, the setting data 52 to 54 are set to 35, 106, and 153, which are five places before this. By doing so, the overflow occurrence detection circuit (decoder) 30 can detect the overflow of the buffer memory 1 in advance in an arbitrary cell unit.

【0077】このように、本実施の形態4によれば、バ
ッファメモリのライトアドレスおよびリードアドレスと
アドレス設定レジスタに設定した任意の設定データとの
一致を検出することによりメモリ領域に対応する複数の
フラグレジスタをセットあるいはリセットし、これらの
フラグレジスタの出力が1つを除いて全てHになり、か
つ残り1つのフラグレジスタに対応するメモリ領域のラ
イトアドレスがオーバーフローしかかっていることを、
これとアドレス設定レジスタに設定した設定データとを
デコードすることにより検知するとともに、これらのフ
ラグレジスタの出力が少なくとも1つ以上Hである場合
にバッファメモリを読み出し可能とするようにしたの
で、バッファメモリのオーバーフローを、これが実際に
生じるよりも前もって検出でき、データの転送制御に用
いた場合に転送効率が良いものが得られるとともに、バ
ッファメモリを任意の個数のセルに分割し、かつその分
割したセルを単位としてバッファメモリのデータの有無
を検知することが可能である。
As described above, according to the fourth embodiment, by detecting a match between the write address and the read address of the buffer memory and the arbitrary setting data set in the address setting register, a plurality of addresses corresponding to the memory area are detected. Set or reset the flag registers, and confirm that all but one of the outputs of these flag registers are H, and that the write address of the memory area corresponding to the remaining one flag register is about to overflow.
This is detected by decoding the setting data set in the address setting register and the setting data set in the address setting register, and when at least one of the outputs of the flag registers is at H, the buffer memory can be read. Overflow can be detected before it actually occurs, and when used for data transfer control, a transfer efficiency can be obtained.In addition, the buffer memory is divided into an arbitrary number of cells, and the divided cells are divided. Can be used to detect the presence or absence of data in the buffer memory.

【0078】なお、図7に示すように、オーバーフロー
発生通知回路を図1に示すような論理積回路28で構成
するようにしてもよく、この場合、アドレス設定レジス
タ49,50,51を、各メモリ領域1a,1b,1c
の最上位アドレス、例えば40,110,158に設定
すれば、バッファメモリのオーバーフローを前もって検
出することはできないが、任意のセルを単位としてオー
バーフローを検出可能である。従って、アドレス設定レ
ジスタ49,50,51を、これより、例えば5ずつ前
の35,106,153に設定しておけば、オーバーフ
ローを前もって検出することが可能となり、上記実施の
形態4と同様の効果を奏する。
As shown in FIG. 7, the overflow occurrence notifying circuit may be constituted by an AND circuit 28 as shown in FIG. 1. In this case, the address setting registers 49, 50, 51 Memory area 1a, 1b, 1c
, For example, 40, 110, 158, the overflow of the buffer memory cannot be detected in advance, but the overflow can be detected in arbitrary cells. Therefore, if the address setting registers 49, 50, and 51 are set to 35, 106, and 153, for example, 5 ahead of each other, overflow can be detected in advance, and the same as in the fourth embodiment. It works.

【0079】また、このバッファメモリ制御装置は、フ
ラグレジスタとフラグリセットレジスタと一致検出回路
およびアドレス設定レジスタの数を増やすことでさらに
細かくバッファメモリのメモリ領域を任意の単位で分割
でき、その分割されたセル単位によるデータの転送やオ
ーバーフローの事前検出が可能となる。さらに、一致検
出回路の検出値を例えば全て158に設定した場合、バ
ッファメモリを分割せず、全体を1つのメモリ領域とし
てそのオーバーフローの有無を検出できる。
The buffer memory control device can further divide the memory area of the buffer memory into arbitrary units by increasing the number of flag registers, flag reset registers, coincidence detection circuits, and address setting registers. It becomes possible to transfer data and detect overflow in advance on a cell-by-cell basis. Furthermore, when the detection values of the coincidence detection circuit are all set to, for example, 158, it is possible to detect the presence or absence of overflow of the entire buffer memory without dividing the buffer memory.

【0080】[0080]

【発明の効果】以上のように、本願の請求項1に係る発
明によるバッファメモリ制御装置によれば、アドレスに
より複数のデータ単位であるセル単位のメモリ領域に分
割されたバッファメモリと、前記バッファメモリのライ
トアドレスを出力するライトアドレス生成回路と、前記
バッファメモリのリードアドレスを出力するリードアド
レス生成回路と、前記ライトアドレスをデコードするこ
とによりセル単位毎のデータのライトが終了する前のラ
イトアドレスを示すフラグ信号を出力する第1のレジス
タと、前記フラグ信号により前記バッファメモリ内にセ
ル単位のデータの有無を判別し前記バッファメモリのリ
ード制御を行うデータ判別回路と、前記リードアドレス
をデコードすることによりセル単位毎のデータのリード
終了を示し、前記フラグ信号のリセットを行うフラグリ
セット信号を出力する第2のレジスタと、前記フラグ信
号によりバッファメモリのオーバーフローの発生を知ら
せるオーバーフロー発生通知回路とを有し、前記データ
判別回路により前記バッファメモリのリード制御を行
い、バッファメモリのオーバーフローが発生する前にラ
イトデータの転送中止を知らせ、かつ、セル単位でデー
タの転送を行いデータの損失を防止するようにしたの
で、バッファメモリをあるセル単位に分割し、セル単位
ごとにデータ転送を行い、オーバーフローおよびエンプ
ティーの制御を行うことでセルデータの損失を防止でき
る。 また、バッファメモリのオーバーフローを比較回路
を用いず検出するために回路規模を小さく構成できる効
果がある。
As described above, according to the buffer memory control device according to the first aspect of the present invention, a buffer memory divided into a plurality of data units, i.e., a cell-based memory area by an address; A write address generation circuit that outputs a write address of a memory; a read address generation circuit that outputs a read address of the buffer memory; and a write address before the end of data writing for each cell unit by decoding the write address. A first register for outputting a flag signal indicating the presence of the data, a data discriminating circuit for discriminating presence / absence of data in a unit of cell in the buffer memory based on the flag signal, and performing a read control of the buffer memory; Indicates the end of reading data for each cell unit, A second register for outputting a flag reset signal for resetting a lag signal; and an overflow occurrence notifying circuit for notifying the occurrence of an overflow in the buffer memory by the flag signal. The buffer memory is divided into a certain cell unit because the stop of the write data transfer is notified before the buffer memory overflow occurs, and the data transfer is performed in the cell unit to prevent the data loss. By performing data transfer on a cell-by-cell basis and controlling overflow and empty, loss of cell data can be prevented. Further, since the overflow of the buffer memory is detected without using the comparison circuit, the circuit scale can be reduced.

【0081】また、本願の請求項2に係る発明によるバ
ッファメモリ制御装置によれば、請求項1記載のバッフ
ァメモリ制御装置において、フラグ信号を入力とし、バ
ッファメモリにセル単位のデータが無い場合にバッファ
メモリのリード制御を行うと同時に疑似データ選択信号
とセル単位の疑似データを出力する疑似データ生成回路
と、前記疑似データ選択信号により前記疑似データと前
記バッファメモリのリードデータのいずれかを選択する
選択回路とを有するようにしたので、転送先でこのセル
全体が廃棄されてしまうという不具合が発生することは
なく、セルデータの損失を防ぐことができる効果があ
る。
Further, according to the buffer memory control device of the present invention, when a flag signal is input and there is no data in cell units in the buffer memory, A pseudo data generation circuit that outputs a pseudo data selection signal and pseudo data in cell units at the same time as performing read control of the buffer memory, and selects one of the pseudo data and the read data of the buffer memory by the pseudo data selection signal. Since the selection circuit is provided, there is no problem that the entire cell is discarded at the transfer destination, and there is an effect that loss of cell data can be prevented.

【0082】また、本願の請求項3に係る発明によるバ
ッファメモリ制御装置によれば、請求項1記載のバッフ
ァメモリ制御装置において、外部からアドレス値を設定
可能なレジスタと、前記レジスタの値とライトアドレス
の一致を検出する第1の一致検出回路と、前記レジスタ
の値とリードアドレスの一致を検出する第2の一致検出
回路とを有し、バッファメモリのメモリ領域を任意の単
位で分割可能とするようにしたので、任意の単位で分割
したバッファメモリのメモリ領域のオーバーフローを検
出できる効果がある。
According to a third aspect of the present invention, there is provided the buffer memory control device according to the first aspect, wherein a register capable of setting an address value from the outside, a value of the register, and a value of the register are written. A first match detection circuit for detecting a match between addresses; and a second match detection circuit for detecting a match between the value of the register and the read address, so that the memory area of the buffer memory can be divided into arbitrary units. Therefore, an overflow of the memory area of the buffer memory divided into arbitrary units can be detected.

【0083】また、本願の請求項4に係る発明によるバ
ッファメモリ制御装置によれば、アドレスにより複数の
データ単位であるセル単位のメモリ領域に分割されたバ
ッファメモリと、前記バッファメモリのライトアドレス
を出力するライトアドレス生成回路と、前記バッファメ
モリのリードアドレスを出力するリードアドレス生成回
路と、前記ライトアドレスをデコードすることによりセ
ル単位毎のデータのライトが終了した時点もしくはこれ
より前のライトアドレスを示すフラグ信号を出力する第
1のレジスタと、前記フラグ信号により前記バッファメ
モリ内にセル単位のデータの有無を判別し前記バッファ
メモリのリード制御を行うデータ判別回路と、前記リー
ドアドレスをデコードすることによりセル単位毎のデー
タのリード終了を示し、前記フラグ信号のリセットを行
うフラグリセット信号を出力する第2のレジスタと、フ
ラグ信号とライトアドレスを入力とし、前記フラグ信号
と前記ライトアドレスによりオーバーフローが発生する
前にライトデータの転送停止を知らせるオーバーフロー
発生検出回路とを有し、前記データ判別回路により前記
バッファメモリのリード制御を行い、バッファメモリの
オーバーフローが発生する前にライトデータの転送中止
を知らせ、かつ、セル単位でデータの転送を行いデータ
の損失を防止するようにしたので、バッファメモリをあ
るセル単位に分割し、セル単位ごとにデータ転送を行
い、オーバーフローおよびエンプティーの制御を行うこ
とでセルデータの損失を防止できる。 また、バッファメ
モリのオーバーフローを前もって検出できる効果があ
る。
According to the buffer memory control device of the present invention, the buffer memory divided into a plurality of memory areas in units of cells, which is a plurality of data units, and the write address of the buffer memory is stored in the memory area. A write address generating circuit for outputting, a read address generating circuit for outputting a read address of the buffer memory, and a write address at the time of completion of writing of data for each cell unit or a write address before this by decoding the write address. A first register for outputting a flag signal indicating the data, a data discriminating circuit for discriminating presence / absence of data in a unit of cell in the buffer memory based on the flag signal, and performing read control of the buffer memory; and decoding the read address. Completes reading data for each cell And a second register for outputting a flag reset signal for resetting the flag signal, a flag signal and a write address being input, and stopping transfer of write data before an overflow occurs due to the flag signal and the write address. An overflow occurrence detection circuit for notifying the buffer memory, performing read control of the buffer memory by the data discrimination circuit, notifying stop of write data transfer before an overflow of the buffer memory occurs, and performing data transfer in cell units. Since the data loss is prevented, the buffer memory is divided into certain cell units, data transfer is performed for each cell unit, and overflow and empty are controlled to prevent cell data loss. Also, there is an effect that the overflow of the buffer memory can be detected in advance.

【0084】また、本願の請求項5に係る発明によるバ
ッファメモリ制御装置によれば、請求項4記載のバッフ
ァメモリ制御装置において、フラグ信号を入力とし、バ
ッファメモリにセル単位のデータが無い場合にバッファ
メモリのリード制御を行うと同時に疑似データ選択信号
とセル単位の疑似データを出力する疑似データ生成回路
と、前記疑似データ選択信号により前記疑似データと前
記バッファメモリのリードデータのいずれかを選択する
選択回路とを有するようにしたので、転送先でこのセル
全体が廃棄されてしまうという不具合が発生することは
なく、セルデータの損失を防ぐことができる効果があ
る。
According to the buffer memory control device of the present invention, when a flag signal is input and there is no data in cell units in the buffer memory, A pseudo data generation circuit that outputs a pseudo data selection signal and pseudo data in cell units at the same time as performing read control of the buffer memory, and selects one of the pseudo data and the read data of the buffer memory by the pseudo data selection signal. Since the selection circuit is provided, there is no problem that the entire cell is discarded at the transfer destination, and there is an effect that loss of cell data can be prevented.

【0085】また、本願の請求項6に係る発明によるバ
ッファメモリ制御装置によれば、請求項4記載のバッフ
ァメモリ制御装置において、外部からアドレス値を設定
可能なレジスタと、前記レジスタの値とライトアドレス
の一致を検出する第1の一致検出回路と、前記レジスタ
の値とリードアドレスの一致を検出する第2の一致検出
回路とを有し、バッファメモリのメモリ領域を任意の単
位で分割可能とするようにしたので、任意の単位で分割
したバッファメモリのメモリ領域のオーバーフローを検
出できる効果がある。
According to the buffer memory control device of the present invention, in the buffer memory control device according to the fourth aspect, a register capable of setting an address value from the outside, and writing and reading of the register value A first match detection circuit for detecting a match between addresses; and a second match detection circuit for detecting a match between the value of the register and the read address, so that the memory area of the buffer memory can be divided into arbitrary units. Therefore, an overflow of the memory area of the buffer memory divided into arbitrary units can be detected.

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

【図1】本発明の実施の形態1におけるバッファメモリ
制御装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a buffer memory control device according to a first embodiment of the present invention.

【図2】本発明の実施の形態1におけるバッファメモリ
制御装置のデコーダの構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a decoder of the buffer memory control device according to the first embodiment of the present invention.

【図3】本発明の実施の形態2におけるバッファメモリ
制御装置の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a buffer memory control device according to a second embodiment of the present invention.

【図4】本発明の実施の形態3におけるバッファメモリ
制御装置の構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of a buffer memory control device according to a third embodiment of the present invention.

【図5】本発明の実施の形態3におけるバッファメモリ
制御装置の他の構成例を示すブロック図である。
FIG. 5 is a block diagram showing another configuration example of the buffer memory control device according to the third embodiment of the present invention.

【図6】本発明の実施の形態4におけるバッファメモリ
制御装置の構成を示すブロック図である。
FIG. 6 is a block diagram illustrating a configuration of a buffer memory control device according to a fourth embodiment of the present invention.

【図7】本発明の実施の形態4におけるバッファメモリ
制御装置の他の構成例を示すブロック図である。
FIG. 7 is a block diagram showing another configuration example of the buffer memory control device according to the fourth embodiment of the present invention.

【図8】従来のバッファメモリ制御装置の構成を示すブ
ロック図である。
FIG. 8 is a block diagram showing a configuration of a conventional buffer memory control device.

【図9】従来のバッファメモリ制御装置のオーバーフロ
ー,アンダーフローの検出動作を示す模式図である。
FIG. 9 is a schematic diagram showing an overflow / underflow detection operation of the conventional buffer memory control device.

【図10】従来のバッファメモリ制御装置のアドレス比
較回路,オーバーフロー発生通知回路,エンプティー発
生通知回路の構成を示す模式図である。
FIG. 10 is a schematic diagram showing a configuration of an address comparison circuit, an overflow occurrence notification circuit, and an empty occurrence notification circuit of a conventional buffer memory control device.

【図11】従来のセルバッファ制御回路の構成例を示す
模式図である。
FIG. 11 is a schematic diagram showing a configuration example of a conventional cell buffer control circuit.

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

1 バッファメモリ 1a,1b,1c メモリ領域 2 ライトアドレス生成回路 3 ライトアドレス 4 ライトデータ 5 ライトイネーブル 6 リードアドレス生成回路 7 リードアドレス 8 リードデータ 9 リードイネーブル 10〜12 ライトアドレスデコーダ 13〜15 フラグレジスタ 16〜18 リードアドレスデコーダ 19〜21 フラグリセットレジスタ 22〜24 フラグ信号 25〜27 フラグリセット信号 28 オーバフロー発生通知回路(論理積) 29 データ判別回路 30 オーバフロー発生検出回路 31 疑似データ生成回路 32 疑似データ 33 疑似データ選択信号 34 選択回路 35 転送データ 36〜41 一致検出回路 42〜44,49〜51 アドレス設定レジスタ 45〜47 設定データ 48 外部入力データ DESCRIPTION OF SYMBOLS 1 Buffer memory 1a, 1b, 1c Memory area 2 Write address generation circuit 3 Write address 4 Write data 5 Write enable 6 Read address generation circuit 7 Read address 8 Read data 9 Read enable 10-12 Write address decoder 13-15 Flag register 16 To 18 read address decoder 19 to 21 flag reset register 22 to 24 flag signal 25 to 27 flag reset signal 28 overflow occurrence notifying circuit (logical product) 29 data discriminating circuit 30 overflow occurrence detecting circuit 31 pseudo data generating circuit 32 pseudo data 33 pseudo Data selection signal 34 Selection circuit 35 Transfer data 36-41 Match detection circuit 42-44, 49-51 Address setting register 45-47 Setting data 48 External input data

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 アドレスにより複数のデータ単位である
セル単位のメモリ領域に分割されたバッファメモリと、 前記バッファメモリのライトアドレスを出力するライト
アドレス生成回路と、 前記バッファメモリのリードアドレスを出力するリード
アドレス生成回路と、 前記ライトアドレスをデコードすることによりセル単位
毎のデータのライトが終了する前のライトアドレスを示
すフラグ信号を出力する第1のレジスタと、 前記フラグ信号により前記バッファメモリ内にセル単位
のデータの有無を判別し前記バッファメモリのリード制
御を行うデータ判別回路と、 前記リードアドレスをデコードすることによりセル単位
毎のデータのリード終了を示し、前記フラグ信号のリセ
ットを行うフラグリセット信号を出力する第2のレジス
タと、 前記フラグ信号によりバッファメモリのオーバーフロー
の発生を知らせるオーバーフロー発生通知回路とを有
し、 前記データ判別回路により前記バッファメモリのリード
制御を行い、バッファメモリのオーバーフローが発生す
る前にライトデータの転送中止を知らせ、かつ、セル単
位でデータの転送を行いデータの損失を防止することを
特徴とするバッファメモリ制御装置。
1. A buffer memory divided into a plurality of memory areas in cell units, which are data units, by a address, a write address generation circuit for outputting a write address of the buffer memory, and outputting a read address of the buffer memory. A read address generation circuit, a first register that decodes the write address, and outputs a flag signal indicating a write address before the end of data writing for each cell unit, and stores the flag signal in the buffer memory by the flag signal. A data discriminating circuit for discriminating presence / absence of data in a cell unit and performing read control of the buffer memory; a flag reset for indicating completion of reading of data in each cell unit by decoding the read address and resetting the flag signal A second register for outputting a signal; An overflow occurrence notifying circuit for notifying the occurrence of an overflow of the buffer memory by the flag signal, and performing read control of the buffer memory by the data discriminating circuit, and stopping transfer of write data before an overflow of the buffer memory occurs. A buffer memory control device for notifying and transferring data in cell units to prevent data loss.
【請求項2】 請求項1記載のバッファメモリ制御装置
において、 フラグ信号を入力とし、バッファメモリにセル単位のデ
ータが無い場合にバッファメモリのリード制御を行うと
同時に疑似データ選択信号とセル単位の疑似データを出
力する疑似データ生成回路と、 前記疑似データ選択信号により前記疑似データと前記バ
ッファメモリのリードデータのいずれかを選択する選択
回路とを有することを特徴とするバッファメモリ制御装
置。
2. The buffer memory control device according to claim 1, wherein a flag signal is input, read control of the buffer memory is performed when there is no cell unit data in the buffer memory, and a pseudo data selection signal and a cell unit A buffer memory control device, comprising: a pseudo data generation circuit that outputs pseudo data; and a selection circuit that selects one of the pseudo data and the read data of the buffer memory based on the pseudo data selection signal.
【請求項3】 請求項1記載のバッファメモリ制御装置
において、 外部からアドレス値を設定可能なレジスタと、 前記レジスタの値とライトアドレスの一致を検出する第
1の一致検出回路と、 前記レジスタの値とリードアドレスの一致を検出する第
2の一致検出回路とを有し、 バッファメモリのメモリ領域を任意の単位で分割可能と
したことを特徴とするバッファメモリ制御装置。
3. The buffer memory control device according to claim 1, wherein: a register capable of externally setting an address value; a first match detection circuit for detecting a match between the value of the register and a write address; A buffer memory control device, comprising: a second match detection circuit for detecting a match between a value and a read address, wherein a memory area of the buffer memory can be divided into arbitrary units.
【請求項4】 アドレスにより複数のデータ単位である
セル単位のメモリ領域に分割されたバッファメモリと、 前記バッファメモリのライトアドレスを出力するライト
アドレス生成回路と、 前記バッファメモリのリードアドレスを出力するリード
アドレス生成回路と、 前記ライトアドレスをデコードすることによりセル単位
毎のデータのライトが終了した時点もしくはこれより前
のライトアドレスを示すフラグ信号を出力する第1のレ
ジスタと、 前記フラグ信号により前記バッファメモリ内にセル単位
のデータの有無を判別し前記バッファメモリのリード制
御を行うデータ判別回路と、 前記リードアドレスをデコードすることによりセル単位
毎のデータのリード終了を示し、前記フラグ信号のリセ
ットを行うフラグリセット信号を出力する第2のレジス
タと、 フラグ信号とライトアドレスを入力とし、前記フラグ信
号と前記ライトアドレスによりオーバーフローが発生す
る前にライトデータの転送停止を知らせるオーバーフロ
ー発生検出回路とを有し、 前記データ判別回路により前記バッファメモリのリード
制御を行い、バッファメモリのオーバーフローが発生す
る前にライトデータの転送中止を知らせ、かつ、セル単
位でデータの転送を行いデータの損失を防止することを
特徴とするバッファメモリ制御装置。
4. A buffer memory divided into a plurality of memory areas in units of cells as data units by an address, a write address generating circuit for outputting a write address of the buffer memory, and outputting a read address of the buffer memory. A read address generation circuit, a first register that outputs a flag signal indicating a write address at a point in time when data writing for each cell is completed or earlier by decoding the write address, and a first register that outputs the flag signal according to the flag signal. A data discriminating circuit for discriminating the presence / absence of data in cell units in the buffer memory and performing read control of the buffer memory; and indicating completion of reading of data in cell units by decoding the read address. Output a flag reset signal 2; a flag signal and a write address; and an overflow detection circuit for notifying a stop of write data transfer before an overflow occurs due to the flag signal and the write address. A buffer memory control device for performing read control of a buffer memory, notifying stop of write data transfer before an overflow of the buffer memory occurs, and transferring data in units of cells to prevent data loss. .
【請求項5】 請求項4記載のバッファメモリ制御装置
において、 フラグ信号を入力とし、バッファメモリにセル単位のデ
ータが無い場合にバッファメモリのリード制御を行うと
同時に疑似データ選択信号とセル単位の疑似データを出
力する疑似データ生成回路と、 前記疑似データ選択信号により前記疑似データと前記バ
ッファメモリのリードデータのいずれかを選択する選択
回路とを有することを特徴とするバッファメモリ制御装
置。
5. The buffer memory control device according to claim 4, wherein a flag signal is input, and when there is no data in a cell unit in the buffer memory, read control of the buffer memory is performed, and at the same time, a pseudo data selection signal and a cell unit A buffer memory control device, comprising: a pseudo data generation circuit that outputs pseudo data; and a selection circuit that selects one of the pseudo data and the read data of the buffer memory based on the pseudo data selection signal.
【請求項6】 請求項4記載のバッファメモリ制御装置
において、 外部からアドレス値を設定可能なレジスタと、 前記レジスタの値とライトアドレスの一致を検出する第
1の一致検出回路と、 前記レジスタの値とリードアドレスの一致を検出する第
2の一致検出回路とを有し、 バッファメモリのメモリ領域を任意の単位で分割可能と
したことを特徴とするバッファメモリ制御装置。
6. The buffer memory control device according to claim 4, wherein: a register capable of externally setting an address value; a first match detection circuit for detecting a match between the register value and a write address; A buffer memory control device, comprising: a second match detection circuit for detecting a match between a value and a read address, wherein a memory area of the buffer memory can be divided into arbitrary units.
JP10160250A 1997-06-16 1998-06-09 Buffer memory controller Expired - Fee Related JP2873229B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10160250A JP2873229B2 (en) 1997-06-16 1998-06-09 Buffer memory controller

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP9-158836 1997-06-16
JP15883697 1997-06-16
JP10160250A JP2873229B2 (en) 1997-06-16 1998-06-09 Buffer memory controller

Publications (2)

Publication Number Publication Date
JPH1173299A true JPH1173299A (en) 1999-03-16
JP2873229B2 JP2873229B2 (en) 1999-03-24

Family

ID=26485833

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10160250A Expired - Fee Related JP2873229B2 (en) 1997-06-16 1998-06-09 Buffer memory controller

Country Status (1)

Country Link
JP (1) JP2873229B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100857137B1 (en) * 2002-02-20 2008-09-05 주식회사 엘지이아이 Transmittion apparatus for animation data and method thereof
JP2012098884A (en) * 2010-11-01 2012-05-24 Olympus Corp Data processor and image processor
JP2013222040A (en) * 2012-04-16 2013-10-28 Fujitsu Semiconductor Ltd Data transfer device, data transfer method, and semiconductor device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6009902B2 (en) * 2012-10-23 2016-10-19 株式会社東芝 Shared memory access system and shared memory access method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100857137B1 (en) * 2002-02-20 2008-09-05 주식회사 엘지이아이 Transmittion apparatus for animation data and method thereof
JP2012098884A (en) * 2010-11-01 2012-05-24 Olympus Corp Data processor and image processor
US9003132B2 (en) 2010-11-01 2015-04-07 Olympus Corporation Data processing apparatus and image processing apparatus
JP2013222040A (en) * 2012-04-16 2013-10-28 Fujitsu Semiconductor Ltd Data transfer device, data transfer method, and semiconductor device

Also Published As

Publication number Publication date
JP2873229B2 (en) 1999-03-24

Similar Documents

Publication Publication Date Title
US4507760A (en) First-in, first-out (FIFO) memory configuration for queue storage
KR100287396B1 (en) Buffer memory controller
JPS61156954A (en) Buffer memory system
US6507899B1 (en) Interface for a memory unit
JP2873229B2 (en) Buffer memory controller
US5825204A (en) Apparatus and method for a party check logic circuit in a dynamic random access memory
US6535479B1 (en) Hitless switching system of ATM switch apparatus in which discard priority control is stopped
CN115221082B (en) Data caching method and device and storage medium
US7023850B2 (en) Multicasting apparatus and method in shared memory switch
EP1174790A1 (en) Method and apparatus for determining the number of empty memory locations in a FIFO memory device
JPH09274599A (en) Buffer memory device
JP2000076180A (en) Bus connection device and information processing system
KR100380601B1 (en) Address management system and method of FFC for IPC
JP3500561B2 (en) Shared data buffer
KR100557933B1 (en) Structure of write buffer for raise the efficiency of bus
JPH08223170A (en) Atm cell switch
JPH09305493A (en) Buffer memory circuit and memory switch
KR0137408B1 (en) Fifo data i/o method
JPH0833869B2 (en) Data processing device
JP2577834B2 (en) Buffer memory device
JPH03201846A (en) Buffer control system for atm exchange
JP2814980B2 (en) Cell buffer control method
JPH1063569A (en) Main memory data writing device
JPH07123094A (en) Buffer control circuit
JPH1051469A (en) Atm switch

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees