|
最后的時序圖要認真看,wrusedw[8:0]與rdusedw[8:0]很詭異
=========================
1、SC:single_clk;單一時鐘。DC:dual_clk雙時鐘。即它們的區別主要在于,FIFO在進行數據處理時,寫入數據時的速度與讀出數據時的速度是否一致。2、FIFO模塊(DCFIFO為例)主要包括以下幾部分:write部分,read部分,清零部分。
write部分:data(8位或16位),wrreq,wrclk,wrfull,wrempty,wrusedw[8:0];
read部分:rdreq,rdclk,rdfull,rdempty,q(8位或16位),rdusedw[8:0];
清零部分:aclr;
從上面的字面意思,我們即可大體可以知道其絕大多數的信息,稍微解釋一下幾個特殊的ports,
wrfull,rdempty這兩個較簡單。寫滿與讀空標志。而wrempty與rdfull就比較特殊。參考ALTERA給出的手冊。
以rdfull為例:
In general, the rdfull signal is a delayed version of the wrfull signal.
However, for Stratix III devices and later, the rdfull signal function as a
combinational output instead of a derived version of the wrfull signal.
Therefore, you must always refer to the wrfull port to ensure whether or
not a valid write request operation can be performed, regardless of the
target device.
意思大體說的是,一般來說,rdfull的信號是的wrfull信號的延遲版本。然而,Stratix III及其以后的器件,rdfull信號功能作為組合輸出的派生版本的wrfull信號。因此,不管目標設備是什么,你必須總是指的wrfull端口,以確保是否不是一個有效的寫請求的操作可以被執行。及首先要確保wrfull信號。對于wrempty信號類似。
為了簡便操作,使這兩個引腳無效。
對于wrreq與rdreq的管腳描述如下:對于wrreq,
Do not assert the wrreq signal when the full (for SCFIFO) or wrfull
(for DCFIFO) port is high. Enable the overflow protection circuitry or
set the overflow_checking parameter to ON so that the FIFO
megafunction can automatically disable the wrreq signal when it is
full.
需要先判斷wrfull是否為高電平。但是當我們采取保護電路時,僅僅設置 overflow_checking parameter 到有效(ON)即可。此時無須判斷wrfull管腳情況。
對于rdreq類似操作。
對于wrusedw[8:0]與rdusedw[8:0]操作說明如下:
For Stratix, Stratix GX, and Cyclone devices, the FIFO megafunction
shows full even before the number of words stored reaches its maximum
value. Therefore, you must always refer to the full or wrfull port for
valid write request operation, and the empty or rdempty port for valid
read request operation regardless of the target device.
主要講了:wrusedw實時指向wrfull標志是否產生。是當前FIFO所存儲的數據量。
修改:為了更好地表達fifo的各個端口:simulation圖如下:


上面2個圖來源于Altera官網。基本說明了DCFIFO 各個ports的用法。上面的簡單說明,屬個人意見,有任何問題,概不負責。
綜合:對于DCFIFO一般需要以下部分:data,wrreq,wrclk,wrusedw, rdreq,rdclk,q,rdusedw,aclr;組成。其余部分可以不參與操作。
|
|