JPH11175310A - Fifo memory control circuit - Google Patents

Fifo memory control circuit

Info

Publication number
JPH11175310A
JPH11175310A JP9338468A JP33846897A JPH11175310A JP H11175310 A JPH11175310 A JP H11175310A JP 9338468 A JP9338468 A JP 9338468A JP 33846897 A JP33846897 A JP 33846897A JP H11175310 A JPH11175310 A JP H11175310A
Authority
JP
Japan
Prior art keywords
signal
data
circuit
full
control 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.)
Pending
Application number
JP9338468A
Other languages
Japanese (ja)
Inventor
Yutaka Fujita
豊 藤田
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.)
Toshiba TEC Corp
Original Assignee
Toshiba TEC Corp
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 Toshiba TEC Corp filed Critical Toshiba TEC Corp
Priority to JP9338468A priority Critical patent/JPH11175310A/en
Publication of JPH11175310A publication Critical patent/JPH11175310A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent the omission of asynchronous reception data and to evade time-out for disconnecting connection by a transmission side. SOLUTION: This circuit is provided with an up-down counter 35 for performing a count-up operation every time a write signal (WR) is supplied to a dual port RAM 31 and performing a count-down operation every time a read signal (RD) is supplied to the dual port RAM 31 and a near-full signal output circuit for comparing the counted value of the up-down counter 35 with the counted value (i) before the dual port RAM 31 becomes full set beforehand and outputting (asserting) near-full signals (Near-Full) for indicating that the dual port RAM 31 is near full when the counted value of the up-down counter 35 reaches the set counted value (i) (at the time of satisfying A>=B of a comparator circuit 38 for the near-full signals).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、各種の電子機器に
搭載されるFiFoメモリ制御回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a fifo memory control circuit mounted on various electronic devices.

【0002】[0002]

【従来の技術】従来、この種のFiFoメモリ制御(F
irst−in:First−out(先入れ先出し
型);コンピュータのスタックメモリなど順序をもって
データの書込みと読出しを行うメモリ制御の1つで、最
も早く書込んだデータをその処理の順番がきたときに最
初に処理する制御)を行うFiFoメモリ制御回路10
は、図4に示すように、メモリとしてのkワード構成の
デュアルポートRAM1、デュアルポートRAM1の書
込アドレスを発生する書込アドレス回路2、デュアルポ
ートRAM1の読出アドレスを発生する読出アドレス回
路3、読出アドレス回路3の出力である読出アドレス信
号(RA)及び書込アドレス回路2の出力である書込ア
ドレス信号(WA)からデュアルポートRAM1内の有
効データの状態を示すFull−Empty制御回路4
から構成される。
2. Description of the Related Art Conventionally, this type of FIFO memory control (F
first-in: First-out (first-in first-out type); one of memory controls for writing and reading data in order, such as in a stack memory of a computer. Memory control circuit 10 for performing the processing control)
As shown in FIG. 4, a k-word dual port RAM 1 as a memory, a write address circuit 2 for generating a write address for the dual port RAM 1, a read address circuit 3 for generating a read address for the dual port RAM 1, Full-empty control circuit 4 indicating the state of valid data in dual port RAM 1 from read address signal (RA) output from read address circuit 3 and write address signal (WA) output from write address circuit 2
Consists of

【0003】書込アドレス回路2には、初期化のために
外部からリセット信号(RESET)が接続されてお
り、読出アドレス回路3には初期化のために外部からリ
セット信号(RESET)が接続されている。また、読
出アドレス信号(RA)はデュアルポートRAM1の読
出アドレス端子(RA端子)に接続されており、書込ア
ドレス信号(WA)はデュアルポートRAM1の書込ア
ドレス端子(WA端子)に接続されている。また、上記
読出アドレス信号(RA)及び書込アドレス信号(W
A)はFull−Empty制御回路4に接続されてい
る。
A reset signal (RESET) is externally connected to the write address circuit 2 for initialization, and a reset signal (RESET) is externally connected to the read address circuit 3 for initialization. ing. The read address signal (RA) is connected to the read address terminal (RA terminal) of the dual port RAM 1, and the write address signal (WA) is connected to the write address terminal (WA terminal) of the dual port RAM 1. I have. Further, the read address signal (RA) and the write address signal (W
A) is connected to the Full-Empty control circuit 4.

【0004】Full−Empty制御回路4からは、
上記書込アドレス回路2への書込アドレス信号(W
A)、読出アドレス回路3の読出アドレス信号(RA)
に基づいてデュアルポートRAM1内の有効データの状
態を示すフル信号(Full)とエンプティ信号(Em
pty)が外部に出力されている。このフル信号(Fu
ll)は、デュアルポートRAM1が満杯のときに出力
され、エンプティ信号(Empty)は、デュアルポー
トRAM1が空のときに出力される。具体的には、上記
フル信号(Full)はデュアルポートRAM1にkワ
ードのデータが書込まれた時にアサートされ、エンプテ
ィ信号(Empty)はデュアルポートRAM1に0ワ
ードのデータが書込まれた時にアサートされる。
[0004] From the Full-Empty control circuit 4,
The write address signal (W
A), read address signal (RA) of read address circuit 3
A full signal (Full) indicating the state of valid data in the dual port RAM 1 and an empty signal (Em) based on the
pty) is output to the outside. This full signal (Fu
11) is output when the dual-port RAM 1 is full, and the empty signal (Empty) is output when the dual-port RAM 1 is empty. Specifically, the full signal (Full) is asserted when k words of data are written to the dual port RAM1, and the empty signal (Empty) is asserted when 0 words of data are written to the dual port RAM1. Is done.

【0005】外部から入力されるFiFoメモリ書込信
号(WR)は、デュアルポートRAM1の書込端子(W
R端子)と書込アドレス回路2に接続されている。ま
た、外部から入力されるFiFoメモリ読出信号(R
D)は、デュアルポートRAM1の読出端子(RD端
子)と読出アドレス回路3に接続されている。さらに、
外部から入力されるFiFoメモリチップセレクト信号
(CS)はデュアルポートRAM1のチップセレクト端
子(CS端子)に接続されている。
An externally input FIFO memory write signal (WR) is applied to a write terminal (W) of the dual port RAM 1.
R terminal) and the write address circuit 2. Also, an externally input Fifo memory read signal (R
D) is connected to the read terminal (RD terminal) of the dual port RAM 1 and the read address circuit 3. further,
An externally input Fifo memory chip select signal (CS) is connected to a chip select terminal (CS terminal) of the dual port RAM 1.

【0006】また、外部へデータを出力するデータバス
20は、デュアルポートRAM1の読出データバス端子
(RDATA)に接続されており、外部からの書込デー
タを入力するデータバス21はデュアルポートRAM1
の書込データバス端子(WDATA端子)に接続されて
いる。
A data bus 20 for outputting data to the outside is connected to a read data bus terminal (RDATA) of the dual port RAM 1, and a data bus 21 for inputting write data from the outside is connected to the dual port RAM 1.
Are connected to the write data bus terminal (WDATA terminal).

【0007】次に、上記FiFoメモリ制御回路10を
使用した一般的なマイクロプロセッサ制御回路の構成を
図5に示す。特に送信側のPC(パーソナルコンピュー
タ)から例えばRS232Cに基づいてデータをマイク
ロプロセッサ制御回路で受信し、そのデータを1ワード
ずつFiFoメモリ制御回路10のデュアルポートRA
M1へ書込む場合について説明する。
Next, FIG. 5 shows a configuration of a general microprocessor control circuit using the FIFO memory control circuit 10. As shown in FIG. In particular, the microprocessor control circuit receives data from a PC (personal computer) on the transmission side based on, for example, RS232C, and transfers the data word by word to the dual port RA of the FIFO memory control circuit 10.
The case of writing to M1 will be described.

【0008】上記マイクロプロセッサ制御回路は、CP
U(中央処理装置)コア11と実行プログラムなどを記
憶した制御用ROM(リ−ド・オンリ・メモリ)12と
ワークRAM(ランダム・アクセス・メモリ)13とI
/Oポート(入出力ポート)14を内蔵した1チップC
PU(ワンチップCPU)15を備える。
The microprocessor control circuit comprises a CP
U (central processing unit) core 11, control ROM (read only memory) 12 storing execution programs and the like, work RAM (random access memory) 13, and I
1-chip C with built-in I / O port (input / output port) 14
A PU (one-chip CPU) 15 is provided.

【0009】また、FiFoメモリ制御回路10、送信
側である上記PCのシリアル非同期通信制御回路17の
送信部からのデータを外部データとして受信するシリア
ル非同期通信制御回路の受信部及びFiFo書込制御回
路からなるFiFo書込回路16、このFiFo書込回
路16から出力されるFiFoメモリ制御回路用チップ
セレクト信号(CS1)、ワンチップCPU15から出
力されるFiFoメモリ制御回路用チップセレクト信号
(CS2)を入力とする論理積回路18を備える。
A FIFO memory control circuit 10, a receiving section of a serial asynchronous communication control circuit for receiving data from a transmitting section of the serial asynchronous communication control circuit 17 of the PC as a transmitting side as external data, and a FIFO writing control circuit. , A Fifo memory control circuit chip select signal (CS1) output from the FIFO write circuit 16, and a Fifo memory control circuit chip select signal (CS2) output from the one-chip CPU 15. Is provided.

【0010】上記論理積回路18はFiFoメモリ制御
回路10のチップセレクト端子(CS端子)に接続され
ている。また、上記リセット信号(RESET)はワン
チップCPU15とFiFoメモリ制御回路10のリセ
ット端子(RESET端子)に接続されている。
The AND circuit 18 is connected to a chip select terminal (CS terminal) of the FIFO memory control circuit 10. The reset signal (RESET) is connected to a reset terminal (RESET terminal) of the one-chip CPU 15 and the FIFO memory control circuit 10.

【0011】上記ワンチップCPU15のデータバス2
0は、メモリ制御回路10の読出データバス端子(RD
ATA端子)に接続されており、FiFo書込回路16
のデータバス21はFiFoメモリ制御回路10の書込
データバス端子(WDATA端子)に接続されている。
The data bus 2 of the one-chip CPU 15
0 is the read data bus terminal (RD
ATA terminal) and the FIFO writing circuit 16
Is connected to a write data bus terminal (WDATA terminal) of the FIFO memory control circuit 10.

【0012】上記ワンチップCPU15のデータリード
信号(RD)はFiFoメモリ制御回路10のRD端子
に接続されており、FiFoメモリ制御回路10のフル
信号(Full)、エンプティ信号(Empty)はワ
ンチップCPU15の割込端子IR(n)、IR(n+
1)にそれぞれ接続されている。なお、上記I/Oポー
ト14からは非同期通信制御信号(DTR)が送信側の
PCにおけるシリアル非同期通信制御回路17へ出力さ
れる。
The data read signal (RD) of the one-chip CPU 15 is connected to the RD terminal of the FIFO memory control circuit 10, and the full signal (Full) and the empty signal (Empty) of the FIFO memory control circuit 10 are transmitted to the one-chip CPU 15. Interrupt terminals IR (n), IR (n +
1). The I / O port 14 outputs an asynchronous communication control signal (DTR) to the serial asynchronous communication control circuit 17 in the transmitting PC.

【0013】上記FiFo書込回路16から出力される
書込信号(WR)は、FiFoメモリ制御回路10の書
込端子(WR端子)に接続されている。また、FiFo
書込回路16には、送信側のPCにおけるシリアル非同
期通信制御回路17から非同期受信データ(RXD)が
入力されるようになっている。
A write signal (WR) output from the FIFO write circuit 16 is connected to a write terminal (WR terminal) of the FIFO memory control circuit 10. Also, Fifo
The write circuit 16 is configured to receive asynchronous reception data (RXD) from the serial asynchronous communication control circuit 17 in the PC on the transmission side.

【0014】次に、上記マイクロプロセッサ制御回路に
ついて、ワンチップCPU15が処理可能なスピードの
非同期受信を行なう場合の動作を図6を参照しながら説
明する。
Next, the operation of the microprocessor control circuit when performing asynchronous reception at a speed that can be processed by the one-chip CPU 15 will be described with reference to FIG.

【0015】マイクロプロセッサ制御回路に電源が供給
されると、リセット信号(RESET)がアサートさ
れ、ワンチップCPU15、FiFoメモリ制御回路1
0、FiFo書込回路16が初期化される。そして、ワ
ンチップCPU15はFiFoメモリ制御回路10、F
iFo書込回路16の初期化処理(プログラム)を実行
する。ワンチップCPU15は、非同期受信が可能とな
った事を非同期通信制御信号DTRをアサートする事に
より送信側のPCへ通知する。
When power is supplied to the microprocessor control circuit, a reset signal (RESET) is asserted, and the one-chip CPU 15 and the FIFO memory control circuit 1
0, the FIFO writing circuit 16 is initialized. Then, the one-chip CPU 15 controls the FIFO memory control circuit 10, F
The initialization process (program) of the iFo writing circuit 16 is executed. The one-chip CPU 15 notifies the transmitting-side PC that the asynchronous reception is enabled by asserting the asynchronous communication control signal DTR.

【0016】そして、送信側のPCから1番目の非同期
受信データ(RXD)が入力されると、FiFo書込回
路16は非同期受信データ(RXD)をデータバス21
に乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路10はデュアルポートRAM1の0番地にデータを
書込む。
When the first asynchronous reception data (RXD) is input from the transmitting PC, the FIFO writing circuit 16 transmits the asynchronous reception data (RXD) to the data bus 21.
And the chip select signal (CS1) and the write signal (W
R) is asserted. As a result, the FIFO memory control circuit 10 writes data to the address 0 of the dual port RAM 1.

【0017】続いて、FiFo書込回路16は非同期受
信データをデータバス21に乗せ、チップセレクト信号
(CS1)と書込信号(WR)をネーゲトする。このと
き、書込アドレス回路2のアドレス値は+1される。そ
して、エンプティ信号(Empty)がネーゲトされ
る。
Subsequently, the FIFO writing circuit 16 places the asynchronous reception data on the data bus 21 and negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 2 is incremented by one. Then, the empty signal (Empty) is negated.

【0018】次に、送信側のPCから2番目の非同期受
信データ(RXD)が入力されると、FiFo書込回路
16は非同期受信データ(RXD)をデータバス21に
乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路10はデュアルポートRAM1の1番地にデータを
書込む。
Next, when the second asynchronous reception data (RXD) is input from the PC on the transmission side, the FIFO writing circuit 16 places the asynchronous reception data (RXD) on the data bus 21 and outputs the chip select signal (CS1). ) And the write signal (W
R) is asserted. Thereby, the FIFO memory control circuit 10 writes data to the address 1 of the dual port RAM 1.

【0019】続いて、FiFo書込回路16はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路2のアドレス値は+1
される。以上のような操作をFiFo書込回路16は繰
り返し行う。
Subsequently, the FIFO write circuit 16 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 2 is +1
Is done. The above-described operation is repeatedly performed by the FIFO writing circuit 16.

【0020】そして、送信側のPCからk+1番目の非
同期受信データ(RXD)が入力されると、FiFo書
込回路16は非同期受信データ(RXD)をデータバス
21に乗せ、チップセレクト信号(CS1)と書込信号
(WR)をアサートする。FiFoメモリ制御回路10
はデュアルポートRAM1のk番地にデータを書込む。
When the (k + 1) th asynchronous reception data (RXD) is input from the transmitting PC, the FIFO writing circuit 16 places the asynchronous reception data (RXD) on the data bus 21 and outputs the chip select signal (CS1). And a write signal (WR). Fifo memory control circuit 10
Writes data to the address k of the dual port RAM1.

【0021】続いて、FiFo書込回路16はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路2のアドレス値は0に
なる。すると、フル信号(Full)がアサートされ、
ワンチップCPU15の割込端子IR(n)に割込信号
が入力され、ワンチップCPU15はIR(n)の割込
処理を開始する。すなわち、ワンチップCPU15はデ
ュアルポートRAM1がフル(満杯)状態で非同期受信
が不可能となった事をDTRをネゲートする事により送
信側のPCへ通知する。
Subsequently, the FIFO writing circuit 16 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 2 becomes 0. Then, a full signal (Full) is asserted,
An interrupt signal is input to the interrupt terminal IR (n) of the one-chip CPU 15, and the one-chip CPU 15 starts an IR (n) interrupt process. That is, the one-chip CPU 15 notifies the transmitting PC by negating the DTR that the dual-port RAM 1 is in a full (full) state and the asynchronous reception becomes impossible.

【0022】次に、ワンチップCPU15はチップセレ
クト信号(CS2)とデータリード信号(RD)をアサ
ートする。すると、FiFoメモリ制御回路10はデュ
アルポートRAM1の0番目のデータをデータバス20
に出力する。これにより、ワンチップCPU15はデー
タバス20のデータを読込む。
Next, the one-chip CPU 15 asserts a chip select signal (CS2) and a data read signal (RD). Then, the FIFO memory control circuit 10 transfers the 0th data of the dual port RAM 1 to the data bus 20.
Output to Thus, the one-chip CPU 15 reads the data on the data bus 20.

【0023】続いて、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路10は
読出アドレス回路3のアドレス値を+1する。
Subsequently, the one-chip CPU 15 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 10 increments the address value of the read address circuit 3 by one.

【0024】次に、ワンチップCPU15はチップセレ
クト信号(CS2)とデータリード信号(RD)をアサ
ートする。すると、FiFoメモリ制御回路10はデュ
アルポートRAM1の1番目のデータをデータバス21
に出力する。これにより、ワンチップCPU15はデー
タバス20のデータを読込む。
Next, the one-chip CPU 15 asserts a chip select signal (CS2) and a data read signal (RD). Then, the FIFO memory control circuit 10 transfers the first data of the dual port RAM 1 to the data bus 21.
Output to Thus, the one-chip CPU 15 reads the data on the data bus 20.

【0025】続いて、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路10は
読出アドレス回路3のアドレス値を+1する。以上のよ
うな操作をワンチップCPU15は繰り返し行う。
Subsequently, the one-chip CPU 15 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 10 increments the address value of the read address circuit 3 by one. The above-described operation is repeatedly performed by the one-chip CPU 15.

【0026】そして、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をア
サートし、FiFoメモリ制御回路10がデュアルポー
トRAM1のk+1番目のデータをデータバス20に出
力すると、ワンチップCPU15はデータバス20のデ
ータを読込む。
When the one-chip CPU 15 asserts the chip select signal (CS2) and the data read signal (RD), and the FIFO memory control circuit 10 outputs the (k + 1) th data of the dual port RAM 1 to the data bus 20, the one-chip CPU 15 The CPU 15 reads the data on the data bus 20.

【0027】続いて、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路10は
読出アドレス回路3のアドレス値を+1すると、読出ア
ドレス回路3のアドレス値は0になる。すると、FiF
oメモリ制御回路10によりエンプティ信号(Empt
y)がアサートされ、ワンチップCPU15の割込端子
IR(n+1)には割込信号が入力される。
Subsequently, the one-chip CPU 15 negates the chip select signal (CS2) and the data read signal (RD). At this time, when the address value of the read address circuit 3 is incremented by 1, the address value of the read address circuit 3 becomes 0. Then, FiF
o The memory control circuit 10 causes the empty signal (Empt
y) is asserted, and an interrupt signal is input to the interrupt terminal IR (n + 1) of the one-chip CPU 15.

【0028】これにより、ワンチップCPU15はIR
(n+1)の割込処理を開始する。すなわち、ワンチッ
プCPU15は非同期受信が可能となった事をDTRを
アサートする事により送信側のPCへ通知する。そし
て、ワンチップCPU15はIR(n)の割込処理に戻
り、その後メイン処理に戻る。
As a result, the one-chip CPU 15
The (n + 1) interrupt process is started. That is, the one-chip CPU 15 notifies the transmitting PC by asserting the DTR that asynchronous reception has become possible. Then, the one-chip CPU 15 returns to the interrupt processing of IR (n), and thereafter returns to the main processing.

【0029】[0029]

【発明が解決しようとする課題】上述したように、ワン
チップCPU15が処理可能なスピードの非同期受信を
行なう場合には、送信側のPCが受信側のFiFoメモ
リ制御回路10のデュアルポートRAM1がフル(満
杯)状態となるk番地に書込むデータを出力してから次
のデータを出力するまでの時間がワンチップCPU15
から見れば長いため、その間に受信側でデュアルポート
RAM1がフル状態になって非同期受信が不可能となっ
た事を通知(送信側のPCへ出力するDTRをネーゲ
ト)すれば、送信側のPCは次のデータを送信すること
を待つことができるので、このデータが破棄されること
はない。
As described above, when asynchronous reception is performed at a speed that can be processed by the one-chip CPU 15, the dual-port RAM 1 of the FIFO memory control circuit 10 on the receiving side becomes full when the PC on the transmitting side becomes full. The time from outputting the data to be written to address k in a (full) state until outputting the next data is one-chip CPU 15.
From this point of view, if the dual port RAM 1 becomes full on the receiving side and asynchronous reception is disabled during this period (DTR output to the transmitting PC is negated), the transmitting PC Can wait for the next data to be sent, so that this data is not discarded.

【0030】しかしながら、ワンチップCPU15が処
理不可能なスピードの非同期受信を行なう場合には、送
信側のPCがデュアルポートRAM1のk番地に書込む
データを出力してから次のデータを出力するまでの時間
がワンチップCPU15から見て短くなるため、受信側
でデュアルポートRAM1がフル状態になって非同期受
信が不可能となった事の通知(送信側のPCへ出力する
DTRをネーゲト)が間に合わず、送信側のPCが次の
データを送信してしまうことがあり、この場合には送信
されたデータは破棄されてしまう。すなわち、データの
取りこぼしが発生するという問題があった。
However, when the one-chip CPU 15 performs asynchronous reception at a speed that cannot be processed, the transmission-side PC outputs data to be written to address k of the dual port RAM 1 and then outputs the next data. Since the time is shorter when viewed from the one-chip CPU 15, the notification that the dual port RAM 1 is full on the receiving side and asynchronous reception is disabled (the DTR output to the PC on the transmitting side is negated) is made in time. Instead, the transmitting PC may transmit the next data, and in this case, the transmitted data is discarded. That is, there is a problem that data is missed.

【0031】以下、上記マイクロプロセッサ制御回路に
ついて、ワンチップCPU15が処理不可能なスピード
の非同期受信を行なう場合に発生する上記問題につい
て、マイクロプロセッサ制御回路の動作とともに、図7
を参照しながら具体的に説明する。
The above-mentioned problem which occurs when the one-chip CPU 15 performs asynchronous reception at a speed that cannot be processed by the one-chip CPU 15 will be described below together with the operation of the microprocessor control circuit.
This will be specifically described with reference to FIG.

【0032】マイクロプロセッサ制御回路に電源が供給
されと、リセット信号(RESET)がアサートされ、
ワンチップCPU15、FiFoメモリ制御回路10、
FiFo書込回路16が初期化される。そして、ワンチ
ップCPU15はFiFoメモリ制御回路10、FiF
o書込回路16の初期化処理(プログラム)を実行す
る。ワンチップCPU15は、非同期受信が可能となっ
た事を非同期通信制御信号DTRをアサートする事によ
り送信側のPCへ通知する。
When power is supplied to the microprocessor control circuit, a reset signal (RESET) is asserted,
One-chip CPU 15, Fifo memory control circuit 10,
The FIFO writing circuit 16 is initialized. The one-chip CPU 15 is connected to the FiFo memory control circuit 10 and the FiF
The initialization processing (program) of the o writing circuit 16 is executed. The one-chip CPU 15 notifies the transmitting-side PC that the asynchronous reception is enabled by asserting the asynchronous communication control signal DTR.

【0033】そして、送信側のPCから1番目の非同期
受信データ(RXD)が入力されると、FiFo書込回
路16は非同期受信データ(RXD)をデータバス21
に乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路10はデュアルポートRAM1の0番地にデータを
書込む。
When the first asynchronous reception data (RXD) is input from the transmitting PC, the FIFO writing circuit 16 transmits the asynchronous reception data (RXD) to the data bus 21.
And the chip select signal (CS1) and the write signal (W
R) is asserted. As a result, the FIFO memory control circuit 10 writes data to the address 0 of the dual port RAM 1.

【0034】続いて、FiFo書込回路16はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路2のアドレス値は+1
される。そして、エンプティ信号(212)がネーゲト
される。
Subsequently, the FIFO writing circuit 16 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 2 is +1
Is done. Then, the empty signal (212) is negated.

【0035】次に、送信側のPCから2番目の非同期受
信データ(RXD)が入力されると、FiFo書込回路
16は非同期受信データ(RXD)をデータバス21に
乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路10はデュアルポートRAM1の1番地にデータを
書込む。
Next, when the second asynchronous reception data (RXD) is input from the PC on the transmission side, the FIFO writing circuit 16 places the asynchronous reception data (RXD) on the data bus 21 and outputs the chip select signal (CS1). ) And the write signal (W
R) is asserted. Thereby, the FIFO memory control circuit 10 writes data to the address 1 of the dual port RAM 1.

【0036】続いて、FiFo書込回路16はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路2のアドレス値は+1
される。以上のような操作をFiFo書込回路16は繰
り返し行う。
Subsequently, the FIFO write circuit 16 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 2 is +1
Is done. The above-described operation is repeatedly performed by the FIFO writing circuit 16.

【0037】その後、送信側のPCからk+1番目の非
同期受信データ(RXD)が入力されると、FiFo書
込回路16は非同期受信データ(RXD)をデータバス
21に乗せ、チップセレクト信号(CS1)と書込信号
(WR)をアサートする。FiFoメモリ制御回路10
はデュアルポートRAM1のk番地にデータを書込む。
Thereafter, when the (k + 1) th asynchronous reception data (RXD) is input from the PC on the transmission side, the FIFO writing circuit 16 places the asynchronous reception data (RXD) on the data bus 21 and the chip select signal (CS1). And a write signal (WR). Fifo memory control circuit 10
Writes data to the address k of the dual port RAM1.

【0038】続いて、FiFo書込回路16はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路2のアドレス値は0に
なる。すると、フル信号(Full)がアサートされ、
ワンチップCPU15の割込端子IR(n)に割込信号
が入力される。
Subsequently, the FIFO writing circuit 16 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 2 becomes 0. Then, a full signal (Full) is asserted,
An interrupt signal is input to an interrupt terminal IR (n) of the one-chip CPU 15.

【0039】この場合、ワンチップCPU15の処理不
可能なスピードの非同期受信で送信側のPCからデータ
が送信されるため、ワンチップCPU15の割込処理に
よってDTRをネゲートする前に、送信側のPCからk
+2番目の非同期受信データが入力される。従って、デ
ュアルポートRAM1がフル状態で非同期受信が不可能
となった事の通知(送信側のPCへ出力するDTRをネ
ーゲト)は間に合わず、k+2番目の非同期受信データ
はFiFo書込回路16に入力されてしまう。
In this case, since the data is transmitted from the transmitting PC by asynchronous reception at a speed that cannot be processed by the one-chip CPU 15, the PC on the transmitting side must be transmitted before the DTR is negated by the interrupt processing of the one-chip CPU 15. To k
The + 2nd asynchronous reception data is input. Therefore, the notification that the asynchronous reception is impossible due to the full state of the dual port RAM 1 (negating the DTR to be output to the PC on the transmission side) cannot be made in time, and the k + 2th asynchronous reception data is input to the FIFO writing circuit 16. Will be done.

【0040】このとき、デュアルポートRAM1はフル
状態にあるのでFiFo書込回路16はk+2番目の非
同期受信データを破棄する。こうして、非同期受信デー
タの取りこぼしが発生する。
At this time, since the dual port RAM 1 is in the full state, the FIFO writing circuit 16 discards the (k + 2) th asynchronous reception data. Thus, the asynchronous reception data is missed.

【0041】次に、ワンチップCPU15はチップセレ
クト信号(CS2)とデータリード信号(RD)をアサ
ートする。すると、FiFoメモリ制御回路10はデュ
アルポートRAM1の0番目のデータをデータバス21
に出力する。これにより、ワンチップCPU15はデー
タバス20のデータを読込む。
Next, the one-chip CPU 15 asserts the chip select signal (CS2) and the data read signal (RD). Then, the FIFO memory control circuit 10 transfers the 0th data of the dual port RAM 1 to the data bus 21.
Output to Thus, the one-chip CPU 15 reads the data on the data bus 20.

【0042】続いて、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路10は
読出アドレス回路3のアドレス値を+1する。
Subsequently, the one-chip CPU 15 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 10 increments the address value of the read address circuit 3 by one.

【0043】次に、ワンチップCPU15はチップセレ
クト信号(CS2)とデータリード信号(RD)をアサ
ートする。すると、FiFoメモリ制御回路10はデュ
アルポートRAM1の1番目のデータをデータバス21
に出力する。これにより、ワンチップCPU15はデー
タバス20のデータを読込む。
Next, the one-chip CPU 15 asserts the chip select signal (CS2) and the data read signal (RD). Then, the FIFO memory control circuit 10 transfers the first data of the dual port RAM 1 to the data bus 21.
Output to Thus, the one-chip CPU 15 reads the data on the data bus 20.

【0044】続いて、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路10は
読出アドレス回路3のアドレス値を+1する。以上のよ
うな操作をワンチップCPU15は繰り返し行う。
Subsequently, the one-chip CPU 15 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 10 increments the address value of the read address circuit 3 by one. The above-described operation is repeatedly performed by the one-chip CPU 15.

【0045】その後、ワンチップCPU15はチップセ
レクト信号(CS2)とデータリード信号(RD)をア
サートし、FiFoメモリ制御回路10がデュアルポー
トRAM1のk+1番目のデータをデータバス20に出
力すると、ワンチップCPU15はデータバス20のデ
ータを読込む。
Thereafter, the one-chip CPU 15 asserts the chip select signal (CS2) and the data read signal (RD), and when the FIFO memory control circuit 10 outputs the (k + 1) th data of the dual port RAM 1 to the data bus 20, the one-chip CPU 15 The CPU 15 reads the data on the data bus 20.

【0046】ワンチップCPU15はチップセレクト信
号(CS2)とデータリード信号(RD)をネゲートす
る。このとき、FiFoメモリ制御回路10は読出アド
レス回路3のアドレス値を+1すると、読出アドレス回
路3のアドレス値は0になる。すると、FiFoメモリ
制御回路10によりエンプティ信号(Empty)がア
サートされ、ワンチップCPU15に割込端子IR(n
+1)には割込信号が入力される。
The one-chip CPU 15 negates the chip select signal (CS2) and the data read signal (RD). At this time, when the address value of the read address circuit 3 is incremented by 1, the address value of the read address circuit 3 becomes 0. Then, the empty signal (Empty) is asserted by the FIFO memory control circuit 10 and the one-chip CPU 15 is given an interrupt terminal IR (n).
An interrupt signal is input to +1).

【0047】これにより、ワンチップCPU15はIR
(n+1)の割込処理を開始する。すなわち、ワンチッ
プCPU15は非同期受信が可能となった事をDTRを
アサートする事により送信側のPCへ通知する。そし
て、ワンチップCPU15はIR(n)の割込処理に戻
り、その後メイン処理に戻る。
As a result, the one-chip CPU 15
The (n + 1) interrupt process is started. That is, the one-chip CPU 15 notifies the transmitting PC by asserting the DTR that asynchronous reception has become possible. Then, the one-chip CPU 15 returns to the interrupt processing of IR (n), and thereafter returns to the main processing.

【0048】ところで、受信側でデュアルポートRAM
1がフル状態になって非同期受信が不可能となった事を
通知(送信側のPCへ出力するDTRをネーゲト)した
後、受信側ではワンチップCPU15によりデータの読
出処理が行われるが、デュアルポートRAM1がエンプ
ティ(空)状態になると、非同期受信が可能となった事
を通知(送信側のPCへ出力するDTRをアサート)す
るため、その間は、DTRがネゲートされている。一
方、DTRがネゲートされている間は、送信側のPCで
はデータ送信の停止状態となる。
On the receiving side, a dual port RAM is used.
After notifying (1) that the 1 has become full and asynchronous reception is no longer possible (negating the DTR to be output to the PC on the transmitting side), the one-chip CPU 15 performs data reading processing on the receiving side. When the port RAM 1 is in the empty (empty) state, the fact that asynchronous reception is possible is notified (the DTR to be output to the PC on the transmitting side is asserted), and during that time, the DTR is negated. On the other hand, while the DTR is negated, the PC on the transmitting side is in a state of stopping data transmission.

【0049】従って、DTRがネゲートされている時間
(ワンチップCPU15がデュアルポートRAM1から
データを読出している時間)が長いと、特に送信側のP
Cがタイムアウト機能を備える場合には、送信側がFi
Foメモリ制御回路10が動作不能であると判断し、接
続を切断してしまうという問題が生じる。
Therefore, if the time during which the DTR is negated (the time during which the one-chip CPU 15 is reading data from the dual port RAM 1) is long, the transmission side P
If C has a timeout function,
There is a problem that the Fo memory control circuit 10 determines that it is inoperable and disconnects the connection.

【0050】そこで、本発明は、非同期受信の受信制御
をワンチップCPUが処理不可能なスピードの非同期受
信を行なう場合におけるデータの取りこぼしを防止し、
また送信側が接続を切断するタイムアウトを回避できる
FiFoメモリ制御回路を提供しようとするものであ
る。
Therefore, the present invention prevents the loss of data when performing asynchronous reception at a speed that cannot be processed by a one-chip CPU.
It is another object of the present invention to provide a FIFO memory control circuit that can avoid a timeout in which the transmission side disconnects the connection.

【0051】[0051]

【課題を解決するための手段】請求項1の本発明は、デ
ータの読出し書込みが可能なメモリと、このメモリへの
書込信号に基づいて書込アドレスを発生する書込アドレ
ス回路と、メモリへの読出信号に基づいて読出アドレス
を発生する読出アドレス回路とを備えたFiFoメモリ
制御回路において、メモリへ書込信号が与えられるごと
にカウントアップ動作を行ない、メモリへ読出信号が与
えられるごとにカウントダウン動作を行なうアップダウ
ンカウンタと、このアップダウンカウンタのカウント値
と予め設定した前記メモリが満杯になる前のカウント値
と比較して、アップダウンカウンタのカウント値が設定
カウント値に達したとき又は設定カウント値を越えたと
きにメモリが満杯に近いことを示すニアフル信号を出力
するニアフル信号出力回路とを設けたことを特徴とする
FiFoメモリ制御回路である。
According to the present invention, there is provided a memory capable of reading and writing data, a write address circuit for generating a write address based on a write signal to the memory, and a memory. And a read address circuit for generating a read address based on a read signal to a memory, a count-up operation is performed each time a write signal is supplied to the memory, and a read-out signal is supplied to the memory. An up / down counter for performing a countdown operation, comparing the count value of the up / down counter with a preset count value before the memory is full, when the count value of the up / down counter reaches a set count value, or Near-full signal that outputs a near-full signal indicating that the memory is almost full when the set count value is exceeded A FiFo memory control circuit, characterized in that a and power circuit.

【0052】請求項2の本発明は、アップダウンカウン
タのカウント値と予め設定したメモリが空になる前のカ
ウント値と比較して、アップダウンカウンタのカウント
値が設定カウント値に達したとき又は設定カウント値よ
り小さくなったときにメモリが空に近いことを示すニア
エンプティ信号を出力するニアエンプティ信号出力回路
を設けたことを特徴とする請求項1記載のFiFoメモ
リ制御回路である。
According to a second aspect of the present invention, when the count value of the up / down counter reaches the set count value, the count value of the up / down counter is compared with a preset count value before the memory becomes empty. 2. The FIFO memory control circuit according to claim 1, further comprising a near empty signal output circuit that outputs a near empty signal indicating that the memory is almost empty when the count value becomes smaller than the set count value.

【0053】このような構成の本発明においては、メモ
リがフル状態になる前にニアフル信号が出力され、この
ニアフル信号に基づいて非同期受信が不可能になる事を
外部へ通知することができる。従って、この非同期受信
が不可能になる事の通知より先に外部から次のデータが
入力されてもこれを破棄することなく、メモリへ書込む
ことができる。
In the present invention having such a configuration, a near-full signal is output before the memory becomes full, and it can be notified to the outside that asynchronous reception becomes impossible based on this near-full signal. Therefore, even if the next data is input from outside before the notification that the asynchronous reception becomes impossible, the next data can be written to the memory without being discarded.

【0054】また、メモリがエンプティ状態になる前に
ニアエンプティ信号が出力され、非同期受信が可能とな
った事を送信側の外部へ通知することができる。つま
り、この非同期受信が可能となった通知をより早く外部
へ伝えることができる。このため、例えば外部の送信側
PC(パーソナルコンピュータ)がタイムアウト機能を
備えていても、そのタイムアウトになる前に非同期受信
が可能となった通知を伝えることができる。
Further, a near empty signal is output before the memory becomes empty, and it is possible to notify the outside of the transmitting side that asynchronous reception is possible. That is, the notification that the asynchronous reception is enabled can be transmitted to the outside more quickly. For this reason, for example, even if the external transmission side PC (personal computer) has a timeout function, it is possible to transmit a notification that asynchronous reception has become possible before the timeout occurs.

【0055】[0055]

【発明の実施の形態】以下、本発明の実施の形態を図1
ないし図3を参照して説明する。図1は、本発明にかか
るFiFoメモリ制御回路の構成を示す図である。この
FiFoメモリ制御回路30は、kワード構成のデュア
ルポートRAM31、デュアルポートRAM31の書込
アドレスを発生する書込アドレス回路32、デュアルポ
ートRAM31の読出アドレスを発生する読出アドレス
回路33、読出アドレス回路33の出力である読出アド
レス信号(RA)及び書込アドレス回路の出力である書
込アドレス信号(WA)からデュアルポートRAM31
内の有効データの状態を示すFull−Empty制御
回路34から構成される。
FIG. 1 is a block diagram showing an embodiment of the present invention.
This will be described with reference to FIG. FIG. 1 is a diagram showing a configuration of a Fifo memory control circuit according to the present invention. The FIFO memory control circuit 30 includes a k-word dual port RAM 31, a write address circuit 32 for generating a write address for the dual port RAM 31, a read address circuit 33 for generating a read address for the dual port RAM 31, and a read address circuit 33. From the read address signal (RA) output from the write address signal (WA) and the write address signal (WA) output from the write address circuit.
And a Full-Empty control circuit 34 indicating the state of valid data in the data.

【0056】また、デュアルポートRAM31へ書込信
号(WR)が与えられるごとにカウントアップ動作を行
ない、デュアルポートRAM31へ読出信号(RD)が
与えられるごとにカウントダウン動作を行なうアップダ
ウンカウンタ35と、デュアルポートRAM31が満杯
に近いことを示すニアフル信号(Near−Full)
を出力させるためのアップダウンカウンタ35のカウン
ト値を設定するニアフル信号用設定レジスタ36、デュ
アルポートRAM31が空に近いことを示すニアエンプ
ティ信号(Near−Empty)を出力させるための
アップダウンカウンタ35のカウント値を設定するニア
エンプティ信号用設定レジスタ37を備える。
An up-down counter 35 which performs a count-up operation each time a write signal (WR) is applied to dual port RAM 31 and performs a count-down operation each time a read signal (RD) is applied to dual port RAM 31; Near-full signal (Near-Full) indicating that the dual port RAM 31 is almost full
, A near full signal setting register 36 for setting the count value of an up / down counter 35 for outputting the near-empty signal (Near-Empty) indicating that the dual-port RAM 31 is almost empty. A near-empty signal setting register 37 for setting a count value is provided.

【0057】さらに、実際のアップダウンカウンタ35
のカウント値Aとニアフル信号用設定レジスタ36に設
定されたカウント値Bを比較してA≧Bを満たすときに
ニアフル信号(Near−Full)を出力(アサー
ト)するコンパレータなどで構成されたニアフル信号用
比較回路38、実際のアップダウンカウンタ35のカウ
ント値Aとニアエンプティ信号用設定レジスタ37に設
定されたカウント値Bを比較してA≦Bを満たすときに
ニアエンプティ信号(Near−Empty)を出力
(アサート)するコンパレータなどで構成されたニアエ
ンプティ信号用比較回路39を備える。
Further, the actual up / down counter 35
Is compared with the count value B set in the near full signal setting register 36, and a near full signal composed of a comparator or the like that outputs (asserts) a near full signal (Near-Full) when A ≧ B is satisfied. The comparison circuit 38 compares the actual count value A of the up / down counter 35 with the count value B set in the near-empty signal setting register 37, and outputs a near-empty signal (Near-Empty) when A ≦ B is satisfied. A near-empty signal comparison circuit 39 including a comparator for outputting (asserting) is provided.

【0058】なお、上記ニアフル信号用設定レジスタ3
6及びニアフル信号用比較回路38はニアフル信号出力
回路を構成し、ニアエンプティ信号用設定レジスタ37
及びニアエンプティ信号用比較回路39はニアエンプテ
ィ信号出力回路を構成する。上記ニアフル信号用設定レ
ジスタ36は、CPU(例えば後述するワンチップCP
U60などを示す)からのレジスタ書込信号(NFC
K)に基づいてデータを書込むことにより、カウント値
を設定できるようになっている。また、ニアエンプティ
信号用設定レジスタ37も、CPUからのレジスタ書込
信号(NECK)に基づいてデータを書込むことによ
り、カウント値を設定できるようになっている。
The near full signal setting register 3
6 and the near-full signal comparison circuit 38 constitute a near-full signal output circuit, and the near-empty signal setting register 37
The near-empty signal comparison circuit 39 forms a near-empty signal output circuit. The near full signal setting register 36 includes a CPU (for example, a one-chip CP described later).
Register write signal (NFC etc.)
By writing data based on K), a count value can be set. The near-empty signal setting register 37 can also set a count value by writing data based on a register write signal (NECK) from the CPU.

【0059】書込アドレス回路32には、初期化のため
に外部からリセット信号(RESET)が接続されてお
り、読出アドレス回路33には初期化のために外部から
リセット信号(RESET)が接続されている。また、
アップダウンカウンタ35には初期化のために外部から
リセット信号(RESET)が接続されている。さら
に、ニアフル信号用設定レジスタ36及びニアエンプテ
ィレジスタにも初期化のために外部からリセット信号
(RESET)が接続されている。
A reset signal (RESET) is externally connected to the write address circuit 32 for initialization, and a reset signal (RESET) is externally connected to the read address circuit 33 for initialization. ing. Also,
A reset signal (RESET) is externally connected to the up / down counter 35 for initialization. Further, a reset signal (RESET) is externally connected to the near full signal setting register 36 and the near empty register for initialization.

【0060】また、読出アドレス信号(RA)はデュア
ルポートRAM31の読出アドレス端子(RA端子)に
接続されており、書込アドレス信号(WA)はデュアル
ポートRAM31の書込アドレス端子(WA端子)に接
続されている。さらに、上記読出アドレス信号(RA)
及び書込アドレス信号(WA)はFull−Empty
制御回路34に接続されている。
The read address signal (RA) is connected to the read address terminal (RA terminal) of the dual port RAM 31, and the write address signal (WA) is connected to the write address terminal (WA terminal) of the dual port RAM 31. It is connected. Further, the read address signal (RA)
And the write address signal (WA) is Full-Empty.
It is connected to the control circuit 34.

【0061】Full−Empty制御回路34から
は、上記書込アドレス回路32への書込アドレス信号
(WA)、読出アドレス回路33の読出アドレス信号
(RA)に基づいてデュアルポートRAM31内の有効
データの状態を示すフル信号(Full)とエンプティ
信号(Empty)が外部に出力されている。このフル
信号(Full)は、デュアルポートRAM31が満杯
のときに出力され、エンプティ信号(Empty)は、
デュアルポートRAM31が空のときに出力される。具
体的には、上記フル信号(Full)はデュアルポート
RAM31にkワードのデータが書込まれた時にアサー
トされ、エンプティ信号(Empty)はデュアルポー
トRAM31に0ワードのデータが書込まれた時にアサ
ートされる。外部から入力されるFiFoメモリ書込信
号(WR)は、デュアルポートRAM31の書込端子
(WR端子)と書込アドレス回路32とアップダウンカ
ウンタ35のUP端子に接続されている。また、外部か
ら入力されるFiFoメモリ読出信号(RD)は、デュ
アルポートRAM31の読出端子(RD端子)と読出ア
ドレス回路33とアップダウンカウンタ35のDOWN
端子に接続されている。さらに、外部から入力されるF
iFoメモリチップセレクト信号(CS)はデュアルポ
ートRAM31のチップセレクト端子(CS端子)に接
続されている。
The full-empty control circuit 34 outputs valid data in the dual port RAM 31 based on the write address signal (WA) to the write address circuit 32 and the read address signal (RA) of the read address circuit 33. A full signal (Full) indicating the state and an empty signal (Empty) are output to the outside. This full signal (Full) is output when the dual port RAM 31 is full, and the empty signal (Empty) is
Output when the dual port RAM 31 is empty. Specifically, the full signal (Full) is asserted when k words of data are written to the dual port RAM 31, and the empty signal (Empty) is asserted when 0 words of data are written to the dual port RAM 31. Is done. The externally input FIFO memory write signal (WR) is connected to the write terminal (WR terminal) of the dual port RAM 31, the write address circuit 32, and the UP terminal of the up / down counter 35. The externally input Fifo memory read signal (RD) is supplied to the read terminal (RD terminal) of the dual port RAM 31, the read address circuit 33, and the DOWN of the up / down counter 35.
Connected to terminal. Further, F input from outside
The ifo memory chip select signal (CS) is connected to the chip select terminal (CS terminal) of the dual port RAM 31.

【0062】また、外部へデータを出力するデータバス
40は、デュアルポートRAM31の読出データバス端
子(RDATA)に接続されており、外部からのデータ
を入力するデータバス41はデュアルポートRAM31
の書込データバス端子(WDATA端子)、ニアフル信
号用設定レジスタ36、ニアエンプティ信号用設定レジ
スタ37に接続されている。
A data bus 40 for outputting data to the outside is connected to a read data bus terminal (RDATA) of the dual port RAM 31, and a data bus 41 for inputting data from the outside is connected to the dual port RAM 31.
, A write data bus terminal (WDATA terminal), a near full signal setting register 36, and a near empty signal setting register 37.

【0063】また、外部から入力されるニアフルレジス
タ書込信号(NFCK)はニアフル信号用設定レジスタ
36のNFCK端子に接続されており、外部から入力さ
れるニアエンプティ書込信号(NECK)はニアエンプ
ティ信号用設定レジスタ37のNECK端子に接続され
ている。
The near full register write signal (NFCK) input from the outside is connected to the NFCK terminal of the near full signal setting register 36, and the near empty write signal (NECK) input from the outside is near. It is connected to the NECK terminal of the empty signal setting register 37.

【0064】上記アップダウンカウンタ35の出力端子
(CNTQ端子)は、ニアフル信号用比較回路38のA
端子とニアエンプティ信号用比較回路39のA端子に接
続されている。ニアフル信号用設定レジスタ36の出力
端子(NFQ端子)はニアフル信号用比較回路38のB
端子に接続されており、ニアエンプティ信号用設定レジ
スタ37の出力端子(NEQ端子)はニアエンプティ信
号用比較回路39のB端子に接続されている。
The output terminal (CNTQ terminal) of the up / down counter 35 is connected to the A
The terminal and the A terminal of the near-empty signal comparison circuit 39 are connected. The output terminal (NFQ terminal) of the near full signal setting register 36 is connected to the B of the near full signal comparison circuit 38.
The output terminal (NEQ terminal) of the near empty signal setting register 37 is connected to the B terminal of the near empty signal comparison circuit 39.

【0065】次に、上記FiFoメモリ制御回路30を
使用した一般的なマイクロプロセッサ制御回路の構成を
図2に示す。特に送信側のPC(パーソナルコンピュー
タ)から例えばRS232Cに基づいてデータをマイク
ロプロセッサ制御回路で受信し、そのデータを1ワード
ずつFiFoメモリ制御回路30のデュアルポートRA
M31へ書込む場合について説明する。
Next, FIG. 2 shows a configuration of a general microprocessor control circuit using the FIFO memory control circuit 30. In particular, data is received by a microprocessor control circuit from a transmitting PC (personal computer) based on, for example, RS232C, and the data is sent word by word to the dual port RA of the FIFO memory control circuit 30.
The case of writing to M31 will be described.

【0066】上記マイクロプロセッサ制御回路は、CP
U(中央処理装置)コア61と実行プログラムなどを記
憶した制御用ROM(リ−ド・オンリ・メモリ)62と
ワークRAM(ランダム・アクセス・メモリ)63とI
/Oポート(入出力ポート)64を内蔵した1チップC
PU(ワンチップCPU)60を備える。
The microprocessor control circuit includes a CP
U (central processing unit) core 61, control ROM (read only memory) 62 storing execution programs and the like, work RAM (random access memory) 63 and I
1-chip C with built-in / O port (input / output port) 64
A PU (one-chip CPU) 60 is provided.

【0067】また、FiFoメモリ制御回路30、送信
側である上記PCのシリアル非同期通信制御回路67の
送信部からのデータを外部データとして受信するシリア
ル非同期通信制御回路の受信部及びFiFo書込制御回
路からなるFiFo書込回路66、このFiFo書込回
路66から出力されるFiFoメモリ制御回路用チップ
セレクト信号(CS1)、ワンチップCPU60から出
力されるFiFoメモリ制御回路用チップセレクト信号
(CS2)を入力とする論理積回路68を備える。
The FIFO memory control circuit 30, a reception unit of the serial asynchronous communication control circuit for receiving data from the transmission unit of the serial asynchronous communication control circuit 67 of the PC as the transmission side as external data, and a Fifo write control circuit , A chip select signal for a FIFO memory control circuit (CS1) output from the FIFO write circuit 66, and a chip select signal for a FIFO memory control circuit (CS2) output from the one-chip CPU 60. And a logical product circuit 68.

【0068】上記論理積回路68はFiFoメモリ制御
回路30のチップセレクト端子(CS端子)に接続され
ている。また、上記リセット信号(RESET)はワン
チップCPU60とFiFoメモリ制御回路30のリセ
ット端子(RESET端子)に接続されている。
The AND circuit 68 is connected to the chip select terminal (CS terminal) of the FIFO memory control circuit 30. The reset signal (RESET) is connected to the reset terminal (RESET terminal) of the one-chip CPU 60 and the FIFO memory control circuit 30.

【0069】上記ワンチップCPU60のデータバス4
0は、メモリ制御回路30の読出データバス端子(RD
ATA端子)に接続されており、FiFo書込回路66
のデータバス41はFiFoメモリ制御回路30の書込
データバス端子(WDATA端子)に接続されている。
The data bus 4 of the one-chip CPU 60
0 is the read data bus terminal (RD
ATA terminal) and the FIFO writing circuit 66
Is connected to the write data bus terminal (WDATA terminal) of the FIFO memory control circuit 30.

【0070】上記ワンチップCPU60のデータリード
信号(RD)はFiFoメモリ制御回路30のRD端子
に接続されており、FiFoメモリ制御回路30のフル
信号(Full)、エンプティ信号(Empty)はワ
ンチップCPU60の割込端子IR(n)、IR(n+
1)にそれぞれ接続されている。また、FiFoメモリ
制御回路30のニアフル信号(Near−Full)と
ニアエンプティ信号(Near−Empty)はワンチ
ップCPU60の割込端子IR(m)、IR(m+1)
にそれぞれ接続されている。なお、上記I/Oポート6
4からは非同期通信制御信号(DTR)が送信側のPC
におけるシリアル非同期通信制御回路67へ出力され
る。
The data read signal (RD) of the one-chip CPU 60 is connected to the RD terminal of the FIFO memory control circuit 30, and the full signal (Full) and the empty signal (Empty) of the FIFO memory control circuit 30 are transmitted to the one-chip CPU 60. Interrupt terminals IR (n), IR (n +
1). Further, the near-full signal (Near-Full) and the near-empty signal (Near-Empty) of the FIFO memory control circuit 30 are output to the interrupt terminals IR (m) and IR (m + 1) of the one-chip CPU 60.
Connected to each other. The above I / O port 6
4, the asynchronous communication control signal (DTR) is transmitted from the PC on the transmission side.
Is output to the serial asynchronous communication control circuit 67.

【0071】上記FiFo書込回路66から出力される
書込信号(WR)は、FiFoメモリ制御回路30の書
込端子(WR端子)に接続されている。また、FiFo
書込回路66には、送信側のPCにおけるシリアル非同
期通信制御回路67から非同期受信データ(RXD)が
入力されるようになっている。さらに、上記ワンチップ
CPU60は、FiFoメモリ制御回路30へレジスタ
書込信号(NFCK)とレジスタ書込信号(NECK)
を供給している。 次に、上記マイクロプロセッサ制御
回路について、ワンチップCPU60が処理不可能なス
ピードの非同期受信を行なう場合の動作を図3を参照し
ながら説明する。
The write signal (WR) output from the FIFO write circuit 66 is connected to the write terminal (WR terminal) of the FIFO memory control circuit 30. Also, Fifo
The asynchronous receiving data (RXD) is input to the writing circuit 66 from the serial asynchronous communication control circuit 67 in the PC on the transmitting side. Further, the one-chip CPU 60 sends a register write signal (NFCK) and a register write signal (NECK) to the FIFO memory control circuit 30.
Has been supplied. Next, the operation of the microprocessor control circuit when the one-chip CPU 60 performs asynchronous reception at a speed that cannot be processed will be described with reference to FIG.

【0072】マイクロプロセッサ制御回路に電源が供給
されると、リセット信号(RESET)がアサートさ
れ、ワンチップCPU60、FiFoメモリ制御回路3
0、FiFo書込回路66が初期化される。そして、ワ
ンチップCPU60はFiFoメモリ制御回路30、F
iFo書込回路66の初期化処理(プログラム)を実行
する。
When power is supplied to the microprocessor control circuit, a reset signal (RESET) is asserted, and the one-chip CPU 60 and the FIFO memory control circuit 3
0, the FIFO writing circuit 66 is initialized. Then, the one-chip CPU 60 operates the FIFO memory control circuit 30, F
The initialization process (program) of the iFo writing circuit 66 is executed.

【0073】これにより、アップダウンカウンタ35は
0に初期化される。また、ワンチップCPU60はニア
フル信号用のレジスタ書込信号(NFCK)をアサート
し、ニアフル信号用設定レジスタ36に比較用のカウン
ト値として定数i(i<k)を設定する。さらに、ワン
チップCPU60はニアエンプティ信号用のレジスタ書
込信号(NECK)をアサートしニアエンプティ信号用
設定レジスタ37に比較用のカウント値として定数j
(j>0)を設定する。ワンチップCPU60は、非同
期受信が可能となった事を非同期通信制御信号DTRを
アサートする事により送信側のPCへ通知する。
Thus, the up / down counter 35 is initialized to zero. Further, the one-chip CPU 60 asserts a register write signal (NFCK) for a near full signal, and sets a constant i (i <k) as a count value for comparison in the near full signal setting register 36. Further, the one-chip CPU 60 asserts a register write signal (NECK) for the near empty signal and sets the near empty signal setting register 37 as a constant j as a count value for comparison.
(J> 0) is set. The one-chip CPU 60 notifies the transmission-side PC that the asynchronous reception is enabled by asserting the asynchronous communication control signal DTR.

【0074】そして、送信側のPCから1番目の非同期
受信データ(RXD)が入力されると、FiFo書込回
路66は非同期受信データ(RXD)をデータバス41
に乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路30はデュアルポートRAM31の0番地にデータ
を書込む。
When the first asynchronous reception data (RXD) is input from the PC on the transmission side, the FIFO writing circuit 66 transmits the asynchronous reception data (RXD) to the data bus 41.
And the chip select signal (CS1) and the write signal (W
R) is asserted. As a result, the FIFO memory control circuit 30 writes data to the address 0 of the dual port RAM 31.

【0075】続いて、FiFo書込回路66はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路32のアドレス値は+
1され、アップダウンカウンタ35のカウント値は+1
される。そして、エンプティ信号(Empty)がネー
ゲトされる。
Subsequently, the FIFO writing circuit 66 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 32 is +
The count value of the up / down counter 35 is +1.
Is done. Then, the empty signal (Empty) is negated.

【0076】次に、送信側のPCから2番目の非同期受
信データ(RXD)が入力されると、FiFo書込回路
66は非同期受信データ(RXD)をデータバス41に
乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路30はデュアルポートRAM31の1番地にデータ
を書込む。
Next, when the second asynchronous reception data (RXD) is input from the PC on the transmission side, the FIFO writing circuit 66 puts the asynchronous reception data (RXD) on the data bus 41 and outputs the chip select signal (CS1). ) And the write signal (W
R) is asserted. As a result, the FIFO memory control circuit 30 writes data to the address 1 of the dual port RAM 31.

【0077】続いて、FiFo書込回路66はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路32のアドレス値は+
1され、アップダウンカウンタ35のカウント値は+1
される。以上のような操作をFiFo書込回路66は繰
り返し行う。
Subsequently, the FIFO writing circuit 66 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 32 is +
The count value of the up / down counter 35 is +1.
Is done. The operation described above is repeatedly performed by the FIFO writing circuit 66.

【0078】そして、送信側のPCからj+1番目の非
同期受信データ(RXD)が入力されると、FiFo書
込回路66は非同期受信データ(RXD)をデータバス
41に乗せ、チップセレクト信号(CS1)と書込信号
(WR)をアサートする。FiFoメモリ制御回路30
はデュアルポートRAM31のj番地にデータを書込
む。
When the (j + 1) th asynchronous reception data (RXD) is input from the transmitting PC, the FIFO writing circuit 66 puts the asynchronous reception data (RXD) on the data bus 41 and outputs the chip select signal (CS1). And a write signal (WR). Fifo memory control circuit 30
Writes data to the address j of the dual port RAM 31.

【0079】続いて、FiFo書込回路66はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路32のアドレス値は+
1される。また、アップダウンカウンタ35のカウント
値は+1され、そのカウント値はj+1になる。これに
より、アップダウンカウンタ35のカウント値はニアエ
ンプティ信号用設定レジスタ37に設定したカウント値
jより大きくなり、A≦Bを満たさなくなる為、ニアエ
ンプティ信号用比較回路39によりニアエンプティ信号
(Near−Empty)がネーゲトされる。
Subsequently, the FIFO write circuit 66 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 32 is +
1 is done. Further, the count value of the up / down counter 35 is incremented by one, and the count value becomes j + 1. As a result, the count value of the up / down counter 35 becomes larger than the count value j set in the near empty signal setting register 37, and does not satisfy A ≦ B. Therefore, the near empty signal comparison circuit 39 causes the near empty signal (Near− Empty) is negated.

【0080】次に、送信側のPCからi番目の非同期受
信データ(RXD)が入力されると、FiFo書込回路
66は非同期受信データ(RXD)をデータバス41に
乗せ、チップセレクト信号(CS1)と書込信号(W
R)をアサートする。これにより、FiFoメモリ制御
回路30はデュアルポートRAM31のi−1番地にデ
ータを書込む。
Next, when the i-th asynchronous reception data (RXD) is input from the transmitting PC, the FIFO writing circuit 66 puts the asynchronous reception data (RXD) on the data bus 41, and outputs the chip select signal (CS1). ) And the write signal (W
R) is asserted. As a result, the FIFO memory control circuit 30 writes data to the i-1 address of the dual port RAM 31.

【0081】続いて、FiFo書込回路66は、チップ
セレクト信号(CS1)と書込信号(WR)をネゲート
する。このとき、書込アドレス回路32のアドレス値は
+1される。また、アップダウンカウンタ35のカウン
ト値は+1されてそのカウント値はiになる。これによ
り、アップダウンカウンタ35のカウント値とニアフル
信号用設定レジスタ36に設定したカウント値iが等し
くなり、A≧Bを満たすようになる為、ニアフル信号用
比較回路38によりニアフル信号(Near−Ful
l)がアサートされ、ワンチップCPU60の割込端子
IR(m)に割込信号が入力され、ワンチップCPU6
0は割込処理を開始する。すなわち、ワンチップCPU
60はデュアルポートRAM31がニアフル状態であり
非同期受信が不可能になる事をDTRをネゲートする事
により送信側のPCへ通知する。
Subsequently, the FIFO writing circuit 66 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 32 is incremented by one. Further, the count value of the up / down counter 35 is incremented by 1 and the count value becomes i. As a result, the count value of the up / down counter 35 becomes equal to the count value i set in the near full signal setting register 36, so that A ≧ B is satisfied. Therefore, the near full signal (Near-Ful)
1) is asserted, an interrupt signal is input to the interrupt terminal IR (m) of the one-chip CPU 60, and the one-chip CPU 6
0 starts the interrupt processing. That is, one-chip CPU
Numeral 60 indicates to the transmitting PC by negating the DTR that the dual port RAM 31 is in the near full state and asynchronous reception becomes impossible.

【0082】こうして、デュアルポートRAM31がフ
ル状態になる前に非同期受信が不可能になる事を送信側
のPCへ通知(送信側のPCへ出力するDTRをネーゲ
ト)することができる。この状態では、デュアルポート
RAM31に未だ空きが残っている。従って、この非同
期受信が不可能になる通知より先に送信側のPCから次
のデータであるi+1番目の非同期受信データ(RX
D)が入力されてもこれを破棄することなく、デュアル
ポートRAM31へ書込むことができる。
In this way, it is possible to notify the transmitting PC that the asynchronous reception becomes impossible before the dual port RAM 31 becomes full (negate the DTR to be output to the transmitting PC). In this state, an empty space still remains in the dual port RAM 31. Therefore, prior to the notification that the asynchronous reception becomes impossible, the i + 1-th asynchronous reception data (RX
Even if D) is input, it can be written to the dual port RAM 31 without discarding it.

【0083】すなわち、非同期受信が不可能になる事の
通知より早く送信側のPCからi+1番目の非同期受信
データ(RXD)が入力されると、FiFo書込回路6
6は非同期受信データ(RXD)をデータバス41に乗
せ、チップセレクト信号(CS1)と書込信号(WR)
をアサートする。これにより、FiFoメモリ制御回路
30はデュアルポートRAM31のi+1(≦k)番地
にデータを書込む。
That is, when the (i + 1) th asynchronous reception data (RXD) is input from the transmitting PC earlier than the notification that the asynchronous reception becomes impossible, the FIFO writing circuit 6
6 places the asynchronous receive data (RXD) on the data bus 41, and outputs the chip select signal (CS1) and the write signal (WR).
Assert Thereby, the FIFO memory control circuit 30 writes the data to the address i + 1 (≦ k) of the dual port RAM 31.

【0084】続いて、FiFo書込回路66はチップセ
レクト信号(CS1)と書込信号(WR)をネゲートす
る。このとき、書込アドレス回路32のアドレス値は+
1される。また、アップダウンカウンタ35のカウント
値は+1され、そのカウント値はi+1になる。こうし
て、非同期受信が不可能になる事を送信側のPCへ通知
する前に送信側のPCから受信したデータはデュアルポ
ートRAM31へ確実に書込まれる。従って、非同期受
信データの取りこぼしが発生することはない。
Subsequently, the FIFO write circuit 66 negates the chip select signal (CS1) and the write signal (WR). At this time, the address value of the write address circuit 32 is +
1 is done. Further, the count value of the up / down counter 35 is incremented by one, and the count value becomes i + 1. Thus, the data received from the transmitting PC is reliably written to the dual port RAM 31 before notifying the transmitting PC that the asynchronous reception becomes impossible. Therefore, there is no possibility of missing the asynchronous reception data.

【0085】次に、ワンチップCPU60はチップセレ
クト信号(CS2)とデータリード信号(RD)をアサ
ートする。すると、FiFoメモリ制御回路30はデュ
アルポートRAM31の0番目のデータをデータバス4
1に出力する。これにより、ワンチップCPU60はデ
ータバス40のデータを読込む。
Next, the one-chip CPU 60 asserts the chip select signal (CS2) and the data read signal (RD). Then, the FIFO memory control circuit 30 transfers the 0th data of the dual port RAM 31 to the data bus 4.
Output to 1. Thus, the one-chip CPU 60 reads the data on the data bus 40.

【0086】続いて、ワンチップCPU60はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路30は
読出アドレス回路33のアドレス値を+1する。そし
て、アップダウンカウンタ35のカウント値は−1され
る。
Subsequently, the one-chip CPU 60 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 30 increases the address value of the read address circuit 33 by one. Then, the count value of the up / down counter 35 is decremented by one.

【0087】次に、ワンチップCPU60はチップセレ
クト信号(CS2)とデータリード信号(RD)をアサ
ートする。すると、FiFoメモリ制御回路30はデュ
アルポートRAM31の1番目のデータをデータバス4
1に出力する。これにより、ワンチップCPU60はデ
ータバス40のデータを読込む。
Next, the one-chip CPU 60 asserts the chip select signal (CS2) and the data read signal (RD). Then, the FIFO memory control circuit 30 transfers the first data of the dual port RAM 31 to the data bus 4.
Output to 1. Thus, the one-chip CPU 60 reads the data on the data bus 40.

【0088】続いて、ワンチップCPU60はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路30は
読出アドレス回路33のアドレス値を+1する。そし
て、アップダウンカウンタ35のカウント値は−1され
る。以上のような操作をワンチップCPU60は繰り返
し行う。
Subsequently, the one-chip CPU 60 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 30 increases the address value of the read address circuit 33 by one. Then, the count value of the up / down counter 35 is decremented by one. The above operation is repeatedly performed by the one-chip CPU 60.

【0089】そして、ワンチップCPU60はチップセ
レクト信号(CS2)とデータリード信号(RD)をア
サートし、FiFoメモリ制御回路30がデュアルポー
トRAM31のj−1番目のデータをデータバス40に
出力すると、ワンチップCPU60はデータバス40の
データを読込む。
When the one-chip CPU 60 asserts the chip select signal (CS2) and the data read signal (RD), and the FIFO memory control circuit 30 outputs the (j-1) th data of the dual port RAM 31 to the data bus 40, One-chip CPU 60 reads data on data bus 40.

【0090】続いて、ワンチップCPU60はチップセ
レクト信号(CS2)とデータリード信号(RD)をネ
ゲートする。このとき、FiFoメモリ制御回路30は
読出アドレス回路33のアドレス値を+1する。また、
アップダウンカウンタ35のカウント値は−1されてそ
のカウント値はjになる。これにより、アップダウンカ
ウンタ35のカウント値とニアエンプティ信号用設定レ
ジスタ37に設定したカウント値jが等しくなり、A≦
Bを満たすようになる為、ニアエンプティ信号用比較回
路39によりニアエンプティ信号(Near−Empt
y)がアサートされ、ワンチップCPU60の割込端子
IR(m+1)に割込信号が入力され、ワンチップCP
U60は割込処理を開始する。すなわち、ワンチップC
PU60はデュアルポートRAM31がニアエンプティ
状態であり非同期受信が可能となった事をDTRをアサ
ートする事により送信側のPCへ通知し、IR(m)の
割込処理に戻り、その後メイン処理に戻る。こうして、
デュアルポートRAM31がエンプティ状態になる前に
非同期受信が可能となった事を送信側のPCへ通知(送
信側のPCへ出力するDTRをネーゲト)することがで
きる。
Subsequently, the one-chip CPU 60 negates the chip select signal (CS2) and the data read signal (RD). At this time, the FIFO memory control circuit 30 increases the address value of the read address circuit 33 by one. Also,
The count value of the up / down counter 35 is decremented by one, and the count value becomes j. Thus, the count value of the up / down counter 35 becomes equal to the count value j set in the near empty signal setting register 37, and A ≦
B, the near-empty signal (Near-Empt) is output by the near-empty signal comparing circuit 39.
y) is asserted, an interrupt signal is input to the interrupt terminal IR (m + 1) of the one-chip CPU 60, and the one-chip CP
U60 starts the interrupt processing. That is, one chip C
The PU 60 notifies the transmitting PC by asserting the DTR that the dual port RAM 31 is in the near-empty state and the asynchronous reception is possible, and returns to the IR (m) interrupt processing, and then returns to the main processing. . Thus,
Before the dual-port RAM 31 enters the empty state, it is possible to notify the transmitting PC that the asynchronous reception has become possible (negate the DTR to be output to the transmitting PC).

【0091】このように、デュアルポートRAM31へ
書込信号(WR)が与えられるごとにカウントアップ動
作を行ない、デュアルポートRAM31へ読出信号(R
D)が与えられるごとにカウントダウン動作を行なうア
ップダウンカウンタ35と、このアップダウンカウンタ
35のカウント値と予め設定したデュアルポートRAM
31が満杯になる前のカウント値iと比較して、アップ
ダウンカウンタ35のカウント値が設定カウント値iに
達したとき(ニアフル信号用比較回路38のA≧Bを満
たしたとき)、デュアルポートRAM31が満杯に近い
ことを示すニアフル信号(Near−Full)を出力
(アサート)するニアフル信号出力回路とを設けたこと
により、非同期受信の受信制御をワンチップCPUが処
理不可能なスピードの非同期受信を行った場合であって
も、デュアルポートRAM31がフル状態になる前に非
同期受信が不可能になる事を送信側のPCへ通知(送信
側のPCへ出力するDTRをネーゲト)することができ
る。従って、この非同期受信が不可能になる事の通知よ
り先に送信側のPCから次の非同期受信データ(RX
D)が入力されてもこれを破棄することなく、デュアル
ポートRAM31へ書込むことができる。これにより、
データの取りこぼしを防止できる。
As described above, each time the write signal (WR) is applied to the dual port RAM 31, the count-up operation is performed, and the read signal (R) is sent to the dual port RAM 31.
D), an up / down counter 35 that performs a countdown operation each time a given value is given,
When the count value of the up / down counter 35 reaches the set count value i (when A ≧ B of the near-full signal comparison circuit 38 is satisfied) as compared with the count value i before the counter 31 becomes full, the dual port By providing a near-full signal output circuit that outputs (asserts) a near-full signal (Near-Full) indicating that the RAM 31 is almost full, asynchronous reception at a speed at which the one-chip CPU cannot process reception control of asynchronous reception is provided. Is performed, it is possible to notify the transmitting PC that the asynchronous reception is disabled before the dual port RAM 31 becomes full (negate the DTR to be output to the transmitting PC). . Therefore, prior to the notification that the asynchronous reception becomes impossible, the next asynchronous reception data (RX
Even if D) is input, it can be written to the dual port RAM 31 without discarding it. This allows
Data can be prevented from being missed.

【0092】また、従来はデュアルポートRAM31が
フル状態になるまでは、データの読出しが開始されなか
ったが、本実施の形態では、デュアルポートRAM31
がフル状態になる前に、すなわちニアフル信号(Nea
r−Full)が出力(アサート)されればデータの読
出しが開始されるため、従来より早くデータの読出しを
終了させることができる。このため、より早く非同期受
信が可能となった事を送信側のPCへ通知(送信側のP
Cへ出力するDTRをネーゲト)することができる。こ
のため、送信側のPCがタイムアウト機能を備えていて
も、そのタイムアウトになる前に非同期受信が可能とな
った通知を伝えることができ、送信側が接続を切断する
タイムアウトを回避できる。
Conventionally, data reading has not been started until the dual port RAM 31 is full, but in the present embodiment, the dual port RAM 31
Before the state becomes full, that is, the near full signal (Near
When (r-Full) is output (asserted), data reading is started, so that data reading can be completed earlier than before. For this reason, a notification to the effect that asynchronous reception has become possible earlier is sent to the transmitting PC (P.
The DTR to be output to C can be negated. For this reason, even if the transmitting PC has a timeout function, it is possible to transmit a notification that asynchronous reception has become possible before the timeout occurs, and it is possible to avoid a timeout in which the transmission side disconnects the connection.

【0093】さらに、アップダウンカウンタ35のカウ
ント値と予め設定したデュアルポートRAM31が空に
なる前のカウント値jと比較して、アップダウンカウン
タ35のカウント値が設定カウント値jに達したときデ
ュアルポートRAM31が空に近いことを示すニアエン
プティ信号(Near−Empty)を出力(アサー
ト)するニアエンプティ信号出力回路を設けたことによ
り、デュアルポートRAM31がエンプティ状態になる
前に非同期受信が可能となった事を送信側のPCへ通知
(送信側のPCへ出力するDTRをネーゲト)すること
ができる。つまり、この非同期受信が可能となった通知
をより早く送信側のPCへ伝えることができる。このた
め、送信側のPCがタイムアウト機能を備えていても、
そのタイムアウトになる前に非同期受信が可能となった
通知を伝えることができ、送信側が接続を切断するタイ
ムアウトを回避できる。
Further, the count value of the up / down counter 35 is compared with a preset count value j before the dual port RAM 31 becomes empty, and when the count value of the up / down counter 35 reaches the set count value j, By providing a near empty signal output circuit that outputs (asserts) a near empty signal (Near-Empty) indicating that the port RAM 31 is almost empty, asynchronous reception is possible before the dual port RAM 31 enters the empty state. Can be notified to the transmitting PC (Negative DTR to be output to the transmitting PC). That is, the notification that the asynchronous reception has been enabled can be transmitted to the PC on the transmission side earlier. Therefore, even if the sending PC has a timeout function,
A notification that asynchronous reception has become possible can be transmitted before the timeout occurs, and a timeout in which the transmission side disconnects the connection can be avoided.

【0094】なお、本発明の実施の形態においては、実
際のアップダウンカウンタ35のカウント値Aとニアフ
ル信号出力回路のニアフル信号用比較回路38は、ニア
フル信号用設定レジスタ36に設定されたカウント値B
を比較してA≧Bを満たすときにニアフル信号(Nea
r−Full)を出力するものについて述べたが、必ず
しもこれに限定されるものではなく、A>Bを満たすと
きにニアフル信号(Near−Full)を出力するよ
うにしてもよい。
In the embodiment of the present invention, the actual count value A of the up / down counter 35 and the near full signal comparison circuit 38 of the near full signal output circuit are the count value set in the near full signal setting register 36. B
Are compared, and when A ≧ B is satisfied, the near full signal (Nea
Although the output of r-Full is described, the present invention is not limited to this, and a near-full signal (Near-Full) may be output when A> B is satisfied.

【0095】また、本発明の実施の形態においては、実
際のアップダウンカウンタ35のカウント値Aとニアエ
ンプティ信号出力回路のニアエンプティ信号用比較回路
39は、ニアエンプティ信号用設定レジスタ37に設定
されたカウント値Bを比較してA≦Bを満たすときにニ
アエンプティ信号(Near−Empty)を出力する
ものについて述べたが、必ずしもこれに限定されるもの
ではなく、A>Bを満たすときにニアエンプティ信号
(Near−Empty)を出力するようにしてもよ
い。
In the embodiment of the present invention, the actual count value A of the up / down counter 35 and the near empty signal comparison circuit 39 of the near empty signal output circuit are set in the near empty signal setting register 37. In the above description, the count value B is compared and the near-empty signal (Near-Empty) is output when A ≦ B is satisfied. However, the present invention is not limited to this. An empty signal (Near-Empty) may be output.

【0096】[0096]

【発明の効果】以上詳述したように本発明によれば、非
同期受信の受信制御をワンチップCPUが処理不可能な
スピードの非同期受信を行なう場合におけるデータの取
りこぼしを防止し、また送信側が接続を切断するタイム
アウトを回避できるFiFoメモリ制御回路を提供でき
る。
As described above in detail, according to the present invention, it is possible to prevent the loss of data when performing asynchronous reception at a speed that cannot be processed by the one-chip CPU and to prevent data loss. Can be provided.

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

【図1】本発明の実施の形態にかかるFiFoメモリ制
御回路の構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of a FIFO memory control circuit according to an embodiment of the present invention.

【図2】図1に示すFiFoメモリ制御回路を使用した
一般的なマイクロプロセッサ制御回路の構成を示すブロ
ック図。
FIG. 2 is a block diagram showing a configuration of a general microprocessor control circuit using the FIFO memory control circuit shown in FIG. 1;

【図3】図2に示すマイクロプロセッサ制御回路につい
て、ワンチップCPU60が処理不可能なスピードの非
同期受信を行なう場合の動作
FIG. 3 shows an operation of the microprocessor control circuit shown in FIG. 2 when the one-chip CPU 60 performs asynchronous reception at a speed that cannot be processed.

【図4】従来のFiFoメモリ制御回路の構成を示すブ
ロック図。
FIG. 4 is a block diagram showing a configuration of a conventional FIFO memory control circuit.

【図5】図4に示すFiFoメモリ制御回路を使用した
一般的なマイクロプロセッサ制御回路の構成を示すブロ
ック図。
FIG. 5 is a block diagram showing a configuration of a general microprocessor control circuit using the FIFO memory control circuit shown in FIG. 4;

【図6】図5に示すマイクロプロセッサ制御回路につい
て、ワンチップCPUが処理可能なスピードの非同期受
信を行なう場合の動作タイミングを示す図。
6 is a diagram showing operation timings in the case of performing asynchronous reception at a speed that can be processed by a one-chip CPU for the microprocessor control circuit shown in FIG. 5;

【図7】図5に示すマイクロプロセッサ制御回路につい
て、ワンチップCPUが処理不可能なスピードの非同期
受信を行なう場合の動作タイミングを示す図。
FIG. 7 is a diagram showing operation timings when the one-chip CPU performs asynchronous reception at a speed that cannot be processed by the microprocessor control circuit shown in FIG. 5;

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

30…FiFoメモリ制御回路 31…デュアルポートRAM 32…書込アドレス回路 33…読出アドレス回路 35…アップダウンカウンタ 36…ニアフル信号用設定レジスタ 37…ニアエンプティ信号用設定レジスタ 38…ニアフル信号用比較回路 39…ニアエンプティ信号用比較回路 60…ワンチップCPU DESCRIPTION OF SYMBOLS 30 ... Fifo memory control circuit 31 ... Dual port RAM 32 ... Write address circuit 33 ... Read address circuit 35 ... Up / down counter 36 ... Near full signal setting register 37 ... Near empty signal setting register 38 ... Near full signal comparison circuit 39 … Near empty signal comparison circuit 60… One chip CPU

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 データの読出し書込みが可能なメモリ
と、このメモリへの書込信号に基づいて書込アドレスを
発生する書込アドレス回路と、前記メモリへの読出信号
に基づいて読出アドレスを発生する読出アドレス回路と
を備えたFiFoメモリ制御回路において、 前記メモリへ書込信号が与えられるごとにカウントアッ
プ動作を行ない、前記メモリへ読出信号が与えられるご
とにカウントダウン動作を行なうアップダウンカウンタ
と、このアップダウンカウンタのカウント値と予め設定
した前記メモリが満杯になる前のカウント値と比較し
て、前記アップダウンカウンタのカウント値が前記設定
カウント値に達したとき又は前記設定カウント値を越え
たときに前記メモリが満杯に近いことを示すニアフル信
号を出力するニアフル信号出力回路とを設けたことを特
徴とするFiFoメモリ制御回路。
A memory capable of reading and writing data, a write address circuit for generating a write address based on a write signal to the memory, and a read address based on a read signal to the memory An up-down counter for performing a count-up operation each time a write signal is applied to the memory, and performing a count-down operation each time a read signal is applied to the memory; The count value of the up / down counter is compared with a preset count value before the memory is full, and when the count value of the up / down counter reaches the set count value or exceeds the set count value. A near full signal output circuit that outputs a near full signal indicating that the memory is almost full. FiFo memory control circuit, characterized in that a and.
【請求項2】 前記アップダウンカウンタのカウント値
と予め設定した前記メモリが空になる前のカウント値と
比較して、前記アップダウンカウンタのカウント値が前
記設定カウント値に達したとき又は前記設定カウント値
より小さくなったときに前記メモリが空に近いことを示
すニアエンプティ信号を出力するニアエンプティ信号出
力回路を設けたことを特徴とする請求項1記載のFiF
oメモリ制御回路。
And comparing the count value of the up / down counter with a preset count value before the memory is emptied, when the count value of the up / down counter reaches the set count value or the set value. 2. The FiF according to claim 1, further comprising a near-empty signal output circuit that outputs a near-empty signal indicating that the memory is almost empty when the count value becomes smaller than the count value.
o Memory control circuit.
JP9338468A 1997-12-09 1997-12-09 Fifo memory control circuit Pending JPH11175310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9338468A JPH11175310A (en) 1997-12-09 1997-12-09 Fifo memory control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9338468A JPH11175310A (en) 1997-12-09 1997-12-09 Fifo memory control circuit

Publications (1)

Publication Number Publication Date
JPH11175310A true JPH11175310A (en) 1999-07-02

Family

ID=18318454

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9338468A Pending JPH11175310A (en) 1997-12-09 1997-12-09 Fifo memory control circuit

Country Status (1)

Country Link
JP (1) JPH11175310A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6470439B2 (en) 2000-04-20 2002-10-22 Sharp Kabushiki Kaisha FIFO memory control circuit
EP1482402A2 (en) * 2003-05-27 2004-12-01 Micronas GmbH Fill level capture in a buffer
JP2011227919A (en) * 2000-06-09 2011-11-10 Trustees Of Columbia Univ In The City Of New York Small standby time fifo circuit for mixed asynchronous and synchronous system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6470439B2 (en) 2000-04-20 2002-10-22 Sharp Kabushiki Kaisha FIFO memory control circuit
JP2011227919A (en) * 2000-06-09 2011-11-10 Trustees Of Columbia Univ In The City Of New York Small standby time fifo circuit for mixed asynchronous and synchronous system
EP1482402A2 (en) * 2003-05-27 2004-12-01 Micronas GmbH Fill level capture in a buffer
EP1482402A3 (en) * 2003-05-27 2006-03-29 Micronas GmbH Fill level capture in a buffer

Similar Documents

Publication Publication Date Title
EP0632391B1 (en) Universal asynchronous receiver/transmitter
US5968143A (en) Information handling system for transfer of command blocks to a local processing side without local processor intervention
EP0852357B1 (en) Method for handling interrupts in a high speed I/O controller
US6742063B1 (en) Method and apparatus for efficient transfer of data packets
US6970921B1 (en) Network interface supporting virtual paths for quality of service
US5199105A (en) Universal asynchronous receiver/transmitter
US20030074502A1 (en) Communication between two embedded processors
US8713239B2 (en) Bus controller for handling split transactions
US5228130A (en) Multi-channel peripheral interface using selectively flaggable channel register sets for concurrent write in response to any selected channel register write instruction
JP2004021613A (en) Data transfer controller, electronic apparatus, and data transfer control method
US20050204189A1 (en) Network apparatus, method for controlling the same, and program for the same
EP0772831B1 (en) Bidirectional parallel signal interface
US5761453A (en) Method and system for increasing the throughput of serial data in a computer system
EP1433069B1 (en) Bus system and bus interface for connection to a bus
US7469304B2 (en) Data transfer control device, electronic equipment, and method for a data transfer through a bus, the data transfer control device including a register and a packet buffer that are commonly used during a host operation and a peripheral operation
JPH11175310A (en) Fifo memory control circuit
EP1759297B1 (en) Interrupt scheme for bus controller
US7043589B2 (en) Bus system and bus interface
US6178462B1 (en) Protocol for using a PCI interface for connecting networks
US20050271126A1 (en) High-speed transmission apparatus
KR100241876B1 (en) Interfacing apparatus between lan and atm network
US6763405B2 (en) Process for interfacing a microprocessor with a packet based device and respective system
JP2602975B2 (en) Reception control device in start-stop synchronous communication
KR950002306B1 (en) Data transmission device and method for fax
JP2574628B2 (en) Facsimile machine