JP2010020815A - Fifo access circuit - Google Patents

Fifo access circuit Download PDF

Info

Publication number
JP2010020815A
JP2010020815A JP2008177915A JP2008177915A JP2010020815A JP 2010020815 A JP2010020815 A JP 2010020815A JP 2008177915 A JP2008177915 A JP 2008177915A JP 2008177915 A JP2008177915 A JP 2008177915A JP 2010020815 A JP2010020815 A JP 2010020815A
Authority
JP
Japan
Prior art keywords
data
fifo
write
read
bus width
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
JP2008177915A
Other languages
Japanese (ja)
Inventor
Masayuki Matsuyama
将之 松山
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2008177915A priority Critical patent/JP2010020815A/en
Publication of JP2010020815A publication Critical patent/JP2010020815A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To accurately read effective data in FIFO without depending on a data processing unit when only fragmentary quantity in which effective data storage quantity is less than an output bus width is present in the FIFO by a data processing unit, in the FIFO of input bus width narrower than output bus width. <P>SOLUTION: Data can be read by providing a dummy data write means for the FIFO and by filling data of the portion not filling the output bus width with dummy data. Also it can be recognized that what bit the actually effective data is out of output data from the number of times of writing of dummy data. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、FIFO内に格納されている有効データ量に応じてアクセスを制御するFIFOアクセス回路に関するものである。   The present invention relates to a FIFO access circuit that controls access according to the amount of valid data stored in a FIFO.

FIFOは様々なデータ処理回路においてバッファとして用いられている。   The FIFO is used as a buffer in various data processing circuits.

図1に一般的なFIFOを含む回路ブロック図を示して、FIFO回路の動作について簡単に説明する。   FIG. 1 is a circuit block diagram including a general FIFO, and the operation of the FIFO circuit will be briefly described.

102の書き込み制御回路と103読み出し制御回路の間でデータ送信を行う際にFIFOを使用している。101はデータ送信全体の制御を行うためのMPU、104はFIFO内のメモリアレイ105への書き込み及び読み出し動作の制御を行うためのFIFOアクセス制御回路、151は入力データ、152は出力データである。   A FIFO is used when data is transmitted between the 102 write control circuit and the 103 read control circuit. 101 is an MPU for controlling the entire data transmission, 104 is a FIFO access control circuit for controlling writing and reading operations to the memory array 105 in the FIFO, 151 is input data, and 152 is output data.

図2に書き込み制御回路102の動作フローを示す。   FIG. 2 shows an operation flow of the write control circuit 102.

書き込み制御回路102はMPU101から書き込み要求信号111のアサートにて書き込み要求を受ける(S201)と、入力データ151をFIFOに書き込むための制御を開始する。書き込み要求を受けた書き込み制御回路102はFIFOアクセス制御回路104からのフル信号115によりFIFOに空きがあるか否かを確認する(S202)。FIFOに空きが無い場合はフル信号115の確認を繰り返し、読み出し動作によりFIFOに空きができるのを待つ(S203)。FIFOに空きがある場合は入力データ151をFIFO書き込みデータ113として出力し、同時にFIFO書き込みトリガ114を出力する(S204)。また同時に書き込み完了トリガ122をMPU101に対して出力する(S205)。MPU101は書き込み完了トリガ122を受けて書き込み要求信号111をネゲートすることで書き込み処理は完了する(S206)。   When the write control circuit 102 receives a write request by asserting the write request signal 111 from the MPU 101 (S201), it starts control for writing the input data 151 to the FIFO. The write control circuit 102 that has received the write request checks whether or not there is an empty FIFO by the full signal 115 from the FIFO access control circuit 104 (S202). If there is no available space in the FIFO, the confirmation of the full signal 115 is repeated, and it is waited for the FIFO to be freed by the read operation (S203). If there is an empty FIFO, the input data 151 is output as the FIFO write data 113, and the FIFO write trigger 114 is output at the same time (S204). At the same time, the write completion trigger 122 is output to the MPU 101 (S205). The MPU 101 receives the write completion trigger 122 and negates the write request signal 111 to complete the write process (S206).

図3に読み出し制御回路103の動作フローを示す。   FIG. 3 shows an operation flow of the read control circuit 103.

読み出し制御回路103はMPU101から読み出し要求信号112のアサートにて読み出し要求を受ける(S301)と、FIFOからデータを取り出し出力データ152として出力するための制御を開始する。読み出し要求を受けた読み出し制御回路103はFIFOアクセス制御回路104からのエンプティ信号118によりFIFOに有効データが格納されているか否かを確認する(S302)。FIFOに有効データが格納されていない場合はエンプティ信号118の確認を繰り返し、書き込み動作により有効データが格納されるのを待つ(S303)。FIFOに有効データが格納されている場合はFIFO読み出しトリガ117を出力する(S304)。FIFO読み出しトリガを受けたFIFOアクセス制御回路104は有効データをFIFO読み出しデータ116として出力し、このデータを読み出し制御回路103は出力データ152としてラッチする(S305)。また同時に読み出し完了トリガ123をMPU101に対して出力する(S306)。MPU101は読み出し完了トリガ123を受けて読み出し要求信号112をネゲートすることで読み出し処理は完了する(S307)。   When the read control circuit 103 receives a read request from the MPU 101 by asserting the read request signal 112 (S301), the read control circuit 103 starts control for extracting data from the FIFO and outputting it as output data 152. In response to the read request, the read control circuit 103 checks whether valid data is stored in the FIFO by the empty signal 118 from the FIFO access control circuit 104 (S302). If valid data is not stored in the FIFO, the empty signal 118 is repeatedly checked to wait for valid data to be stored by a write operation (S303). If valid data is stored in the FIFO, the FIFO read trigger 117 is output (S304). In response to the FIFO read trigger, the FIFO access control circuit 104 outputs valid data as FIFO read data 116, and the read control circuit 103 latches this data as output data 152 (S305). At the same time, a read completion trigger 123 is output to the MPU 101 (S306). The MPU 101 receives the read completion trigger 123 and negates the read request signal 112 to complete the read process (S307).

FIFOアクセス制御回路104内部には書き込み/読み出し対象となるメモリアドレスを管理しておりアドレスデータをデコードした結果を書き込みメモリ選択信号120及び読み出しメモリ選択信号121として出力する。また書き込みアドレスと読み出しアドレスを比較することでFIFO内の有効データ量を検出し、FIFO内に空きメモリが無い場合はフル信号115を、有効データが無い場合はエンプティ信号118をアサートする。   The FIFO access control circuit 104 manages memory addresses to be written / read, and outputs the result of decoding the address data as a write memory selection signal 120 and a read memory selection signal 121. Further, the effective data amount in the FIFO is detected by comparing the write address and the read address, and the full signal 115 is asserted when there is no empty memory in the FIFO, and the empty signal 118 is asserted when there is no valid data.

しかし上記の構成ではMPU101からFIFO内の有効データ格納量を確認することができず、効率的なデータ送信を行えないという問題があり、このような問題に対して、特許文献1〜特許文献4などにより、FIFO内の有効データ格納量を検出するための方法が提案されている。   However, in the above configuration, there is a problem that the effective data storage amount in the FIFO cannot be confirmed from the MPU 101, and efficient data transmission cannot be performed. Thus, a method for detecting the effective data storage amount in the FIFO has been proposed.

例えば特許文献1においては、ライトアドレスとリードアドレスの差をMPUに出力することで有効データ量を検出することを提案している。   For example, Patent Document 1 proposes detecting the effective data amount by outputting the difference between the write address and the read address to the MPU.

また特許文献2においては、ライトアドレスとリードアドレスの差からアクセス調停する回路を追加することでアクセス効率をあげることを提案している。   Patent Document 2 proposes to increase access efficiency by adding a circuit that performs access arbitration based on the difference between a write address and a read address.

また特許文献3においては、メモリアレイ内のメモリそれぞれに有効データが格納されているか否かを示すレジスタを追加することを提案している。   Patent Document 3 proposes adding a register indicating whether or not valid data is stored in each memory in the memory array.

また特許文献4においては、メモリアレイ内のメモリに書き込み時間データを追加することを提案している。
特開平5-189955号公報 特開2003-263883号公報 特開平5-51931号公報 特開平2-183487号公報
Patent Document 4 proposes to add write time data to the memory in the memory array.
JP 5-189955 A Japanese Patent Laid-Open No. 2003-263883 JP-A-5-51931 JP-A-2-183487

特許文献1に提案されている方法にてFIFO内の有効データ格納量を検出することは可能である。しかしこれは入力データと出力データのバス幅が同じ場合においては有効であるが、入出力のバス幅が異なるFIFOにおいてはこの制御をこのまま行うことができない。   It is possible to detect the effective data storage amount in the FIFO by the method proposed in Patent Document 1. However, this is effective when the bus widths of the input data and the output data are the same, but this control cannot be performed as it is in the FIFOs having different input / output bus widths.

また上記入出力のバス幅が異なるFIFOにおいて、入力バス幅<出力バス幅となる場合は、有効データ格納量が出力バス幅に満たない半端な量しか存在しない場合に、データを読み出すことができない。   If the input / output bus width is smaller than the output bus width in FIFOs with different input / output bus widths, data cannot be read out if there is only a fractional amount of valid data storage that is less than the output bus width. .

例えば入力データバス幅が8bit、出力データバス幅が64bitである場合において、出力データを1回の読み出しに対して入力データは8回の書き込みが必要となる。データ処理単位によっては入力データの書き込み回数が8回単位で行われるとは限らず、このような場合には、出力データ64bit中に1回目のデータ処理における最終データと2回目のデータ処理における開始データとが混在することになる。   For example, when the input data bus width is 8 bits and the output data bus width is 64 bits, it is necessary to write the input data eight times for one read of the output data. Depending on the data processing unit, the number of times of writing input data is not always performed in units of 8. In such a case, the final data in the first data processing and the start in the second data processing in the 64 bits of output data Data will be mixed.

そこで本発明のFIFO制御方法はMPUから直接ダミーデータをフル信号がアサートされるまで書き込みを行う回路を追加することで、有効データの格納量を正確に検出し、同時にデータ処理単位にあわせたFIFOアクセス制御方法を提案するものである。   Therefore, the FIFO control method of the present invention adds a circuit that writes dummy data directly from the MPU until the full signal is asserted, thereby accurately detecting the storage amount of valid data, and at the same time, FIFO that matches the data processing unit. An access control method is proposed.

ダミーデータの書き込み回数から有効データの格納量を知ることができ、また同時に入力バス幅<出力バス幅となる場合に、有効データ格納量が出力バス幅に満たない半端な量しか存在しない場合においてもデータを読み出すことができる。   When the amount of valid data stored can be determined from the number of dummy data writes, and when the input bus width is smaller than the output bus width, and the effective data storage amount is less than the output bus width, Can also read data.

次に、本発明の詳細を実施例の記述に従って説明する。   Next, details of the present invention will be described in accordance with the description of the embodiments.

以下に図面を用いて、本発明のFIFO制御方法の一実施例を詳細に説明する。   Hereinafter, an embodiment of a FIFO control method according to the present invention will be described in detail with reference to the drawings.

図4に本発明のFIFOを含む回路ブロック図の一例を示す。   FIG. 4 shows an example of a circuit block diagram including the FIFO of the present invention.

図4において図1と異なる点は、MPUからの任意のMPU書き込みデータ172と入力データ151とを選択して書き込みデータ173として出力するための入力データ選択回路106を備えたことと、入力データ選択回路105においていずれのデータを選択するかを決定するデータ選択信号171をMPU101より出力することと、MPUにてフル信号115をモニタすることである。   4 differs from FIG. 1 in that it has an input data selection circuit 106 for selecting arbitrary MPU write data 172 and input data 151 from the MPU and outputting them as write data 173, and input data selection. The MPU 101 outputs a data selection signal 171 that determines which data is to be selected in the circuit 105, and the full signal 115 is monitored by the MPU.

図5にMPU101のFIFO書き込み時の動作フローを示す。   FIG. 5 shows the operation flow when writing to the FIFO of the MPU101.

まず通常のデータ書き込み時について説明する。MPU101は書き込みを行う(S501)にあたり、内部に備えたカウンタをクリアしMPU書き込みデータ172 を出力する(S502)。その後書き込み要求信号111をアサート(S503)し、書き込み動作を開始する。開始後は書き込み制御回路102より書き込み完了トリガ122が出力されるのを待つ(S504)。書き込み完了トリガ122を受けた時点で、現在の書き込みモードを確認(S505)し、通常書き込みモード時は後書き込み要求信号111をネゲート(S506)して書き込み動作を完了する。   First, normal data writing will be described. In writing (S501), the MPU 101 clears the counter provided therein and outputs MPU write data 172 (S502). Thereafter, the write request signal 111 is asserted (S503), and the write operation is started. After the start, it waits for the write completion trigger 122 to be output from the write control circuit 102 (S504). When the write completion trigger 122 is received, the current write mode is confirmed (S505). In the normal write mode, the post-write request signal 111 is negated (S506) to complete the write operation.

次にダミーデータ書き込み時について説明する。S505までは通常データ書き込みと同様のフローであるが、ダミーデータ書き込み時は内部に備えたカウンタ値を+1する (S507)。その後書き込み要求信号111をネゲート(S508)して一旦書き込み処理を完了するが、ここでフル信号115の値を確認してFIFOに空きがあるか否かを判断する(S509)。もしFIFOに空きがあればS503〜S508の動作を繰り返す。FIFOに空きが無くなればフル信号115がアサートされるため書き込み動作を完了する。   Next, dummy data writing will be described. Up to S505, the flow is the same as that for normal data writing. However, when dummy data is written, the counter value provided therein is incremented by 1 (S507). Thereafter, the write request signal 111 is negated (S508) and the write process is once completed. Here, the value of the full signal 115 is confirmed to determine whether or not there is an empty FIFO (S509). If there is an empty FIFO, the operations from S503 to S508 are repeated. When the FIFO is full, the full signal 115 is asserted and the write operation is completed.

上記構成において入力バス幅8bit、出力データバス幅が64bitである場合において、112bit分のデータ転送を行う場合のダミーデータ書き込み動作について説明する。   A dummy data write operation in the case of performing data transfer of 112 bits when the input bus width is 8 bits and the output data bus width is 64 bits in the above configuration will be described.

まずデータ転送開始時は通常データ書き込みモードにてデータ書き込みを行う。112bit中64bit分に関しては出力データバス幅の64bitに達しているため通常に読み出しを行うことができる。残りの48bit分に関してFIFOへの書き込みが終了した時点でMPU101は転送すべき全てのデータがFIFOに書き込み終えたことを検出し、ダミーデータ書き込みモードに切り替えてデータ書き込みを開始する。ダミーデータを2回書き終えたところでFIFO格納データ量は64bitとなり、フル信号115がアサートされるためダミーデータ書き込みを完了して、FIFO格納データ64bitの読み出しを行う。ここで内臓カウンタ値は2であるため読み出したデータのうち16bitがダミーデータであるとしてMPU101はその後の処理を行う。   First, when data transfer is started, data is written in the normal data write mode. For 64 bits out of 112 bits, the output data bus width has reached 64 bits, so it can be read normally. When the writing to the FIFO for the remaining 48 bits is completed, the MPU 101 detects that all the data to be transferred has been written to the FIFO, and switches to the dummy data writing mode to start data writing. When the dummy data is written twice, the FIFO stored data amount is 64 bits, and the full signal 115 is asserted, so the dummy data writing is completed and the FIFO stored data 64 bits are read. Here, since the built-in counter value is 2, the MPU 101 performs subsequent processing assuming that 16 bits of the read data are dummy data.

上記のような出力データバス幅で割り切れない量のデータ転送は例えば、画像処理を行う際に画像処理を行う画像サイズ単位とは別の画像サイズ単位で画像内のドット数を計算したデータ生成を行う場合に発生する。いずれの結果もシステムのバスを経由して外部のRAMに書き込む場合に、システムのバス幅は画像処理を行う画像サイズ単位によって決定されており、FIFO出力バス幅もこれにあわせる必要がある。しかしドット数の計算データはこれとは異なる画像サイズ単位によって計算されるため、FIFO入力バス幅は出力バス幅と異なることになる。また画像処理を行う画像によりデータ量が決定されるため、出力データバス幅で割り切れない量のデータ転送が発生する。   The amount of data transfer that cannot be divided by the output data bus width as described above is, for example, data generation in which the number of dots in an image is calculated in an image size unit different from the image size unit for performing image processing when performing image processing Occurs when doing. In either case, when writing to an external RAM via the system bus, the system bus width is determined by the image size unit for image processing, and the FIFO output bus width needs to be adjusted accordingly. However, since the calculation data of the number of dots is calculated in a different image size unit, the FIFO input bus width is different from the output bus width. In addition, since the amount of data is determined by the image to be processed, an amount of data transfer that cannot be divided by the output data bus width occurs.

一般的なFIFOを含む回路ブロック図。Circuit block diagram including general FIFO. 書き込み制御回路102の動作フロー。The operation flow of the write control circuit 102. 読み出し制御回路103の動作フロー。The operation flow of the read control circuit 103. 本発明のFIFOを含む回路ブロック図の一例。An example of the circuit block diagram containing the FIFO of this invention. 本発明のMPU101のFIFO書き込み時の動作フロー。The operation | movement flow at the time of FIFO writing of MPU101 of this invention.

符号の説明Explanation of symbols

101 MPU
102 書き込み制御回路
103 読み出し制御回路
104 FIFOアクセス制御回路
105 メモリアレイ
106 入力データ選択回路
111 書き込み要求信号
112 読み出し要求信号
113 FIFO書き込みデータ
114 FIFO書き込みトリガ
115 フル信号
116 FIFO読み出しデータ
117 FIFO読み出しトリガ
118 エンプティ信号
120 書き込みメモリ選択信号
121 読み出しメモリ選択信号
122 書き込み完了トリガ
123 読み出し完了トリガ
151 入力データ
152 出力データ
171 データ選択信号
172 MPU書き込みデータ
173 書き込みデータ
101 MPU
102 write control circuit 103 read control circuit 104 FIFO access control circuit 105 memory array 106 input data selection circuit 111 write request signal 112 read request signal 113 FIFO write data 114 FIFO write trigger 115 full signal 116 FIFO read data 117 FIFO read trigger 118 empty Signal 120 Write memory selection signal 121 Read memory selection signal 122 Write completion trigger 123 Read completion trigger 151 Input data 152 Output data 171 Data selection signal 172 MPU write data 173 Write data

Claims (4)

FIFOに対して任意の書き込みデータと、外部からの入力データを切り替えて出力するデータ切り替え手段と、
前記任意の書き込みデータを任意の回数書き込むための任意データ書き込み手段とを備えることを特徴とするFIFOアクセス回路。
Data switching means for switching and outputting arbitrary write data to FIFO and input data from outside,
An FIFO access circuit comprising: arbitrary data writing means for writing the arbitrary write data an arbitrary number of times.
請求項1に記載のFIFOアクセス回路において、前記任意の書き込みデータ書き込み回数はFIFOの空きがなくなるまでであることを特徴とするFIFOアクセス回路。   2. The FIFO access circuit according to claim 1, wherein the arbitrary number of write data is written until the FIFO becomes empty. 請求項2に記載のFIFOアクセス回路において、前記任意の書き込みデータ書き込み回数からFIFO内に格納されている外部からの入力データ量を検出することを特徴とするFIFOアクセス回路。   3. The FIFO access circuit according to claim 2, wherein the amount of externally input data stored in the FIFO is detected from the arbitrary write data write count. 請求項1〜請求項3のいずれかに記載のFIFOアクセス回路において、FIFOの入力と出力のデータバス幅が異なることを特徴とするFIFOアクセス回路。   4. The FIFO access circuit according to claim 1, wherein a data bus width of the input and output of the FIFO is different.
JP2008177915A 2008-07-08 2008-07-08 Fifo access circuit Pending JP2010020815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008177915A JP2010020815A (en) 2008-07-08 2008-07-08 Fifo access circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008177915A JP2010020815A (en) 2008-07-08 2008-07-08 Fifo access circuit

Publications (1)

Publication Number Publication Date
JP2010020815A true JP2010020815A (en) 2010-01-28

Family

ID=41705556

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008177915A Pending JP2010020815A (en) 2008-07-08 2008-07-08 Fifo access circuit

Country Status (1)

Country Link
JP (1) JP2010020815A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10671319B2 (en) 2017-11-03 2020-06-02 Samsung Electronics Co., Ltd. Memory device configured to store and output address in response to internal command

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10671319B2 (en) 2017-11-03 2020-06-02 Samsung Electronics Co., Ltd. Memory device configured to store and output address in response to internal command

Similar Documents

Publication Publication Date Title
JP4550439B2 (en) ECC controller
KR102393427B1 (en) Semiconductor device and semiconductor system
US8041856B2 (en) Skip based control logic for first in first out buffer
KR102398541B1 (en) Semiconductor device and semiconductor system
JP2010020815A (en) Fifo access circuit
JP4019757B2 (en) Storage device
JPWO2014167670A1 (en) Data transfer apparatus and data transfer method
JP4569163B2 (en) Data input / output device and data input / output method
US8462167B2 (en) Memory access control circuit and image processing system
JP4894218B2 (en) Semiconductor integrated circuit
JP2005301714A (en) Multi-cpu system, its data transfer method, and its program
KR100557561B1 (en) First in First out storage device
JP2007305021A (en) Semiconductor storage device and its reading method
JP6263048B2 (en) Semiconductor integrated circuit
JP2009278394A (en) Message transmitting circuit and semiconductor integrated circuit
JP2008310719A (en) Block transfer instruction execution device and block transfer method
JP2015014934A (en) Memory controller and memory control method
JP2007328647A (en) Data transfer method between cpus
JP2007241912A (en) Signal processing circuit
JP2007334600A (en) Semiconductor integrated circuit device
JP2010272029A (en) Access control circuit
JP2007219874A (en) Data transfer controller and data transfer control method
JP2007156720A (en) Microcomputer
JP2006221435A (en) Memory circuit
JP2006139666A (en) Conversion device and image formation device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100201

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20100630