Full Adder Section 4.5 Spring, 2014 J.Ou. Schedule 62/3MondayBinary addition: full adder 72/5WednesdayBinary addition: full adder/four-bit adder L2/6ThursdayLab.

Slides:



Advertisements
Similar presentations
Verilog Section 3.10 Section 4.5. Keywords Keywords are predefined lowercase identifiers that define the language constructs – Key example of keywords:
Advertisements

CDA 3100 Recitation Week 11.
//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
Verilog.
The Verilog Hardware Description Language
Decoder Mano Section 4.9 &4.12.
Verilog Descriptions of Digital Systems
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Cs 1110 Ch 4-1 Combinational Logic. ° Introduction Logic circuits for digital systems may be: °2°2 combinational sequential OR A combinational circuit.
Verilog Intro: Part 1.
Figure 4.1. The function f (x1, x2, x3) =  m(0, 2, 4, 5, 6).
16/04/20151 Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and.
Half Adder Sec Sec. 4.5, Schedule 11/13MondayCourse intro, diagnostic test 21/15Wednesday Fundamentals of digital logic design (1) (signed.
Full Adder Display. Topics A 1 bit adder with LED display Ripple Adder Signed/Unsigned Subtraction Hardware Implementation of 4-bit adder.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
Lecture 1 Design Hierarchy Chapter 1. Digital System Design Flow 1.Register-Transfer Levl (RTL) – e.g. VHDL/Verilog 2.Gate Level Design 3.Circuit Level.
Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Binary Addition. Binary Addition (1) Binary Addition (2)
ECE 331 – Digital System Design
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Allows designers to quickly create and debug large.
ENEE 408C Lab Capstone Project: Digital System Design Spring 2005 Class Web Site: e408c.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
Encoder Section Outline Review: Sum of Products Encoder Priority Decoder Application of Priority Decoder.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Binary Addition CSC 103 September 17, 2007.
Binary Addition Section 4.5. Binary Addition Example.
ECE 3130 – Digital Electronics and Design
Digital Arithmetic and Arithmetic Circuits
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
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.
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
C ONTINUOUS A SSIGNMENTS. C OMBINATIONAL L OGIC C IRCUITS each output of a Combinational Logic Circuit  A function of the inputs - Mapping functions.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
Use CMOS Transistors to bit a 4-bit Adder. NAND2 symbol Schematic.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
CEC 220 Digital Circuit Design
Introduction to Verilog Section Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
Full Adder Verilog(HO: wires/regs, always) Section 4.5 (Full adder)
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Mantıksal Tasarım – BBM231 M. Önder Efe
Designing Combinational Logic Circuits in Verilog - 1
ECE 3130 Digital Electronics and Design
Combinational Circuits
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
Chapter 4 Combinational Logic
Introduction to Verilog
Introduction to Verilog
FIGURE 4.1 Block diagram of combinational circuit
Week 7: Gates and Circuits: PART II
Number Systems and Circuits for Addition
فصل چهارم مدارهای ترکیبی.
Adders and Subtractors
The Verilog Hardware Description Language
XOR Function Logic Symbol  Description  Truth Table 
Prof. Onur Mutlu ETH Zurich Spring March 2019
Half & Full Subtractor Half Subtractor Full Subtractor.
Half & Full Subtractor Half Subtractor Full Subtractor.
Presentation transcript:

Full Adder Section 4.5 Spring, 2014 J.Ou

Schedule 62/3MondayBinary addition: full adder 72/5WednesdayBinary addition: full adder/four-bit adder L2/6ThursdayLab canceled 82/10MondayClass canceled 92/12Wednesday Four bit subtractor, effects of gate delay, binary multiplication L2/13ThursdayBinary adder: full adder 102/17MondayDecoder 112/19WednesdayEncoder L2/20ThursdayDecoder Experiment 122/24MondayMUX/Three state 132/26WednesdayReview L2/27ThursdayRandom number generator 143/3MondayTest 1

Outline Review of a Half Adder Full Adder – Explanation – Step-By-Step Module Writing Four Bit Adder

Derivation of ∑ BA∑

Derivation of Carry Out Question: What primitive best implements C o ? Inputs: A, B Outputs: C o =A∙B BACoCo

Implementation of a Half-Adder

Limitation of a Half Adder A half-adder does not account for carry-in.

Truth Table for a Full Adder carry-in

Karnaugh Map For the Sum Bit

Karnaugh Map For the Carry-Out Bit

Implementation of a Full Adder (carry-in)

Build a Full-Adder Circuit w1 w2w3 M1M2

Module Template module module_name (,, ) endmodule Input, output wires reg Program Body

Module Declaration w1 w2w3 M1M2 x,y, and z are the input ports s,c are the output ports wires:x, y,z, s, c wires w1, w2, w3

Module Template module module_name (,, ) endmodule Input, output wires reg Program Body

w1 w2w3 M1M2 Use existing half adder cells Two instances: M1 and M2 Need an OR gate: I can use either primitive gates Use assign statement

Module Test Bench Template //`timescale 1 ms /1 us module module_tb_name (,, ) endmodule Input, output wires reg Define the test bench Call on the module

Modify half_adder_tb.v 1.Change `include line 2.Change module name

Module Test Bench Template //`timescale 1 ms /1 us module module_tb_name (,, ) endmodule Input, output wires reg Define the test bench Call on the module

Change input/output, wire/regs To do list: 1.Increase X,Y to X,Y,Z a.output b.t_X,t_Y, t_Z Question: Why do we have to use reg X,Y, but not wire X, Y?

After Modifying the Module Declaration

Module Test Bench Template //`timescale 1 ms /1 us module module_tb_name (,, ) endmodule Input, output wires reg Define the test bench Call on the module

To-Do List 1.Change output file name 2.Add Z to $fmonitor line 3.Read from three bit files 4.Update Z from t_Z 5.Change how the module is invoke.

Implement the To-Do List

Error!

Erroneous Output

Program Body w1 w2w3 M1M2

Output

Four-Bit Adder C 4 is calculated last because it takes C 0 8 gates to reach C 4. Each FA uses 2 XOR, 2 AND and 1 OR gate. A four-bit adder uses 8 XOR, 8 AND and 4 OR gate. G0G0 G1G1 G2G2 G3G3

Output time=230 A0=1 A1=0 A2=0 A3=1 B0=1 B1=0 B2=0 B3=1 C0=0 S0=0 S1=1 S2=0 S3=0 C4=1 time=240 A0=0 A1=1 A2=0 A3=0 B0=0 B1=0 B2=1 B3=0 C0=1 S0=1 S1=1 S2=1 S3=0 C4=0 time=250 A0=0 A1=0 A2=0 A3=1 B0=1 B1=0 B2=0 B3=0 C0=0 S0=1 S1=0 S2=0 S3=1 C4=0 time=260 A0=0 A1=1 A2=1 A3=1 B0=1 B1=1 B2=1 B3=0 C0=0 S0=1 S1=0 S2=1 S3=0 C4=1 time=270 A0=0 A1=0 A2=1 A3=0 B0=0 B1=1 B2=0 B3=0 C0=1 S0=1 S1=1 S2=1 S3=0 C4=0 time=280 A0=1 A1=0 A2=0 A3=0 B0=0 B1=0 B2=0 B3=1 C0=1 S0=0 S1=1 S2=0 S3=1 C4=0 time=290 A0=0 A1=0 A2=0 A3=0 B0=0 B1=0 B2=0 B3=0 C0=1 S0=1 S1=0 S2=0 S3=0 C4=0 time=310 A0=0 A1=0 A2=0 A3=1 B0=1 B1=0 B2=0 B3=0 C0=0 S0=1 S1=0 S2=0 S3=1 C4=0 time=320 A0=1 A1=1 A2=1 A3=0 B0=0 B1=1 B2=1 B3=1 C0=1 S0=0 S1=1 S2=1 S3=0 C4=1 time=330 A0=0 A1=1 A2=0 A3=0 B0=0 B1=0 B2=1 B3=0 C0=1 S0=1 S1=1 S2=1 S3=0 C4=0 time=340 A0=1 A1=1 A2=0 A3=1 B0=1 B1=0 B2=1 B3=1 C0=0 S0=0 S1=0 S2=0 S3=1 C4=1 time=350 A0=0 A1=1 A2=0 A3=1 B0=1 B1=0 B2=1 B3=0 C0=0 S0=1 S1=1 S2=1 S3=1 C4=0 time=360 A0=0 A1=0 A2=0 A3=0 B0=0 B1=0 B2=0 B3=0 C0=1 S0=1 S1=0 S2=0 S3=0 C4=0

Things to Sort Through before writing the module four_bit_adder.v – What should be declared as inputs? – What should be declared as outputs? – How do I connect the ports of four_bit_add.v module to ports of full_adder.v module? – What should be declared as wires – What verilog modules should I include? – How should the instance be invoked?

Things to Sort Through Before Writing the Module four_bit_adder_tb.v – What test bench should I use as a template? – What should be the output? – What wires should I have? – What should I replace t_X,t_Y, t_Z with? – How should the four_bit_adder.v be invoked? – How should the output be printed?

What Will Be provided? Bit files (9 files in all, downloadable from the course website) half_adder.v What you need to implement: – full_adder.v – full_adder_tb.v – four_bit_adder.v – four_bit_adder_tb.v Due date: Next Wed (2/12) in Class.