我有以下结构:
architecture datapath of DE2_TOP is
begin
U1: entity work.lab1 port map ( --error on this line
clock => clock_50,
key => key,
hex6 => hex6,
hex5 => hex5,
hex4 => hex4
);
end datapath;
这种架构显然取决于lab1中的实体。 这是我lab1中的实体和架构:
entity lab1 is
port(
clock : in std_logic;
key : in std_logic_vector(3 downto 0);
hex4, hex5, hex6 : out std_logic_vector(6 downto 0);
value_counter : in unsigned(7 downto 0);
register_counter : in unsigned(3 downto 0)
);
end lab1;
architecture up_and_down of lab1 is
signal hex5_value : unsigned(7 downto 0);
begin
process(clock)
begin
value_counter<="00000000"; --default values?
register_counter<="0000";
if rising_edge(clock) then
if (key(3)='0' and key(2)='0' and key(1)='1' and key(0)='0') then
value_counter <= value_counter + "1";
elsif (key(3)='0' and key(2)='0' and key(1)='0' and key(0)='1') then
value_counter <= value_counter - "1";
end if;
end if;
hex5_value <= (value_counter - (value_counter mod 10))/10;
end process;
end architecture up_and_down;
我收到以下错误: Error (10346): VHDL error at DE2_TOP.vhd(280): formal port or parameter "value_counter" must have actual or default value
的指示线。 在我看来,我已经在我的lab1中的建筑已经设置的默认值。 任何人都知道是什么问题?