xilinx SIE仿真问题

2019-07-16 01:55发布

按照一本书练习vhdl语言,仿真时遇到了问题,ise10.1版本,请教各位前辈,这是什么问题?
错误提示:ERROR:Simulator:29 - at 0 ns : Delay 50000000 fs is not greater than previous waveform element delay 500000000 fs in assignment for target signal load
仿真语句:
ENtiTY MY_CNTR_TB IS
END MY_CNTR_TB;

ARCHITECTURE behavior OF MY_CNTR_TB IS

    -- Component Declaration for the Unit Under Test (UUT)

    COMPONENT MY_CNTR
    PORT(
         CLK : IN  std_logic;
         RST : IN  std_logic;
         D_IN : IN  std_logic_vector(7 downto 0);
         Q_OUT : OUT  std_logic_vector(7 downto 0);
         LOAD : IN  std_logic;
         CE : IN  std_logic;
         UPDN : IN  std_logic
        );
    END COMPONENT;


   --Inputs
   signal CLK_SIG : std_logic := '0';
   signal RST : std_logic := '1';
   signal D_IN : std_logic_vector(7 downto 0) := X"0F";
   signal LOAD : std_logic := '0';
   signal CE : std_logic := '1';
   signal UPDN : std_logic := '1';

        --Outputs
   signal Q_OUT : std_logic_vector(7 downto 0);

BEGIN

        -- Instantiate the Unit Under Test (UUT)
   uut: MY_CNTR PORT MAP (
          CLK => CLK_SIG,
          RST => RST,
          D_IN => D_IN,
          Q_OUT => Q_OUT,
          LOAD => LOAD,
          CE => CE,
          UPDN => UPDN
        );

       
        CLK_SIG <= not CLK_SIG after 5 ns;
          -- Stimulus process
   stim_proc: process
   begin               
                CE <= '1','0' after 300 ns,'1' after 400 ns;
                RST <= '0' after 15 ns,'1' after 40 ns;
                UPDN <= '0' after 750 ns;
                LOAD <= '1' after 500 ns, '0' after 50 ns;
      wait;
   end process;
END;

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
2条回答
zhangshujie
1楼-- · 2019-07-16 02:41
你要实现的是什么功能的??
sundonga
2楼-- · 2019-07-16 02:48
zhangshujie 发表于 2013-2-4 14:57
你要实现的是什么功能的??

很简单,就是一个可加可减的计数器。
entity MY_CNTR is
        generic (CNT_WIDTH: integer:= 8);
        port( CLK: in std_logic;
                        RST: in std_logic;
                        D_IN: in std_logic_vector(CNT_WIDTH-1 downto 0);
                        Q_OUT: out std_logic_vector(CNT_WIDTH-1 downto 0);
                        LOAD: in std_logic;
                        CE: in std_logic;
                        UPDN: in std_logic);
end MY_CNTR;

architecture Behavioral of MY_CNTR is
        signal INT_CNT: std_logic_vector(CNT_WIDTH-1 downto 0);
begin
       
        process (CLK,RST)
        begin
                if RST='0' then
                        INT_CNT <= (others=> '0');
                elsif rising_edge(CLK) then
                        if CE='1' then
                                if LOAD='1' then
                                        INT_CNT <= D_IN;
                                else
                                        if UPDN='1' then
                                                INT_CNT <= INT_CNT + 1;
                                        else
                                                INT_CNT <= INT_CNT - 1;
                                        end if;
                                end if;
                        end if;
                end if;
        end process;
       
        Q_OUT <= INT_CNT;
end Behavioral;

一周热门 更多>