JP2010020815A - Fifo access circuit - Google Patents
Fifo access circuit Download PDFInfo
- 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
Links
Images
Landscapes
- Information Transfer Systems (AREA)
Abstract
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
図2に書き込み制御回路102の動作フローを示す。
FIG. 2 shows an operation flow of the
書き込み制御回路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
図3に読み出し制御回路103の動作フローを示す。
FIG. 3 shows an operation flow of the
読み出し制御回路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
FIFOアクセス制御回路104内部には書き込み/読み出し対象となるメモリアドレスを管理しておりアドレスデータをデコードした結果を書き込みメモリ選択信号120及び読み出しメモリ選択信号121として出力する。また書き込みアドレスと読み出しアドレスを比較することでFIFO内の有効データ量を検出し、FIFO内に空きメモリが無い場合はフル信号115を、有効データが無い場合はエンプティ信号118をアサートする。
The FIFO
しかし上記の構成では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
例えば特許文献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においては、メモリアレイ内のメモリに書き込み時間データを追加することを提案している。
特許文献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
図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
次にダミーデータ書き込み時について説明する。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
上記構成において入力バス幅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
上記のような出力データバス幅で割り切れない量のデータ転送は例えば、画像処理を行う際に画像処理を行う画像サイズ単位とは別の画像サイズ単位で画像内のドット数を計算したデータ生成を行う場合に発生する。いずれの結果もシステムのバスを経由して外部の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.
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
Claims (4)
前記任意の書き込みデータを任意の回数書き込むための任意データ書き込み手段とを備えることを特徴とする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.
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)
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 |
-
2008
- 2008-07-08 JP JP2008177915A patent/JP2010020815A/en active Pending
Cited By (1)
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 |