Xilinx FIFO Generator IP核对应的官方手册:PG057。
Overview
FIFO Generator Core支持Native interface、AXI Memory Mapped interface和AXI4-Strem interface。
Native Interface FIFOs
Native Interface FIFO可以使用block RAM、distributed RAM和build-in FIFO资源;
可以选择使用Standard mode和First Word Fall Through两种模式。
AXI Interface FIFOs
AXI interface FIFOs是基于Native interface FIFO;
不支持built-in FIFO和Shift Register FIFO结构;
只能工作在First-Word Fall-Though(FWFT)模式。(FWFT是指将FIFO中第一个有效的字拿出FIFO到输出总线上,并且不需要读操作。)
Feature Summary
FIFO深度可达131072(2^17)字节;
独立和公共时钟域。
Native FIFO Features
independent or common clock domains;FWFT available;Non-Symmetric Aspect Ratio Support。
Native FIFO Configuration and Implementation
Common clock domain:Block RAM, Distributed RAM, Shift Register, Built-in FIFO
Independent clock domain:Block RAM, Distributed RAM, Built-in FIFO
Native FIFO Interface Signals
Interface Signals: FIFOs With Independent Clocks
复位信号rst,异步复位;
写接口信号:wr_clk, din[n:0], wr_en, full是必需的,所有信号与wr_clk同步;
读接口信号:rd_rst, rd_clk, dout[m:0], re_en, empty是必须的,所有信号与rd_clk同步;
Interface Signals: FIFOs With CommonClocks
异步复位,所有信号与clk同步。
Product Specification
。。。。。。
Designing with the Core
Initializing the FIFO Generator
在使用block RAM或者distributed RAM结构FIFO时,复位不是必需的;
复位操作可以通过异步复位rst或者同步复位wr_rst/rd_rst实现。
FIFO Usage and Control
Write Operation
当写使能有效且FIFO没有满时,数据就会从输入总线din写入到FIFO里并且写响应wr_ack会有效;
当wr_en有效时,会在下一个wr_clk的上升沿执行写操作;
当FIFO满时执行写操作,wr_ack会无效并且overflow会有效,只有执行了一个或者多个写操作后,full才会无效,数据可以写入FIFO,然后wr_ack有效,overflow无效。
Read Operation
当读使能有效且FIFO不为空时,数据从FIFO读取到输出总线dout上,并且VALID信号有效;
两种读模式:standard 和 first-word fall-through(FWFT)。在标准模式下,当rd_en有效时,读操作发生在下一个rd_clk上升沿,然后输出数据才会出现在dout上并且valid信号有效;在FWFT模式下,只要有可读数据FIFO中的第一个数据就会出现在dout上,当rd_en有效时,才会在时钟上升沿将下一个数据放在dout上。而且在FWFT模式,当最后一个数据被放到dout之后才会将empty有效,但在标准模式,是在最后一个读操作时就把empty有效。
Handshaking Flags
valid,underflow,wr_ack,overflow
Non-symmetric Aspect Ratios
非对称aspect比允许FIFO输入和输出的深度不同,支持1:8, 1:4, 1:2, 1:1, 2:1, 4:1, 8:1;
在写操作时FIFO中的内存是从MSB向LSB存储的,在读操作时也是先从MSB处开始读;
Latency
。。。。。。
Design Flow Steps
Customizing and Generating the Native Core
Synchronization Stages:在选择Independent Clocks Block RAM/Distributed RAM的FIFO配置时可以选择同步器级数;