实现一个8*8的单脉冲FIFO。FIFO是先进先出堆栈,作为数据缓冲器。通常其数据存放结构是完全和RAM一致的只是存取方式不同!
MAXPLUS2软件的库文件中,提供了一个LPM_FIFO的器件,这样,我们可以直接器件调用来设计一个FIFO,调用方法如下:
COMPONENT LPM_FIFO
GENERIC (LPM_WIDTH: POSITIVE;
LPM_WIDTHU: POSITIVE := 1;
LPM_TYPE: STRING := "LPM_FIFO";
LPM_NUMWORDS: POSITIVE;
LPM_SHOWAHEAD: STRING := "OFF"
LPM_HINT: STRING := "UNUSED");
PORT (data: IN STD_LOGIC_VECTOR(LPM_WIDTH-1 DOWNTO 0);
clock, rdreq, wrreq: IN STD_LOGIC;
aclr, sclr: IN STD_LOGIC := '0';
full, empty: OUT STD_LOGIC;
usedw: OUT STD_LOGIC_VECTOR(LPM_WIDTHU-1 DOWNTO 0);
q: OUT STD_LOGIC_VECTOR(LPM_WIDTH-1 DOWNTO 0)
);
END COMPONENT;