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
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。