Chapter #6: Sequential Logic Design

Slides:



Advertisements
Similar presentations
Finite State Machines (FSMs)
Advertisements

ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
1 Sequential Ckts, Latches and Timing Issues Today: Sequential Circuits, LatchesFirst Hour: Sequential Circuits, Latches –Section of Katz’s Textbook.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Chapter #6: Sequential Logic Design
Sequential Logic Computer Organization Ellen Walker Hiram College Figures from Computer Organization and Design 3ed, D.A. Patterson & J.L. Hennessey, Morgan.
Page 1 Sequential Logic Basic Binary Memory Elements.
Circuits require memory to store intermediate data
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Lecture 9 Memory Elements and Clocking
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Flip-Flop Types.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
Chapter #6: Sequential Logic Design 6.2 Timing Methodologies
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
ELEC 256 / Saif Zahir UBC / 2000 Sequential Logic Design Sequential Networks Simple Circuits with Feedback R-S Latch J-K Flipflop Edge -Triggered Flip-Flops.
SEQUENTIAL CIRCUITS Introduction
Digital Computer Design Fundamental
Digital System Design. Intro. VLSI: CMOS inverter.
Chap 4. Sequential Circuits
VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite State Machines (FSM) Sequential circuits  primitive sequential.
Unit 11 Latches and Flip-Flops Fundamentals of Logic Design By Roth and Kinney.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
DLD Lecture 26 Finite State Machine Design Procedure.
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
6-1 Programmable and Steering Logic Chapter #6: Sequential Logic Design.

Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Digital Design: Sequential Logic Principles
Lecture 10 Flip-Flops/Latches
LATCHES AND FLIP-FLOPS
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
LATCHED, FLIP-FLOPS,AND TIMERS
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on sequential logic related to HDL.
Flip Flops.
FIGURE 5.1 Block diagram of sequential circuit
Flip-Flop.
EKT 121 / 4 DIGITAL ELECTRONICS I
Flip-FLops and Latches
Assistant Prof. Fareena Saqib Florida Institute of Technology
CSE 140 MT 2 Review By Daniel Knapp.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Chapter 11 Sequential Circuits.
332:437 Lecture 12 Finite State Machine Design
Digital Logic Design Sequential Circuits (Chapter 6)
Sequential logic circuits
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Sequential Circuit Analysis & Design
Synchronous sequential
Synchronous Sequential
Flip-Flops.
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 14: State Tables, Diagrams, Latches, and Flip Flop
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
SEQUENTIAL CIRCUITS __________________________________________________
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Presentation transcript:

Chapter #6: Sequential Logic Design

Metastability and Asynchronous Inputs Chapter Overview • Sequential Networks Simple Circuits with Feedback R-S Latch J-K Flipflop Edge-Triggered Flipflops • Realizing Circuits with Flipflops Choosing a FF Type Characteristic Equations Conversion Among Types Metastability and Asynchronous Inputs

Sequential Switching Networks Definition of Terms Clock: Periodic Event, causes state of memory element to change rising edge, falling edge, high level, low level Setup Time (Tsu) Minimum time before the clocking event by which the input must be stable There is a timing "window" around the clocking event during which the input must remain stable and unchanged in order to be recognized Hold Time (Th) Minimum time after the clocking event during which the input must remain stable

Sequential Switching Networks Cross-Coupled NOR Gates R S Q S R \Q Timing Waveform Reset Hold 100 Set Reset Set Race R S Q \ Forbidden State Forbidden State

Sequential Switching Networks State Behavior of R-S Latch Truth Table Summary of R-S Latch Behavior

Sequential Switching Elements R-S Latch Truth Table: Next State = F(S, R, Current State) Derived K-Map: S(t) R(t) Q(t) Q(t+) 0 0 0 0 (hold) 0 0 1 1 (Hold) 0 1 0 0 (reset) 0 1 1 0 (reset) 1 0 0 1 (set) 1 0 1 1 (set) 1 1 0 Not allowed 1 1 1 Not allowed Characteristic Equation: Q+ = S + R Q t S R-S Latch R Q+ Q

Sequential Switching Networks J-K Latch J, K both one yields toggle J Q K \ Q J(t) K(t) Q(t) Q(t+) 0 0 0 0 (hold) 0 0 1 1 (Hold) 0 1 0 0 (reset) 0 1 1 0 (reset) 1 0 0 1 (set) 1 0 1 1 (set) 1 1 0 1 (toggle) 1 1 1 0 (toggle) J-K Latch Characteristic Equation: Q+ = Q K + Q J

Sequential Switching Networks J-K Latch: Race Condition Set Reset Toggle Race Condition

D-FlipFlop Sequential Switching Networks Edge triggered device sample inputs on the event edge 7474 Bubble here for negative edge triggered device Positive edge-triggered flip-flop D Q Clk

Sequential Switching Networks Positive vs. Negative Edge Triggered Devices Positive Edge Triggered Inputs sampled on rising edge Outputs change after rising edge Negative Edge Triggered Inputs sampled on falling edge Outputs change after falling edge Toggle Flipflop Formed from J-K with both inputs wired together

Timing Methodologies Cascaded Flipflops and Setup/Hold/Propagation Delays Shift Register S,R are preset, preclear New value to first stage while second stage obtains current value of first stage Correct Operation, assuming positive edge triggered FF

D-latch and D-Flipflop Transparent latches sample inputs as long as the clock is asserted Example: to be done during the class

Realizing Circuits with Different Kinds of FFs Choosing a Flipflop R-S Clocked Latch: used as storage element in narrow width clocked systems its use is not recommended! however, fundamental building block of other flipflop types J-K Flipflop: versatile building block can be used to implement D and T FFs usually requires least amount of logic to implement ƒ(In,Q,Q+) but has two inputs with increased wiring complexity D Flipflop: minimizes wires, much preferred in VLSI technologies simplest design technique best choice for storage registers T Flipflops: don't really exist, constructed from J-K FFs usually best choice for implementing counters Preset and Clear inputs highly desirable!!

Realizing Circuits with Different Kinds of Flipflops Characteristic Equations R-S: D: J-K: T: Q+ = S + R Q Q+ = D Q+ = J Q + K Q Q+ = T Q + T Q Derived from the K-maps for Q+ = ƒ(Inputs, Q) E.g., J=K=0, then Q+ = Q J=1, K=0, then Q+ = 1 J=0, K=1, then Q+ = 0 J=1, K=1, then Q+ = Q Implementing One FF in Terms of Another D implemented with J-K D J K C Q

Realizing Circuits with Different Kinds of Flipflops Design Procedure Excitation Tables: What are the necessary inputs to cause a particular kind of change in state?

Metastability and Asynchronous Inputs Terms and Definitions Clocked synchronous circuits • common reference signal called the clock • state of the circuit changes in relation to this clock signal Asynchronous circuits • inputs, state, and outputs sampled or changed independent of a common reference signal

Metastability and Asynchronous Inputs Asynchronous Inputs Are Dangerous! Since they take effect immediately, glitches can be disastrous Synchronous inputs are greatly preferred! But sometimes, asynchronous inputs cannot be avoided e.g., reset signal

R-S latch is asynchronous, J-K FF is synchronous Synchronous inputs • active only when the clock edge or level is active Asynchronous inputs • take effect immediately, without consideration of the clock

Chapter Summary • Fundamental Building Block of Circuits with State: latch and flipflop • R-S Latch, J-K Flipflop, Edge-triggered D Flipflop

Problem example

Concept of the State Machine: Moore Machine Example: Odd Parity Checker Assert output whenever input bit stream has odd # of 1's Symbolic State Transition Table State Diagram Encoded State Transition Table

Mealy Machine: with an edge, input/output

General state machine model Values stored in registers represent the state of the circuit Combinational logic computes: next state function of current state and inputs outputs function of current state and inputs (Mealy machine) function of current state only (Moore machine) Inputs Outputs Next State Current State output logic next state logic VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz

State machine model (cont’d) States: S1, S2, ..., Sk Inputs: I1, I2, ..., Im Outputs: O1, O2, ..., On Transition function: Fs(Si, Ij) Output function: Fo(Si) or Fo(Si, Ij) Inputs Outputs Next State Current State output logic next state logic Clock Next State State 1 2 3 4 5 VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz

Comparison of Mealy and Moore machines Mealy machines tend to have less states different outputs on arcs (n2) rather than states (n) Moore machines are safer to use Mealy machines react faster to inputs react in same cycle – don't need to wait for clock in Moore machines, more logic may be necessary to decode state into outputs – more gate delays after clock edge VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz

Comparison of Mealy and Moore machines (cont’d) state feedback inputs outputs reg combinational logic for next state logic for outputs Moore Mealy Synchronous Mealy inputs outputs state feedback reg combinational logic for next state logic for outputs inputs outputs state feedback reg combinational logic for next state logic for outputs VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz

Reverse Engineering (1) Problem: Given a circuit or logic diagram, Output: what is the function (state transition diagram) of this machine?

Example 2:

Realizing Circuits with Different Kinds of Flipflops Characteristic Equations R-S: D: J-K: T: Q+ = S + R Q Q+ = D Q+ = J Q + K Q Q+ = T Q + T Q Derived from the K-maps for Q+ = ƒ(Inputs, Q) E.g., J=K=0, then Q+ = Q J=1, K=0, then Q+ = 1 J=0, K=1, then Q+ = 0 J=1, K=1, then Q+ = Q Implementing One FF in Terms of Another D implemented with J-K D J K C Q

Mealy Machine: with an edge, input/output