Error (10482): VHDL error: object “select_vector” is used but not declared

断了今生、忘了曾经 提交于 2019-12-25 19:46:17

问题


I dont know why I am getting this error (Error (10482): VHDL error at SWSelectorVHDL.vhd(11): object "select_vector" is used but not declared). Please point out what do I need to change.. Here is my code

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;

回答1:


  • I don't think "select_vector" is a valid type for your input port "selector". I guess it should be "std_logic_vector(7 downto 0)"
  • or if "select_vector" is valid type then you need to include the package where you have declared the type "select_vector".


来源:https://stackoverflow.com/questions/53278598/error-10482-vhdl-error-object-select-vector-is-used-but-not-declared

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!