ECE 331 Digital System Design

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

Lecture 8: Synchronous Digital Systems

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

Engr354: Digital Logic Circuits

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

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

Chapter 5. Sequential Logic

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

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

Combinational Logic Design Process

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

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

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

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

CHAPTER 11 LATCHES AND FLIP-FLOPS

Lesson 12 Sequential Circuits: Flip-Flops

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

Digital Electronics Detailed Outline

Digital Logic Design Sequential circuits

Systems I: Computer Organization and Architecture

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

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

Flip-Flops and Sequential Circuit Design

Upon completion of unit 1.1, students will be able to

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

ECE380 Digital Logic

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

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

Let s put together a Manual Processor

RAM & ROM Based Digital Design. ECE 152A Winter 2012

CpE358/CS381. Switching Theory and Logical Design. Class 10

Finite State Machine. RTL Hardware Design by P. Chu. Chapter 10 1

Design: a mod-8 Counter

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

Module 3: Floyd, Digital Fundamental

Asynchronous Counters. Asynchronous Counters

CHAPTER 3 Boolean Algebra and Digital Logic

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

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

BINARY CODED DECIMAL: B.C.D.

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

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

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

Memory Elements. Combinational logic cannot remember

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

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

Chapter 8. Sequential Circuits for Registers and Counters

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Sequential Circuit Design

Sequential Logic Design Principles.Latches and Flip-Flops

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

Counters & Shift Registers Chapter 8 of R.P Jain

Counters and Decoders

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

The components. E3: Digital electronics. Goals:

7. Latches and Flip-Flops

Cascaded Counters. Page 1 BYU

Gates, Circuits, and Boolean Algebra

CS311 Lecture: Sequential Circuits

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

Layout of Multiple Cells

CSE140: Components and Design Techniques for Digital Systems

Master/Slave Flip Flops

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

DEPARTMENT OF INFORMATION TECHNLOGY

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

ANALOG & DIGITAL ELECTRONICS

Lecture 10: Sequential Circuits

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

Lecture-3 MEMORY: Development of Memory:

(1) /30 (2) /30 (3) /40 TOTAL /100

Register File, Finite State Machines & Hardware Control Language

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Digital Systems Design! Lecture 1 - Introduction!!

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.

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

Binary Adders: Half Adders and Full Adders

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

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

路 論 Chapter 15 System-Level Physical Design

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

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

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

ASYNCHRONOUS COUNTERS

Contents COUNTER. Unit III- Counters

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE

Registers & Counters

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

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

Counters. Present State Next State A B A B

Finite State Machine Design and VHDL Coding Techniques

Simplifying Logic Circuits with Karnaugh Maps

Theory of Logic Circuits. Laboratory manual. Exercise 3

Lecture 11: Sequential Circuit Design

VHDL GUIDELINES FOR SYNTHESIS

Operating Manual Ver.1.1

3.Basic Gate Combinations

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

Transcription:

ECE 331 Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #21) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning.

Combinational vs. Sequential Combinational Logic Circuit Output is a function only of the present inputs. Does not have state information. Does not require memory. Sequential Logic Circuit (aka. Finite State Machine) Output is a function of the present state. Has state information Requires memory. Uses Flip-Flops to implement memory. Spring 2011 ECE 331 - Digital System Design 2

Synchronous vs. Asynchronous Synchronous Sequential Logic Circuit Clocked All Flip-Flops use the same clock and change state on the same triggering edge. Asynchronous Sequential Logic Circuit No clock Can change state at any instance in time. Faster but more complex than synchronous sequential circuits. Spring 2011 ECE 331 - Digital System Design 3

Sequential Circuits: General Model Memory Stores state information Realized using Flip-Flops Combinational Logic Implements Flip-Flop input functions and output functions Realized using logic gates, a ROM or a PLA Spring 2011 ECE 331 - Digital System Design 4

Sequential Circuits: Models Moore Machine Outputs are a function of the present state. Outputs are independent of the inputs. State diagram includes an output value for each state. Mealy Machine Outputs are a function of the present state and the present input. State diagram includes an input and output value for each transition (between states). Spring 2011 ECE 331 - Digital System Design 5

Sequential Circuits: Models Spring 2011 ECE 331 - Digital System Design 6

Sequential Circuits: Mealy Model output Next state Present state Spring 2011 ECE 331 - Digital System Design 7

Sequential Circuits: Moore Model Present state output Next state Spring 2011 ECE 331 - Digital System Design 8

Sequential Circuits: State Diagram Input State Output Moore Machine Each node in the graph represents a state in the sequential circuit. Spring 2011 ECE 331 - Digital System Design 9

Sequential Circuits: State Diagram Input Output State Mealy Machine Each node in the graph represents a state in the sequential circuit. Spring 2011 ECE 331 - Digital System Design 10

Sequential Circuit Analysis Spring 2011 ECE 331 - Digital System Design 11

Analysis: Signal Tracing 1.Assume an initial state for the sequential circuit. All Flip-Flops reset to 0 (unless otherwise stated). 2.Determine the sequential circuit output and the flipflop inputs for the first input value in the sequence. 3.Determine the next state of each Flip-Flop After the next active clock edge. 4.Determine the sequential circuit output and the flipflop inputs for the next value in the sequence. 5.Repeat steps 3 & 4. Spring 2011 ECE 331 - Digital System Design 12

Example: Moore Machine Flip-Flop inputs output State = AB input Spring 2011 ECE 331 - Digital System Design 13

Example: Moore Machine 0 1 1 0 1 Spring 2011 ECE 331 - Digital System Design 14

Example: Mealy Machine Spring 2011 ECE 331 - Digital System Design 15

Example: Mealy Machine Spring 2011 ECE 331 - Digital System Design 16

Analysis: State Tables and Graphs Although constructing timing charts is satisfactory for small circuits and short input sequences, the construction of state tables and graphs provides a more systematic approach which is useful for the analysis of larger circuits and which leads to a general synthesis procedure for sequential circuits. The state table specifies the next state and output of a sequential circuit in terms of its present state and input. Spring 2011 ECE 331 - Digital System Design 17

Analysis Procedure 1. Determine the Flip-Flop input equations 2. Determine the Sequential Circuit output equations 3. Derive the Next State equation for each Flip-Flop Using the corresponding input equation And the Flip-Flop characteristic equation 4. Plot the Next State K-map for each Flip-Flop 5. Construct the State Table (aka. Transition Table) Assign a state label to each binary state assignment 6. Draw the corresponding state diagram (aka. state graph) Spring 2011 ECE 331 - Digital System Design 18

Example: Analyze a sequential circuit using D Flip-Flops Spring 2011 ECE 331 - Digital System Design 19

Example: Analysis (D FF) Derive the State Table for the following Sequential Logic Circuit: Spring 2011 ECE 331 - Digital System Design 20

Example: Analysis (D FF) The flip-flop input equations are: D A = X xor B' D B = X or A The sequential circuit output equation is: Z = A xor B The next-state equations for the flip-flops are: A + = D A = X xor B' B + = D B = X or A Spring 2011 ECE 331 - Digital System Design 21

Example: Analysis (D FF) The corresponding next-state (K-) maps are: Spring 2011 ECE 331 - Digital System Design 22

Example: Analysis (D FF) The state table, or transition table, is then: A + B + A B X = 0 X = 1 Z 0 0 1 0 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 Present Next State State X = 0 X = 1 Output S0 S3 S1 0 S1 S0 S2 1 S2 S1 S2 0 S3 S2 S1 1 Spring 2011 ECE 331 - Digital System Design 23

Example: Analysis (D FF) The state diagram can then be drawn from the state table: Spring 2011 ECE 331 - Digital System Design 24

Example: Analyze a sequential circuit using JK Flip-Flops Spring 2011 ECE 331 - Digital System Design 25

Example: Analysis (JK FF) Derive the State Table for the following Sequential Logic Circuit: Spring 2011 ECE 331 - Digital System Design 26

Example: Analysis (JK FF) The flip-flop input equations are: J A = X.B K A = X J B = X K B = X.A The sequential circuit output equation is: Z = X.B' + X.A + X'.A'.B The next-state equations for the flip-flops are: A + = J A.A' + K A '.A A + = X.B.A' + X.A B + = J B.B' + K B '.B B + = X.B' + X.A.B Spring 2011 ECE 331 - Digital System Design 27

Example: Analysis (JK FF) The corresponding next-state (K-) maps are Spring 2011 ECE 331 - Digital System Design 28

Example: Analysis (JK FF) The state table, and transition table, is then: Spring 2011 ECE 331 - Digital System Design 29

Example: Analysis (JK FF) The state diagram can then be drawn from the state table: Spring 2011 ECE 331 - Digital System Design 30

Example: Analyze a serial adder Spring 2011 ECE 331 - Digital System Design 31

Example: Serial Adder The serial adder adds two n-bit binary numbers. (serial) output (serial) inputs next state present state Spring 2011 ECE 331 - Digital System Design 32

Example: Serial Adder Truth Table for the Full Adder: Spring 2011 ECE 331 - Digital System Design 33

Example: Serial Adder The state table, or transition table, is then: C i+1 Sum C i XY = 00 XY = 01 XY = 10 XY = 11 XY = 00 XY = 01 XY = 10 XY = 11 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 1 Present Next State Output State XY = 00 XY = 01 XY = 10 XY = 11 XY = 00 XY = 01 XY = 10 XY = 11 S0 S0 S0 S0 S1 0 1 1 0 S1 S0 S1 S1 S1 1 0 0 1 Spring 2011 ECE 331 - Digital System Design 34

Example: Serial Adder State Graph for the Serial Adder: What type of state machine is this? Spring 2011 ECE 331 - Digital System Design 35

Example: Serial Adder Timing Diagram for the Serial Adder: Spring 2011 ECE 331 - Digital System Design 36

Example: Analyze a state machine with multiple inputs. Spring 2011 ECE 331 - Digital System Design 37

Example: Multiple Inputs State Table for a state machine with multiple inputs: Spring 2011 ECE 331 - Digital System Design 38

Example: Multiple Inputs State Graph for a state machine with multiple inputs: What type of state machine is this? How many paths leave each state? Spring 2011 ECE 331 - Digital System Design 39

Questions? Spring 2011 ECE 331 - Digital System Design 40