我对 Modelsim 很陌生,而且我不断从中得到这个“错误”。基本上我用 vhdl 编写了一个计数器:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity Contatore16bit is
port (
CLK: in std_logic;
RESET: in std_logic;
LOAD: in std_logic;
UP_DOWN: in std_logic;
ENABLE: in std_logic;
USCITA: out unsigned(15 downto 0) );
end Contatore16bit;
architecture Arch of Contatore16bit is
signal temp_value, next_value: unsigned(15 downto 0);
begin
process (CLK)
begin
if CLK'Event and CLK='1' then
if RESET='1' then
temp_value <= (others => '0');
elsif ENABLE='1' then
temp_value <= next_value;
end if;
end if;
--CASE UP_DOWN IS
--WHEN '0' => next_value <= temp_value + conv_unsigned(1, 16);
--WHEN '1' => next_value <= temp_value - conv_unsigned(1, 16);
--END CASE;
--CASE LOAD IS
--WHEN '0' => USCITA <= conv_unsigned(0, 16);
--WHEN '1' => USCITA <= temp_value;
--END CASE;
end process;
end Arch;
我可以用这段代码毫无问题地开始模拟。但是,如果我对“案例”行进行注释,modelsim 将不再识别架构并会给我错误:
错误:(vsim-3173) 实体 '...Contatore\simulation\modelsim\rtl_work.contatore16bit' 没有架构。
任何想法为什么会发生这种情况?