Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Similar documents
Topic 8: Sequential Circuits

Sequential vs. Combinational

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ELCT201: DIGITAL LOGIC DESIGN

Synchronous Sequential Logic

Sequential Logic Circuits

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Chapter 4. Sequential Logic Circuits

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Digital Design. Sequential Logic

Chapter 7 Sequential Logic

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Chapter 5 Synchronous Sequential Logic

Synchronous Sequential Circuit Design. Digital Computer Design

I. Motivation & Examples

Overview of Chapter 4

Mealy & Moore Machines

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

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

Integrated Circuits & Systems

I. Motivation & Examples

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

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

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

14.1. Unit 14. State Machine Design

State and Finite State Machines

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Clocked Synchronous State-machine Analysis

Digital Electronics Sequential Logic

Sequential Circuit Design

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

The Design Procedure. Output Equation Determination - Derive output equations from the state table

Problem Set 9 Solutions

ALU, Latches and Flip-Flops

Sequential Synchronous Circuit Analysis

Lecture 13: Sequential Circuits, FSM

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

Lecture 10: Synchronous Sequential Circuits Design

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as

Sequential Circuit Analysis

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

or 0101 Machine

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering


EET 310 Flip-Flops 11/17/2011 1

CPE100: Digital Logic Design I

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS

Latches. October 13, 2003 Latches 1

Lecture 13: Sequential Circuits, FSM

State & Finite State Machines

Topics. CMOS Design Multi-input delay analysis. John A. Chandy Dept. of Electrical and Computer Engineering University of Connecticut

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

State & Finite State Machines

Lecture 3 Review on Digital Logic (Part 2)

Adders allow computers to add numbers 2-bit ripple-carry adder

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

EE 209 Logic Cumulative Exam Name:

Fundamentals of Digital Design

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

P2 (10 points): Given the circuit below, answer the following questions:

Digital Design 2010 DE2 1

CprE 281: Digital Logic

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

Fundamentals of Computer Systems

Lecture 8: Sequential Networks and Finite State Machines

Synchronous Sequential Logic Part I

Lecture Outline. ESE 570: Digital Integrated Circuits and VLSI Fundamentals. Total Power. Energy and Power Optimization. Worksheet Problem 1

CHAPTER 9: SEQUENTIAL CIRCUITS

Lab #10: Design of Finite State Machines

Analysis and Design of Sequential Circuits: Examples

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Different encodings generate different circuits

Konstruktion av Vippor och Latchar

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Gates and Flip-Flops

Digital Logic Design - Chapter 4

Chapter #6: Sequential Logic Design

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Sequential Logic Worksheet

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Introduction to Digital Logic

Lecture 7: Sequential Networks

ELCT201: DIGITAL LOGIC DESIGN

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Fundamentals of Computer Systems

Models for representing sequential circuits

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Sequential Circuits Sequential circuits combinational circuits state gate delay

Unit 7 Sequential Circuits (Flip Flop, Registers)

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Hold Time Illustrations

Transcription:

Topic 8: Sequential Circuits Bistable Devices Readings : Consider the following element Patterson & Hennesy, Appendix B.4 - B.6 Goals Basic Principles behind Memory Elements Clocks Applications of sequential circuits Introduction to the concept of the State Machine This device exhibits two stable states (bistable) If P=(Reset), then Q=1(Set). If P=1(Set), then Q=(Reset). So, It is able to retain the two states, Set & Reset indefinitely. This is a memory cell, but there is no way to set it! Solution : Add OR gates to make it set-able. S-R Latches Four possible cases (inputs) : RS =, 1, 1, 11 Reminder : For a NOR gate, if any input is 1 then the output is. The circuit on the right is called an S-R Latch (Set-Reset Latch) Truth table R S Q QÕ 1/ /1 1 1 1 1 1 1 The value of the output Q and its complement represent the stored state. R, S are the inputs of the Latch

S-R Latches RS Latch summary Q is value stored in memory latch RS = is ÒHoldÓ condition RS = 1 is Ò SetÓ condition (force Q=1) RS = 1 is Ò ResetÓ condition (force Q=) RS = 11 is Ò ForbiddenÓ It can lead to incorrect operation : oscillation or ÒmetastabilityÓ. Q is not the complement of QÕ. Symbol Problems and Solutions Problem : What to do about R=S=1 Solution : Don't let it happen. Tie together inputs with an inverter. Now we cannot get R=S=1, but : Problem : We cannot get R=S= (ÒHoldÓ condition) Solution : Use ÓClockÓ input. Result : Clocked D-latch (No clock = hold) D-Latch Definition : Clock is a free-running signal with a fixed Cycle Time or Clock Period. Clock Frequency = 1/Cycle Time Q(t) Q(t+1) D 1 1 1 1 1 1 The clock period is divided into two portions: Clock is ÒHighÓ Clock is ÒLowÓ Rising Edge : Transition from Low to High Falling Edge: Transition from High to Low Necessary topic before we proceed : ÒClocksÓ

Rising Edge Falling Edge Rising Edge Falling Edge Clock Period Clock Low Clock Period Clock Low Edge-Triggered Methodology : Either the Rising or the Falling Edge of the Clock is considered Active = Causes state changes to occur. The duration of ÒHighÓ and ÒLowÓ parts of the clock cycle need not be the same. Duty cycle : Fraction of the Period, when the signal is considered active. Edge Triggered clocking : All state changes occur at a clock edge. Constraint of Clocked or Synchronous Systems : Signals must be Valid when the active clock edge occurs. Valid = Stable (not changing) for a short period before and after the edge rise or fall. Return to the D-latch Clk= ; Nothing happens (ÓHold" condition) Ck = equivalent to (S= and R=) Edge Triggered S-R Latch Different Approach Clk=1 ; read D into Latch. Update value until C changes to. Ck = 1 equivalent to S=D and R=DÕ Operation (assuming output is initially deasserted, ie Low) Note : NOT an Edge-Triggered D-Flip-Flop

Race Condition : For a D-Latch, if the input changes state, while the clock is still high, then there will be an additional change to the output, although the data to be written was the former value. D CLK Solution to race condition: Master/Slave Flip-Flop This is a Falling-Edge Triggered Master/Slave D Flip-Flop. The first Latch, called the Master, follows the input D when the Clock input is asserted. When Ck falls, X is closed and the second latch, called the slave, is open and gets the input from the output of the master latch. Also : Remember the previous reference to the edge triggered S-R Edge Triggered devices = Flip Flops The Actual circuit is more complex than shown above! Characteristics: Setup time (Tsu) Hold time (Th) Propagation Delay (Tprop) Minimum clock width... all are relative to clock edge S-R Latch Master/Slave

Applications : First, introduce another Flip-Flop Type : J-K Flip-Flop Counter Frequency Divider Parallel Data Storage The Basic Idea Behind Registers

Summary Flip flops v. latches Flip flops are edge triggered Latches are level sensitive Many variants S-R, J-K, D, T latch/flip-flop D-type most useful in processor design State machines design Interesting state machines have inputs and outputs. State will change depending on input. Two classes are Mealy and Moore: Moore machine: output = f(state) Beware of race conditions Need edge triggered device in any feed-back path Mealy machine: output = f(state,input) Generally: Moore machines have more states (mnemonic), but are easier to understand. Design Process General Procedure Step 1: Create a State Diagram Step 2: Write down a State Transition Table Step 3: Figure out the inputs to the flip flops using the excitation table. Step 4: Figure out functions for input to flip flops Step 5: Implement the machine Example "Write a string recognizer that recognizes the pattern 1 in its input. When an input bit pattern is recognized, output a 1. When the sequence 1 is seen, output zeros thereafter until a reset is assertedó Examples: 1. State diagram creation Start with easy paths, fill in the rest, reuse as much as possible! This is a Moore machine: X:Ê1111 Z:Ê111 X:Ê111111 Z:Ê1

2. Final state diagram 3. Symbolic State Transition Table: State Number Current State Next (X=) Next (X=1) Output S S1 S2 S3 S4 S5 S6 4. Figure out flip flop inputs 5. Reduce using K-maps A B C X AÕ BÕ CÕ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

6. Output Logic 6. Final Circuit A B C Output 1 1 1 1 1 1 1 1 1 1 1 1 1 X Combinatorial Logic Karnaugh map State minimization Goal: to minimize the number of states in a state diagram. Basic idea: Identify and combine states with equivalent behavior. 2 states are equivalent if the output is the same and, for each input combinations, the next state is the same state or an equivalent state. Approach: Start with state transition table. Identify states with the same behavior If such states go to the same next state, combine them and rename each occurrence of the old state in the state table. Repeat with new state table until no new combinations are possible. Next Time : Minimization

State Transition Table Modified State Transition Table Prefix Name X= X=1 Output (X=) Output (X=1) Reset S S1 S2 S1 S3 S4 1 S2 S5 S6 S3 S7 S8 1 S4 S9 S1 1 S5 S11 S12 11 S6 S13 S14 S7 S S 1 S8 S S 1 S9 S S 11 S1 S S 1 1 S11 S S 11 S12 S S 1 11 S13 S S 111 S14 S S Reset 1 1 1 11 x, 1 1 11x 11 11 Prefix Name S S1 S2 S3 S4 S5 S6 S1Õ X= S1 S3 S5 S S X=1 S2 S4 S6 S1Õ S1Õ S S 1 Output (X=) Output (X=1) Modified State Transition Table (2nd iteration) State Diagram: Prefix Name X= X-1 Output (X=) Output (X=1) Reset S S1 S2 S1 S3Õ S4Õ 1 S2 S4Õ S3Õ, 11 S3Õ 1, 1 S4Õ S1Õ x, 1 1 11x S S 11 11 S1Õ S S 1

Summary Components Flip flops (edge triggered) Latches (usually level triggered). Designing Sequential Circuits Step 1: Create a State Diagram Step 2: Write down a State Transition Table Step 3: Do state minimization Step 4: Do state assignment Step 5: Figure out the inputs to the flip flops using the excitation table. Step 6: Figure out functions for input to flip flops