SlideShare a Scribd company logo
1 of 2
Additionneur complet 4 bits AC4
library ieee;
use ieee.std_logic_1164.all;
entity AC4 is
port( A,B: in std_logic_vector(3 downto 0);
som : out std_logic_vector(3 downto 0);
Ret: out std_logic
);
end AC4;
architecture arch of AC4 is

component da is
port ( A,B : in std_logic;
sigma, R : out std_logic
);

end component;

component ac1 is
port ( a,b,r: in std_logic;
S, Ro: out std_logic
);

end component;
signal x:std_logic_vector (3 downto 0);

begin
objet1: da port map ( A(0),B(0),som(0),x(0));
objet2: ac1 port map ( A(1),B(1),x(0),som(1),x(1));
objet3: ac1 port map ( A(2),B(2),x(1),som(2),x(2));
objet4: ac1 port map ( A(3),B(3),x(2),som(3),x(3));

Ret<=x(3);
end arch;

More Related Content

What's hot

Carry save adder Type 2
Carry save adder Type 2Carry save adder Type 2
Carry save adder Type 2Atchyuth Sonti
 
Computer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlabComputer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlabShankar Gangaju
 
All VLSI programs
All VLSI programsAll VLSI programs
All VLSI programsGouthaman V
 
Vhd lhigh2003
Vhd lhigh2003Vhd lhigh2003
Vhd lhigh2003gkumawat
 
Efficient SIMD Vectorization for Hashing in OpenCL
Efficient SIMD Vectorization for Hashing in OpenCLEfficient SIMD Vectorization for Hashing in OpenCL
Efficient SIMD Vectorization for Hashing in OpenCLJonas Traub
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab FileKandarp Tiwari
 
Roots of a quadratic equation1
Roots of a quadratic equation1Roots of a quadratic equation1
Roots of a quadratic equation1Wilson ak
 
Digital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECEDigital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECERamesh Naik Bhukya
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked ListSayantan Sur
 
Doublylinklist
DoublylinklistDoublylinklist
Doublylinklistritu1806
 
Programming in c function
Programming in c functionProgramming in c function
Programming in c functionParvez Ahmed
 

What's hot (20)

Carry save adder Type 2
Carry save adder Type 2Carry save adder Type 2
Carry save adder Type 2
 
Computer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlabComputer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlab
 
Linked list2
Linked list2Linked list2
Linked list2
 
Carry save adder vhdl
Carry save adder vhdlCarry save adder vhdl
Carry save adder vhdl
 
All VLSI programs
All VLSI programsAll VLSI programs
All VLSI programs
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Vhd lhigh2003
Vhd lhigh2003Vhd lhigh2003
Vhd lhigh2003
 
8 Bit ALU
8 Bit ALU8 Bit ALU
8 Bit ALU
 
Gpus graal
Gpus graalGpus graal
Gpus graal
 
VHDL Programs
VHDL ProgramsVHDL Programs
VHDL Programs
 
Efficient SIMD Vectorization for Hashing in OpenCL
Efficient SIMD Vectorization for Hashing in OpenCLEfficient SIMD Vectorization for Hashing in OpenCL
Efficient SIMD Vectorization for Hashing in OpenCL
 
ECAD lab manual
ECAD lab manualECAD lab manual
ECAD lab manual
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab File
 
Cpl
CplCpl
Cpl
 
Roots of a quadratic equation1
Roots of a quadratic equation1Roots of a quadratic equation1
Roots of a quadratic equation1
 
Stack using Array
Stack using ArrayStack using Array
Stack using Array
 
Digital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECEDigital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECE
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
Doublylinklist
DoublylinklistDoublylinklist
Doublylinklist
 
Programming in c function
Programming in c functionProgramming in c function
Programming in c function
 

Programme en C: Additionneur complet 4 bits ac4

  • 1. Additionneur complet 4 bits AC4 library ieee; use ieee.std_logic_1164.all; entity AC4 is port( A,B: in std_logic_vector(3 downto 0); som : out std_logic_vector(3 downto 0); Ret: out std_logic ); end AC4; architecture arch of AC4 is component da is port ( A,B : in std_logic; sigma, R : out std_logic ); end component; component ac1 is port ( a,b,r: in std_logic; S, Ro: out std_logic ); end component;
  • 2. signal x:std_logic_vector (3 downto 0); begin objet1: da port map ( A(0),B(0),som(0),x(0)); objet2: ac1 port map ( A(1),B(1),x(0),som(1),x(1)); objet3: ac1 port map ( A(2),B(2),x(1),som(2),x(2)); objet4: ac1 port map ( A(3),B(3),x(2),som(3),x(3)); Ret<=x(3); end arch;