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.

Slides:



Advertisements
Similar presentations
11/12/2004EE 42 fall 2004 lecture 311 Lecture #31 Flip-Flops, Clocks, Timing Last lecture: –Finite State Machines This lecture: –Digital circuits with.
Advertisements

1 Lecture 14 Memory storage elements  Latches  Flip-flops State Diagrams.
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Chapter 6 -- Introduction to Sequential Devices
EECS 465: Digital Systems Lecture Notes # 7
1 Sequential Ckts, Latches and Timing Issues Today: Sequential Circuits, LatchesFirst Hour: Sequential Circuits, Latches –Section of Katz’s Textbook.
ELEC 256 / Saif Zahir UBC / 2000 Timing Methodology Overview Set of rules for interconnecting components and clocks When followed, guarantee proper operation.
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
BR 8/991 Sequential Systems A combinational system is a system whose outputs depends only upon its current inputs. A sequential system is a system whose.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 12 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch:
Sequential Circuits. 2 ياداوري  آموزش تکنيک هاي طراحي و پياده سازي سيستم هاي پيچيده: سيستم:  داراي ورودي ها، خروجي ها و رفتار مشخصي است −اين رفتار توسط.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Chapter #6: Sequential Logic Design
1 Sequential Systems A combinational system is a system whose outputs depend only upon its current inputs. A sequential system is a system whose outputs.
1 Sequential Circuits –Digital circuits that use memory elements as part of their operation –Characterized by feedback path –Outputs depend not only on.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Logic and Computer.
Page 1 Sequential Logic Basic Binary Memory Elements.
Circuits require memory to store intermediate data
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
EET 1131 Unit 10 Flip-Flops and Registers
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.
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.
Chapter #6: Sequential Logic Design 6.2 Timing Methodologies
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
1 CSE370, Lecture 14 Lecture 14 u Logistics n Midterm 1: Average 90/100. Well done! n Midterm solutions online n HW5 due date delayed until this Friday.
Flip Flops. Clock Signal Sequential logic circuits have memory Output is a function of input and present state Sequential circuits are synchronized by.
1 Flip Flops, Registers Today: Latches, Flip FlipsFirst Hour: Types of Latches, Flip Flips –Section of Katz’s Textbook –In-class Activity #1.
SEQUENTIAL CIRCUITS Introduction
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
Introduction to Sequential Logic Design Flip-flops.
ENGR-43_Lec-05c_Thevenin_AC_Power.pptx 1 Bruce Mayer, PE Engineering-43: Engineering Circuit Analysis Bruce Mayer, PE Licensed.
Digital System Design. Intro. VLSI: CMOS inverter.
Chap 4. Sequential Circuits
ENG241 Digital Design Week #6 Sequential Circuits (Part A)
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
D Latch Delay (D) latch:a) logic symbolb) NAND implementationc) NOR implementation.
Unit 11 Latches and Flip-Flops Fundamentals of Logic Design By Roth and Kinney.
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
BR 8/991 DFFs are most common Most programmable logic families only have DFFs DFF is fastest, simplest (fewest transistors) of FFs Other FF types (T, JK)
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.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
Sequential logic circuits
EKT 121 / 4 ELEKTRONIK DIGIT I
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Flip Flops, Registers Today: First Hour: Types of Latches, Flip Flips
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CHAPTER 11 LATCHES AND FLIP-FLOPS This chapter in the book includes: Objectives Study Guide 11.1Introduction 11.2Set-Reset Latch 11.3Gated D Latch 11.4Edge-Triggered.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Digital Design: Sequential Logic Principles
Lecture 10 Flip-Flops/Latches
Lecture #16: D Latch ; Flip-Flops
Chapter #6: Sequential Logic Design
EKT 121 / 4 DIGITAL ELECTRONICS I
ECE Digital logic Lecture 16: Synchronous Sequential Logic
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
SEQUENTIAL CIRCUITS __________________________________________________
Presentation transcript:

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 Timing Methodologies Cascading Flip-Flops for Proper Operation Narrow Width Clocking vs. Multiphase Clocking Clock Skew Realizing Circuits with Flip-Flops Choosing a FF Type Characteristic Equations Conversion Among Types Self-Timed Circuits

ELEC 256 / Saif Zahir UBC / 2000 Sequential Switching Networks Sequential logic forms basis for building "memory" into circuits. Sequential logic is characterized by the presence of feedback paths. Combinational Logic Delay =  x1 x2 x3 x4 z1 z2 z3 z4 z3 = F(x1,...,x4,z3,z4) z3(t+  ) = F(x1(t),...,x4(t),z3(t),z4(t)) Observations: z3 and z4 appear as both inputs and outputs. The “state” of variable z3 (or z4) at time t+  depends on its value at time t, i.e. z3(t+  ) = F(z3(t)), hence, circuit has memory. z3(t) and z4(t) are called state variables. Sequential Circuit

ELEC 256 / Saif Zahir UBC / 2000 Simple Sequential Circuits Cascaded Inverters: Static Memory Cell "0" "1" Delay=  x(t) z(t)   t x z Assuming  > 0 z(t+  ) = x(t) z(t) if x(t) = 0 then z(t)=1(stable state) if x(t) = 1 then z(t+  ) = z(t) Another Example Observe that NAND gate with one input asserted acts as an inverter with respect to other input When x=1, equaivalent circuit z(t) Timing Waveform:

ELEC 256 / Saif Zahir UBC / 2000 Inverter Chains and Ring Oscillators Inverter Chains Odd # of stages leads to ring oscillator Snapshot taken just before last inverter changes Output high propagating thru this stage Timing Waveform: tp = n  n = no. inverters

ELEC 256 / Saif Zahir UBC / 2000 Cross-Coupled NOR Gates Observation NOR gate with one input=0, acts as an inverter with respect to other input. 0 x X x(t) z(t) x=1 --> z=0 x=0 --> z=1 Problem: how can we insert x in the loop? Simple-Latch: two-inverter loop q Q R S Equivalent NOR circuit with two control inputs (R and S) to break or close the loop R: Reset input (R=1 --> Q=0) S: Set input (S=1 --> Q=1) q Q R S Alternative representation

ELEC 256 / Saif Zahir UBC / 2000 The RS Latch q=0 Q=1 R=0 S=0 if R=S=0 then Q(t+  )=Q(t) (memory element) q=1 Q=0 R=0 S=0 q=0 Q=0 R=1 S=1 if R=S=1 then q = Q = 0, which violates the inverter rule (q = 0, Q = 1) if R and S chnage from 1-to-0 at precisely same moment, then RS latch will oscillate (provided the NOR gate delays are perfectly matched) q=0-->1-->0-->1-- Q=0-->1-->0-->1-- R=1-->0 S=1-->0 0-->1-->0-->1

ELEC 256 / Saif Zahir UBC / 2000 State Behavior of RS Latch Truth Table Summary of R-S Latch Behavior The response and transient behavior of the RS latch can be described using a state-diagram: 1- Nodes represent the unique states of the circuit 2- Arcs indicate state-transition under particular input combinations (arc labels). Because of the resulting unstable behavior the combination R=S=1 is called the forbidden input for the RS latch. state 0 state 3 state 1state 2

ELEC 256 / Saif Zahir UBC / 2000 State-Diagrams and State Tables qQ SR SR SR SR PSNS (q +, Q + ) PS : present state NS: next state Q + : Q(t+  ) A state-table expresses the same information of the state-diagram in a tabular format Note the unstable behavior is now obvious from the continuous transition states 00 and 11 when SR changes from 11 to 00.

ELEC 256 / Saif Zahir UBC / 2000 The D-Latch enabled when C=1 D C Clk Enable Q q if C=1 then Q=D if C=0 then Q(t+  )=Q(t) if C=0, then R=S=0 and Q(t+  )=Q(t) If C=1 and D=0 then R=1, S=0, and Q=0 if C=1 and D=1 then R=0, S=1, and Q=1 Realization using an RS latch Note that input R=S=1 can not occur R SQ qq D C RS Latch

ELEC 256 / Saif Zahir UBC / 2000 Steup and Hold Times Clock: Periodic Event, causes state of memory element to change. There is a timing "window" around the clocking event during which the input must remain stable and unchanged in order to be recognized Setup Time (Tsu): Minimum time before the clocking event by which the input must be stable Hold Time (Th) Minimum time after the clocking event during which the input must remain stable Primitive Memory Elements : Latches: Continuously sample their inputs. Any change in the level of the inputs is propagated through to the outputs (level sensitive). Flip-Flops: Outputs change only with respect to the clock, normally the rising edge or the falling edges of the clock.

ELEC 256 / Saif Zahir UBC / 2000 Level Sensitive Latches Timing Diagram: Set Reset RS latch with active-low inputs and active-low Enable Truth Table \enb S R Q + 1 x x Q Q Unstable

ELEC 256 / Saif Zahir UBC / 2000 Flip-Flops and Latches Bubble here for negative edge triggered device Timing Diagram: Behavior is the same unless input changes occur while the clock is high Edge triggered devices sample inputs on the rising or falling edge of the Clock or the Enable. Transparent latches sample inputs as long as the clock is asserted - output changes with input (after certain delay).

ELEC 256 / Saif Zahir UBC / 2000 Flip-Flops vs. Latches Input/Output Behavior of Latches and Flipflops Type When Inputs are Sampled When Outputs are Valid unclocked always propagation delay from latch input change level clock high propagation delay from sensitive (Tsu, Th around input change latch falling clock edge) positive edge clock lo-to-hi transition propagation delay from flipflop (Tsu, Th around rising edge of clock rising clock edge) negative edge clock hi-to-lo transition propagation delay from flipflop (Tsu, Th around falling edge of clock falling clock edge) master/slave clock hi-to-lo transition propagation delay from flipflop (Tsu, Th around falling edge of clock falling clock edge)

ELEC 256 / Saif Zahir UBC / 2000 Flip-Flops: Typical Timing Specifications 74LS74 Positive Edge Triggered D Flipflop Setup time Hold time Minimum clock width Propagation delays (low to high, high to low, max and typical) All measurements are made from the clocking event that is, the rising edge of the clock

ELEC 256 / Saif Zahir UBC / 2000 Latches: Typical Timing Specifications 74LS76 Transparent Latch Setup time Hold time Minimum Clock Width Propagation Delays: high to low, low to high, maximum, typical data to output clock to output Measurements from falling clock edge or rising or falling data edge

ELEC 256 / Saif Zahir UBC / 2000 Designing Latches RS Latch Truth Table: Next State = F(S, R, Current State) Derived K-Map: Characteristic Equation: q(t+  )=s(t)+R(t)q(t) or q + =s + Rq q Q R S q q R S Compare to previous NOR implementation

ELEC 256 / Saif Zahir UBC / 2000 The JK Latch The JK latch eliminates the forbidden state of the RS latch Basic principle: use output feedback to guarantee that R=S=1 never occurs J=K=1 yields toggle (q + = Q) Characteristic Equation: Q + = Q K + Q J J K D C Q enb D-Latch

ELEC 256 / Saif Zahir UBC / 2000 JK Latches q SR SR SR SR x x Q Q 0 1 x PSNS (q +, Q + ) Simplified State-Tables q JK JK JK JK Q Q 0 1 Q PSNS (q +, Q + ) JK=01, 11 JK=10, 11 JK=00, 10 JK=00, 01 Q=1Q=0 J K Q+ 0 0 Q Q

ELEC 256 / Saif Zahir UBC / 2000 From JK Latch to JK Flip-Flop JK Latch: Race Condition Set Reset Toggle Race Condition Ideally, the Latch should toggle only once when JK=11. Because of latch transparency, race conditions cause continuous toggrling. Toggle Correctness: Single State change per clocking event Solution: Master-Slave Flipflop

ELEC 256 / Saif Zahir UBC / 2000 Master-Slave JK Flip-Flop Correct Toggle Operation Master Stage Slave Stage Sample inputs while clock high Sample inputs while clock low Break feedback path, by dividing operation in two time periods (clock-high and clock-low)

ELEC 256 / Saif Zahir UBC / 2000 The Toggle (T) FlipFlop State table T Q Q TQ C T flipflop JK flipflop TJ KC Q T-FF can be realized using a JK-FF Verification: J=K=T T Q + 0 Q 1 Q or T J K Q q Q q + = tQ+Tq D flipflop T D C Q T-FF can be realized using a D-FF

ELEC 256 / Saif Zahir UBC / 2000 Edge-Triggered FlipFlops Characteristic equation Q + = D Negative edge-triggered D flipflop Flipflop state changes right after the falling edge of the clock 4-5 gate delays (longer than latches) Setup and Hold times are necessary for correct operation Example: D Clk Q

ELEC 256 / Saif Zahir UBC / 2000 Edge-Triggered D FlipFlopk Step-by-step analysis When clock goes from high-to-low data is latched When clock is low data is held

ELEC 256 / Saif Zahir UBC / 2000 Positive and Negative Edge Triggered FlipFlops 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 Timing Diagram

ELEC 256 / Saif Zahir UBC / 2000 Comparison 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 because of 1's catching, never use master/slave J-K FFs Use edge-triggered varieties 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 Asynchronous Preset and Clear inputs are highly desirable!

ELEC 256 / Saif Zahir UBC / 2000 FlipFlop Excitation Tables Useful Design Tool: For each state-transition, the excitation table lists the required input combination(s) D Q DQ C D flipflop q + = d TQ C T flipflop q + = tQ+Tq Q Q + D Excitation Table Q Q + T D FlipFlop 2. T FlipFlop Transition Table T Q + 0 q 1 Q Excitation Table Transition Table

ELEC 256 / Saif Zahir UBC / 2000 FlipFlop Excitation Tables q + = s + Rq Q Q + R S 0 0 X X 1. SR FlipFlop RQ Clk SR flipflop S Transition TableExcitation Table R S Q Q forbid q + = jQ + Kq Q Q + J K X X 1 0 X X 0 1. JK FlipFlop JQ Clk JK flipflop K Transition TableExcitation Table R S Q q Q Q=0Q=1 JK= 10, 11 JK= 01, 11 JK=00,01 JK=00,10 Q=0Q=1 RS= 01 RS=10 RS=00,10 RS=00,01

ELEC 256 / Saif Zahir UBC / 2000 Conversion Between FlipFlop Types Procedure uses excitation tables Method: to realize a type A flipflop using a type B flipflop: 1. Start with the K-map or state-table for the A-flipflop. 2. Express B-flipflop inputs as a function of the inputs and present state of A-flipflop such that the required state transitions of A-flipflop are reallized. x y Q Type B x y Q g h CL Type A 1. Find Q + = f(g,h,Q) for type A (using type A state-table) 2. Compute x = f1(g,h,Q) and y=f2(g,h,Q) to realize Q +.

ELEC 256 / Saif Zahir UBC / 2000 Conversion Between FlipFlop Types Example: Use JK-FF to realize D-FF 1) Start transition table for D-FF 2) Create K-maps to express J and K as functions of inputs (D, Q) 3) Fill in K-maps with appropriate values for J and K to cause the same state transition as in the D-FF transition table State-Table D Q Q + J K X X X X 0 e.g. when D=Q=0, then Q + = 0 the same transition Q-->Q + is realize with J=0, K=X

ELEC 256 / Saif Zahir UBC / 2000 Conversion Between FlipFlops Another Example: Implement JK-FF using a D-FF J K Q Q+ D T J K JK Q 0 1 t= jQ + kq J K JK Q 0 1 d= jQ + Kq J K D C Q Clk DFF J K T C Q Clk T-FF

ELEC 256 / Saif Zahir UBC / 2000 Asynchronous Inputs PRESET and CLEAR: asynchronous, level-sensitive inputs used to initialize a flipflop. D C S R Q Q Q Clk SET CLR T Clk TQ CLEAR PRESET PRESET, CLEAR: active low inputs PRESET = 0 --> Q = 1 CLEAR = 0 --> Q = 0 LogicWorks Simulation

ELEC 256 / Saif Zahir UBC / 2000 Proper Cascading of Flipflops Correct Operation, assuming positive edge triggered FF FF0FF1 Serial connection of positive edge-trigerred flipflops 1. on rising efge of CLK, FF1 reads Q0, and FF0 reads IN 2. during clock period FF1 performs Q1 <-- Q0, and FF0 performs Q0 <-- IN Shift-register