SOPC BUILDER定制了个8位256深度的FIFO,综合能通过,但仿真没成功,各位高手看看呗,给点意见
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;
entity control is
port(clk : in std_logic;
wrreq,rdreq : out std_logic;
usedw : in std_logic_vector(7 downto 0));end entity;
architecture bhv of control isbegin
process(clk)
begin
if clk'event and clk='1' then
if usedw<"01110101" then
rdreq<='0';
wrreq<='1';
else
wrreq<='0';
rdreq<='1';
end if;
end if;
end process;end architecture;
此帖出自
小平头技术问答
具体怎么控制是符合你要求。这个需要看你的方案了。FIFO读写基本上满足这个原则的
写数据:
先准备数据和地址
然后置写有效
写有效一个时钟,写一次;长期有效,写多次;
读数据:
先准备地址;然后置读有效;
然后延迟1个时钟,取数据。
上面控制原则!你领会了,控制FIFO很简单的
一周热门 更多>