我有一个 VHDL 测试文件 a.vhd。
猫.vhd
package pak is
component b is -- 1st definition of component b.
end component
end pak;
use work.pak.all; -- 1st definition visible through this package use clause
entity a is
port (in1 : in std_logic );
end a;
architecture a of a is
component b -- 2nd definition of component b.
port ( in11 : in std_logic);
end component;
begin
inst : b port map ( in11=> in1); -- there are two definitions of component b at this instance.
end a;
entity b is
port (in11 : in std_logic);
end b;
architecture b of b is
begin
end b;
因此,在其上运行 modelsim 时,不会出现被覆盖组件的警告/错误。我们是否总是优先考虑在架构中声明的组件,而不是在 package.json 中声明的同名组件。有人能告诉我 LRM 是怎么说的吗?请解释一下。