Synchronous Sequential Logic Part I

Slides:



Advertisements
Similar presentations
Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
Advertisements

EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Sequential Circuits.
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
EECS 465: Digital Systems Lecture Notes # 7
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
Computer Architecture CS 215
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:
Princess Sumaya University
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
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.
Introduction to Sequential Logic Design Bistable elements Latches.
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.
Sequential logic circuits. 2 Outline Sequential Circuit Models –Asynchronous –Synchronous Latches Flip-Flops.
ReturnNext  Latch : a sequential device that watches all of its inputs continuously and changes its outputs at any time, independent of a clocking signal.
Circuits require memory to store intermediate data
Digital Logic Design Lecture 22. Announcements Homework 7 due today Homework 8 on course webpage, due 11/20. Recitation quiz on Monday on material from.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
INTRODUCTION TO SEQUENCIAL CIRCUIT
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Sequential Logic Flip-Flops and Related Devices Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty.
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.
So far, all of the logic circuits we have studied were basically based on the analysis and design of combinational digital circuits. The other major aspect.
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
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 Part I
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.
ENG241 Digital Design Week #6 Sequential Circuits (Part A)
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
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.
Princess Sumaya University
Sequential logic circuits
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
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.
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.
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.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
Digital Design Lecture 9
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
CISE204: Design of Digital Systems Lecture 18 : Sequential Circuits
Assistant Prof. Fareena Saqib Florida Institute of Technology
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Sequential logic circuits
LECTURE 15 – DIGITAL ELECTRONICS
Synchronous Sequential Circuits
FLIP-FLOPS.
Synchronous sequential
Synchronous Sequential
Sequential Circuits UNIT- IV
2019/9/26 EE 4271 VLSI Design, Fall 2012 Sequential Circuits.
Presentation transcript:

Synchronous Sequential Logic Part I Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University

Sequential Logic Digital circuits we have learned, so far, have been combinational no memory, outputs are entirely defined by the “current” inputs However, many digital systems encountered everyday life are sequential (i.e. they have memory) the memory elements remember past inputs outputs of sequential circuits are not only dependent on the current input but also the state of the memory elements.

Sequential Circuits Model Combinational Circuit inputs outputs Memory Elements current state next state current state is a function of past inputs and initial state

Classification 1/2 Two types of sequential circuits Synchronous Signals affect the memory elements at discrete instants of time. Discrete instants of time requires synchronization. Synchronization is usually achieved through the use of a common clock. A “clock generator” is a device that generates a periodic train of pulses.

Classification 2/2 Synchronous Asynchronous The state of the memory elements are updated with the arrival of each pulse This type of logical circuit is also known as clocked sequential circuits. Asynchronous No clock behavior of an asynchronous sequential circuits depends upon the input signals at any instant of time and the order in which the inputs change. Memory elements in asynchronous circuits are regarded as time-delay elements

Clocked Sequential Circuits Memory elements are flip-flops which are logic devices, each of which is capable of storing one bit of information. Combinational Circuit Flip-Flops inputs outputs current state next clock

Clocked Sequential Circuits The outputs of a clocked sequential circuit can come from the combinational circuit, from the outputs of the flip-flops or both. The state of the flip-flops can change only during a clock pulse transition i.e. low-to-high and high-to-low clock edge When the clock maintains its value, the flip-flop output does not change The transition from one state to the next occurs at the clock edge.

Latches The most basic types of memory elements are not flip-flops, but latches. A latch is a memory device that can maintain a binary state indefinitely. Latches are, in fact, asynchronous devices and they usually do not require a clock to operate. Therefore, they are not directly used in clocked synchronous sequential circuits. They rather be used to construct flip-flops.

SR-Latch made of cross-coupled NOR (or NAND) gates R Q1 S Q2 S R Q1 Q2 Q2 = Q1’ Undefined

Undefined State of SR-Latch S = R = 1 may result in an undefined state the next state is unpredictable when both S and R goes to 0 at the same time. It may oscillate Or the outcome state depend on which of S and R goes to 0 first. It oscillates 1 1 R R Q S Q’ 1 S Q Q’ 1

SR-Latches with NAND Gates Q R Q’ Also known as S’R’-latch S R Q Q’ 1 After S = 1, R = 0 After S = 0, R = 1 Undefined

SR-Latch with Control Input Control inputs allow the changes at S and R to change the state of the latch. R S C Q Q’ C S R Q Q’ X No change 1 Q = 0 Reset state Q = 1 Set state Indeterminate

D-Latch SR latches are seldom used in practice because the indeterminate state may cause instability Remedy: D-latches C D R Q S Q’ This circuit guarantees that the inputs to the S’R’-latch is always complement of each other when C = 1.

D-Latch We say that the D input is sampled when C = 1 C D Next state of Q X No change 1 Q = 0; reset state Q = 1; set state We say that the D input is sampled when C = 1 S R Q Q’ SR-latch S R Q Q’ S’R’-latch D C Q Q’ D-latch

D-Latch as a Storage Unit D–latches can be used as temporary storage The input of D-latch is transferred to the Q output when C = 1 When C = 0 the binary information is retained. We call latches level-sensitive devices. So long as C remains at logic-1 level, any change in data input will change the state and the output of the latch. Level sensitive latches may suffer from a serious problem. Memory devices that are sensitive to the rising or falling edge of control input is called flip-flops.

Need for Flip-Flops 1/2 Outputs may keep changing so long as C = 1 Combinational Circuit Latches inputs outputs current state next C

Need for Flip-Flops 2/2 Another issue (related to the first one) The states of the memory elements must change synchronously memory elements should respond to the changes in input at certain points in time. This is the very characteristics of synchronous circuits. To this end, we use flip-flops that change states during a signal transition of control input (clock)

Edge-Triggered D Flip-Flop An edge-triggered D flip-flop can be constructed using two D latches Y D latch (master) D latch (slave) D Q D Q D Q C C clk clk’ Y = D clk Y does not change clk D Y Q Q = Y = D clk’ Negative edge-triggered D flip-flop

Positive Edge-Triggered D Flip-Flop D latch (master) D C Q (slave) clk Y clk’ Y= D clk’ Y does not change clk Q = Y = D

Symbols for D Flip-Flops D FF D Q clk C Positive edge-triggered D Flip-Flop D FF D Q clk C Negative edge-triggered D Flip-Flop

Setup & Hold Times 1/2 Timing parameters are associated with the operation of flip-flops Recall Q gets the value of D in clock transition clk D FF D Q clk C ts th D Q tp, FF

Setup & Hold Times 2/2 Setup time, ts Hold time, th, The change in the input D must be made before the clock transition. Input D must maintain this new value for a certain minimum amount time. If a change occurs at D less than ts second before the clock transition, then the output may not acquire this new value. It may even demonstrate unstable behavior. Hold time, th, Similarly the value at D must be maintained for a minimum amount of time (i.e. th) after the clock transition.

Propagation Time Even if setup and hold times are achieved, it takes some time the circuit to propagate the input value to the output. This is because of the fact that flip-flops are made of logic gates that have certain propagation times.

D Flip-Flop Characteristic equation Positive edge-triggered D FF D Q clk C Positive edge-triggered D Flip-Flop Characteristic equation Q(t+1) = D D Q(t+1) 1 Characteristic Table

Other Flip-Flops D flip-flop is the most common since it requires the fewest number of gates to construct. Two other widely used flip-flops JK flip-flops T flip-flops Three FF operations Set Reset Complement

JK Flip-Flops Characteristic equation Characteristic Table Q(t+1) next state Q(t) no change 1 Reset Set Q’(t) Complement J Q C K Characteristic Table Characteristic equation Q(t+1) = JQ’(t) + K’Q(t)

T (Toggle) Flip-Flop Complementing flip-flop Characteristic equation Q(t+1) next state Q(t) no change 1 Q’(t) Complement T Q C Characteristic Table Characteristic equation Q(t+1) = T J Q C K T D Q C

Characteristic Equations The logical properties of a flip-flop can be expressed algebraically using characteristic equations D flip-flop Q(t+1) = JK flip-flop T flip-flop

Asynchronous Inputs of Flip-Flops They are used to force the flip-flop to a particular state independent of clock “Preset” (direct set) set FF state to 1 “Clear” (direct reset) set FF state to 0 They are especially useful at startup. In digital circuits when the power is turned on, the state of flip-flops are unknown. Asynchronous inputs are used to bring all flip-flops to a known “starting” state prior to clock operation.

Asynchronous Inputs data reset reset C D Q Q’ 1 X  Starting State D Q clk D Q reset D Q C data reset R reset C D Q Q’ 1 X  Starting State

Analysis of Clocked Sequential Circuits Goal: to determine the behavior of clocked sequential circuits “Behavior” is determined from Inputs Outputs State of the flip-flops We have to obtain Boolean expressions for output and next state output & state equations (state) table (state) diagram

State Equations Also known as “transition equations” Example specify the next state as a function of the present state and inputs Example D Q C A A’ B B’ x y clk A(t+1) B(t+1)

Output and State Equations B(t+1) = y = A(t+1) D Q A x C A’ B(t+1) D Q B C B’ y clk

Flip Flop Input Equations Flip-Flop input (excitation) equations Same as the state equations in D flip-flops

Example: State (Transition) Table B(t+1) = ? y = ? y B A x output Next state input Present state 1 1 1 1 A sequential circuit with m FFs and n inputs needs 2m+n rows in the transition table

Example: State Diagram Present state input Next state output A B x y 1 1/1 0/0 11 00 0/0 0/0 1/0 0/0 1/0 01 10 1/0 What is this circuit doing? State diagram provides the same information as state table

Analysis with JK Flip-Flops For a D flip-flop, the state equation is the same as the flip-flop input equation Q(t+1) = D For JK flip-flops, situation is different Goal is to find state equations Method determine flip-flop input equations List the binary values of each input equation Use the corresponding flip-flop characteristic table to determine the next state values in the state table

Example: Analysis with JK FFs JA KA JB KB x Q A J C K J D Q B Q clk C C 1 K y Flip-flop input equations JA = and KA = JB = and KB =

Example: Analysis with JK FFs JA = Bx and KA = x’+B JB = x and KB = 1 KB JB KA JA B A x FF inputs next state input present State 1 1 1 1 1

Example: Analysis with JK FFs Characteristic equations A(t+1) = JAA’ + K’AA B(t+1) = JBB’ + K’BB Input equations JA = Bx and KA = x’+B JB = x and KB = 1 State equations A(t+1) = = B(t+1) =

State Diagram 11 00 01 10 What is the circuit doing? 1/1 0/0 0/0 0/0 Present state input Next state output A B x y 1 00 0/0 0/0 1/0 0/0 1/0 01 10 1/0 What is the circuit doing?

Analysis with T Flip-Flops Method is the same Example TA = TB = TA TB T Q C D A B x clk reset y0 y1 y1 = A y0 = B

Example: Analysis with T Flip-Flops Characteristic equation A(t+1) = TA  A B(t+1) = TB  B Input equations TA = xB TB = x Output equations y1 = A y0 = B State equations A(t+1) = B(t+1) =

State Table & Diagram A(t+1) = xB  A B(t+1) = x  B y1 = A; y0 = B 00/00 1 01/01 Present state input Next state output A B x y1 y0 1 1 1 10/10 1 11/11

Mealy and Moore Models There are two models for sequential circuits They differ in the way the outputs are generated Mealy: output is a function of both present states and inputs output is a function of present state only

Example: Mealy and Moore Machines Q C x y S clock reset Mealy machine External inputs, x and y, are asynchronous Thus, outputs may have momentary (incorrect) values Inputs must be synchronized with clocks Outputs must be sampled only during clock edges

Timing Diagram (11) + (01) = 100 clk reset x y C S S = x  y  C C(t+1) = xy + xC + yC

Timing Diagram clk reset x y C S S = x  y  C C(t+1) = xy + xC + yC 48 C(t+1) = xy + xC + yC

Example: Moore Machines T Q C D A B x clk reset y Outputs are already synchronized with clock. They change synchronously with the clock edge.