ECE 331 – Digital System Design

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

LECTURE 4: The VHDL N-bit Adder
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
ECE 331 – Digital System Design
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
ECE 301 – Digital Electronics
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 301 – Digital Electronics
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’.
(1) Programming Mechanics © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
 Seattle Pacific University EE Logic System DesignCADNumbers-1 Arithmetic and CAD Tools CAD tools work great with arithmetic functions Adding,subtracting,multiplying,
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
IAY 0600 Digital Systems Design
Digital Arithmetic and Arithmetic Circuits
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
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.
WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)
ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 6: Configurations.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
L26 – Datapath ALU implementation
Reconfigurable Computing - VHDL John Morris Chung-Ang University The University of Auckland.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Basic Overview of VHDL Matthew Murach Slides Available at:
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
Reconfigurable Computing - VHDL John Morris Computer Science/ Electrical and Computer Engineering The University of Auckland Iolanthe racing off Fremantle,
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.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
1/8/ L2 VHDL Introcution© Copyright Joanne DeGroat, ECE, OSU1 Introduction to VHDL.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
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)
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
ECOM 4311—Digital System Design with VHDL
Number Systems and Circuits for Addition – Binary Adders Lecture 6 Section 1.5 Fri, Jan 26, 2007.
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
Electrical Engineering Engineering the Future Digital Circuits Fundamentals Hands-on Full-Adder Simulation (afternoon)
Explain Half Adder and Full Adder with Truth Table.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
IAY 0600 Digital Systems Design VHDL discussion Structural style Modular design and hierarchy Part 1 Alexander Sudnitson Tallinn University of Technology.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
IAY 0600 Digital Systems Design
Combinational logic circuit
Elements of Structural Models
Structural style Modular design and hierarchy Part 1
Basic Language Concepts
Structural style Modular design and hierarchy Part 1
ENG6530 Reconfigurable Computing Systems
ECE 331 – Digital System Design
VHDL VHSIC Hardware Description Language VHSIC
Structural style Modular design and hierarchy Part 1
VHDL (VHSIC Hardware Description Language)
Hardware Descriptive Languages these notes are taken from Mano’s book
Chapter 5 – Number Representation and Arithmetic Circuits
ECE 331 – Digital System Design
NTU DSD (Digital System Design) 2007
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
Digital Logic with VHDL
Presentation transcript:

ECE 331 – Digital System Design Single-bit Adder Circuits (Lecture #11)

Single-bit Adder Circuits The Half Adder (HA) ECE 331 - Digital System Design

ECE 331 - Digital System Design Binary Addition 0 0 1 1 + 0 + 1 + 0 + 1 0 1 1 10 Sum Carry ECE 331 - Digital System Design

ECE 331 - Digital System Design The Half Adder A B Sum Carry 1 Sum = A'.B + A.B' = A xor B Carry = A.B ECE 331 - Digital System Design

ECE 331 - Digital System Design The Half Adder HA (c) Circuit (d) Graphical symbol A B Sum Carry ECE 331 - Digital System Design

ECE 331 - Digital System Design The Half Adder in VHDL LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY halfadd IS PORT ( A, B : IN STD_LOGIC ; Sum, Cout : OUT STD_LOGIC ) ; END halfadd ; ARCHITECTURE LogicFunc OF halfadd IS BEGIN Sum <= A XOR B; Cout <= A AND B; END LogicFunc ; Filename: halfadd.vhdl Contains both the entity and the architecture statements ECE 331 - Digital System Design

Single-bit Adder Circuits The Full Adder (FA) ECE 331 - Digital System Design

ECE 331 - Digital System Design Binary Addition 0 0 0 0 0 0 1 1 + 0 + 1 + 0 + 1 0 1 1 10 Carry-in 1 1 1 1 0 0 1 1 + 0 + 1 + 0 + 1 1 10 10 11 Carry-out Sum ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder A B Cin Sum Cout 1 ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder Sum Cout 00 01 11 10 1 A B Cin A B Cin 00 01 11 10 1 1 1 1 1 Sum = A xor B xor Cin Cout = A.B + A.Cin + B.Cin ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder A B Cin Sum Cout ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder in VHDL LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY fulladd IS PORT ( Cin, A, B : IN STD_LOGIC ; Sum, Cout : OUT STD_LOGIC ) ; END fulladd ; ARCHITECTURE LogicFunc OF fulladd IS BEGIN Sum <= A XOR B XOR Cin ; Cout <= (A AND B) OR (Cin AND A) OR (Cin AND B) ; END LogicFunc ; ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder HA s c (a) Block diagram (b) Detailed diagram Half Adder A B Cin Sum Cout ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder in VHDL Construct Full Adder from two Half Adders Use Structural VHDL Realize using hierarchical design Design half adder Interconnect half adders Include any additional logic ECE 331 - Digital System Design

ECE 331 - Digital System Design VHDL: Components Specify the logical sub-circuits (i.e. components) that will be used in the hierarchical design. Define the interface to the sub-circuit. Uses the same format as the Entity Statement. Sub-circuits are interconnected using “wires”. This is known as Structural VHDL. The architecture statement for the sub-circuit may be included in the same file as the upper level design or in a separate file. If included in a separate file, it must be compiled prior to compilation of the upper level design. ECE 331 - Digital System Design

ECE 331 - Digital System Design VHDL: Components Component Statement COMPONENT <component name> PORT ( <interface signals> : mode type ) ; END COMPONENT ; Component Instantiation named association <instance name> : <component name> PORT MAP ( <component port names> => <signal names> ) ; PORT MAP ( <signal names> ) ; positional association ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder in VHDL Half Adder A B Cin Sum Cout ports ports LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY fulladd IS PORT ( Cin, A, B : IN STD_LOGIC ; Sum, Cout : OUT STD_LOGIC ) ; END fulladd ; ECE 331 - Digital System Design

The Full Adder in VHDL ARCHITECTURE Structure OF fulladd IS Half Adder A B Cin Sum Cout signal signals ARCHITECTURE Structure OF fulladd IS SIGNAL s1, c1, c2: STD_LOGIC ; COMPONENT halfadd PORT ( A, B : IN STD_LOGIC ; Sum, Cout : OUT STD_LOGIC ) ; END COMPONENT ; BEGIN ha1 : halfadd PORT MAP ( A => A, B => B, Sum => s1, Cout => c1 ) ; ha2 : halfadd PORT MAP ( A, B, Sum, c2 ); Cout <= c1 OR c2 ; END Structure ; component declaration named association component instantiation positional association

ECE 331 - Digital System Design VHDL: Packages Packages (and libraries) allow frequently used functions and components to be “centrally” located. Component declarations are included in package files rather than in the VHDL code for the hierarchical design. The associated VHDL models for the components are included in separate files. The compiled VHDL models are typically included in the same library. When the package file is compiled, the package is created and stored in the working directory. ECE 331 - Digital System Design

ECE 331 - Digital System Design VHDL: Packages Package Declaration LIBRARY ieee ; USE ieee.std_logic_1164.all ; PACKAGE <package name> IS <package declarations> ; END <package name> ; Package Declaration LIBRARY work ; USE work.<package name>.all ; ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder in VHDL (The Package File) LIBRARY ieee ; USE ieee.std_logic_1164.all ; PACKAGE halfadd_package IS COMPONENT halfadd PORT ( A, B: IN STD_LOGIC ; Sum, Cout: OUT STD_LOGIC ) ; END COMPONENT ; END halfadd_package ; ECE 331 - Digital System Design

ECE 331 - Digital System Design The Full Adder in VHDL (The Design File) LIBRARY ieee ; USE ieee.std_logic_1164.all ; USE work.halfadd_package.all ; ENTITY fulladd IS PORT ( Cin, A, B : IN STD_LOGIC ; Sum, Cout : OUT STD_LOGIC ) ; END fulladd ; ARCHITECTURE Structure OF fulladd IS SIGNAL s1, c1, c2: STD_LOGIC ; BEGIN ha1 : halfadd PORT MAP ( A => A, B => B, Sum => s1, Cout => c1 ) ; ha2 : halfadd PORT MAP ( A, B, Sum, c2 ); Cout <= c1 OR c2 ; END Structure ; ECE 331 - Digital System Design

Multi-bit Adder Circuits ECE 331 - Digital System Design

Implementations of Multi-bit Adders: 1. Ripple Carry Adder 2. Carry Lookahead Adder ECE 331 - Digital System Design

ECE 331 - Digital System Design Ripple Carry Adder ECE 331 - Digital System Design

ECE 331 - Digital System Design Ripple Carry Adder Carry ripples from one column to the next 1 1 1 Carry-in 1 1 + 1 1 Carry-out 1 1 ECE 331 - Digital System Design

ECE 331 - Digital System Design Ripple Carry Adder Carry-out Carry-in FA x n – 1 c n ” y – s 2 MSB position LSB position Carry ripples from one stage to the next ECE 331 - Digital System Design

ECE 331 - Digital System Design Ripple Carry Adder n-bit Ripple Carry Adder Composed of n 1-bit Full Adders Carries ripple from LSB stage to MSB stage Delay ~ (n)*(delay of single FA stage) Area required is linear in n 4-bit Ripple Carry Adder Composed of 4 1-bit Full Adders ECE 331 - Digital System Design

The Ripple Carry Adder is slow! Why? How can the speed of the adder be increased? ECE 331 - Digital System Design