dio cane
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
entity RCA4 is
|
||||
Port (A,B: in bit_vector(3 downto 0);
|
||||
cin: in bit;
|
||||
S: out bit_vector(3 downto 0);
|
||||
cout: out bit);
|
||||
end RCA4;
|
||||
|
||||
architecture MyRCA4 of RCA4 is
|
||||
signal C: bit_vector(3 downto 1);
|
||||
component FullAdder is
|
||||
Port ( a,b,cin : in bit;
|
||||
s,cout : out bit);
|
||||
end component;
|
||||
begin
|
||||
FA0: FullAdder port map(A(0),B(0),cin,S(0),C(1));
|
||||
FA1: FullAdder port map(A(1),B(1),C(1),S(1),C(2));
|
||||
FA2: FullAdder port map(A(2),B(2),C(2),S(2),C(3));
|
||||
FA3: FullAdder port map(A(3),B(3),C(3),S(3),cout);
|
||||
end MyRCA4;
|
||||
Reference in New Issue
Block a user