|
最后的時(shí)序圖要認(rèn)真看,wrusedw[8:0]與rdusedw[8:0]很詭異
=========================
1、SC:single_clk;單一時(shí)鐘。DC:dual_clk雙時(shí)鐘。即它們的區(qū)別主要在于,F(xiàn)IFO在進(jìn)行數(shù)據(jù)處理時(shí),寫入數(shù)據(jù)時(shí)的速度與讀出數(shù)據(jù)時(shí)的速度是否一致。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;
從上面的字面意思,我們即可大體可以知道其絕大多數(shù)的信息,稍微解釋一下幾個(gè)特殊的ports,
wrfull,rdempty這兩個(gè)較簡(jiǎn)單。寫滿與讀空標(biāo)志。而wrempty與rdfull就比較特殊。參考ALTERA給出的手冊(cè)。
以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.
意思大體說(shuō)的是,一般來(lái)說(shuō),rdfull的信號(hào)是的wrfull信號(hào)的延遲版本。然而,Stratix III及其以后的器件,rdfull信號(hào)功能作為組合輸出的派生版本的wrfull信號(hào)。因此,不管目標(biāo)設(shè)備是什么,你必須總是指的wrfull端口,以確保是否不是一個(gè)有效的寫請(qǐng)求的操作可以被執(zhí)行。及首先要確保wrfull信號(hào)。對(duì)于wrempty信號(hào)類似。
為了簡(jiǎn)便操作,使這兩個(gè)引腳無(wú)效。
對(duì)于wrreq與rdreq的管腳描述如下:對(duì)于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是否為高電平。但是當(dāng)我們采取保護(hù)電路時(shí),僅僅設(shè)置 overflow_checking parameter 到有效(ON)即可。此時(shí)無(wú)須判斷wrfull管腳情況。
對(duì)于rdreq類似操作。
對(duì)于wrusedw[8:0]與rdusedw[8:0]操作說(shuō)明如下:
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實(shí)時(shí)指向wrfull標(biāo)志是否產(chǎn)生。是當(dāng)前FIFO所存儲(chǔ)的數(shù)據(jù)量。
修改:為了更好地表達(dá)fifo的各個(gè)端口:simulation圖如下:


上面2個(gè)圖來(lái)源于Altera官網(wǎng);菊f(shuō)明了DCFIFO 各個(gè)ports的用法。上面的簡(jiǎn)單說(shuō)明,屬個(gè)人意見(jiàn),有任何問(wèn)題,概不負(fù)責(zé)。
綜合:對(duì)于DCFIFO一般需要以下部分:data,wrreq,wrclk,wrusedw, rdreq,rdclk,q,rdusedw,aclr;組成。其余部分可以不參與操作。
|
|