MODELSIM ALTERA ERROR: NUMERIC_STD."=": metavalue detected, returning FALSE

问题描述 投票:0回答:0

我想在 vhdl 中创建一个计数器作为更大项目的一部分,当我编译时一切正常。但是,当我运行整个模拟时,它从不显示图形面板,而是显示此错误:#** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE 时间:0 ps 迭代:1 实例:/pract2/i2。 -- i2 是名为“ContadorUno”的 vhdl 文件 我知道这与某些值是 U 或 X 而不是布尔值这一事实有关,因此当将它与另一个布尔值进行比较时会出现此错误。但是,我似乎无法在此文件中发现它。 ¿也许它在另一个人中,即使模拟告诉我在这个人中?我不知道,我需要帮助。

--BLOQUE CONTADOR
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY ContadorUno IS
    PORT (
        clk, reset_n : IN std_logic;
        enable_t : IN std_logic; -- necesito dos enables para que en la maquina de estados, cuando quiero que me empiece a contar hasta uno, se resetee
        cuenta_uno: out std_logic);
END ContadorUno;

ARCHITECTURE behavioral of ContadorUno is 
signal contador: unsigned(11 downto 0);
constant uno: unsigned(11 downto 0):= to_unsigned(2604,12);


begin 
process(clk,reset_n)
begin 
    if reset_n='0' then 
        contador <= (others => '0');
        
    elsif clk'event and clk='1' then 
        if enable_t='1' then 
            if contador=uno then 
                contador <= (others => '0');
            else
            contador <= contador +1; 
            end if; 
        else
            contador <= (others => '0');
        end if; 
    end if; 
end process;


cuenta_uno <= '1' when (contador=uno and enable_t='1') else '0';

end behavioral;     

            
    
        
runtime-error vhdl simulation modelsim
© www.soinside.com 2019 - 2024. All rights reserved.