JP4569163B2 - Data input / output device and data input / output method - Google Patents

Data input / output device and data input / output method Download PDF

Info

Publication number
JP4569163B2
JP4569163B2 JP2004138314A JP2004138314A JP4569163B2 JP 4569163 B2 JP4569163 B2 JP 4569163B2 JP 2004138314 A JP2004138314 A JP 2004138314A JP 2004138314 A JP2004138314 A JP 2004138314A JP 4569163 B2 JP4569163 B2 JP 4569163B2
Authority
JP
Japan
Prior art keywords
data
fifo memory
stage fifo
delay
read
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.)
Expired - Fee Related
Application number
JP2004138314A
Other languages
Japanese (ja)
Other versions
JP2005321933A (en
Inventor
伸和 三好
学 赤松
慶春 吉田
雅彦 菊地
真吾 中西
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2004138314A priority Critical patent/JP4569163B2/en
Publication of JP2005321933A publication Critical patent/JP2005321933A/en
Application granted granted Critical
Publication of JP4569163B2 publication Critical patent/JP4569163B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Description

本発明は、FIFO(First In First Out)メモリを備え、入力したデータを一時的にFIFOメモリに蓄積してから出力するデータ入出力装置およびこのデータ入出力装置におけるデータ入出力方法に関する。   The present invention relates to a data input / output device that includes a first-in first-out (FIFO) memory and temporarily outputs input data after being stored in the FIFO memory, and a data input / output method in the data input / output device.

FIFOメモリは、例えば転送速度の異なる2つのバスシステムの間でのデータ転送を実現するために用いられる。すなわち、2つのバスの転送速度の差を吸収するためにFIFOメモリに一時的にデータを書き込んで、書き込んだデータをFIFOメモリから読み出して出力側のバスにデータを出力している。   The FIFO memory is used, for example, to realize data transfer between two bus systems having different transfer speeds. That is, in order to absorb the difference in transfer speed between the two buses, data is temporarily written in the FIFO memory, the written data is read from the FIFO memory, and the data is output to the output side bus.

特許文献1では、FIFOメモリを利用したデータ入出力装置において、データの転送効率とデータバスの使用効率を高めるために、FIFOメモリに所定数以上のデータが書き込まれているか否かを書き込みアドレスポインタと読み出しアドレスポインタとの比較により判定して、FIFOメモリに書き込まれた所定数以上のデータが空となるまでデータ転送要求を発生させている。またFIFOメモリに所定数以上のデータを書き込む余地があるか否かを判定して、FIFOメモリが満杯になるまでデータ書き込み要求を発生させている。   In Patent Document 1, in a data input / output device using a FIFO memory, a write address pointer indicates whether or not a predetermined number of data is written in the FIFO memory in order to increase data transfer efficiency and data bus use efficiency. And a read address pointer, and a data transfer request is generated until a predetermined number of data written in the FIFO memory becomes empty. Further, it is determined whether or not there is room for writing a predetermined number or more of data in the FIFO memory, and a data write request is generated until the FIFO memory is full.

また特許文献2では、データの書き込みと読み出しとを同じポートで行うシングルポートメモリを用いたデータ入出力装置であっても、データの連続書き込みが行える技術を開示している。   Japanese Patent Application Laid-Open No. 2004-228561 discloses a technique that enables continuous data writing even in a data input / output device using a single port memory that performs data writing and reading at the same port.

特開平6−187123号公報JP-A-6-187123 特開2003−271378号公報JP 2003-271378 A

しかしながら、シングルポートメモリやFIFOメモリを多段接続したメモリにデータを書き込んで読み出すと、メモリ内部で生じる遅延によりデータを出力できないことがある。すなわち、シングルポートメモリやFIFOメモリを多段接続したメモリにデータを書き込むと、多段構成のためデータを出力するまでに時間がかかる。このためデータを書き込んですぐに読み出し要求信号が出されても、このデータを読み出すことができない。   However, when data is written to and read from a memory in which single-port memories or FIFO memories are connected in multiple stages, data may not be output due to a delay generated in the memory. That is, when data is written in a memory in which a single port memory or FIFO memory is connected in multiple stages, it takes time to output the data because of the multistage configuration. Therefore, even if a read request signal is issued immediately after data is written, this data cannot be read.

例えば、5つのFIFOメモリを多段接続したFIFOメモリに1ワードのデータを書き込み、書き込んだ所でデータ読み出し要求が発生すると、データは接続した多段分遅延して読み出し可能となるため、データを読み出せないことがある。 For example, if one word of data is written in a FIFO memory in which five FIFO memories are connected in multiple stages, and a data read request is generated at the written location, the data can be read with a delay corresponding to the connected multiple stages, so the data can be read out. There may not be.

本発明は上記事情に鑑みてなされたものであり、データの書き込みから読み出しまでに遅延を生じるFIFOメモリであっても、確実にデータを読み出すことができるデータ入出力装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to provide a data input / output device capable of reliably reading data even in a FIFO memory that causes a delay from data writing to data reading. To do.

かかる目的を達成するために請求項1記載のデータ入出力装置は、多段のFIFOメモリを備え、入力したデータを初段のFIFOメモリから後段のFIFOメモリへと順次記録し、最終段のFIFOメモリからデータを読み出して出力するデータ入出力装置であって、前記多段のFIFOメモリに入力するデータ数をカウントする入力データ数カウント手段と、前記多段のFIFOメモリから出力するデータ数をカウントする出力データ数カウント手段と、前記入力データ数カウント手段と前記出力データ数カウント手段とのカウント数に基づいて、前記多段のFIFOメモリに所定数以上のデータが記録されているか否かを判定する第1判定手段と、前記第1判定手段の判定結果が、前記多段FIFOメモリに所定数以上のデータが記録されていないとの判定結果から、前記所定数以上のデータが記録されているとの判定結果に変更された場合に、前記第1判定手段から送られるカウント開始の指示に基づき、前記多段のFIFOメモリの段数に応じた遅延カウント数をカウントする第1遅延手段と、前記第1判定手段の判定結果が、前記多段のFIFOメモリに所定数以上のデータが記録されていないとの判定結果から、前記所定数以上のデータが記録されているとの判定結果に変更され前記第1遅延手段前記遅延カウント数をカウントした後に、前記多段のFIFOメモリからのデータ読み出しを許可する読み出し許可手段とを備え、前記多段のFIFOメモリからデータの連続読み出しを実行することを特徴としている。 In order to achieve this object, the data input / output device according to claim 1 includes a multi-stage FIFO memory, and sequentially records the input data from the first-stage FIFO memory to the subsequent-stage FIFO memory, and from the last-stage FIFO memory. A data input / output device for reading and outputting data, the input data number counting means for counting the number of data input to the multi-stage FIFO memory, and the number of output data for counting the number of data output from the multi-stage FIFO memory First determination means for determining whether or not a predetermined number or more of data is recorded in the multi-stage FIFO memory based on the count number of the count means, and the input data number count means and the output data number count means As a result of the determination by the first determination means, a predetermined number of data is recorded in the multi-stage FIFO memory. It is the determination result that is not, in the case where the predetermined number or more of data is changed to the determination result that has been recorded, based on an instruction of the count start sent from the first determining means, said multi-stage FIFO From the first delay means that counts the delay count number according to the number of memory stages, and the determination result of the first determination means that the determination result that the predetermined number or more data is not recorded in the multi-stage FIFO memory, wherein the predetermined number or more of data is changed to the determination result that has been recorded, after the first delay means has counted the number of the delay count, the read permission means for permitting the reading of data from the multi-stage FIFO memory And continuously reading data from the multi-stage FIFO memory .

請求項1記載の発明は、第1判定手段により、多段のFIFOメモリに所定数以上のデータが記録されているか否かを判定し、判定結果が、所定数以上のデータが記録されていないとの判定結果から、所定数以上のデータが記録されているとの判定結果に変更されると、遅延カウント数のカウント後に多段のFIFOメモリからのデータ読み出しを許可しているので、多段のFIFOメモリからデータを連続して読み出すことができる。 In the first aspect of the invention, the first determination means determines whether or not a predetermined number of data is recorded in the multi-stage FIFO memory, and the determination result indicates that the predetermined number of data or more is not recorded. If the determination result is changed to a determination result indicating that more than a predetermined number of data is recorded, data reading from the multi-stage FIFO memory is permitted after the count of the delay count, so the multi-stage FIFO memory The data can be read continuously from .

上記データ入出力装置において、前記読み出し許可手段は、前記多段のFIFOメモリに入力するデータの終了を示すデータエンド信号を入力した場合に、前記第1判定手段の判定結果が、前記多段のFIFOメモリに所定数以上のデータが記録されていないとの判定結果であっても、前記第1遅延手段に前記遅延カウント数をカウントさせ、前記第1遅延手段が前記遅延カウント数をカウントすると、前記多段のFIFOメモリからのデータ読み出しを許可するとよい。 In the data input / output device, when the read permission unit inputs a data end signal indicating the end of data to be input to the multistage FIFO memory , the determination result of the first determination unit is the result of the multistage FIFO memory. to be the determination result of the yarn a predetermined number or more of data is not been recorded, the by first counting the number of delay count delay means, when the first delay means for counting the number of the delay count, the multi-stage It is preferable to allow data read from the FIFO memory.

請求項2記載の発明によれば、多段のFIFOメモリに所定数以上のデータが記録されていなくても、多段のFIFOメモリからデータを確実に読み出すことができる。 According to the second aspect of the present invention , even if a predetermined number of data or more is not recorded in the multistage FIFO memory, the data can be reliably read from the multistage FIFO memory.

上記データ入出力装置において、前記入力データ数カウント手段と前記出力データ数カウント手段とのカウント数に基づいて、前記多段のFIFOメモリに所定数以上のデータの記録が可能であるか否かを判定する第2判定手段と、前記多段のFIFOメモリの段数に応じた遅延カウント数をカウントする第2遅延手段と、前記第2判定手段の判定結果が、前記多段のFIFOメモリに前記所定数以上のデータの記録が不可能との判定結果から、前記所定数以上のデータの記録が可能との判定結果に変更されると、前記第2遅延手段に前記遅延カウント数をカウントさせ、前記遅延カウント数のカウント後に前記多段のFIFOメモリへのデータの記録を許可する記録許可手段とを有するとよい。In the data input / output device, it is determined whether or not a predetermined number of data can be recorded in the multi-stage FIFO memory based on the count numbers of the input data number counting means and the output data number counting means. Second determination means, second delay means for counting a delay count number corresponding to the number of stages of the multi-stage FIFO memory, and a determination result of the second determination means is greater than the predetermined number in the multi-stage FIFO memory. When the determination result that data recording is impossible is changed to the determination result that data recording of the predetermined number or more is possible, the second delay means counts the delay count number, and the delay count number Recording permission means for permitting the recording of data in the multi-stage FIFO memory after counting.

請求項3記載の発明によれば、多段のFIFOメモリに、所定数以上のデータの記録が不可能との判定結果から、所定数以上のデータの記録が可能との判定結果に変更されると、遅延カウント数のカウント後に多段のFIFOメモリへのデータ入力を行っているので、多段のFIFOメモリへの所定数以上のデータの記録を確実に行うことができる。 According to the third aspect of the present invention, when the determination result that the predetermined number or more of data cannot be recorded in the multi-stage FIFO memory is changed to the determination result that the predetermined number or more of data can be recorded. Since the data input to the multistage FIFO memory is performed after the count of the delay counts, it is possible to reliably record a predetermined number or more of data in the multistage FIFO memory.

上記データ入出力装置において、前記多段のFIFOメモリを、同期型のFIFOメモリで構成してもよいし、非同期型のFIFOメモリで構成してもよい。In the data input / output device, the multi-stage FIFO memory may be a synchronous FIFO memory or an asynchronous FIFO memory.

本発明のデータ入出力方法は、多段のFIFOメモリを備え、入力したデータを初段のFIFOメモリから後段のFIFOメモリへと順次記録し、最終段のFIFOメモリからデータを読み出して出力するデータ入出力装置のデータ入出力方法であって、前記多段のFIFOメモリに入力するデータ数をカウントするステップと、前記多段のFIFOメモリから出力するデータ数をカウントするステップと、前記多段のFIFOメモリに入出力されるデータのカウント数に基づいて、前記多段のFIFOメモリに所定数以上のデータが記録されているか否かを判定するステップと、前記判定の結果が、前記多段のFIFOメモリに所定数以上のデータが記録されていないとの判定から、前記所定数以上のデータが記録されているとの判定に変更されると、前記多段のFIFOメモリの段数に応じた遅延カウント数をカウントするステップと、前記遅延カウント数のカウント後に、前記多段のFIFOメモリからのデータ読み出しを許可するステップとを有し、前記多段のFIFOメモリからデータの連続読み出しを実行することを特徴としている。
The data input / output method according to the present invention includes a multi-stage FIFO memory, and sequentially records input data from a first-stage FIFO memory to a subsequent-stage FIFO memory, and reads and outputs data from the last-stage FIFO memory. A data input / output method for a device, the step of counting the number of data input to the multi-stage FIFO memory, the step of counting the number of data output from the multi-stage FIFO memory, and the input / output to the multi-stage FIFO memory Determining whether or not a predetermined number of data is recorded in the multi-stage FIFO memory based on the count number of data to be processed, and the result of the determination is a predetermined number or more in the multi-stage FIFO memory The determination that no data is recorded is changed to the determination that more than the predetermined number of data is recorded. Once the steps of counting the number of delay count corresponding to the number of stages of the FIFO memory of the multi-stage, after the count of the delay count, and a step of permitting the data read from the multi-stage FIFO memory, wherein It is characterized by executing continuous reading of data from a multi-stage FIFO memory.

請求項6記載の発明のように、FIFOメモリを、シングルポートRAMと、複数のFIFOメモリを多段接続したFIFOメモリとから構成すると、データ出力に遅延を生じるが、このようなFIFOメモリであっても、請求項1から4の何れか一項に記載のデータ入出力装置により確実にデータを読み出して、データの書き込みを行うことができる。   When the FIFO memory is composed of a single-port RAM and a FIFO memory in which a plurality of FIFO memories are connected in multiple stages as in the invention described in claim 6, data output is delayed. The data input / output device according to any one of claims 1 to 4 can reliably read data and write data.

本発明は、データの書き込みから読み出しまでに遅延を生じるFIFOメモリであっても、確実に書き込んだデータを読み出すことができる。   According to the present invention, even if the FIFO memory causes a delay from data writing to reading, the written data can be read reliably.

次に、添付図面を参照しながら本発明の最良の実施例を説明する。   Next, preferred embodiments of the present invention will be described with reference to the accompanying drawings.

まず、図1を参照しながらデータ入出力装置1の読み出し側の構成を説明する。図1に示すようにデータ入出力装置1の読み出し側には、RAMコントローラ2と、1ポートRAM3と、読み出しタイミンング制御部20とが設けられている。   First, the configuration on the reading side of the data input / output device 1 will be described with reference to FIG. As shown in FIG. 1, a RAM controller 2, a 1-port RAM 3, and a read timing control unit 20 are provided on the read side of the data input / output device 1.

図1に示すようにRAMコントローラ2には、書き込み信号(以下、WEとも表記する)に合わせてデータ(Dataとも表記する)が入力される。またRAMコントローラ2には、読み出し信号(以下、REとも表記する)に合わせて1ポートRAM3からデータが出力される。また1ポートRAM3が満杯状態で新たなデータの書き込みができなくなると、1ポートRAM3が満杯状態であることを示すフルフラグ(以下、FULLとも表記する)がRAMコントローラ2から出力される。さらに、1ポートRAM3が空状態でデータの読み出しができなくなると、1ポートRAM3が空状態であることを示すエンプティフラグ(以下、EMPとも表記する)が出力される。 As shown in FIG. 1, data (also referred to as Data) is input to the RAM controller 2 in accordance with a write signal (hereinafter also referred to as WE). Further, data is output from the 1-port RAM 3 to the RAM controller 2 in accordance with a read signal (hereinafter also referred to as RE). When the 1-port RAM 3 is full and new data cannot be written, the RAM controller 2 outputs a full flag (hereinafter also referred to as FULL) indicating that the 1-port RAM 3 is full. Further, when data cannot be read when the 1-port RAM 3 is empty, an empty flag (hereinafter also referred to as EMP) indicating that the 1-port RAM 3 is empty is output.

読み出しタイミング制御部20は、1ポートRAM3に所定以上のデータが書き込まれているか否かを判定して、所定数以上のデータが書き込まれていると所定時間経過後に読み出しを許可する読み出し許可フラグを設定する。 The read timing control unit 20 determines whether or not a predetermined number of data has been written in the 1-port RAM 3, and if a predetermined number or more of data has been written, a read permission that permits reading after a predetermined time has elapsed. Set the flag.

次に、図2を参照しながら読み出しタイミング制御部20の構成について説明する。図2に示すように読み出しタイミング制御部20は、ライトカウンタ21と、比較回路22と、リードカウンタ23と、ディレイカウンタ24と、読み出し許可フラグ生成回路25とを有している。   Next, the configuration of the read timing control unit 20 will be described with reference to FIG. As shown in FIG. 2, the read timing control unit 20 includes a write counter 21, a comparison circuit 22, a read counter 23, a delay counter 24, and a read permission flag generation circuit 25.

ライトカウンタ21は、書き込み信号(WE)とRAMコントローラ2からのフルフラグにより1ポートRAM3に書き込まれているデータ数(以下、書き込みデータ数という)をカウントする。同様にリードカウンタ23は、読み出し信号(RE)とRAMコントローラ2からのエンプティフラグにより1ポートRAM3から読み出されたデータ数(以下、読み出しデータ数という)をカウントする。   The write counter 21 counts the number of data written to the 1-port RAM 3 (hereinafter referred to as the number of write data) based on the write signal (WE) and the full flag from the RAM controller 2. Similarly, the read counter 23 counts the number of data read from the 1-port RAM 3 (hereinafter referred to as the number of read data) by the read signal (RE) and the empty flag from the RAM controller 2.

比較回路22は、ライトカウンタ21の書き込みデータ数からリードカウンタ23の読み出しデータ数を減算し、減算結果のデータカウント値を読み出し許可フラグ生成回路25に出力する。   The comparison circuit 22 subtracts the read data number of the read counter 23 from the write data number of the write counter 21 and outputs the data count value of the subtraction result to the read permission flag generation circuit 25.

読み出し許可フラグ生成回路25は、1ポートRAM3から連続的に読み出すワード数を示す読み出しワード数(以下、RSIZEとも表記する)と、ディレイカウンタ24にカウントさせる読み出し遅延カウント数(以下、RDELAYとも表記する)とを入力するThe read permission flag generation circuit 25 reads a read word number indicating the number of words read continuously from the 1-port RAM 3 (hereinafter also referred to as RSIZE) and a read delay count number (hereinafter also referred to as RDELAY) to be counted by the delay counter 24. ) to enter and.

読み出し許可フラグ生成回路25は、ライトカウンタ21の書き込みデータ数からリードカウンタ23の読み出しデータ数を減算した減算結果と、読み出しワード数(RSIZE)とを比較する。読み出しワード数(RSIZE)は、1ポートRAM3から所定数以上のデータを読み出すことができるかを判定する判定値となる。ライトカウンタ21の書き込みデータ数からリードカウンタ23の読み出しデータ数を減算した減算結果が、読み出しワード数(RSIZE)よりも大きくなると、1ポートRAM3から読み出しワード数(RSIZE)以上のデータを読み出すことができると判定する。読み出し許可フラグ生成回路25は、所定数(RSISE)以上のデータを読み出せると判定すると、ディレイカウンタ24で所定のカウント数をカウントしてから、1ポートRAM3からの読み出しを許可する読み出し許可フラグを1に設定する。   The read permission flag generation circuit 25 compares the subtraction result obtained by subtracting the read data number of the read counter 23 from the write data number of the write counter 21 with the read word number (RSIZE). The number of read words (RSIZE) is a determination value for determining whether or not a predetermined number of data can be read from the 1-port RAM 3. When the subtraction result obtained by subtracting the read data number of the read counter 23 from the write data number of the write counter 21 becomes larger than the read word number (RSIZE), data of the read word number (RSIZE) or more can be read from the 1-port RAM 3. Judge that it is possible. When the read permission flag generation circuit 25 determines that data of a predetermined number (RSISE) or more can be read, the delay counter 24 counts a predetermined count number and then reads a read permission flag for permitting reading from the 1-port RAM 3. Set to 1.

ディレイカウンタ24は、読み出し許可フラグ生成回路25からのカウント開始指示信号によって、ディレイカウントを開始する。ディレイカウンタ24のカウントする読み出し遅延カウント数(RDELAY)は、予め読み出し許可フラグ生成回路25から指示されている。ディレイカウンタ24は、カウント値を読み出し許可フラグ生成回路25に出力する。   The delay counter 24 starts a delay count in response to a count start instruction signal from the read permission flag generation circuit 25. The read delay count number (RDELAY) counted by the delay counter 24 is instructed from the read permission flag generation circuit 25 in advance. The delay counter 24 outputs the count value to the read permission flag generation circuit 25.

次に、図3に示す信号出力タイミングチャートを参照しながら読み出し許可フラグ生成回路25のデータの書き込みと読み出しのタイミング制御について説明する。基準クロック(WCLK)に同期して生成された書き込み信号(WE)に合わせて、データをRAMコントーラ2に入力する。RAMコントローラ2は、1ポートRAM3のアドレス(図3に示すWaddr)にデータ(Data)を順次に書き込む。   Next, the data write and read timing control of the read permission flag generation circuit 25 will be described with reference to the signal output timing chart shown in FIG. Data is input to the RAM controller 2 in accordance with a write signal (WE) generated in synchronization with the reference clock (WCLK). The RAM controller 2 sequentially writes data (Data) to the address (Waddr shown in FIG. 3) of the 1-port RAM 3.

読み出しタイミング制御部20は、ライトカウンタ21とリードカウンタ23とを用いて1ポートRAM3への書き込みデータ数と読み出しデータ数とをカウントし、1ポートRAM3内に所定数以上のデータが書き込まれているか否かを検出する。比較回路22で、ライトカウンタ21のカウント数からリードカウンタ23のカウント数を減算し、減算結果を読み出し許可フラグ生成回路25に出力する。   The read timing controller 20 uses the write counter 21 and the read counter 23 to count the number of data written to the 1-port RAM 3 and the number of read data, and whether or not a predetermined number of data is written in the 1-port RAM 3. Detect whether or not. The comparison circuit 22 subtracts the count number of the read counter 23 from the count number of the write counter 21 and outputs the subtraction result to the read permission flag generation circuit 25.

読み出し許可フラグ生成回路25は、ライトカウンタ21の書き込みデータ数からリードカウンタ23の読み出しデータ数を減算したデータカウント値と、読み出しワード数(RSIZE)とを比較する。データカウント値が読み出しワード数(RSIZE)よりも小さい場合には、所定数(RSIZE)のデータを1ポートRAM3から読み出すことができないとして、読み出し許可フラグをローレベル(0)のままにする。また減算結果が、読み出しワード数(RSIZE)よりも大きい場合には、所定数(RSIZE)以上のデータが1ポートRAM3に書き込まれたと判定し、ディレイカウンタ24にディレイカウント開始を指示するカウント開示指示信号を出力する。   The read permission flag generation circuit 25 compares the data count value obtained by subtracting the read data number of the read counter 23 from the write data number of the write counter 21 with the read word number (RSIZE). If the data count value is smaller than the number of read words (RSIZE), a predetermined number (RSIZE) of data cannot be read from the 1-port RAM 3, and the read permission flag is kept at the low level (0). If the subtraction result is larger than the number of read words (RSIZE), it is determined that data of a predetermined number (RSIZE) or more has been written in the 1-port RAM 3, and a count disclosure instruction for instructing the delay counter 24 to start delay counting Output a signal.

ディレイカウンタ24は、読み出し許可フラグ生成回路25からのカウント開始指示信号によって、ディレイカウントを開始する。ディレイカウンタ24のカウントする読み出し遅延カウント数(RDELAY)は、予め読み出し許可フラグ生成回路25から指示される。   The delay counter 24 starts a delay count in response to a count start instruction signal from the read permission flag generation circuit 25. The read delay count number (RDELAY) counted by the delay counter 24 is instructed from the read permission flag generation circuit 25 in advance.

読み出し許可フラグ生成回路25は、ディレイカウンタ24によって読み出し遅延カウント数(RDELAY)(図3に示すカウント数C)をカウントすると、読み出し許可フラグをハイレベル(1)に設定して、1ポートRAM3からのデータの読み出しを許可する。   When the read permission flag generation circuit 25 counts the read delay count number (RDELAY) (count number C shown in FIG. 3) by the delay counter 24, the read permission flag is set to a high level (1) and the 1-port RAM 3 Allow reading of data.

読み出し許可フラグがハイレベルに遷移することで、基準クロック(WCLK)に同期して生成された読み出し信号(RE)の入力に合わせてデータ(Data)を1ポートRAM3からRAMコントローラ2に出力する。RAMコントローラ2は、入力したデータ(Data)を順次出力する。   When the read permission flag transitions to the high level, data (Data) is output from the 1-port RAM 3 to the RAM controller 2 in accordance with the input of the read signal (RE) generated in synchronization with the reference clock (WCLK). The RAM controller 2 sequentially outputs the input data (Data).

例えば、1ポートRAM3に1ワード書き込んだ所でこの1ワードのデータの読み出し要求を出した場合、書き込まれたデータは、すぐには出力されない。このため1ワード分の読み出しを行っても1ワードのデータを読み出すことができない。本実施例では、1ポートRAM3に所定数以上のデータが書き込まれていると判定すると、ディレイカウンタ24で所定時間をカウントしてからデータの読み出しを行う。このため1ポートRAM3に書き込んだデータを確実に読み出すことができる。   For example, when a 1-word data read request is issued when 1 word is written in the 1-port RAM 3, the written data is not immediately output. Therefore, even if one word is read, one word of data cannot be read. In this embodiment, when it is determined that a predetermined number or more of data is written in the 1-port RAM 3, the delay counter 24 counts a predetermined time and then reads the data. For this reason, the data written in the 1-port RAM 3 can be read reliably.

なお、本実施例は図4に示すようなFIFO(First In First Out)メモリ4、5、6を複数多段接続した構成のデータ入出力装置に適用することができる。また図示しないが、シングルポートRAM3と、多段構成のFIFOとから構成されるメモリ部であっても本発明を適用することができる。また、このFIFOメモリは、データの入力と出力とを同期して行う同期式のものであってもよいし、データの入力と出力とを非同期で行う非同期式のものであってもよい。   The present embodiment can be applied to a data input / output device having a configuration in which a plurality of FIFO (First In First Out) memories 4, 5, and 6 are connected in multiple stages as shown in FIG. Although not shown, the present invention can also be applied to a memory unit including a single port RAM 3 and a multistage FIFO. The FIFO memory may be a synchronous type that performs data input and output in synchronization, or may be an asynchronous type that performs data input and output asynchronously.

なお、ディレイカウンタ24の読み出し遅延カウント数(RDELAY)は、図1に示す1ポートRAM3を用いた構成では、この1ポートRAM3で生じるデータの読み出しまでにかかる遅延時間を考慮して設定される。また、図4に示すFIFOメモリ4、5、6を多段接続した構成のメモリ部の場合には、多段接続したFIFOメモリの段数に応じて設定することができる。もちろん、1ポートRAM3と多段構成のFIFOメモリ4、5、6とからなるメモリ部であった場合には、1ポートRAM3で生じるデータ読み出しまでにかかる遅延時間と、多段接続したFIFOメモリの段数に応じて設定することができる。   It should be noted that the read delay count number (RDELAY) of the delay counter 24 is set in consideration of the delay time required until the data read in the 1-port RAM 3 in the configuration using the 1-port RAM 3 shown in FIG. Further, in the case of a memory unit having a configuration in which the FIFO memories 4, 5, and 6 shown in FIG. 4 are connected in multiple stages, the setting can be made according to the number of FIFO memories connected in multiple stages. Of course, in the case of a memory unit composed of 1-port RAM 3 and multi-stage FIFO memories 4, 5 and 6, the delay time required for data reading that occurs in 1-port RAM 3 and the number of stages of FIFO memories connected in multi-stages It can be set accordingly.

また、本実施例では、ディレイカウンタ24の読み出し遅延カウント数(RDELAY)と、1ポートRAM3から連続して読み出し可能なデータ数(RSIZE)とは、外部より任意に設定可能である。ソフトウェアにより読み出し遅延カウント数(RDELAY)とデータ数(RSIZE)とを図示しないレジスタに書き込み、レジスタの値を上位装置で読み出しタイミング制御部20に通知する。   In this embodiment, the read delay count number (RDELAY) of the delay counter 24 and the data number (RSIZE) that can be continuously read from the 1-port RAM 3 can be arbitrarily set from the outside. The software writes the read delay count number (RDELAY) and the data number (RSIZE) to a register (not shown), and notifies the read timing control unit 20 of the register value by the host device.

次に、図5を参照しながら第2実施例の構成を説明する。図5には、本実施例のデータ入出力装置1の書き込み側の構成が示されている。図5に示すデータ入出力装置1は、1ポートRAM3へのデータの書き込みと読み出しを制御するRAMコントローラ2と、データの書き込みと読み出しとを同じ1つのポートで行う1ポートRAM3と、1ポートRAM3に所定数以上のデータを書き込む余地があるか否かを判定して、所定数以上のデータを書き込む余地があると所定時間経過後に書き込みを許可する書き込み許可フラグを設定する書き込みタイミング制御部10とを有している。   Next, the configuration of the second embodiment will be described with reference to FIG. FIG. 5 shows the configuration on the writing side of the data input / output device 1 of this embodiment. The data input / output device 1 shown in FIG. 5 includes a RAM controller 2 that controls writing and reading of data to and from the 1-port RAM 3, a 1-port RAM 3 that performs writing and reading of data through the same port, and a 1-port RAM 3 A write timing control unit 10 for determining whether or not there is room for writing a predetermined number or more of data and setting a write permission flag that permits writing after a predetermined time if there is room for writing a predetermined number or more of data. have.

次に、図6を参照しながら書き込みタイミング制御部10の構成について説明する。図6に示すように書き込みタイミング制御部10は、ライトカウンタ11と、比較回路12と、リードカウンタ13と、ディレイカウンタ14と、書き込み許可フラグ生成回路15とを有している。   Next, the configuration of the write timing control unit 10 will be described with reference to FIG. As shown in FIG. 6, the write timing control unit 10 includes a write counter 11, a comparison circuit 12, a read counter 13, a delay counter 14, and a write permission flag generation circuit 15.

ライトカウンタ11は、書き込み信号(WE)とRAMコントローラ2からのフルフラグにより1ポートRAM3に書き込まれているデータ数(以下、書き込みデータ数という)をカウントする。同様にリードカウンタ13は、読み出し信号(RE)とRAMコントローラ2からのエンプティフラグにより1ポートRAM3から読み出されたデータ数(以下、読み出しデータ数という)をカウントする。   The write counter 11 counts the number of data written to the 1-port RAM 3 (hereinafter referred to as the number of write data) by the write signal (WE) and the full flag from the RAM controller 2. Similarly, the read counter 13 counts the number of data read from the 1-port RAM 3 (hereinafter referred to as the number of read data) by the read signal (RE) and the empty flag from the RAM controller 2.

比較回路12は、ライトカウンタ11の書き込みデータ数からリードカウンタ13の読み出しデータ数を減算し、減算結果のデータカウント値を書き込み許可フラグ生成回路15に出力する。   The comparison circuit 12 subtracts the number of read data of the read counter 13 from the number of write data of the write counter 11 and outputs the data count value of the subtraction result to the write permission flag generation circuit 15.

書き込み許可フラグ生成回路15は、1ポートRAM3に連続的に書き込むワード数を示す書き込みワード数(以下、WSIZEとも表記する)と、ディレイカウンタ14にカウントさせる書き込み遅延カウント数(以下、WDELAYとも表記する)とを入力するThe write permission flag generation circuit 15 includes a write word number indicating the number of words continuously written in the 1-port RAM 3 (hereinafter also referred to as WSIZE) and a write delay count number (hereinafter also referred to as WDELAY) to be counted by the delay counter 14. ) to enter and.

書き込み許可フラグ生成回路15は、1ポートRAMのメモリサイズ(以下、TSIZEと表記する)から比較回路12のデータカウント値を減算し、減算結果を書き込みワード数(WSIZE)と比較する。書き込みワード数(WSIZE)は、1ポートRAM3に書き込むデータ数を示すものであり、ここでは、1ポートRAM3に所定数以上のデータを書き込む余地があるかを判定する判定値となる。TSIZEからデータカウント値を減算した値が、書き込みワード数(WSIZE)よりも大きくなると、1ポートRAM3に書き込みワード数(WSIZE)以上のデータを書き込む余地があると判定できる。書き込み許可フラグ生成回路15は、所定数(WSIZE)のデータを書き込む余地があると判定すると、ディレイカウンタ14で所定のカウント数をカウントしてから、1ポートRAM3への書き込みを許可する書き込み許可フラグを1に設定する。   The write permission flag generation circuit 15 subtracts the data count value of the comparison circuit 12 from the memory size of the 1-port RAM (hereinafter referred to as TSIZE), and compares the subtraction result with the number of write words (WSIZE). The number of write words (WSIZE) indicates the number of data to be written in the 1-port RAM 3, and is a determination value for determining whether there is room for writing a predetermined number or more of data in the 1-port RAM 3. When the value obtained by subtracting the data count value from TSIZE becomes larger than the number of write words (WSIZE), it can be determined that there is room for writing data of the number of write words (WSIZE) or more in the 1-port RAM 3. When the write permission flag generation circuit 15 determines that there is room for writing a predetermined number (WSIZE) of data, the write permission flag for permitting writing to the 1-port RAM 3 after the delay counter 14 counts the predetermined count number. Is set to 1.

ディレイカウンタ14は、書き込み許可フラグ生成回路15からのカウント開始指示信号によって、ディレイカウントを開始する。ディレイカウンタ14のカウントする書き込み遅延カウント数(WDELAY)は、予め書き込み許可フラグ生成回路15から指示されている。ディレイカウンタ14は、カウント値を書き込み許可フラグ生成回路15に出力する。   The delay counter 14 starts a delay count in response to a count start instruction signal from the write permission flag generation circuit 15. The write delay count number (WDELAY) counted by the delay counter 14 is instructed from the write permission flag generation circuit 15 in advance. The delay counter 14 outputs the count value to the write permission flag generation circuit 15.

次に、図7に示す信号出力タイミングチャートを参照しながら書き込みタイミング制御部10のデータの書き込みと読み出しのタイミング制御について説明する。基準クロック(以下WCLKとも表記する)に同期して生成された読み出し信号(RE)に合わせて、入力したアドレス(図7に示すRaddr)のデータ(Data)を1ポートRAM3からRAMコントローラ2に出力する。RAMコントローラ2は、入力したデータ(Data)を順次出力する(図7に示すDO)。   Next, data write and read timing control of the write timing control unit 10 will be described with reference to a signal output timing chart shown in FIG. The data (Data) of the input address (Raddr shown in FIG. 7) is output from the 1-port RAM 3 to the RAM controller 2 in accordance with the read signal (RE) generated in synchronization with the reference clock (hereinafter also referred to as WCLK). To do. The RAM controller 2 sequentially outputs the input data (Data) (DO shown in FIG. 7).

書き込みタイミング制御部10は、ライトカウンタ11とリードカウンタ13とを用いて1ポートRAM3への書き込みデータ数と読み出しデータ数とをカウントし、1ポートRAM3内に所定数以上のデータを書き込む余地があるか否かを検出する。比較回路12で、ライトカウンタ11のカウント数からリードカウンタ13のカウント数を減算し、減算結果のデータカウント値を書き込み許可フラグ生成回路15に出力する。   The write timing control unit 10 uses the write counter 11 and the read counter 13 to count the number of data written to the 1-port RAM 3 and the number of read data, and there is room for writing a predetermined number or more of data in the 1-port RAM 3. Whether or not is detected. The comparison circuit 12 subtracts the count number of the read counter 13 from the count number of the write counter 11 and outputs the data count value of the subtraction result to the write permission flag generation circuit 15.

書き込み許可フラグ生成回路15は、1ポートRAM3のメモリサイズTSIZEから比較回路12のデータカウント値を減算する。次に、減算結果と書き込みワード数(WSIZE)とを比較する。減算結果が、書き込みワード数(WSIZE)よりも小さい場合には、所定数(WSIZE)以上のデータを書き込む余地が1ポートRAM3にはないとして、書き込み許可フラグをローレベル(0)のままにする。また減算結果が、書き込みワード数(WSIZE)よりも大きい場合には、所定数(WSIZE)以上のデータを書き込む余地が1ポートRAM3にできたと判定し、ディレイカウンタ14にディレイカウント開始を指示するカウント開始指示信号を出力する。   The write permission flag generation circuit 15 subtracts the data count value of the comparison circuit 12 from the memory size TSIZE of the 1-port RAM 3. Next, the subtraction result is compared with the number of write words (WSIZE). If the subtraction result is smaller than the number of write words (WSIZE), it is assumed that there is no room for writing data of a predetermined number (WSIZE) or more in the 1-port RAM 3, and the write permission flag is kept at the low level (0). . If the subtraction result is larger than the number of written words (WSIZE), it is determined that there is room for writing data of a predetermined number (WSIZE) or more in the 1-port RAM 3, and the count for instructing the delay counter 14 to start delay counting is determined. A start instruction signal is output.

ディレイカウンタ14は、書き込み許可フラグ生成回路15からのカウント開始指示信号によって、ディレイカウントを開始する。ディレイカウンタ14のカウントする書き込み遅延カウント数(WDELAY)は、予め書き込み許可フラグ生成回路15から指示されている。   The delay counter 14 starts a delay count in response to a count start instruction signal from the write permission flag generation circuit 15. The write delay count number (WDELAY) counted by the delay counter 14 is instructed from the write permission flag generation circuit 15 in advance.

書き込み許可フラグ生成回路15は、ディレイカウンタ14によって書き込み遅延カウント数(WDELAY)(図7に示すカウント数C)をカウントすると、書き込み許可フラグをハイレベルに設定して、1ポートRAM3へのデータの書き込みを許可する。   When the write permission flag generation circuit 15 counts the write delay count number (WDELAY) (count number C shown in FIG. 7) by the delay counter 14, the write permission flag is set to a high level and the data to the 1-port RAM 3 is transferred. Allow writing.

書き込み許可フラグがハイレベルに遷移することで、基準クロック(WCLK)に同期して生成された書き込み信号(WE)の入力に合わせてデータ(Data)をRAMコントローラ2に入力する。RAMコントローラ2は、入力したデータ(Data)を順次1ポートRAM3に書き込む。   When the write permission flag transitions to the high level, data (Data) is input to the RAM controller 2 in accordance with the input of the write signal (WE) generated in synchronization with the reference clock (WCLK). The RAM controller 2 sequentially writes the input data (Data) to the 1-port RAM 3.

このように本実施例は、1ポートRAM3に所定数(WSIZE)以上のデータを書き込める余地があると判定すると、所定時間(WDELAY)経過後に1ポートRAM3へのデータ書き込みを許可している。所定時間を経過してからデータの書き込みを許可するので、確実に所定数のデータを書き込むことができる。   As described above, in this embodiment, when it is determined that there is room for writing a predetermined number (WSIZE) or more of data in the 1-port RAM 3, data writing to the 1-port RAM 3 is permitted after a predetermined time (WDELAY) has elapsed. Since data writing is permitted after a predetermined time has elapsed, a predetermined number of data can be reliably written.

なお、本実施例も変形例として図8に示すようなFIFO(First In First Out)メモリ4、5、6を複数多段接続した構成のデータ入出力装置にも適用することができる。また図示しないが、シングルポートRAM3と、多段構成のFIFOとから構成されるメモリ部であっても本発明を適用することができる。また、この1ポートRAM3やFIFOメモリ4、5、6は、データの入力と出力とを同期して行う同期式のものであってもよいし、データの入力と出力とを非同期で行う非同期式のものであってもよい。   This embodiment can also be applied to a data input / output device having a configuration in which a plurality of FIFO (First In First Out) memories 4, 5, and 6 are connected in multiple stages as shown in FIG. Although not shown, the present invention can also be applied to a memory unit including a single port RAM 3 and a multistage FIFO. The 1-port RAM 3 and the FIFO memories 4, 5, and 6 may be of a synchronous type in which data input and output are performed synchronously, or asynchronously in which data input and output are performed asynchronously. It may be.

またディレイカウンタ14の書き込み遅延カウント数(WDELAY)は、図1に示す1ポートRAM3を用いた構成では、この1ポートRAM3で生じるデータの読み出しまでにかかる遅延時間を考慮して設定される。また、図8に示すFIFOメモリ4、5、6を多段接続した構成のメモリ部の場合には、多段接続したFIFOメモリの段数に応じて設定することができる。もちろん、1ポートRAM3と多段構成のFIFOメモリ4、5、6とからなるメモリ部であった場合には、1ポートRAM3で生じるデータ読み出しまでにかかる遅延時間と、多段接続したFIFOメモリの段数に応じて設定することができる。   In the configuration using the 1-port RAM 3 shown in FIG. 1, the write delay count number (WDELAY) of the delay counter 14 is set in consideration of the delay time taken until the data is read in the 1-port RAM 3. Further, in the case of a memory unit having a configuration in which the FIFO memories 4, 5, and 6 shown in FIG. 8 are connected in multiple stages, the setting can be made according to the number of FIFO memories connected in multiple stages. Of course, in the case of a memory unit composed of 1-port RAM 3 and multi-stage FIFO memories 4, 5 and 6, the delay time required for data reading that occurs in 1-port RAM 3 and the number of stages of FIFO memories connected in multi-stages It can be set accordingly.

また、本実施例では、ディレイカウンタ14の書き込み遅延カウント数(WDELAY)と、1ポートRAM3に連続して書き込まれるデータ数(WSIZE)とは、外部より任意に設定可能である。ソフトウェアにより書き込み遅延カウント数(WDELAY)とデータ数(WSIZE)とを図示しないレジスタに書き込み、レジスタの値を上位装置で書き込みタイミング制御部10に通知する。   In this embodiment, the write delay count number (WDELAY) of the delay counter 14 and the data number (WSIZE) continuously written in the 1-port RAM 3 can be arbitrarily set from the outside. The software writes the write delay count number (WDELAY) and the data number (WSIZE) to a register (not shown), and notifies the write timing control unit 10 of the register value in the host device.

本実施例は、最後の書き込みデータが所定数に満たない端数データであっても、1ポートRAM3から確実に読み出すことができる構成を提供する。本実施例は、図9及び図10に示すように書き込み側からの最後の書き込みデータであることを示すエンド信号(WEND)を読み出しタイミング制御部20の読み出し許可フラグ生成回路25に入力する。図11のタイミングチャートに示すように読み出し許可フラグ生成回路25は、エンド信号(WEND)が入力されると、例え1ポートRAM3に書き込まれているデータ数が所定数に満たなくても強制的にカウント開始指示信号をディレイカウンタ24に出力する。ディレイカウンタ24で読み出し遅延カウント数(RDELAY)をカウントすると、読み出しタイミング制御部20は読み出し許可フラグをハイレベルに設定する。   This embodiment provides a configuration that can reliably read from the 1-port RAM 3 even if the last write data is fractional data less than a predetermined number. In this embodiment, as shown in FIGS. 9 and 10, an end signal (WEND) indicating the last write data from the write side is input to the read permission flag generation circuit 25 of the read timing control unit 20. As shown in the timing chart of FIG. 11, when the end signal (WEND) is input, the read permission flag generation circuit 25 forcibly forces even if the number of data written in the 1-port RAM 3 is less than a predetermined number. A count start instruction signal is output to the delay counter 24. When the delay counter 24 counts the read delay count (RDELAY), the read timing control unit 20 sets the read permission flag to a high level.

読み出し許可フラグがハイレベルに遷移することで、読み出し信号(RE)の入力に合わせてデータ(Data)が1ポートRAM3からRAMコントローラ2に出力される。   As the read permission flag transits to a high level, data (Data) is output from the 1-port RAM 3 to the RAM controller 2 in accordance with the input of the read signal (RE).

このようにして本実施例では、データが所定数に満たない端数データであっても、1ポートRAM3から確実に読み出すことができる。   In this way, in this embodiment, even if the data is fractional data less than the predetermined number, it can be reliably read from the 1-port RAM 3.

本実施例も、上述した実施例3のように最後の書き込みデータが所定数に満たない端数データであっても、1ポートRAM3から確実に読み出すことができる構成を提供する。本実施例では、図12に示すように、書き込み側から最後の書き込みデータであることを示すエンド信号(WEND)が入力されると、読み出しタイミング制御部20は、このエンド信号を所定時間遅延させて出力側に出力する。ここでは、エンド信号を所定時間遅延させた信号を第2エンド信号(WEND2とも表記する)と表記する。   The present embodiment also provides a configuration that can reliably read from the 1-port RAM 3 even if the last write data is fractional data that is less than a predetermined number as in the third embodiment. In this embodiment, as shown in FIG. 12, when an end signal (WEND) indicating the last write data is input from the write side, the read timing control unit 20 delays the end signal for a predetermined time. Output to the output side. Here, a signal obtained by delaying the end signal by a predetermined time is referred to as a second end signal (also referred to as WEND2).

図13に本実施例の構成を示す。本実施例は、図13に示すように書き込み側からのエンド信号(WEND)を入力する書き込みエンドフラグ生成部26と、遅延時間をカウントする第2ディレイカウンタ27とを新たに設けている。書き込みエンドフラグ生成部26には、図13に示すように読み出し遅延カウント数(RDELAY)と、エンド信号(WEND)とが入力される。書き込みエンドフラグ生成部26は、エンド信号(WEND)の信号レベルが遷移(ハイレベルに遷移する)すると、この第2ディレイカウンタ27にカウント動作を開始させる。第2ディレイカウンタ27により読み出し遅延カウント数(RDELAY)をカウントすると、書き込みエンドフラグ生成部26は、第2エンド信号(WEND2)を出力側に出力する。第2エンド信号(WEND2)が出力された時点で、強制的に読み出し動作を実行する。   FIG. 13 shows the configuration of this embodiment. In this embodiment, as shown in FIG. 13, a write end flag generation unit 26 for inputting an end signal (WEND) from the write side and a second delay counter 27 for counting a delay time are newly provided. As shown in FIG. 13, the write end flag generator 26 receives a read delay count (RDELAY) and an end signal (WEND). The write end flag generator 26 causes the second delay counter 27 to start a count operation when the signal level of the end signal (WEND) transitions (transitions to a high level). When the read delay count number (RDELAY) is counted by the second delay counter 27, the write end flag generator 26 outputs the second end signal (WEND2) to the output side. When the second end signal (WEND2) is output, the read operation is forcibly executed.

このようにして本実施例でも、データが所定数に満たない端数データであっても、1ポートRAM3から確実に読み出すことができる。   As described above, even in this embodiment, even if the data is fractional data less than the predetermined number, it can be reliably read from the 1-port RAM 3.

上述した実施例1から実施例4のデータ入出力装置は、例えば、図14に示すように画像形成装置の画像入力ユニット30のラインバッファ31や、画像出力ユニット33のFIFOメモリ34へのデータの入出力制御に用いられる。例えば、メモリ35に記録した画像データを画像伸張処理部32で伸張処理し、処理後の信号をバスを介して画像出力ユニット33のデータ入出力装置に入力して、FIFOメモリ34へのデータの書き込みと読み出しとを行う。   In the data input / output devices of the first to fourth embodiments described above, for example, as shown in FIG. 14, the data input to the line buffer 31 of the image input unit 30 of the image forming apparatus and the FIFO memory 34 of the image output unit 33 are performed. Used for input / output control. For example, the image data recorded in the memory 35 is decompressed by the image decompression processing unit 32, and the processed signal is input to the data input / output device of the image output unit 33 via the bus and the data to the FIFO memory 34 is input. Write and read.

なお、上述した実施例は本発明の好適な実施例である。但し、これに限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変形実施可能である。例えば、上述した実施例では、書き込み信号(WE)と読み出し信号(RE)とを同一の基準クロック(WCLK)から生成しているため、同じ周波数の信号となっているが、書き込み信号(WE)と読み出し信号(RE)とを異なる周波数の信号としてもよい。この場合、書き込み信号(WE)と読み出し信号(RE)との信号周波数に基づいて、書き込み遅延カウント数(WDELAY)と読み出し遅延カウント数(RDELAY)とを決定する。   The above-described embodiment is a preferred embodiment of the present invention. However, the present invention is not limited to this, and various modifications can be made without departing from the scope of the present invention. For example, in the above-described embodiment, the write signal (WE) and the read signal (RE) are generated from the same reference clock (WCLK), and thus the signals have the same frequency, but the write signal (WE) And the read signal (RE) may be signals having different frequencies. In this case, the write delay count number (WDELAY) and the read delay count number (RDELAY) are determined based on the signal frequencies of the write signal (WE) and the read signal (RE).

実施例1のデータ入出力装置のリード側の構成を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration of a read side of the data input / output device according to the first exemplary embodiment. 実施例1の読み出しタイミング制御部20の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a read timing control unit 20 according to the first embodiment. FIG. 実施例1のデータ読み出しのタイミングを示す信号出力タイミング図である。FIG. 3 is a signal output timing diagram illustrating data read timing according to the first exemplary embodiment. データ入出力装置のリード側の他の構成を示すブロック図である。It is a block diagram which shows the other structure of the read side of a data input / output device. 実施例2のデータ入出力装置のライト側の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration on a write side of a data input / output device according to a second embodiment. 実施例2の書き込みタイミング制御部10の構成を示すブロック図である。FIG. 6 is a block diagram illustrating a configuration of a write timing control unit 10 according to a second embodiment. 実施例2のデータ書き込みのタイミングを示す信号出力タイミング図である。FIG. 10 is a signal output timing diagram illustrating data write timing according to the second exemplary embodiment. データ入出力装置のライト側の他の構成を示すブロック図である。It is a block diagram which shows the other structure of the write side of a data input / output device. 実施例3のデータ入出力装置のリード側の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a read side of a data input / output device according to a third embodiment. 実施例3の読み出しタイミング制御部20の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a read timing control unit 20 according to a third embodiment. 実施例3のデータ読み出しのタイミングを示す信号出力タイミング図である。FIG. 10 is a signal output timing diagram illustrating data read timing according to the third embodiment. 実施例4のデータ入出力装置のリード側の他の構成を示すブロック図である。FIG. 10 is a block diagram illustrating another configuration of the read side of the data input / output device of the fourth embodiment. 実施例4の読み出しタイミング制御部20の他の構成を示すブロック図である。FIG. 10 is a block diagram illustrating another configuration of the read timing control unit 20 according to the fourth embodiment. データ入出力装置を搭載した画像形成装置を示す図である。1 is a diagram illustrating an image forming apparatus equipped with a data input / output device.

符号の説明Explanation of symbols

1 データ入出力装置 2 RAMコントローラ
3 1ポートRAM 4、5、6 FIFO
10 書き込みタイミング制御部 11、21 ライトカウンタ
12、22 比較回路 13、23 リードカウンタ
14、24 ディレイカウンタ 15 書き込み許可フラグ生成回路
20 読み出しタイミング制御部
25 読み出し許可フラグ生成回路
26 書き込みエンドフラグ生成部 27 第2ディレイカウンタ
1 Data Input / Output Device 2 RAM Controller 3 1 Port RAM 4, 5, 6 FIFO
DESCRIPTION OF SYMBOLS 10 Write timing control part 11, 21 Write counter 12, 22 Comparison circuit 13, 23 Read counter 14, 24 Delay counter 15 Write permission flag generation circuit 20 Read timing control part
25 read permission flag generation circuit 26 write end flag generation unit 27 second delay counter

Claims (6)

多段のFIFOメモリを備え、入力したデータを初段のFIFOメモリから後段のFIFOメモリへと順次記録し、最終段のFIFOメモリからデータを読み出して出力するデータ入出力装置であって、
前記多段のFIFOメモリに入力するデータ数をカウントする入力データ数カウント手段と、
前記多段のFIFOメモリから出力するデータ数をカウントする出力データ数カウント手段と、
前記入力データ数カウント手段と前記出力データ数カウント手段とのカウント数に基づいて、前記多段のFIFOメモリに所定数以上のデータが記録されているか否かを判定する第1判定手段と、
前記第1判定手段の判定結果が、前記多段FIFOメモリに所定数以上のデータが記録されていないとの判定結果から、前記所定数以上のデータが記録されているとの判定結果に変更された場合に、前記第1判定手段から送られるカウント開始の指示に基づき、前記多段のFIFOメモリの段数に応じた遅延カウント数をカウントする第1遅延手段と、
前記第1判定手段の判定結果が、前記多段のFIFOメモリに所定数以上のデータが記録されていないとの判定結果から、前記所定数以上のデータが記録されているとの判定結果に変更され前記第1遅延手段前記遅延カウント数をカウントした後に、前記多段のFIFOメモリからのデータ読み出しを許可する読み出し許可手段とを備え
前記多段のFIFOメモリからデータの連続読み出しを実行することを特徴とするデータ入出力装置。
A data input / output device comprising a multi-stage FIFO memory, sequentially recording input data from a first-stage FIFO memory to a subsequent-stage FIFO memory, and reading and outputting data from the last-stage FIFO memory,
Input data number counting means for counting the number of data input to the multi-stage FIFO memory;
Output data number counting means for counting the number of data output from the multi-stage FIFO memory;
First determination means for determining whether or not a predetermined number or more of data is recorded in the multi-stage FIFO memory based on the count numbers of the input data number counting means and the output data number counting means;
The determination result of the first determination means is changed from a determination result that a predetermined number or more data is not recorded in the multistage FIFO memory to a determination result that the predetermined number or more data is recorded . A first delay unit that counts a delay count according to the number of stages of the multi-stage FIFO memory based on a count start instruction sent from the first determination unit .
The determination result of the first determination means is changed from a determination result that a predetermined number of data is not recorded in the multi-stage FIFO memory to a determination result that the predetermined number of data is recorded. , after the first delay means has counted the number of the delay count, a read permission means for permitting the reading of data from the multi-stage FIFO memory,
A data input / output device for continuously reading data from the multi-stage FIFO memory .
前記読み出し許可手段は、前記多段のFIFOメモリに入力するデータの終了を示すデータエンド信号を入力した場合に、前記第1判定手段の判定結果が、前記多段のFIFOメモリに所定数以上のデータが記録されていないとの判定結果であっても、前記第1遅延手段に前記遅延カウント数をカウントさせ、前記第1遅延手段が前記遅延カウント数をカウントすると、前記多段のFIFOメモリからのデータ読み出しを許可することを特徴とする請求項1記載のデータ入出力装置。 When the read permission unit inputs a data end signal indicating the end of data to be input to the multi-stage FIFO memory , the determination result of the first determination unit indicates that a predetermined number or more of data is stored in the multi-stage FIFO memory. even recorded have such yarn determination result, the first is counting the number of delay count delay means, wherein the first delay means for counting the number of the delay count, the data read out from said multi-stage FIFO memory 2. The data input / output device according to claim 1, wherein the data input / output device is permitted. 前記入力データ数カウント手段と前記出力データ数カウント手段とのカウント数に基づいて、前記多段のFIFOメモリに所定数以上のデータの記録が可能であるか否かを判定する第2判定手段と、
前記多段のFIFOメモリの段数に応じた遅延カウント数をカウントする第2遅延手段と、
前記第2判定手段の判定結果が、前記多段のFIFOメモリに前記所定数以上のデータの記録が不可能との判定結果から、前記所定数以上のデータの記録が可能との判定結果に変更されると、前記第2遅延手段に前記遅延カウント数をカウントさせ、前記遅延カウント数のカウント後に前記多段のFIFOメモリへのデータの記録を許可する記録許可手段と、
を有することを特徴とする請求項1又は2記載のデータ入出力装置。
Second determination means for determining whether a predetermined number or more of data can be recorded in the multi-stage FIFO memory based on the count numbers of the input data number counting means and the output data number counting means;
Second delay means for counting a delay count according to the number of stages of the multi-stage FIFO memory;
The determination result of the second determination means is changed from the determination result that the predetermined number of data or more cannot be recorded to the multistage FIFO memory to the determination result that the predetermined number or more of data can be recorded. Then, recording permitting means for allowing the second delay means to count the delay count number, and permitting data recording to the multi-stage FIFO memory after counting the delay count number;
The data input / output device according to claim 1 or 2, characterized by comprising:
前記多段のFIFOメモリは、同期型のFIFOメモリであることを特徴とする請求項1から3のいずれか一項記載のデータ入出力装置。   4. The data input / output device according to claim 1, wherein the multi-stage FIFO memory is a synchronous FIFO memory. 5. 前記多段のFIFOメモリは、非同期型のFIFOメモリであることを特徴とする請求項1から3のいずれか一項記載のデータ入出力装置。   4. The data input / output device according to claim 1, wherein the multi-stage FIFO memory is an asynchronous FIFO memory. 5. 多段のFIFOメモリを備え、入力したデータを初段のFIFOメモリから後段のFIFOメモリへと順次記録し、最終段のFIFOメモリからデータを読み出して出力するデータ入出力装置のデータ入出力方法であって、
前記多段のFIFOメモリに入力するデータ数をカウントするステップと、
前記多段のFIFOメモリから出力するデータ数をカウントするステップと、
前記多段のFIFOメモリに入出力されるデータのカウント数に基づいて、前記多段のFIFOメモリに所定数以上のデータが記録されているか否かを判定するステップと、
前記判定の結果が、前記多段のFIFOメモリに所定数以上のデータが記録されていないとの判定から、前記所定数以上のデータが記録されているとの判定に変更されると、前記多段のFIFOメモリの段数に応じた遅延カウント数をカウントするステップと、
前記遅延カウント数のカウント後に、前記多段のFIFOメモリからのデータ読み出しを許可するステップとを有し、前記多段のFIFOメモリからデータの連続読み出しを実行することを特徴とするデータ入出力方法。
A data input / output method for a data input / output device comprising a multi-stage FIFO memory, sequentially recording input data from a first-stage FIFO memory to a subsequent-stage FIFO memory, and reading and outputting data from the last-stage FIFO memory. ,
Counting the number of data input to the multi-stage FIFO memory;
Counting the number of data output from the multi-stage FIFO memory;
Determining whether or not a predetermined number or more of data is recorded in the multi-stage FIFO memory based on a count number of data input to and output from the multi-stage FIFO memory;
When the result of the determination is changed from determination that a predetermined number of data or more is not recorded in the multistage FIFO memory to determination that the predetermined number or more of data is recorded, the multistage FIFO Counting a delay count according to the number of stages of the FIFO memory;
And a step of permitting data reading from the multi-stage FIFO memory after counting the delay count number, and continuously reading data from the multi-stage FIFO memory .
JP2004138314A 2004-05-07 2004-05-07 Data input / output device and data input / output method Expired - Fee Related JP4569163B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004138314A JP4569163B2 (en) 2004-05-07 2004-05-07 Data input / output device and data input / output method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004138314A JP4569163B2 (en) 2004-05-07 2004-05-07 Data input / output device and data input / output method

Publications (2)

Publication Number Publication Date
JP2005321933A JP2005321933A (en) 2005-11-17
JP4569163B2 true JP4569163B2 (en) 2010-10-27

Family

ID=35469190

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004138314A Expired - Fee Related JP4569163B2 (en) 2004-05-07 2004-05-07 Data input / output device and data input / output method

Country Status (1)

Country Link
JP (1) JP4569163B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4715645B2 (en) * 2006-06-19 2011-07-06 沖電気工業株式会社 Buffer memory
JP6337730B2 (en) * 2014-10-03 2018-06-06 株式会社デンソー Memory device
JP7175730B2 (en) * 2018-12-05 2022-11-21 株式会社ソニー・インタラクティブエンタテインメント Signal processing device, electronic device, sensor device, signal processing method and program
KR102325428B1 (en) * 2019-12-09 2021-11-12 한국전자기술연구원 I/o port emulating system and method using virtual hardware

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5647981A (en) * 1979-09-25 1981-04-30 Nec Corp Operation control system of buffer memory
JPS6293728A (en) * 1985-10-18 1987-04-30 Fujitsu Ltd Fifo memory system
JPS62282352A (en) * 1986-05-30 1987-12-08 Pfu Ltd Bus access controller
JPH06259225A (en) * 1993-01-11 1994-09-16 Hewlett Packard Co <Hp> Synchronizer of data transfer
JPH08314851A (en) * 1995-05-23 1996-11-29 Fujitsu Ltd Data processing system
JP2001134421A (en) * 1999-11-05 2001-05-18 Ricoh Co Ltd Fifo storage device
JP2001184301A (en) * 1999-12-27 2001-07-06 Seiko Instruments Inc Method and device for transferring image data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6446829A (en) * 1987-08-18 1989-02-21 Toshiba Corp First-in/first-out memory

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5647981A (en) * 1979-09-25 1981-04-30 Nec Corp Operation control system of buffer memory
JPS6293728A (en) * 1985-10-18 1987-04-30 Fujitsu Ltd Fifo memory system
JPS62282352A (en) * 1986-05-30 1987-12-08 Pfu Ltd Bus access controller
JPH06259225A (en) * 1993-01-11 1994-09-16 Hewlett Packard Co <Hp> Synchronizer of data transfer
JPH08314851A (en) * 1995-05-23 1996-11-29 Fujitsu Ltd Data processing system
JP2001134421A (en) * 1999-11-05 2001-05-18 Ricoh Co Ltd Fifo storage device
JP2001184301A (en) * 1999-12-27 2001-07-06 Seiko Instruments Inc Method and device for transferring image data

Also Published As

Publication number Publication date
JP2005321933A (en) 2005-11-17

Similar Documents

Publication Publication Date Title
JP4936506B2 (en) Memory control circuit and memory control method
JP4998519B2 (en) Asynchronous interface circuit and asynchronous data transfer method
JP3645584B2 (en) Data transfer synchronization device
JP2010027032A (en) Fifo device and method of storing data in fifo buffer
JP2004062630A (en) Fifo memory and semiconductor device
JP4569163B2 (en) Data input / output device and data input / output method
JP4019757B2 (en) Storage device
JP4850504B2 (en) Signal processing apparatus, imaging apparatus, and data transfer method
EP2133797B1 (en) Dma transfer device and method
JP4821628B2 (en) Packet buffer FIFO memory device
JP2008165485A (en) Semiconductor device and buffer control circuit
US6625711B1 (en) Method and/or architecture for implementing queue expansion in multiqueue devices
JP4696003B2 (en) Data transfer circuit
JP3592169B2 (en) Asynchronous data transfer control device and asynchronous data transfer control method
JP4517741B2 (en) Storage device
JP2973941B2 (en) Asynchronous FIFO buffer device
US20020004881A1 (en) Data transfer apparatus and data transfer method
JP4355383B2 (en) Data accumulation monitoring device
JP2005250683A (en) Microcomputer
JP4478592B2 (en) Memory circuit
JP2944549B2 (en) Cell processing circuit
JP2006172395A (en) Data transfer controller and data transfer control system
JP3935152B2 (en) Buffer memory device
JP2010020815A (en) Fifo access circuit
JP3856016B2 (en) Signal processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070419

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090710

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090728

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090925

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100409

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100713

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100726

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130820

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4569163

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees