INTRODUCTION TO SEQUENCIAL CIRCUIT

Slides:



Advertisements
Similar presentations
EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Sequential Circuits.
Advertisements

1 Lecture 14 Memory storage elements  Latches  Flip-flops State Diagrams.
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals.
Computer Architecture CS 215
Flip-Flops, Registers, Counters, and a Simple Processor
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Synchronous Sequential Logic
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Sequential circuits The digital circuits considered thus far have been combinational, where the outputs are entirely dependent on the current inputs. Although.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
ReturnNext  Latch : a sequential device that watches all of its inputs continuously and changes its outputs at any time, independent of a clocking signal.
Sequential Circuits : Part I Read Sections 5-1, 5-2, 5-3.
Circuits require memory to store intermediate data
EET 1131 Unit 10 Flip-Flops and Registers
EKT 124 / 3 DIGITAL ELEKTRONIC 1
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
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.
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
EE 4271 VLSI Design, Fall 2010 Sequential Circuits.
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.
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
ETE Digital Electronics Latches and Flip-Flops [Lecture:12] Instructor: Sajib Roy Lecturer, ETE, ULAB.
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
Synchronous Sequential Logic Chapter 5. Digital Circuits Sequential Circuits Combinational circuits contains no memory elements the outputs depends.
Chap 4. Sequential Circuits
C HAPTER F IVE S YNCHRONOUS S EQUENTIAL L OGIC 1.
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.
FLIP FLOP By : Pn Siti Nor Diana Ismail CHAPTER 1.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
Sequential Design Basics. Lecture 2 topics  A review of devices that hold state A review of Latches A review of Flip-Flops 8/22/2012 – ECE 3561 Lect.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Chapter 10 Flip-Flops and Registers 1. Objectives You should be able to: Explain the internal circuit operation of S-R and gated S-R flip-flops. Explain.
1 Lecture #11 EGR 277 – Digital Logic Ch. 5 - Synchronous Sequential Logic There are two primary classifications of logic circuits: 1.Combinational logic.
1 Synchronous Sequential Logic Sequential Circuits Every digital system is likely to have combinational circuits, most systems encountered in practice.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
EKT 121 / 4 ELEKTRONIK DIGIT I
Synchronous Sequential Logic Part 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.
Chapter5: Synchronous Sequential Logic – Part 1
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CENG 241 Digital Design 1 Lecture 7 Amirali Baniasadi
Dept. of Electrical Engineering
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
LATCHED, FLIP-FLOPS,AND TIMERS
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
Synchronous Sequential Circuits
ECE Digital logic Lecture 16: Synchronous Sequential Logic
LECTURE 15 – DIGITAL ELECTRONICS
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
Synchronous Sequential Circuits
FLIP-FLOPS.
Synchronous sequential
Synchronous Sequential
Flip-Flops.
Sequential Circuits UNIT- IV
2019/9/26 EE 4271 VLSI Design, Fall 2012 Sequential Circuits.
Presentation transcript:

INTRODUCTION TO SEQUENCIAL CIRCUIT

Introduction Combinational circuits: Sequential circuits: contain no memory elements the outputs depends on the current inputs Sequential circuits: a feedback path outputs depends on present inputs and present states (pre. inputs) (inputs, current state) Þ (outputs, next state) Combinational logic refers to circuits whose output is strictly dependent on the present value of the inputs. Once the input values are changed, the information regarding the pre- vious inputs is lost; in other words, combinational logic circuits have no memory. In many applications, information regarding input values at a certain instant of time is needed at some future time. Circuits whose output depends not only on the present values of the input but also on the past values of the inputs are known as sequential logic circuits. The mathematical model of a sequential circuit is usually referred to as a sequential machine or a finite state machine.

General model of a sequential logic circuit. Sequential Circuits A general model of a sequential circuit is shown in Figure 4.1. As can be seen in the diagram, sequential circuits are basically combinational circuits with the additional property of memory (to remember past inputs). The combinational part of the circuit receives two sets of input signals: primary (coming from the circuit environment) and secondary (coming from the memory). The particular combination of secondary input variables at a given time is called the present state of the circuit; the secondary input variables are also known as state variables. If there are m secondary input variables in a sequential circuit, then the circuit can be in anyone of 2mdifferent present states. The outputs of the combinational part of the circuit are divided into two sets. The primary outputs are available to control operations in the circuit environment, whereas the secondary outputs are used to specify the next state to be assumed by the memory. The number of secondary output variables, often called the excitation variables, depends on the type of memory element used. General model of a sequential logic circuit.

Sequential Circuits A sequential circuit is specified by a time sequence of inputs, outputs and internal states Sequential circuits must be able to remember the past history Flip-flops: most commonly used memory devices A function of - present inputs & - present state of memory elements (the past sequence of inputs)

Sequential Circuit--- Why? comparator input output Add more memory elements! Iteration 1: A=0110 B=1100 Iteration 2: if (A<B) C=1100 D=0111 else C=0011 D=1000 4-bit Comparator

Synchronous clocked sequential circuit Use clock pulses generated by a clock generator 1 1 2 2 2 Synchronous clocked sequential circuit

Types of Sequential Circuits depending on the timing of their signals Synchronous sequential circuits Storage elements are affected at discrete time instants Use clock pulses in the inputs of storage elements Asynchronous sequential circuits Storage elements are affected at any time instant

Synchronous Sequential Circuits Storage elements are affected only with the arrival of each pulse The storage elements used in the clocked sequential circuits are called “flip-flops” Synchronous Use clock pulses in the inputs of storage elements

Synchronous Sequential Circuits a master-clock generator to generate a periodic train of clock pulses the clock pulses are distributed throughout the system clocked sequential circuits (most popular) no instability problems the memory elements: flip-flops binary cells capable of storing one bit of information two outputs: one for the normal value and one for the complement value maintain a binary state indefinitely until directed by an input signal to switch states

Latches and Flip-Flops 8/22/2012 – ECE 3561 Lect 2 What is the difference? Flip-flops use a clock and are clock edge triggered When the clock edge occurs the data on the data inputs determines the next state of the flip-flop Latches are level sensitive Latches are very common in VLSI circuits Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU The basis 8/22/2012 – ECE 3561 Lect 2 How do you design logic that holds state? Logic gates are feed forward devices who’s output depends on the value of the inputs So how to create a device that holds a state? Feedback!! Copyright 2012 - Joanne DeGroat, ECE, OSU

Latch vs. Flip-Flop Latch positive-edge triggered CLK Q D CLK negative-edge triggered CLK CLK

Latches The most basic types of flip-flops operate with signal levels latch All FFs are constructed from the latches introduced here A FF can maintain a binary state indefinitely until directed by an input signal to switch states Two NOR gates Set=1Q=1, Reset=1Q=0

Latches IF R=0 S=0 1 1 1 1 1 1 IF R=1 S=0 1 1 1 1 1 Step 1: red number Step 2: yellow number Step 3: green number Step 4: black number 1 1 1 1 1 1

Latches IF 1 1 1 R=1 1 S=1 1  Q=0 Q’= 0 After that, R=0 and S=0 1 1 1 Step 1: red number Step 2: yellow number Step 3: green number Step 4: black number 1  Q=0 Q’= 0 After that, R=0 and S=0 Wrong! 1 1 1 1 1 …

Latches SR latch (S,R)= (0,0): no operation S R Q’ Q 0 0 * * // a stable state in the previous state 1 0 0 1 // change to another stable state “Set” 0 0 0 1 // remain in the previous state 0 1 1 0 // change to another stable state “Reset” 0 0 1 0 // remain in the previous state 1 1 0 0 // oscillate (unpredictable) if next SR=00 SR latch (S,R)= (0,0): no operation (S,R)=(0,1): reset (Q=0, the clear state) (S,R)=(1,0): set (Q=1, the set state) (S,R)=(1,1): indeterminate state (Q=Q'=0) Under normal condition, (S,R) = (0,0) Set (S,R)=(1,0) can store a 1 in it. Then the output maintains 1 even the input is set as (S,R)=(0,0) the condition should be avoided Q  a memory/storage unit to store a bit (by setting different R and S)

SR Latch with NAND gates (S’R’ latch) reset set SR latch with NAND gates (c) Graphic symbol S’R’ latch

SR Latch with Control Input The complement output of the previous R’S’ latch. S_ R_ 1/S' 1/R' 0/1 En=0, no change En=1, enable

The Set-Reset (SR) Latch 8/22/2012 – ECE 3561 Lect 2 The circuit has no memory Output depends not only on present inputs but the state of the latch when the current inputs were applied. The state 1 1 on the inputs not allowed. Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU HDL code for SR Latch 8/22/2012 – ECE 3561 Lect 2 The core of the model --set up dataflow for SR latch Q <= R NOR Qbar AFTER 5 ns; Qbar <= S NOR Q AFTER 5 ns; Apply stimulus to S and R What does simulation show Copyright 2012 - Joanne DeGroat, ECE, OSU

HDL simulation of SR latch 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU The next state 8/22/2012 – ECE 3561 Lect 2 The state 11 is not allowed S=1 Q to 1 R=1 Q to 0 S and R 00 Hold state Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU Next state truth table 8/22/2012 – ECE 3561 Lect 2 From the table you can get the next state equation Here – Q+ = S + R’Q An equation that expresses the state of a latch (or flip flop) in terms of its present state and inputs is referred to as the characteristic equation. Copyright 2012 - Joanne DeGroat, ECE, OSU

level triggered (level-sensitive) D Latch (Transparent Latch) S_ 1/D' 0/1 R_ 1/D eliminate the undesirable conditions of the indeterminate state in the RS flip-flop D: data D Þ Q when En=1; no change when En=0 Q D En level triggered (level-sensitive) When En=1, Q changes as soon as D changes

Copyright 2012 - Joanne DeGroat, ECE, OSU The D Latch 8/22/2012 – ECE 3561 Lect 2 The D Latch is the most common element in CMOS design. Copyright 2012 - Joanne DeGroat, ECE, OSU

Timing diagram for a D Latch 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU The D F/F The D Flip-Flop has edge triggered operation Can be positive edge triggered (as here) or negative edge triggered 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

Timing for a D Flip-Flop 8/22/2012 – ECE 3561 Lect 2 Important to note relationships Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU D F/F Behavior Some important timing parameters Clock to output Setup and hold time 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

D F/F with Preset and Clear Can add preset and clear for easier circuit initialization. 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU Scan Chains D F/F are the F/F used in scan chains. What are scan chains? 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU Scan Chains 8/22/2012 – ECE 3561 Lect 2 Can use scan chains to inputs data or extract data Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU The T Flip Flop Toggle Flip Flop 8/22/2012 – ECE 3561 Lect 2 Copyright 2012 - Joanne DeGroat, ECE, OSU

More on Basic Sequential Elements 8/22/2012 – ECE 3561 Lect 2 The S-R F/F Q*=S+R’Q The Toggle F/F Q*=Q’ Q* is next value or next state Copyright 2012 - Joanne DeGroat, ECE, OSU

Copyright 2012 - Joanne DeGroat, ECE, OSU D F/F and J/K F/F 8/22/2012 – ECE 3561 Lect 2 D F/F Q* = D J/K F/F Q*=JQ’+K’Q Copyright 2012 - Joanne DeGroat, ECE, OSU

Flip-Flops A trigger The state of a latch or flip-flop is switched by a change of the control input Level triggered – latches Edge triggered – flip-flops Level triggered Edge triggered Edge triggered

Problem of Latch If level-triggered flip-flops are used the feedback path may cause instability problem (since the time interval of logic-1 is too long) multiple transitions might happen during logic-1 level Edge-triggered flip-flops the state transition happens only at the edge eliminate the multiple-transition problem

Edge-Triggered D Flip-Flop Two designs to solve the problem of latch: Master-slave D flip-flop Edge-trigger D flip-Flop Master-slave D flip-flop two separate latches a master latch (positive-level triggered) a slave latch (negative-level triggered) o

Master-slave D flip-flop Two D latches and one inverter The circuit samples D input and changes its output Q only at the negative-edge of CLK isolate the output of FF from being affected while its input is changing new value old value CLK=1, enabled CLK=0, disabled CLK=1, disabled CLK=0, enabled Old value is equal to the new value only at the instant of CLK’s falling edge positive-edge

Master-slave D flip-flop CP = 1: (S,R) Þ (Y,Y'); (Q,Q') holds CP = 0: (Y,Y') holds; (Y,Y') Þ (Q,Q') (S,R) could not affect (Q,Q') directly the state changes coincide with the negative-edge transition of CP

Edge-Triggered Flip-Flops the state changes during a clock-pulse transition SR latch with NAND gate A D-type positive-edge-triggered flip-flop three SR latches

Edge-Triggered Flip-Flops (S,R) = (0,1): Q = 1 (S,R) = (1,0): Q = 0 (S,R) = (1,1): no operation (S,R) = (0,0): should be avoided If Clk=0  S=1 and R=1  no operation. Output Q remains in the present state. 1 1 2 3 4 1 1 1 1 1 1 10 1 1 If Clk=1 and D=0 R=0  Reset. Output Q is 0. Then, if D changes to 1, R remains at 0 and Q is 0. 1 1

Edge-Triggered Flip-Flops (S,R) = (0,1): Q = 1 (S,R) = (1,0): Q = 0 (S,R) = (1,1): no operation (S,R) = (0,0): should be avoided If Clk=0 S=1 and R=1  no operation. Output Q remains in the present state. 1 2 3 4 1 1 If Clk=1 and D=0 R=0  Reset. Output Q is 0. Then, if D changes to 1, R remains at 0 and Q is 0. 1 0(new) 1(old) 1 1 Then, Clk=0  S=1, R=1  no operation (Q=0) Then, if Clk=1 and D=1 S=0 Set. Output Q is 1. (see the blue dot-line flow) Then, if D changes to 0, S remains at 0 and Q=1; 1 1

Positive-Edge-Triggered Flip-Flops Summary Clk=0: (S,R) = (1,1), no state change Clk=: state change once Clk=1: state holds eliminate the feedback problems in sequential circuits All flip-flops must make their transition at the same time