Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1

Similar documents
Sequential Logic. Road Traveled So Far

Memory, Latches, & Registers

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

6. Finite State Machines

Synchronous Logic. These must be the slings and arrows of outrageous fortune. Comp 411 Fall /18/06. L14 Synchronous Logic 1

Synchronous Logic. These must be the slings and arrows of outrageous fortune. Comp 411 Spring /12/12. L13 Synchronous Logic 1

Synchronous Logic. These must be the slings and arrows of outrageous fortune. Comp 411 Fall /20/15. L15 Synchronous Logic 1

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

CPE100: Digital Logic Design I

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

State & Finite State Machines

Digital Integrated Circuits A Design Perspective

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

State & Finite State Machines

Topic 8: Sequential Circuits

Latches. October 13, 2003 Latches 1

State and Finite State Machines

Topics. Dynamic CMOS Sequential Design Memory and Control. John A. Chandy Dept. of Electrical and Computer Engineering University of Connecticut

CMPEN 411. Spring Lecture 18: Static Sequential Circuits

Lecture 3 Review on Digital Logic (Part 2)

Integrated Circuits & Systems

ELCT201: DIGITAL LOGIC DESIGN

CPE100: Digital Logic Design I

Models for representing sequential circuits

Clock Strategy. VLSI System Design NCKUEE-KJLEE

Finite State Machines CS 64: Computer Organization and Design Logic Lecture #15 Fall 2018

CPE100: Digital Logic Design I

Lecture 7: Logic design. Combinational logic circuits

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Sequential Logic (3.1 and is a long difficult section you really should read!)

Hold Time Illustrations

Sequential Logic Design: Controllers

Problem Set 9 Solutions

Sequential vs. Combinational

Review for B33DV2-Digital Design. Digital Design

Fundamentals of Digital Design

ALU, Latches and Flip-Flops

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

Synchronous Sequential Circuit Design. Digital Computer Design

Lecture 10: Synchronous Sequential Circuits Design

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

Digital Integrated Circuits A Design Perspective

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

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

Lecture 10: Sequential Networks: Timing and Retiming

Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic. November Digital Integrated Circuits 2nd Sequential Circuits

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

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

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

Chapter 7. Sequential Circuits Registers, Counters, RAM

Synchronous Sequential Logic

MODULE 5 Chapter 7. Clocked Storage Elements

9/18/2008 GMU, ECE 680 Physical VLSI Design

GMU, ECE 680 Physical VLSI Design

Different encodings generate different circuits

ALU A functional unit

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

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

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

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

Lecture 9: Sequential Logic Circuits. Reading: CH 7

Timing Constraints in Sequential Designs. 63 Sources: TSR, Katz, Boriello & Vahid

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

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

Introduction to Digital Logic

Sequential Logic Circuits

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

EE141Microelettronica. CMOS Logic

ENEL Digital Circuits Final Examination

Gates. Quiz 1 will cover up to and including this lecture. The book says something about NAND... maybe an in-law. Is he talking about BILL??? 6.

CMPEN 411 VLSI Digital Circuits Spring 2012 Lecture 17: Dynamic Sequential Circuits And Timing Issues

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

CMOS Inverter. Performance Scaling

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

Digital Design 2010 DE2 1

NTE74HC173 Integrated Circuit TTL High Speed CMOS, 4 Bit D Type Flip Flop with 3 State Outputs

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

Digital Electronics Sequential Logic

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)

Designing Sequential Logic Circuits

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1

Sequential Circuits. Circuits with state. Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. L06-1

Sequential Logic Worksheet

NTE74HC299 Integrated Circuit TTL High Speed CMOS, 8 Bit Universal Shift Register with 3 State Output

Chapter 3 Digital Logic Structures

Digital Integrated Circuits A Design Perspective

Laboratory Exercise #8 Introduction to Sequential Logic

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

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

14:332:231 DIGITAL LOGIC DESIGN. Organizational Matters (1)

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

Lecture 14 Finite state machines

Digital Integrated Circuits Designing Combinational Logic Circuits. Fuyuzhuo

From Sequential Circuits to Real Computers

FSM model for sequential circuits

Chapter 4. Sequential Logic Circuits

Transcription:

Sequential Logic Handouts: Lecture Slides 6.4 - Spring 2 2/27/ L6 Sequential Logic

Roadmap so far Fets & voltages Logic gates Combinational logic circuits Sequential Logic Voltage-based encoding V OL, V IL, V IH, V OH Combinational contract: discrete-valued inputs complete in/out spec. static discipline t CD and t PD Acyclic connections Composable blocks Design: truth tables sum-of-products simplification muxes, ROMs, PLAs Storage & state Dynamic discipline Finite-state machines Metastability Throughput & latency Pipelining Our motto: Spare me the details! 6.4 - Spring 2 2/27/ L6 Sequential Logic 2

Why Sequential Logic? We ll use sequential logic when we need organize the solution to some design problem as a sequence of steps: How to open digital combination lock w/ 3 buttons ( start, and ): Step : press start button Step 2: press button Step 3: press button Step 4: press button Step 5: press button Information remembered between steps is called state. Might be just what step we re on, or might include results from earlier steps we ll need to complete a later step. 6.4 - Spring 2 2/27/ L6 Sequential Logic 3

Implementing a State Machine Current state start Next state unlock --- --- --- start start digit start error start start digit digit2 digit error digit digit digit2 digit3 digit3 unlock unlock error unlock error unlock unlock error --- --- error 6 different states encode using 3 bits 6.4 - Spring 2 2/27/ L6 Sequential Logic 4

Now do it in Hardware! start button button button Current state ROM 64x4 6 inputs 2 6 locations each location supplies 4 bits unlock Next state 3 3 State State memory memory Trigger update periodically ( clock ) 6.4 - Spring 2 2/27/ L6 Sequential Logic 5

Abstraction du jour: Finite State Machines m Clocked FSM n A FINITE STATE MACHINE has k STATES S... S k (one is "initial state) m INPUTS I... I m n OUTPUTS O... O n Transition Rules S'(s,i) for each state s and input i Output Rules Out(s) for each state s 6.4 - Spring 2 2/27/ L6 Sequential Logic 6

Discrete State, Time inputs STATE s ROM NEXT s outputs Two design choices: () outputs only depend on state (Moore) (2) outputs depend on inputs + state (Mealy) s state bits 2 s possible states Clock STATE NEXT Clock Period Clock Period 2 Clock Period 3 Clock Period 4 Clock Period 5 6.4 - Spring 2 2/27/ L6 Sequential Logic 7

State Transition Diagrams S S U= D U= S S S S D2 U= D3 U=, U U= S E U= State name S = no buttons pressed S Outputs when in this state (Moore) Heavy border for initial state U= 6.4 - Spring 2 2/27/ L6 Sequential Logic 8

Valid State Diagrams in/out S3 -/ S / / S8 / / / / / S9 / S2 / / -/ S4 Can you spot the problems? S5 / -/ / / Arcs leaving a state must be: () mutually exclusive can t have two choices for a given input value (2) collectively exhaustive S7 S6 input/output (Mealy) every state must specify what happens for each possible input combination. Nothing happens means arc back to itself. 6.4 - Spring 2 2/27/ L6 Sequential Logic 9

FSM Party ames. What can you say about the number of states? k ROM k 2. Same question: m States x y z n States 3. Here's an FSM. Can you discover its rules? 6.4 - Spring 2 2/27/ L6 Sequential Logic

What s My Transition Diagram? =OFF, =ON? vs. "" = Surprise! If you know NOTHIN about the FSM, you re never sure! If you have a BOUND on the number of states, you can discover its behavior: K-state FSM: Every (reachable) state can be reached in < k steps. BUT... states may be equivalent! 6.4 - Spring 2 2/27/ L6 Sequential Logic

FSM Equivalence vs. ARE THEY DIFFERENT? NOT in any practical sense! They are EXTERNALLY INDISTINUISHABLE, hence interchangeable. FSMs EQUIVALENT iff every input sequence yields identical output sequences. ENINEERIN OAL: HAVE an FSM which works... WANT simplest (ergo cheapest) equivalent FSM. 6.4 - Spring 2 2/27/ L6 Sequential Logic 2

Housekeeping issues. Initialization? Clear the memory? inputs STATE s ROM or gates outputs NEXT s 2. Unused state encodings? - waste ROM (use PLA or gates) - meaning? 3. Synchronizing input changes with state update? That symbol doesn t register 4. Choosing encoding for state? 5. How do we implement memory? 6.4 - Spring 2 2/27/ L6 Sequential Logic 3

Storage: Using Capacitors We ve chosen to encode information using voltages and we know from 6.2 that we can store a voltage as charge on a capacitor: bit line word line N-channel fet serves as access switch V REF To write: Drive bit line, turn on access fet, force storage cap to new voltage To read: precharge bit line, turn on access fet, detect (small) change in bit line voltage Pros: compact! Cons: it leaks! refresh complex interface stable? (noise, ) 6.4 - Spring 2 2/27/ L6 Sequential Logic 4

Dynamic Memory TiN top electrode (V REF ) Ta 2 O 5 dielectric poly word line access fet 6.4 - Spring 2 2/27/ L6 Sequential Logic 5

Storage: Using Feedback BI IDEA: use positive feedback to maintain storage indefinitely. Our logic gates are built to restore marginal signal levels, so noise shouldn t be a problem! V IN V OUT Result: a bistable storage element V OUT VTC for inverter pair Feedback constraint: V IN = V OUT Not affected by noise Three solutions: two end-points are stable middle point is unstable V IN We ll get back to this! 6.4 - Spring 2 2/27/ L6 Sequential Logic 6

Settable storage element It s easy to build a settable storage element (called a latch) using a MUX: Here s a feedback path, so it s no longer a combinational circuit. state signal appears as both input and output A D Q IN Q OUT BD S YQ -- -- -- -- Q stable Q follows D 6.4 - Spring 2 2/27/ L6 Sequential Logic 7

Static D Latch D Q Positive latch Q follows D D Q Q stable static means latch will hold data (i.e., value of Q) while is inactive, however long that may be. Q: Does this take static power? 6.4 - Spring 2 2/27/ L6 Sequential Logic 8

Potential hazard D P2 P Q Let D = and consider : P = P2 = Q = P P P P2 P2 P2 Q Q Q Scenario : fast inverter slow AND, OR Scenario 2: slow inverter fast AND, OR Scenario 3: fast inverter fast AND, OR 6.4 - Spring 2 2/27/ L6 Sequential Logic 9

Hazards in perspective Two possible fixes:. Adjust gate timings 2. Add AND gate to cover P:P2 transition D Q Q: When should we worry about hazards? A. Whenever we build combinational circuits. B. When driving in Cambridge C. On 6.4 quizzes D. Only in special circumstances, eg, when using feedback to build static storage elements. A. D : Common digital engineering approaches do not depend on combinational outputs during propagation, hence tolerate combinational hazards. 6.4 - Spring 2 2/27/ L6 Sequential Logic 2

More serious problems D P2 P Q D P Short pulse on : how long is enough to set the latch?? D P D changes about the same time as latch closes. What value is saved?? 6.4 - Spring 2 2/27/ L6 Sequential Logic 2

A Dynamic Discipline Design of sequential circuits MUST guarantee that inputs to sequential devices are valid and stable during periods when they may influence state changes. >t PULSE D 6.4 - Spring 2 2/27/ >t SETUP >t HOLD t PULSE : minimum pulse width guarantee is active for long enough for latch to capture data t SETUP : setup time guarantee that D value has propagated through feedback path before latch closes t HOLD : hold time guarantee latch is closed and Q is stable before allowing D to change L6 Sequential Logic 22

Does this work yet? start button button button Current state ROM 64x4 unlock Next state 3 3 Q D Hmm. Hard to get pulse width exactly right! 6.4 - Spring 2 2/27/ L6 Sequential Logic 23

Summary sequential logic = combinational logic + memory new abstraction: finite state machines transition diagrams showing states, outputs, and transition arcs: mutually exclusive, collectively exhaustive memory elements dynamic memory: compact, only reliable short-term static memory: controlled use of positive feedback level-sensitive D-latches dynamic discipline (setup and hold times) To do list: how to generate correct size pulse for input to latch? what about 3 rd solution point in bistable storage element? input synchronization to avoid violating dynamic discipline? 6.4 - Spring 2 2/27/ L6 Sequential Logic 24