JP2007272562A - Fifo memory - Google Patents
Fifo memory Download PDFInfo
- Publication number
- JP2007272562A JP2007272562A JP2006097356A JP2006097356A JP2007272562A JP 2007272562 A JP2007272562 A JP 2007272562A JP 2006097356 A JP2006097356 A JP 2006097356A JP 2006097356 A JP2006097356 A JP 2006097356A JP 2007272562 A JP2007272562 A JP 2007272562A
- Authority
- JP
- Japan
- Prior art keywords
- write
- pointer
- write pointer
- read
- clock signal
- 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
- 230000015654 memory Effects 0.000 title claims abstract description 30
- 230000009977 dual effect Effects 0.000 claims abstract description 28
- 230000005540 biological transmission Effects 0.000 abstract 1
- 102100040862 Dual specificity protein kinase CLK1 Human genes 0.000 description 32
- 101000749294 Homo sapiens Dual specificity protein kinase CLK1 Proteins 0.000 description 32
- 230000000630 rising effect Effects 0.000 description 19
- 230000001360 synchronised effect Effects 0.000 description 12
- 230000002093 peripheral effect Effects 0.000 description 10
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 5
- 101100102872 Arabidopsis thaliana WAT1 gene Proteins 0.000 description 3
- 101100352822 Schizosaccharomyces pombe (strain 972 / ATCC 24843) pop3 gene Proteins 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 101150052413 TNK2 gene Proteins 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Information Transfer Systems (AREA)
Abstract
Description
本発明は、互いに非同期なクロックでリード/ライト動作が可能なデュアルポートRAMを利用したFIFOメモリに関する。 The present invention relates to a FIFO memory using a dual port RAM capable of performing read / write operations with mutually asynchronous clocks.
一般に、FIFOメモリは、データを記憶するためのRAMと、ライトポインタ及びリードポインタを管理するためのアドレス演算回路とから構成されており、互いに非同期のクロックで動作する二つのデバイス間でデータ転送を行う際のインターフェイス等として利用される。このため、FIFOメモリは、ライト用のクロックとリード用のクロックとがそれぞれ入力可能なデュアルポートRAMを用いて実現されることが多い。 In general, a FIFO memory is composed of a RAM for storing data and an address arithmetic circuit for managing a write pointer and a read pointer, and transfers data between two devices operating with asynchronous clocks. It is used as an interface when performing. For this reason, the FIFO memory is often realized by using a dual port RAM into which a write clock and a read clock can be input.
図4に、デュアルポートRAM210を用いたFIFOメモリ200の構成を示す。
同図において、デュアルポートRAM210は、クロック信号CLK0に同期して動作する第1アクセスポートと、クロック信号CLK1に同期して動作する第2アクセスポートとを備えている。符号220はウェイト信号生成回路、符号230,250,280は同期化回路、符号240はライトポインタ生成回路、符号260はフル/エンプティ判定回路、符号270はリードポインタ生成回路である。
FIG. 4 shows a configuration of the
In the figure, the
デュアルポートRAM210の第1アクセスポートには、CPU等のバスマスタデバイスからライト信号WRとライトデータWD15〜WD0とが入力され、ライトポインタ生成回路240から同期化回路250を介してライトアドレス信号WA7〜WA0が入力される。一方、デュアルポートRAM210の第2アクセスポートには、外部の周辺デバイスからリード信号RDが入力され、リードポインタ生成回路270からリードアドレス信号RA7〜RA0が入力される。また、第2アクセスポートから周辺デバイスにリードデータRD15〜RD0が出力される。
A write signal WR and write data WD15 to WD0 are input from a bus master device such as a CPU to the first access port of the
次に、図5に示すタイミングチャートを参照して、バスマスタデバイスからの要求に基づくライト動作について説明する。
先ず、時刻t1におけるクロック信号CLK0の立ち上がりで、バスマスタデバイスがライト信号WRをローレベルにアサート(assert)すると、これを受けて、ウェイト信号生成回路220は、その次の時刻t2におけるクロック信号CLK0の立ち上がりエッジでウェイト信号WATをハイレベルにアサートする。これ以後、ウェイト信号WATがネゲート(negate)されるまで、バスマスタデバイスによるライトが禁止される。
Next, a write operation based on a request from the bus master device will be described with reference to a timing chart shown in FIG.
First, when the bus master device asserts the write signal WR to the low level at the rising edge of the clock signal CLK0 at time t1, the wait
また、ウェイト信号生成回路220は、アサートされたライト信号WRを同期化回路230に出力する。同期化回路230は、時刻t3におけるクロック信号CLK1の立ち上がりエッジで、アサートされたライト信号WRを取り込み、次の時刻t4におけるクロック信号CLK1の立ち上がりエッジで、クロック信号CLK1に同期化されたローレベルのライト信号WRSを出力する。ライトポインタ生成回路240は、時刻t5におけるクロック信号CLK1の立ち上がりエッジで、ライト信号WRSによりポインタPwを更新して出力する。
The wait
一方、リードポインタ生成回路270は、周辺デバイスから供給されるリード信号RDからリードポインタPrを生成する。この例ではリード信号RDはアサートされておらず、リードポインタPrは先頭アドレス「0」を維持している。フル/エンプティ判定回路260は、上述の更新されたライトポインタPwとリードポインタPrとからデュアルポートRAM210の記憶領域の残りを演算し、この演算結果から記憶領域がフル状態であるか否かを判定する。この例では、時刻t5におけるクロック信号CLK1の立ち上がりエッジでフル状態ではないと判定している。
On the other hand, the read
記憶領域がフル状態ではないと判定されると、フル/エンプティ判定回路260は、時刻t6におけるクロック信号CLK1の立ち上がりエッジで、判定結果を表すアクノリッジ信号Ack1をハイレベルにアサートして同期化回路280に出力する。同期化回路280は、時刻7におけるクロック信号CLK0の立ち上がりエッジで、クロック信号CLK0でアクノリッジ信号Ack1を同期化してアクノリッジ信号Ack0を出力する。
If it is determined that the storage area is not full, the full /
アクノリッジ信号Ack0を入力するウェイト信号生成回路220は、次の時刻t8におけるクロック信号CLK0の立ち上がりエッジでウェイト信号をローレベルにネゲートする。このウェイト信号を受けて、バスマスタデバイスは、次の時刻t9におけるクロック信号CLK0の立ち上がりエッジでライト信号WRをハイレベルにネゲートし、これにより一連のライト動作が完了する。
ところで、上述の従来技術によれば、ライトポインタPw及びリードポインタPrの両者の更新をリード用のクロック信号CLK1に同期させる必要がある。なぜなら、フル/エンプティ判定回路140においてデュアルポートRAM210の記憶領域が満杯であるか否かを正しく判定するためには、ライトポインタとリードポインタとを同一のタイミングで更新して両ポインタの位置関係を把握する必要があるからである。
By the way, according to the above-described prior art, it is necessary to synchronize the update of both the write pointer Pw and the read pointer Pr with the read clock signal CLK1. This is because, in order to correctly determine whether or not the storage area of the
しかしながら、ライトポインタPw及びリードポインタPrの両者の更新をリード用のクロック信号CLK1に同期させることは、ライトポインタPwを得るためのライト信号WRを遅延させることを意味し、このため、フル/エンプティ判定回路260が判定結果を出力するまでに所定のレイテンシを必要とするという問題がある。
However, synchronizing the update of both the write pointer Pw and the read pointer Pr with the read clock signal CLK1 means delaying the write signal WR for obtaining the write pointer Pw, and therefore full / empty. There is a problem that a predetermined latency is required before the
具体的には、リード用のクロック信号CLK1で両ポインタを更新する場合、ライトポインタPwの更新にタイムラグが生じる。なぜなら、ライトポインタPwを更新する際に、同期化回路230によりライト信号WRをリード用のクロック信号CLK1に同期化させる必要があるためである。この同期化の際に発生するタイムラグが、フル/エンプティ状態を判定する際のレイテンシをもたらし、データ転送効率を低下させる原因になる。上述の図5に示す例では、ウェイト信号WATがアサートされてからネゲートされるまで、即ち第1アクセスポートから第2アクセスポートにデータが転送されるまでに8サイクルを要している。
Specifically, when updating both pointers with the read clock signal CLK1, there is a time lag in updating the write pointer Pw. This is because it is necessary to synchronize the write signal WR with the read clock signal CLK1 by the
本発明は、上記事情に鑑みてなされたものであり、データ転送効率を改善することができるFIFOメモリを提供することを目的とする。 The present invention has been made in view of the above circumstances, and an object thereof is to provide a FIFO memory capable of improving data transfer efficiency.
本発明に係るFIFOメモリは、第1クロック信号に同期して動作する第1アクセスポートと第2クロック信号に同期して動作する第2アクセスポートとを有する記憶手段と、前記第1アクセスポートに入力されるライト信号に基づきライトポインタを生成するライトポインタ生成手段と、前記第2アクセスポートに入力されるリード信号に基づきリードポインタを生成するリードポインタ生成手段と、前記ライトポインタとリードポインタとの差分が予め設定されたマージン以下となった場合に前記記憶手段の記憶領域が満杯であると判定する判定手段とを備える。 A FIFO memory according to the present invention comprises a storage means having a first access port that operates in synchronization with a first clock signal and a second access port that operates in synchronization with a second clock signal; Write pointer generating means for generating a write pointer based on an input write signal, read pointer generating means for generating a read pointer based on a read signal input to the second access port, and the write pointer and the read pointer Determination means for determining that the storage area of the storage means is full when the difference is equal to or less than a preset margin.
上記FIFOメモリにおいて、例えば、前記ライトポインタ生成手段は、前記ライトポインタを前記第2クロック信号で同期化して前記判定手段に出力することを特徴とする。
上記FIFOメモリにおいて、例えば、前記リードポインタ生成手段は、前記リードポインタを前記第1クロック信号で同期化して前記判定手段に出力することを特徴とする。
In the FIFO memory, for example, the write pointer generation unit synchronizes the write pointer with the second clock signal and outputs the result to the determination unit.
In the FIFO memory, for example, the read pointer generation unit synchronizes the read pointer with the first clock signal and outputs the result to the determination unit.
上記FIFOメモリにおいて、例えば、前記マージンは、前記ライトポインタ生成手段がライトポインタを生成してから該ライトポインタに基づく前記判定手段の判定結果が出力されるまでの期間における前記ライトポインタの変化分に応じて設定されたことを特徴とする。
上記FIFOメモリにおいて、例えば、前記記憶手段は、デュアルポートRAMであることを特徴とする。
In the FIFO memory, for example, the margin is a change amount of the write pointer in a period from when the write pointer generation unit generates a write pointer to when the determination result of the determination unit based on the write pointer is output. It is characterized by being set accordingly.
In the FIFO memory, for example, the storage means is a dual port RAM.
本発明によれば、ライトポインタとリードポインタとの間に一定のマージンを設けて、これらライトポインタ及びリードポインタに基づき記憶領域が満杯であるか否かを判定するようにしたので、記憶領域が満杯であるか否かを判定する際のレイテンシの発生を有効に抑制し、データ転送効率を改善することができる。 According to the present invention, a fixed margin is provided between the write pointer and the read pointer, and it is determined whether or not the storage area is full based on the write pointer and the read pointer. It is possible to effectively suppress the occurrence of latency when determining whether or not it is full, and to improve data transfer efficiency.
以下、図面を参照しながら、本発明の実施形態を説明する。
図1に、本発明の実施形態に係るFIFOメモリ100の構成を示す。
同図において、符号110はデュアルポートRAMである。デュアルポートRAM110は、CPU等のバスマスタデバイスのクロック信号CLK0に同期して動作する第1アクセスポート1100と、周辺デバイスのクロック信号CLK1に同期して動作する第2アクセスポート1101とを備える。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a configuration of a
In the figure,
ここで、第1アクセスポート1100には、クロック信号CLK0に加え、図示しないバスマスタデバイスからライト信号WRとライトデータWD15〜WD0とが入力されると共に、後述のライトポインタ生成回路120からライトアドレス信号WA7〜WA0が入力される。一方、第2アクセスポート1101には、クロック信号CLK1に加え、図示しない周辺デバイスからリード信号RDが入力されると共に、後述のリードポインタ生成回路150からリードアドレス信号RA7〜RA0が入力される。また、第2アクセスポート1101からは周辺デバイスにリードデータRD15〜RD0が出力される。
Here, in addition to the clock signal CLK0, the
符号120は、デュアルポートRAM110のライト位置を示すライトポインタPwを生成するためのライトポインタ生成回路である。このライトポインタ生成回路120にはライト信号WRが入力される。ライトポインタ生成回路120は、ライトポインタPwをライトアドレスWA7〜WA0としてデュアルポートRAM110の第1アクセスポート1100に供給する。
符号130は同期化回路であり、従属接続された2段のDフリップフロップから構成される。このうち、1段目のDフリップフロップにはライトポインタPwが入力され、2段目のDフリップフロップからはクロック信号CLK1に同期化されたライトポインタPwsが出力され、これら2段のDフリップフロップの各クロック端子にはクロック信号CLK1が入力される。
符号150は、デュアルポートRAM110のリード位置を示すリードポインタPrを生成するためのリードポインタ生成回路である。このリードポインタ生成回路150にはリード信号RDが入力される。
符号140は、上述の同期化されたライトポインタPwsとリードポインタPrとからデュアルポートRAMの記憶領域が満杯であるか否かを判定するフル/エンプティ判定回路である。このフル/エンプティ判定回路140は、本発明の主要な特徴部の一つを成し、ライトポインタPwsとリードポインタPrとの間に一定のマージンを設けて、これらポインタに基づいてデュアルポートRAMの記憶領域が満杯であるか否かを判定するものである。この判定結果は、判定信号JUDとして周辺デバイスに出力されると共に、ウェイト信号WAT1として後述の同期化回路160に出力される。なお、この判定においてライトポインタPwsとリードポインタPrとの間に設けられる上述の一定のマージンについては後述する。
符号160は同期化回路であり、上述の同期化回路130と同様に従属接続された2段のDフリップフロップから構成される。だたし、これら2段のDフリップフロップの各クロック端子にはクロック信号CLK0が入力され、このうち、1段目のDフリップフロップにはウェイト信号WAT1が入力され、2段目のDフリップフロップからは、クロック信号CLK0に同期化されたウェイト信号WATが外部のバスマスタデバイスに出力される。
次に、図2を参照して、フル/エンプティ判定回路140における判定手法と、その判定の際にライトポインタPwsとリードポインタPrとの間に設けられる上述の一定のマージンMについて、従来技術と対比して説明する。
図2は、フル判定が下される場合のデュアルポートRAM110の記憶領域と各ポインタとの関係の一例を表している。同図に示す例では、デュアルポートRAM110の記憶領域は、0段目からN−1段目までの合計N段のFIFOメモリの記憶領域を構成する。
Next, referring to FIG. 2, the determination method in the full /
FIG. 2 shows an example of the relationship between the storage area of the
ここで、図2(a)は、本実施形態に係る上述の一定のマージンを説明するための図であり、ライトポインタPwsがN−M−1段目を示しているときにリードポインタPrが0段目(初段)を示している状態を表している。また、同図(b)は、従来技術におけるライトポインタPwとリードポインタPrとの関係を説明するための図であり、ライトポインタPwがN−1段目を示しているときにリードポインタPrが0段目を示している状態を表している。 Here, FIG. 2A is a diagram for explaining the above-described constant margin according to the present embodiment. When the write pointer Pws indicates the NM-1 stage, the read pointer Pr is This represents a state indicating the 0th stage (first stage). FIG. 4B is a diagram for explaining the relationship between the write pointer Pw and the read pointer Pr in the prior art. When the write pointer Pw indicates the (N−1) th stage, the read pointer Pr is The state showing the 0th stage is shown.
先ず、従来技術によれば、図2(b)に示すようにPw>Prの場合には、Pw−Pr=N−1なる関係が満足されると、FIFOメモリの記憶領域が満杯となり、フル判定が下される。また、図示しないが、Pw<Prの場合には、Pr−Pw=1なる関係が満足されると、FIFOメモリの記憶領域が満杯となり、フル判定が下される。即ち、従来技術では、リードポインタPrの後ろにライトポインタPwが完全に追いついた状態(空きの記憶領域が全くない状態)となった場合にフル判定が下される。 First, according to the prior art, in the case of Pw> Pr as shown in FIG. 2B, when the relationship Pw−Pr = N−1 is satisfied, the storage area of the FIFO memory becomes full and full. A decision is made. Although not shown, when Pw <Pr, if the relationship of Pr−Pw = 1 is satisfied, the storage area of the FIFO memory is full and a full determination is made. That is, in the conventional technique, the full determination is made when the write pointer Pw has completely caught up after the read pointer Pr (there is no empty storage area).
これに対し、本実施形態では、図2(a)に示すように、Pws>Prの場合にPw−Pr≧N−Mなる関係が満足されると、実際にはFIFOメモリの記憶領域が満杯にはなっていなくてもフル判定が下される。また、図示しないが、Pws<Prの場合にPr−Pw≦Mなる関係が満足されると、同様にFIFOメモリの記憶領域が満杯にはなっていなくてもフル判定が下される。 On the other hand, in this embodiment, as shown in FIG. 2A, when the relationship Pw−Pr ≧ NM is satisfied when Pws> Pr, the storage area of the FIFO memory is actually full. Even if it is not, full judgment is made. Although not shown, if the relationship of Pr−Pw ≦ M is satisfied when Pws <Pr, the full determination is similarly made even if the storage area of the FIFO memory is not full.
即ち、本実施形態では、リードポインタPrと、これを追いかけるライトポインタPwsとの間の差分が所定のマージンM以下になった場合にフル判定が下される。このマージンMをどのように設定すべきかについては後述する。
以上で、本実施形態におけるフル判定の手法とマージンMについて説明した。
That is, in the present embodiment, the full determination is made when the difference between the read pointer Pr and the write pointer Pws chasing the read pointer Pr becomes equal to or less than a predetermined margin M. How to set the margin M will be described later.
The full determination method and the margin M in the present embodiment have been described above.
次に、図3に示すタイミングチャートを参照して、バスマスタデバイスからの要求に基づくライト動作を例として本実施形態の動作を説明する。
以下に説明するように、本実施形態によれば、バスマスタデバイスはライト動作毎にフル判定を待つ必要がなく、従ってバーストモードでのライト動作が可能になる。そこで、ここでは、バスマスタデバイスがバーストモードでデュアルポートRAM110にデータをライトする場合を説明する。
Next, with reference to the timing chart shown in FIG. 3, the operation of this embodiment will be described by taking a write operation based on a request from the bus master device as an example.
As will be described below, according to the present embodiment, the bus master device does not have to wait for a full determination for each write operation, and thus can perform a write operation in the burst mode. Therefore, here, a case where the bus master device writes data to the
先ず、図3において、時刻t1におけるクロック信号CLK0の立ち上がりエッジで、バスマスタデバイスがライト信号WRをローレベルにアサートしてバーストモードでのライト動作を開始すると、それ以後、ライトポインタ生成回路120は、クロック信号CLK0の1サイクル毎にライトポインタPwをカウントアップして更新し、ライトポインタPwの値として、「1」,「2」,…,「17」を順次出力する。また、ライトポインタ生成回路120は、ライトポインタPwとしてライトアドレス信号WA7〜WA0をデュアルポートRAM110の第1アクセスポートに供給する。
First, in FIG. 3, when the bus master device asserts the write signal WR to the low level and starts the write operation in the burst mode at the rising edge of the clock signal CLK0 at the time t1, the write
デュアルポートRAM110は、クロック信号CLK0の各サイクルにおいてバスマスタデバイスからライトデータWD15〜WD0を入力し、ライトポインタ生成回路120からライトポインタPwとして供給されるライトアドレス信号WA7〜WA0で指定される記憶領域に順次格納する。
The
同期化回路130は、ライトポインタPwをクロック信号CLK1で同期化し、クロック信号CLK1に同期したタイミングでライトポインタPwsをフル/エンプティ判定回路140に出力する。具体的には、同期化回路130は、時刻t2におけるクロック信号CLK1の立ち上がりエッジで、ライトポインタPwの値「2」を取り込み、次の時刻t3におけるクロック信号CLK1の立ち上がりエッジで、ライトポインタPwsとして値「2」を出力する。
The
以後同様にして、同期化回路130は、クロック信号CLK1の立ち上がりエッジでライトポインタPwの各値を取り込み、クロック信号CLK1で同期化されたライトポインタPwsとして、「3」,「5」,「7」,「8」,「10」,「11」,「12」,「14」,「15」,「17」の各値をフル/エンプティ判定回路140に順次出力する。
Thereafter, similarly, the
一方、リードポインタ生成回路150は、周辺デバイスから供給されるリード信号RDに基づきリードポインタPrを生成してフル/エンプティ判定回路140に出力する。また、リードポインタ生成回路150は、リードポインタPrとしてリードアドレス信号RA7〜RA0をデュアルポートRAM110の第2アクセスポート1101に供給する。デュアルポートRAM110は、ライトポインタ生成回路120から供給されるライトアドレス信号WA7〜WA0で指定される記憶領域に格納されたデータをリードデータRD15〜RD0として周辺デバイスに出力する。
On the other hand, the read
上述の第1アクセスポート側でのバスマスタデバイスによるライト動作の進行に従ってライトポインタPwの値が増加していくと共に、第2アクセスポート側での周辺デバイスによるリード動作の進行に従って、リードポインタPrの値がライトポインタPwを追跡するように増加していく。 As the write operation by the bus master device on the first access port side proceeds, the value of the write pointer Pw increases, and as the read operation by the peripheral device on the second access port side proceeds, the value of the read pointer Pr Increases to track the write pointer Pw.
ここで、本実施形態では、ライトポインタPwの値が「10」に到達したときに、ライトポインタPwとリードポインタPrとの関係が上述の図2(a)に示す関係になったとする。即ち、ライトポインタPwが「10」になった時点で、リードポインタPrとの間にはマージンMに相当する段数の空き領域しかなく、Pw−Pr≧N−Mなる条件が満足されているものとする。ただし、本実施形態では、この時点ではフル判定は下されない。 Here, in this embodiment, when the value of the write pointer Pw reaches “10”, it is assumed that the relationship between the write pointer Pw and the read pointer Pr becomes the relationship shown in FIG. That is, when the write pointer Pw becomes “10”, there is only a vacant area corresponding to the margin M between the read pointer Pr and the condition Pw−Pr ≧ NM is satisfied. And However, in this embodiment, full determination is not made at this point.
この状態から、時刻t5におけるクロックCLK1の立ち上がりエッジで、同期化回路130は、ライトポインタPwの値「11」を取り込み、これを時刻t6でライトポインタPwsとして出力する。フル/エンプティ判定回路140は、ライトポインタPwsの値「11」とリードポインタPrの値とから記憶領域が満杯か否かを判定する。この場合、ライトポインタPwとリードポインタPrとの間のFIFOの段数はマージンMにそうとうする段数以下であるから、フル/エンプティ判定回路140はフル判定を下し、時刻t7におけるクロック信号CLK1の立ち上がりエッジで、この判定結果を表す判定信号JUDを出力する。
From this state, at the rising edge of the clock CLK1 at time t5, the
同期化回路160は、時刻t8におけるクロック信号CLK0の立ち上がりエッジでウェイト信号WAT1を取り込み、次の時刻t9におけるクロック信号CLK0の立ち上がりエッジでウェイト信号WATをハイレベルにアサートする。これを受けて、外部のバスマスタデバイスは、時刻t10におけるクロック信号CLK0の立ち上がりエッジでライト信号WRをハイレベルにネゲートし、これにより、一連のバーストモードでのライト動作が完了する。
The
上述のバーストモードでの一連のライド動作において、時刻t7においてフル/エンプティ判定回路140がフル判定を出力する以前の時刻t4で、フル判定を下すときの条件(Pw−Pr≧N−M)が満足されている。しかも、フル判定が下された後の時刻t10でライト信号WRがネゲートされている。従って、この例では、ライトポインタPwの値は「10」で留めなければならないにもかかわらず、ライトポインタPwの値は「17」まで進んでいる。
In the above-described series of ride operations in the burst mode, the condition (Pw−Pr ≧ NM) for making a full determination at time t4 before the full /
しかし、本実施形態によれば、上述のマージンMを設けているので、フル判定を下す時点で実際のライトポインタPwの値が進んでいても、デュアルポートRAM110の記憶領域にはマージンMに相当する空き領域が存在するため、オーバーフローには至らない。このことから、マージンMは、ライトポインタPwをクロック信号CLK1で同期化するためのタイムラグと、同期化されたライトポインタPwsとリードポインタPrとからフル判定を下すまでのタイムラグと、フル判定を表す信号をクロック信号CLK0で同期化してウェイト信号WATをアサートするためのタイムラグと、このウェイト信号WATを受けた外部のバスマスタデバイスがライト信号WRをネゲートするまでのタイムラグを考慮して決定される。即ち、マージンMに相当するFIFOの段数は、上述のようなタイムラグの合算期間におけるライトポインタPwの変化分を考慮し、この変化分に対応する全ライトデータを記憶可能なように設定される。換言すれば、マージンMは、ライトポインタが生成されてから判定結果が出力されるまでの期間におけるライトポインタの変化分に応じて設定される。
However, according to the present embodiment, since the margin M described above is provided, the storage area of the
このように、本実施形態では、ライトポインタPwをリード用のクロック信号CLK1で同期化せずにデュアルポートRAM110に供給することにより、ライト用のクロック信号CLK0のサイクル毎のライト動作を可能とし、バーストモードでの高速なライト動作等を実現している。従って、データ転送効率が改善される。一方、ライトポインタPwをリード用のクロック信号CLK1で同期化したライトポインタPwsを用いてフル判定を行っているため、フル/エンプティ判定回路140が入力するライトポインタPwsの値が実際の値と異なり、フル判定に誤差が発生するが、上述のマージンMを設けてフル判定を行うことにより、オーバーフローを回避している。結局、オーバーフローを招くことなく高速なライト動作を実現している。
As described above, in this embodiment, the write pointer Pw is supplied to the
また、この例では、クロック信号CLK1の周期がクロック信号CLK0よりも大きいため、ライトポインタPwをクロック信号CLK1で同期化して得られるライトポインタPwsの値は連続した値にならない。このこともフル/エンプティ判定回路140におけるフル判定の誤差の原因となるが、この誤差が存在したとしても、上述のマージンMによりオーバーフローには至らない。
In this example, since the cycle of the clock signal CLK1 is larger than that of the clock signal CLK0, the value of the write pointer Pws obtained by synchronizing the write pointer Pw with the clock signal CLK1 does not become a continuous value. This also causes a full determination error in the full /
このように、本実施形態では、ライトポインタPwをライト用のクロック信号CLK0に同期させて生成し、リードポインタPrをリード用のクロック信号CLK1に同期させて生成することによりライト動作およびリード動作を高速化すると共に、そのことに伴うフル判定の誤差をマージンMによって吸収している。 As described above, in this embodiment, the write pointer Pw is generated in synchronization with the write clock signal CLK0, and the read pointer Pr is generated in synchronization with the read clock signal CLK1, thereby performing the write operation and the read operation. In addition to speeding up, the full determination error associated therewith is absorbed by the margin M.
以上、本発明の実施形態を詳述したが、具体的な構成は本実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。例えば、上述の実施形態では、ライトポインタの生成をクロック信号CLK0に同期させ、リードポインタPrの生成とフル判定をリード用のクロック信号CLK1に同期させるものとしたが、ライトポインタの生成とフル判定をクロック信号CLK0に同期させ、リードポインタPrの生成をリード用のクロック信号CLK1に同期させるものとしてもよい。 As mentioned above, although embodiment of this invention was explained in full detail, the concrete structure is not restricted to this embodiment, The design change etc. of the range which does not deviate from the summary of this invention are included. For example, in the above-described embodiment, the generation of the write pointer is synchronized with the clock signal CLK0, and the generation of the read pointer Pr and the full determination are synchronized with the clock signal CLK1 for read. May be synchronized with the clock signal CLK0, and the generation of the read pointer Pr may be synchronized with the read clock signal CLK1.
100;FIFOメモリ、110;デュアルポートRAM、120;ライトポインタ生成回路、130,160;同期化回路、140;フル/エンプティ判定回路、150;リードポインタ生成回路。
100; FIFO memory, 110; dual port RAM, 120; write pointer generation circuit, 130, 160; synchronization circuit, 140; full / empty determination circuit, 150; read pointer generation circuit.
Claims (5)
前記第1アクセスポートに入力されるライト信号に基づきライトポインタを生成するライトポインタ生成手段と、
前記第2アクセスポートに入力されるリード信号に基づきリードポインタを生成するリードポインタ生成手段と、
前記ライトポインタとリードポインタとの差分が予め設定されたマージン以下となった場合に前記記憶手段の記憶領域が満杯であると判定する判定手段と
を備えたFIFOメモリ。 Storage means having a first access port that operates in synchronization with the first clock signal and a second access port that operates in synchronization with the second clock signal;
Write pointer generating means for generating a write pointer based on a write signal input to the first access port;
Read pointer generating means for generating a read pointer based on a read signal input to the second access port;
A FIFO memory comprising: a determination unit that determines that the storage area of the storage unit is full when a difference between the write pointer and the read pointer is equal to or less than a preset margin.
5. The FIFO memory according to claim 1, wherein the storage means is a dual port RAM.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006097356A JP2007272562A (en) | 2006-03-31 | 2006-03-31 | Fifo memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006097356A JP2007272562A (en) | 2006-03-31 | 2006-03-31 | Fifo memory |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2007272562A true JP2007272562A (en) | 2007-10-18 |
Family
ID=38675306
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006097356A Pending JP2007272562A (en) | 2006-03-31 | 2006-03-31 | Fifo memory |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2007272562A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102193884A (en) * | 2010-03-10 | 2011-09-21 | 瑞萨电子株式会社 | Data transfer circuit and method |
| US9542152B2 (en) | 2012-11-27 | 2017-01-10 | Samsung Electronics Co., Ltd. | System-on-chip and application processor including FIFO buffer and mobile device comprising the same |
-
2006
- 2006-03-31 JP JP2006097356A patent/JP2007272562A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102193884A (en) * | 2010-03-10 | 2011-09-21 | 瑞萨电子株式会社 | Data transfer circuit and method |
| CN102193884B (en) * | 2010-03-10 | 2015-06-24 | 瑞萨电子株式会社 | Data transfer circuit and method |
| US9542152B2 (en) | 2012-11-27 | 2017-01-10 | Samsung Electronics Co., Ltd. | System-on-chip and application processor including FIFO buffer and mobile device comprising the same |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI298888B (en) | Pseudo-synchronization of the transportation of data across asynchronous clock domains | |
| JP4998519B2 (en) | Asynchronous interface circuit and asynchronous data transfer method | |
| US8675425B2 (en) | Single-strobe operation of memory devices | |
| WO2017016178A1 (en) | Interface signal remapping method based on fpga | |
| CN101344870B (en) | FIFO control module with strong reusability and method for managing internal memory | |
| CN101847131A (en) | Storage control device | |
| JP5414350B2 (en) | Memory control circuit and control method thereof | |
| JP7299890B2 (en) | Asynchronous buffer with pointer offset | |
| CN109815619B (en) | Method for converting synchronous circuit into asynchronous circuit | |
| JP2004062630A (en) | FIFO memory and semiconductor device | |
| US20080209095A1 (en) | Structure for reducing latency associated with read operations in a memory system | |
| CN110618950A (en) | Asynchronous FIFO read-write control circuit and method, readable storage medium and terminal | |
| JP2007272562A (en) | Fifo memory | |
| CN100405253C (en) | Data transmission synchronization circuit, method and computer | |
| US7734860B2 (en) | Signal processor | |
| JP4389459B2 (en) | Data buffer device | |
| US7822905B2 (en) | Bridges capable of controlling data flushing and methods for flushing data | |
| CN121070132B (en) | Chip timer realizing device and SoC chip | |
| CN113760795A (en) | Asynchronous FIFO memory read-write control method, device and equipment | |
| JP3711730B2 (en) | Interface circuit | |
| JP5433156B2 (en) | Memory control circuit | |
| JP5218225B2 (en) | MEMORY ACCESS DEVICE, MEMORY ACCESS SYSTEM, AND MEMORY ACCESS DEVICE PROCESSING METHOD | |
| JPH10112178A (en) | FIFO memory and method of manufacturing the same | |
| CN121541926A (en) | Command acceleration device and its operation method | |
| CN118113112A (en) | Electronic device |