altera FIFO IP核数据写入不进去

2019-07-15 23:38发布

电路如下图clk=50Mhz
wrclk经divide分频为10kzh
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_unsigned.ALL;

ENtiTY devide is
  port(clk:in std_logic;
       reset:in std_logic;
                 clock:out std_logic
                 );
end devide;

architecture arch_devide of devide is
  signal counter:integer range 0 to 99999999;
  signal tmp_clk:std_logic;
begin
  process
  begin
       wait until rising_edge(clk);
                 if(reset='0')then
                   counter<=0;
                        tmp_clk<='1';
                else
                  if(counter=2499)then
                    counter<=0;
                         tmp_clk<=not tmp_clk;
                  else
                    counter<=counter+1;
                  end if;
                end if;
        end process;
        clock<=tmp_clk;
end arch_devide;

wrreq设定为:复位后拉高十秒后拉低
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_unsigned.ALL;

ENTITY wrreq is
  port(clk:in std_logic;
       reset:in std_logic;
                 wrreq:out std_logic
                 );
end wrreq;

architecture arch_wrreq of wrreq is
  signal counter:integer range 0 to 999999999;
  signal tmp:std_logic;
begin
  process
  begin
       wait until rising_edge(clk);
                 if(reset='0')then
                   counter<=0;
                        tmp<='1';
                else
                  if(counter=499999999)then
                    
                         tmp<='0';
                  else
                    counter<=counter+1;
                  end if;
                end if;
        end process;
        wrreq<=tmp;
end arch_wrreq;


为什么一直为空写不进数据呢?




捕获.JPG
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
5条回答
sdt
1楼-- · 2019-07-16 04:51
太难了,没理解上去。
inception1900
2楼-- · 2019-07-16 06:22
sdt 发表于 2015-8-14 17:37
太难了,没理解上去。

难么?就一个FIFO呀,我也是初学者,检查了一下wrclk和wrreq都没什么问题,就是empty标志位一直显示空
inception1900
3楼-- · 2019-07-16 07:57
顶,求关注
inception1900
4楼-- · 2019-07-16 10:05
 精彩回答 2  元偷偷看……
Richard_CJX
5楼-- · 2019-07-16 15:13
我个人觉得可能是非门存在时延造成时序不匹配。

一周热门 更多>