我不知道为什么会收到此错误(错误(10482):SWSelectorVHDL.vhd(11)处的VHDL错误:使用了对象“ select_vector”,但未声明)。请指出我需要更改的内容。 这是我的代码
library ieee;
use ieee.std_logic_1164.all;
entity SWSelectorVHDL is
generic(
NUM : std_logic_vector(2 downto 0) := "000"
);
port(
selector : in select_vector(7 downto 0);
rq : in std_logic_vector(7 downto 0);
own : out std_logic_vector(7 downto 0)
);
end entity SWSelectorVHDL;
architecture RTL of SWSelectorVHDL is
begin
gen_req : for i in 0 to 7 generate
requests(i) <= rq(i) when (selector(i) = NUM) else '0';
end generate;
end;
答案 0 :(得分:3)