第一个是与门,第二个调用与门,两个文件放在同一目录下
----------------------------
library ieee;
entity and2 is
port(x,y:in bit;zut bit);
end and2;
architecture ex2 of and2 is
begin
z<=x and y;
end ex2;
---------------------------
---------------------------
library ieee;
entity adder1 is
port(
m,c:in bit;
nut bit);
end entity;
architecture ex1 of adder1 is
component and2 is
port(x,y:in bit;zut bit);
end component; begin
g1:and2 port map (m,c,n);
end ex1;
---------------------
-------------------
and2编译通过,
但adder1不行,
错误提示是:
error:file d:\max\decoder.dir\adder1.vhd:symbolic name "x" is not a
port of "and2" in a vhdl design file
error:file d:\max\decoder.dir\adder1.vhd:symbolic name "y" is not a
port of "and2" in a vhdl design file
error:file d:\max\decoder.dir\adder1.vhd:symbolic name "z" is not a
port of "and2" in a vhdl design file
这是怎么回事?请各位大侠不吝赐教!