我写了一些关于使用全加器作为组件的 8 位加法器的代码。当我开始编译时,它显示了一个我无法找到的错误。我可能还有其他我无法注意到的错误。这是我的代码:
library ieee;
use ieee.std_logic_1164.all;
entity F_A is
port(
a,b,c_in : in std_logic;
sum,c_out : out std_logic);
end F_A;
architecture behave of F_A is
begin
sum <= a xor b xor c_in;
c_out <= (a and b)or(a and c_in)or(b and c_in);
end behave;
entity Adder_8bit is
port( a,b: in std_logic_vector(7 downto 0);
Cin: in std_logic;
sum: out std_logic_vector(7 downto 0);
Cout: out std_logic);
end Adder_8bit;
architecture RTL of Adder_8bit is
signal c : std_logic_vector(7 downto 0);
component F_A …Run Code Online (Sandbox Code Playgroud)