Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.

Slides:



Advertisements
Similar presentations
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
Advertisements

Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
LECTURE 4: The VHDL N-bit Adder
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Adder Discussion D6.2 Example 17. s i = c i ^ (a i ^ b i ) c i+1 = a i * b i + c i * (a i ^ b i ) Full Adder (Appendix I)
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Space vs. Speed: Binary Adders 11.3 Space vs. Speed.
Lab 2 4-Bit Adder Digilent Spartan 3 Board Lecture L2.3.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #12) The slides included herein were taken from the materials.
ECE 301 – Digital Electronics
ECE 331 – Digital System Design
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
L23 – Arithmetic Logic Units. Arithmetic Logic Units (ALU)  Modern ALU design  ALU is heart of datapath  Ref: text Unit 15 9/2/2012 – ECE 3561 Lect.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
Binary Addition Section 4.5. Binary Addition Example.
Digital Arithmetic and Arithmetic Circuits
DSD,USIT,GGSIPU1 Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in std_logic; q0, q1,
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
L26 – Datapath ALU implementation
Carry look ahead adder P (I) = a(I) xor b(I); G(I) = a(I) and b(I); S(I) = p(I) xor c(I); Carry(I+1) = c(I)p(I) + g(I)
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL.
Reconfigurable Computing - VHDL John Morris Computer Science/ Electrical and Computer Engineering The University of Auckland Iolanthe racing off Fremantle,
HARDWARE DESCRIPTION LANGUAGE (HDL). What is HDL? A type of programming language for sampling and modeling of electronic & logic circuit designs It can.
1 component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words  Declarations of Components and Entities are similar  Components are.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #11) The slides included herein were taken from the materials.
Number Systems and Circuits for Addition Lecture 5 Section 1.5 Thu, Jan 26, 2006.
P R O J E C T VLSI 설계 자동화 담당교수님 : 조 준동 교수님.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
Digital System Projects
CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE 3: The VHDL N-bit Adder Instructor: Francis G. Wolff Case Western Reserve.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
陳慶瀚 國立中央大學資工系 2014 年 4 月 16 日 A2 VHDL Combinational Logic Design.
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
Number Systems and Circuits for Addition – Binary Adders Lecture 6 Section 1.5 Fri, Jan 26, 2007.
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
Number Representation and Arithmetic Circuits
Electrical Engineering Engineering the Future Digital Circuits Fundamentals Hands-on Full-Adder Simulation (afternoon)
Explain Half Adder and Full Adder with Truth Table.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
LAB #5 Modular Design and Hierarchy using VHDL
Combinational logic circuit
IAY 0600 Digital Systems Design
Space vs. Speed: Binary Adders
Behavioral Style Combinational Design with VHDL
ENG6530 Reconfigurable Computing Systems
Combinational Circuits Using VHDL
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
VHDL Description 1. Behavioral Description (동작묘사)
ECE 331 – Digital System Design
HDL Programming Fundamentals
Getting Started with Vivado
VHDL (VHSIC Hardware Description Language)
Concurrent vs Sequential
Chapter 5 – Number Representation and Arithmetic Circuits
Single bit comparator Single bit comparator 4/10/2007 DSD,USIT,GGSIPU
4-Input Gates VHDL for Loops
Digital Logic with VHDL
EEL4712 Digital Design (Lab 1)
Presentation transcript:

Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU

Half adder entity ha is Port ( x : in std_logic; y : in std_logic; s : out std_logic; c : out std_logic); end ha; architecture Behavioral of ha is begin s <= x xor y; c <= x and y; end Behavioral; 10/9/2007 DSD,USIT,GGSIPU

Full adder entity fa_comp is Port ( a : in std_logic; b : in std_logic; cin : in std_logic; sum : out std_logic; carry : out std_logic); end fa_comp; 10/9/2007 DSD,USIT,GGSIPU

architecture Behavioral of fa_comp is component ha is Port ( x : in std_logic; y : in std_logic; s : out std_logic; c : out std_logic); end component; signal temp1,temp2,temp3 : std_logic; begin ha1 : ha port map (x => a, y =>b, s=>temp1, c=> temp2); ha2 : ha port map (x=>temp1, y =>cin, s=>sum, c =>temp3); carry <= temp2 or temp3; end Behavioral; 10/9/2007 DSD,USIT,GGSIPU

4-bit adder entity adder4bit is Port ( a : in std_logic_vector(3 downto 0); b : in std_logic_vector(3 downto 0); carryin : in std_logic; sum : out std_logic_vector(3 downto 0); carryout : out std_logic); end adder4bit; 10/9/2007 DSD,USIT,GGSIPU

architecture Behavioral of adder4bit is component fa_comp is Port ( a : in std_logic; b : in std_logic; cin : in std_logic; sum : out std_logic; carry : out std_logic); end component fa_comp; signal temp : std_logic_vector(2 downto 0); 10/9/2007 DSD,USIT,GGSIPU

begin u1 : fa_comp port map (a=>a(0),b=>b(0),cin =>carryin,sum=>sum(0),carry=>temp(0)); u2 : fa_comp port map (a=>a(1),b=>b(1),cin=>temp(0),sum=>sum(1),carry =>temp(1)); u3 : fa_comp port map (a=>a(2),b=>b(2),cin=>temp(1),sum=>sum(2),carry=>temp(2)); u4 : fa_comp port map (a=>a(3),b=>b(3),cin=>temp(2),sum=>sum(3),carry=>carryout); end Behavioral; 10/9/2007 DSD,USIT,GGSIPU