VHDL元件例化语句的问题 u1 u2总是出错
这是一个将十进制计数器变为四位十进制计数器的程序但是总是显示有错误错误如下:Error:Nodeinstance"u1"instantiatesundefinedenti...
这是一个将十进制计数器变为四位十进制计数器的程序但是总是显示有错误
错误如下:
Error: Node instance "u1" instantiates undefined entity "cnt10"
Error: Node instance "u2" instantiates undefined entity "cnt10"
Error: Node instance "u3" instantiates undefined entity "cnt10"
Error: Node instance "u4" instantiates undefined entity "cnt10"
程序如下
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
entity cnt7 is
port(clr,enabl,fin:in std_logic;
din0,din1,din2,din3:out std_logic_vector(3 downto 0));
end cnt7;
architecture one of cnt7 is
component cnt10
port(clk,enb,clear:in std_logic;
carry:out std_logic;
d:out std_logic_vector(3 downto 0));
end component;
signal a,b,c:std_logic;
begin
u1:cnt10 port map(clk=>fin,clear=>clr,enb=>enabl,carry=>a,d=>din0);
u2:cnt10 port map(clk=>a,clear=>clr,enb=>enabl,carry=>a,d=>din1);
u3:cnt10 port map(clk=>b,clear=>clr,enb=>enabl,carry=>a,d=>din2);
u4:cnt10 port map(clk=>c,clear=>clr,enb=>enabl,carry=>a,d=>din3);
end;
是我没有申明什么么? 展开
错误如下:
Error: Node instance "u1" instantiates undefined entity "cnt10"
Error: Node instance "u2" instantiates undefined entity "cnt10"
Error: Node instance "u3" instantiates undefined entity "cnt10"
Error: Node instance "u4" instantiates undefined entity "cnt10"
程序如下
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
entity cnt7 is
port(clr,enabl,fin:in std_logic;
din0,din1,din2,din3:out std_logic_vector(3 downto 0));
end cnt7;
architecture one of cnt7 is
component cnt10
port(clk,enb,clear:in std_logic;
carry:out std_logic;
d:out std_logic_vector(3 downto 0));
end component;
signal a,b,c:std_logic;
begin
u1:cnt10 port map(clk=>fin,clear=>clr,enb=>enabl,carry=>a,d=>din0);
u2:cnt10 port map(clk=>a,clear=>clr,enb=>enabl,carry=>a,d=>din1);
u3:cnt10 port map(clk=>b,clear=>clr,enb=>enabl,carry=>a,d=>din2);
u4:cnt10 port map(clk=>c,clear=>clr,enb=>enabl,carry=>a,d=>din3);
end;
是我没有申明什么么? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询