entity Adder4Bit is
Port ( A : in STD_LOGIC_VECTOR (3 downto 0);
B : in STD_LOGIC_VECTOR (3 downto 0);
S : out STD_LOGIC_VECTOR (3 downto 0);
COUT : out STD_LOGIC);
end Adder4Bit;
architecture structure of Adder4Bit is
component FullAdder -- add the fulladder to this architecture
port (
A : in std_logic;
B : in std_logic;
CIN : in std_logic;
SUM : out std_logic;
COUT : out std_logic
);
end component;
signal wires : std_logic_vector(3 downto 1) := "000"; -- Make a signal "wires" with initial value 000
begin
adder0 : FullAdder port map ( A=> A(0), B => B(0), CIN => '0', SUM => S(0), COUT => wires(1) );
adder1 : FullAdder port map ( A=> A(1), B => B(1), CIN => wires(1), SUM => S(1), COUT => wires(2) );
adder2 : FullAdder port map ( A=> A(2), B => B(2), CIN => wires(2), SUM => S(2), COUT => wires(3) );
adder3 : FullAdder port map ( A=> A(3), B => B(3), CIN => wires(3), SUM => S(3), COUT => COUT );
end structure;
在最底层的adder3中,程序怎么知道哪个cout属于实体Adder4Bit,哪个cout属于组件FullAdder呢?它与箭头的方向有什么关系吗?
非常感谢您提前