EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Similar documents
Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Chapter 7 Logic Circuits

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Digital Logic Appendix A

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

CHAPTER 7. Exercises 17/ / /2 2 0

Philadelphia University Student Name: Student Number:

Sample Test Paper - I

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Fundamentals of Boolean Algebra

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Lecture 17: Designing Sequential Systems Using Flip Flops

Simplifying Logic Circuits with Karnaugh Maps

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

DIGITAL LOGIC CIRCUITS

Synchronous Sequential Logic

EEE130 Digital Electronics I Lecture #4

MC9211 Computer Organization

CPE100: Digital Logic Design I

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

ENGG 1203 Tutorial - 2 Recall Lab 2 - e.g. 4 input XOR. Parity checking (for interest) Recall : Simplification methods. Recall : Time Delay

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

UNIVERSITI TENAGA NASIONAL. College of Information Technology

DIGITAL LOGIC CIRCUITS

1 Boolean Algebra Simplification

The Design Procedure. Output Equation Determination - Derive output equations from the state table

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

211: Computer Architecture Summer 2016

10/14/2009. Reading: Hambley Chapters


This form sometimes used in logic circuit, example:

CHAPTER1: Digital Logic Circuits Combination Circuits

Fundamentals of Digital Design

CS/COE0447: Computer Organization and Assembly Language

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

Unit 2 Session - 6 Combinational Logic Circuits

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

T02 Tutorial Slides for Week 6

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Philadelphia University Student Name: Student Number:

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

EE40 Midterm Review Prof. Nathan Cheung

Boolean Algebra & Logic Gates. By : Ali Mustafa

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

Digital Logic (2) Boolean Algebra

Latches. October 13, 2003 Latches 1

Cs302 Quiz for MID TERM Exam Solved

Written exam for IE1204/5 Digital Design with solutions Thursday 29/

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Lecture 10: Synchronous Sequential Circuits Design

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

CHAPTER 7. Solutions for Exercises

ELCT201: DIGITAL LOGIC DESIGN

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Systems I: Computer Organization and Architecture

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

CMPE12 - Notes chapter 2. Digital Logic. (Textbook Chapters and 2.1)"

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

Chapter 4. Sequential Logic Circuits

Lecture (08) Synchronous Sequential Logic

Gates and Flip-Flops

Chapter 2 Boolean Algebra and Logic Gates

Lecture 22 Chapters 3 Logic Circuits Part 1

ELCT201: DIGITAL LOGIC DESIGN

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

ELECTRONICS & COMMUNICATION ENGINEERING PROFESSIONAL ETHICS AND HUMAN VALUES

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

CPE100: Digital Logic Design I

MODULAR CIRCUITS CHAPTER 7

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

Sequential Logic Circuits

Combinational Logic. Course Instructor Mohammed Abdul kader

Gate-Level Minimization

DIGITAL LOGIC CIRCUITS

Lecture A: Logic Design and Gates

Introduction to Karnaugh Maps

DE58/DC58 LOGIC DESIGN DEC 2014

Save from: cs. Logic design 1 st Class أستاذ المادة: د. عماد

CHW 261: Logic Design

COMBINATIONAL LOGIC FUNCTIONS

Why digital? Overview. Number Systems. Binary to Decimal conversion

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Logic Design. Chapter 2: Introduction to Logic Circuits

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Transcription:

EE40 Lec 15 Logic Synthesis and Sequential Logic Circuits Prof. Nathan Cheung 10/20/2009 Reading: Hambley Chapters 7.4-7.6 Karnaugh Maps: Read following before reading textbook http://www.facstaff.bucknell.edu/mastascu/elessonshtml/logic/logic3.html Slide 1

Synthesis of Logic Circuits Suppose we are given a truth table for a logic function. Is there a method to implement the logic function using basic logic gates? Answer: There are lots of ways, but one way is the sum of products (SOP) method: 1) Write the sum of products expression based on the truth table for the logic function 2) Implement this expression using standard logic gates. An alternative way is the product of sums (POS) method. Slide 2

Logic Synthesis Example: Adder S 1 = carry, S o =sum Truth Table of Adding Three Inputs : A, B, and C Slide 3 A B C S 1 S 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1

Logic Synthesis Example: Adder Input Output Sum-of-products method for S 1 A B C S 1 S 0 1) Find rows where S 1 is 1 0 0 0 0 0 2) Write down each product of 0 0 1 0 1 inputs which create a 1 (invert 0 1 0 0 1 0 1 1 1 0 A B C A B C 1 0 0 0 1 A B C A B C 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 logic variables that are 0 in that row) 1) Sum all of the products A B C + A B C + A B C + A B C 2) Draw the logic circuit Slide 4

Logic Synthesis Example: Adder A B C B C A C A B A B C A B C + A B C + A B C + A B C SOP Logic Circuit Slide 5

Creating a Better Circuit What makes a digital circuit better? Fewer number of gates Fewer inputs on each gate multi-input gates are slower Let s see how we can simplify the sum-of- products expression for S 1, to make a better circuit Use the Boolean algebra relations Slide 6

Logic Synthesis Example: Adder A B B C A C A B ABC + ABC + ABC + ABC = ABC + ABC + = ABC + ABC + AB(C + C) AB SOP Simplification Can we simplify this digital circuit further? Slide 7

Logic Synthesis Example: Adder A B B C A C A B Add in two inversions (signal stays the same) Slide 8

Logic Synthesis Example: Adder A B B C A C A B This becomes a NAND Apply DeMorgan s Theorem, i.e. bubble pushing X + Y + Z = XYZ Slide 9

NAND Gate Implementation De Morgan s law tells us that is the same as By definition, is the same as All sum-of-products expressions can be implemented with only NAND gates. Slide 10

Logic Synthesis Example: Adder Input Output A B C S 1 S 0 0 0 0 0 0 Product-of-sums method for S 1 1) Find rows where S 1 is 0 2) Write down each sum of inputs which create a 0 (invert logic variables that are 1 in that row) 0 0 1 0 1 which create a 0 (invert logic 0 1 0 0 1 0 1 1 1 0 ( A + B + C) ( A + B + C ) 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 ( A + B + C) ( A + B + C) 3) Product of the sums ( A + B + C)(A + B + C)(A + B + C)(A + B + C) 4) Draw the logic circuit Slide 11

SOP or POS? The Boolean Expression will appear shorter If the Truth table has less 1 s, SOP If the Truth Table has less 0 s s, POS After Minimization, both methods should give same results, unless there are don t care rows in the Truth Table. Slide 12

Notations of Hambley Textbook Sum of Products (SOP) Row # A B C D 0 0 0 0 1 = (,,, ) 1 0 0 1 0 2 0 1 0 1 D Σ m(0,2,6,7) Product of Sums (POS) D = Π M(1,3,4,5) 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 1 7 1 1 1 1 Slide 13

Another Logic Synthesis Example: XOR Sum of Products (SOP) F = Σ m(1,2) F = A B + A B A B F 0 0 0 0 1 1 1 0 1 1 1 0 Product of Sums (POS) F = Π M(0,3) F = (A + B)(A + B) Slide 14

Karnaugh Maps 2-variable Karnaugh Map 3-variable Karnaugh Map 4-variable Karnaugh Map * Arrows show example locations of logic PRODUCTS Slide 15

Comments on Karnaugh Maps Required reading http://www.facstaff.bucknell.edu/mastascu/elessonshtm L/Logic/Logic3.html You may find more details there than the textbook. As the number of variables increases (say >4) it becomes more difficult to see patterns, and computer methods start to become more attractive. EE40 will focus only on 3 variables and 4 variables Karnaugh Maps Slide 16

Comments on Karnaugh Maps For a 4-variables map 1-cube: 1 square by itself ( logic product of 4 variables) 2-cube: 2 squares that have a common edge ( logic product of 3 variables) 4-cube: 4 squares with common edges ( logic product of 2 variables) 8-cube: 8 squares with common edges ( logic product of 1 variable) Slide 17

Comments on Karnaugh Maps In locating cubes on a Karnaugh map, the map should be considered to fold around from top to bottom, and from left to right. Squares on the right-hand side are considered to be adjacent to those on the left-hand side. Squares on the top of the map are considered to be adjacent to those on the bottom. CD 00 01 11 10 00 1 1 Example: The four squares in the map corners form a 4-cube AB 01 11 10 1 1 Slide 18

4-Variables Example From Truth Table and Sum of Products F=Σ m(1,3,4,5,7,10,12,13) Converting the row numbers to binary yields 0001,0011, 0011 0100 etc.. Place 1 s into the Karnaugh Map F = ABCD + AD + BC Slide 19

3-Variables Example: Adder Input Output t Simplification of expression for S 1 : A B C S 1 S 0 B 0 0 0 0 0 BC 0 0 1 0 1 00 01 11 10 0 1 0 0 1 0 0 0 1 0 A 0 1 1 1 0 1 0 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 C BC AC AB S 1 = AB + BC + AC Slide 20

Miscellaneous Examples Slide 21

3-Variable Exercise Slide 22

4-Variable Exercise Slide 23

Exercise with Don t Cares Slide 24

Sequential Logic Circuits Sequential logic circuits that possess memory because their present output value depends on previous as well as present input values. Slide 25

Clock Signals Often, the operation of a sequential circuit is synchronized by a clock signal : V OH 0 v C (t) positive-going edge (leading edge) T C 2T C negative-going edge (trailing edge) time The clock signal regulates when the circuits respond to new inputs, so that operations occur in proper sequence. Sequential circuits that are regulated by a clock signal are said to be synchronous. Slide 26

Flip-Flops One of the basic building blocks for sequential circuits is the flip-flop: A simple flip-flop can be constructed using two inverters: Q Q Two possible states: Q = 1, Q = 0 Q = 0, Q = 1 * Circuit can remain in either state indefinitely Slide 27

The S-R ( Set - Reset ) Flip-Flop S-R Flip-Flop Symbol: Rule 1: If S = 0 and R = 0, Q does not change. Rule 2: If S = 0 and R = 1, then Q = 0 Rule 3: If S = 1 and R = 0, then Q = 1 Rule 4: S = 1 and R = 1 should never occur. S R Q Q Slide 28

Realization of the S-R Flip-Flop S Q R Q R S Q n 0 0 Q n-1 0 1 1 1 0 0 1 1 (not allowed) Slide 29

XOR and NAND Implementation Slide 30

Exercise: Timing Diagram of SR flip-flop R S Q n 0 0 Q n-1 0 1 1 1 0 0 1 1 (not allowed) Q Slide 31

Clocked S-R Flip-Flop When CK = 0, disables the inputs R and S When CK = 1, enables inputs R and S Slide 32

The D ( Delay ) Flip-Flop D Flip-Flop Symbol: D Q CK Q The output terminals Q and Q behave just as in the S-R flip-flop. Q changes only when the clock signal CK makes a positive transition. CK D Q n 0 Q n-1 1 Q n-1 0 0 1 1 Slide 33

D Flip-Flop Example (Timing Diagram) CK D t Q t t Slide 34

Registers A register is an array of flip-flops that is used to store or manipulate the bits of a digital word. Example: Serial-In, Parallel-Out Shift Register using D Flipflops Parallel outputs Q 0 Q 1 Q 2 Data input D 0 Q 0 D 1 Q 1 D 2 Q 2 CK CK CK Clock input Slide 35

Shift Register Timing Diagram Slide 36

J-K Flip Flop Slide 37

Ripple Counter Slide 38

Conclusion (Logic Circuits) Complex combinational logic functions can be achieved simply by interconnecting NAND gates (or NOR gates). Logic gates can be interconnected to form flipflops. Interconnections of flip-flops form registers. A complex digital system such as a computer consists of many gates, flip-flops, and registers. Thus, logic gates are the basic building blocks for complex digital systems. Slide 39