Combinational Logic Design Process



Similar documents
Memory Elements. Combinational logic cannot remember

Karnaugh Maps (K-map) Alternate representation of a truth table

Asynchronous Counters. Asynchronous Counters

Lesson 12 Sequential Circuits: Flip-Flops

Set-Reset (SR) Latch

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Elementary Logic Gates

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

CHAPTER 11 LATCHES AND FLIP-FLOPS

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 5. Sequential Logic

Counters are sequential circuits which "count" through a specific state sequence.

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Engr354: Digital Logic Circuits

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Master/Slave Flip Flops

Digital Electronics Detailed Outline

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Counters and Decoders

A New Paradigm for Synchronous State Machine Design in Verilog

CS311 Lecture: Sequential Circuits

Sequential Logic Design Principles.Latches and Flip-Flops

Lecture 8: Synchronous Digital Systems

Cascaded Counters. Page 1 BYU

Counters & Shift Registers Chapter 8 of R.P Jain

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

CHAPTER 3 Boolean Algebra and Digital Logic

Module 3: Floyd, Digital Fundamental

ECE380 Digital Logic

Modeling Latches and Flip-flops

Layout of Multiple Cells

BINARY CODED DECIMAL: B.C.D.

7. Latches and Flip-Flops

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Registers & Counters

CSE140: Components and Design Techniques for Digital Systems

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

Chapter 8. Sequential Circuits for Registers and Counters

ASYNCHRONOUS COUNTERS

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Theory of Logic Circuits. Laboratory manual. Exercise 3

CHAPTER 11: Flip Flops

Lecture-3 MEMORY: Development of Memory:

Upon completion of unit 1.1, students will be able to

CSE140: Midterm 1 Solution and Rubric

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Digital Fundamentals

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Simplifying Logic Circuits with Karnaugh Maps

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Flip-Flops, Registers, Counters, and a Simple Processor

Digital Controller for Pedestrian Crossing and Traffic Lights

Digital Logic Design Sequential circuits

Wiki Lab Book. This week is practice for wiki usage during the project.

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Contents COUNTER. Unit III- Counters

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

Lecture 7: Clocking of VLSI Systems

Sequential Logic: Clocks, Registers, etc.

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

The 104 Duke_ACC Machine

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

DEPARTMENT OF INFORMATION TECHNLOGY

Design: a mod-8 Counter

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

BOOLEAN ALGEBRA & LOGIC GATES

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Lecture 11: Sequential Circuit Design

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Lecture 10: Sequential Circuits

2.0 Chapter Overview. 2.1 Boolean Algebra

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

Sequential Circuit Design

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Gates, Circuits, and Boolean Algebra

Computer Engineering 290. Digital Design: I. Lecture Notes Summer 2002

State Machines in VHDL

Lab 1: Study of Gates & Flip-flops

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Transcription:

Combinational Logic Design Process Create truth table from specification Generate K-maps & obtain logic equations Draw logic diagram (sharing common gates) Simulate circuit for design verification Debug & fix problems when output is incorrect Check truth table against K-map population Check K-map groups against logic equation product terms Check logic equations against schematic Circuit optimization for area and/or performance Analyze verified circuit for optimization metric G, G IO, G del, P del Use Boolean postulates & theorems Re-simulate & verify optimized design C. E. Stroud ELEC 42

K-mapping & Minimization Steps Step : generate K-map Put a in all specified minterms Put a in all other boxes (optional) Step 2: group all adjacent s without including any s All groups (aka prime implicants) must be rectangular and contain a power-of-2 number of s, 2, 4, 8, 6, 32, An essential group (aka essential prime implicant) contains at least minterm not included in any other groups A given minterm may be included in multiple groups Step 3: define product terms using variables common to all minterms in group Step 4: sum all essential groups plus a minimal set of remaining groups to obtain a minimum SOP C. E. Stroud ELEC 42 2

K-map Minimization Goals Larger groups: Smaller product terms Fewer variables in common Smaller AND gates In terms of number of inputs Fewer groups: Fewer product terms Fewer AND gates Smaller OR gate In terms of number of inputs Alternate method: Group s Could produce fewer and/or smaller product terms Invert output Use NOR instead of OR gate C. E. Stroud ELEC 42 3

Circuit Analysis We can implement different circuits for same logic function that are functionally equivalent (produce the correct output response for all input values) Which implementation is the best? Depends on design goals and criteria Area analysis Number of gates, G (most commonly used) Number of gate inputs and outputs, G IO (more accurate) Bigger gates take up more area Performance analysis (worst case path from inputs to outputs) Number of gates in worst case path from input to output, G del More accurate delay measurement per gate Propagation delay = intrinsic (internal) delay + extrinsic (external) delay Relative prop delay, P del = # inputs to gate (intrinsic) + # loads (extrinsic) C. E. Stroud ELEC 42 4

Circuit Analysis Example From previous example: Z=(A+B )C+A BC # gates: G = 7 A A+B # gate I/O: G IO = 9 Gate delay: G del = 4 worst case path: B Z Prop delay: P del = 2 worst case path: B Z 2 2 B C B (A+B )C 2 + 2+ A 2+ + 2+ A BC C 3+ + Z C. E. Stroud ELEC 42 5

Design Verification Guidelines Use all audits and analysis aids possible to help find potential design bugs Investigate and correct all errors/warnings Simulate thoroughly but use stimuli that eat their way into the design testing one function at a time more important for complex circuits When circuit doesn t work, see what works and what doesn t to narrow down the search space for the problem Which outputs work Which outputs fail and under what conditions Monitor lots of internal nodes Additional simulations (with different vectors) can be helpful Remember debugging is just solving out a puzzle Also if something doesn t look right, stop and check it out Don t overlook potential bugs Always re-run audits and simulation after correcting any problem (or after any changes) Another bug could be lurking, or The fix may have messed up something else C. E. Stroud ELEC 42 6

Sequential Logic Design Steps Derive circuit state diagram from design specs Create state table Choose flip-flops (D, T, SR, JK) Create circuit excitation table use flip-flop excitation tables Construct K-maps for: flip-flop inputs primary outputs Obtain minimized SOP equations Draw logic diagram Simulate to verify design & debug as needed Perform circuit analysis & logic optimization C. E. Stroud ELEC 42 7

Flip-Flop Excitation Tables & State Diagrams D= Q Q+ D T S R J K T= SR= JK= C. E. Stroud ELEC 42 8

Sequential Design Example Design a 3-bit gray code counter with active low synchronous reset (R) State Diagram Inputs R= R= State order: Z R Current state ( Z) Next state ( Z) State Table C. E. Stroud ELEC 42 9

3-bit Gray Code Counter Choose flipflops: Let be a JK Let be a D Let Z be a SR Create circuit excitation table Inputs Current state Next state Q Q QZ R ( Z) ( Z) Jx Kx Dy Sz Rz C. E. Stroud ELEC 42

3-bit Gray Code Counter (cont) Generate K-Maps & obtain minimized SOPs Z R Z R Z R Jx = RZ Dy = RZ + R Z Sz = R + R Z R Further reductions: Rz = R + Sz = R( ) = (R + ) = Rz Z R Kx = R + Z Rz = R + + C. E. Stroud ELEC 42

3-bit Gray Code Counter (cont) Logic diagram Then design verification via logic simulation Debug as needed to obtain working circuit Update logic diagram, logic equations, etc. to reflect fixes R Z Z Z Jx Kx Clk Dy Clk Sz Rz Clk Z Z C. E. Stroud ELEC 42 2

Sequential Logic Models Huffman model consists of two types: Mealy model (aka Mealy machine) Outputs are function inputs and current state Outputs can change when inputs change or when current state changes Moore model (aka Moore machine) Outputs are function of current state only Outputs can change only when current state changes Primary Inputs Primary Inputs Current State Current State Comb Logic Output Logic Next State Logic Flip- Flips Flip- Flips Primary Outputs Next State Next State only for Mealy Primary Outputs C. E. Stroud ELEC 42 3

Mealy & Moore State Diagrams Mealy model Input / Outputs associated Output / with state transition Output values shown with inputs Moore model Outputs associated with states only Output values shown with states / / / / / / / / State order States / Output C. E. Stroud ELEC 42 4

Mealy & Moore State Tables / / / / / / / / / In + + D D O Mealy O Moore Note: next state (next state logic) is same for both Mealy & Moore only output is different C. E. Stroud ELEC 42 5

Mealy & Moore Design Examples In this example the Dx and Dy circuits are the same for both Mealy and Moore But the outputs circuits are different with the Moore being a function of and only In In D = In + In O Mealy = In + In In In D = In + In O Moore = C. E. Stroud ELEC 42 6

Mealy & Moore Design Examples O Mealy = In + In In D = In + In D = In + In In O Moore = Clk Clk O Mealy O Moore Note: O Mealy is a function of In but O Moore is not a function of In C. E. Stroud ELEC 42 7

Flip-Flop Initialization Preset (aka set) => Q + = Clear (aka reset) => Q + = Some flip-flops have: Both preset and clear (set and reset) A preset or a clear Neither (JK & SR flops have set/reset functions) Preset and/or clear can be Typical logic symbol with active high preset and active low clear Cannot determine sync or async from symbol Active high or active low Synchronous => with respect to active edge of clock Asynchronous => independent of clock edges Initialization important for: logic simulation to remove undefined logic values 2, 3, U, etc. system operation to put system in a known state D Clk Pre Clr Q Q C. E. Stroud ELEC 42 8

Synchronous vs. Asynchronous Synchronous => states of memory elements change only with respect to active edge of clock Asynchronous => states of memory elements can change without an active edge of clock Asynchronous designs often have timing problems Example: assume active high sync preset and active low async clear Clk D Pre C. E. Stroud ELEC 42 9 Clr Q D Clk Pre Clr Q Q

System-Level Timing System set-up time: P del + P bufi + t su - P clk(min) P del + P bufi + t su System hold time: t h + P clk - P del(min) - P bufi(min) t h + P clk System clock-to-output: t co + P del + P bufo + P clk Minimum times are difficult to guarantee Typically assume Data comb logic t su t co comb logic Output P del P del Clock C big P clk C. E. Stroud ELEC 42 2

System-Level Timing System set-up time: P bufi + t su(latch) - P clk System hold time: t h(latch) + P clk(input) - P bufi System clock-to to-output: output: t co + P bufo + P clk Improvement techniques: clk(input)min bufi(min) clk(output) Re-clock signals onto/off subcircuit, chip, PCB, or system Fanout clock into input, main, and output clocks -hold hold-time latches on input signals Data LAT en comb logic P del comb logic P del Output Clock C big P clk C. E. Stroud ELEC 42 2