(转载)FIFO端口的说明

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图如下:

(转载)FIFO端口的说明

(转载)FIFO端口的说明

上面2个图来源于Altera官网。基本说明了DCFIFO 各个ports的用法。上面的简单说明,属个人意见,有任何问题,概不负责。
综合:对于DCFIFO一般需要以下部分:data,wrreq,wrclk,wrusedw, rdreq,rdclk,q,rdusedw,aclr;组成。其余部分可以不参与操作。
欢迎转载,请注明来源。