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

Similar documents
Latches. October 13, 2003 Latches 1

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

Lecture 14 Finite state machines

Sequential Logic Circuits

Lecture 10: Synchronous Sequential Circuits Design

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

Chapter 4. Sequential Logic Circuits

Sequential Logic. Road Traveled So Far

Sequential Circuits Sequential circuits combinational circuits state gate delay

EET 310 Flip-Flops 11/17/2011 1

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

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

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

ELCT201: DIGITAL LOGIC DESIGN

CSE370 HW6 Solutions (Winter 2010)

Solution to Proof Questions from September 1st

Problem Set 9 Solutions

6. Finite State Machines

State and Finite State Machines

Laboratory Exercise #8 Introduction to Sequential Logic

Synchronous Sequential Circuit Design

Module - 19 Gated Latches

CPE100: Digital Logic Design I

UNIVERSITY OF WISCONSIN MADISON

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

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

EECS 270 Midterm 2 Exam Answer Key Winter 2017

Lecture 7: Sequential Networks

Introduction to Digital Logic

Last few slides from last time

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

CS61C : Machine Structures

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

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

CS61C : Machine Structures

14.1. Unit 14. State Machine Design

Lecture 7: Logic design. Combinational logic circuits

CprE 281: Digital Logic

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

CSCI 2150 Intro to State Machines

Building a Computer Adder

20.2 Design Example: Countdown Timer

Menu. EEL3701 Classical Design

Lecture 17: Designing Sequential Systems Using Flip Flops

EE 209 Logic Cumulative Exam Name:

or 0101 Machine

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

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

Integrated Circuits & Systems

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

MA 3260 Lecture 10 - Boolean Algebras (cont.) Friday, October 19, 2018.

ENGG 1203 Tutorial. Solution (b) Solution (a) Simplification using K-map. Combinational Logic (II) and Sequential Logic (I) 8 Feb Learning Objectives

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

CSE370 HW3 Solutions (Winter 2010)

Descriptive Statistics (And a little bit on rounding and significant digits)

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13

ALU A functional unit

Synchronous Sequential Circuit

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1

CS173 Lecture B, November 3, 2015

Sequential Circuit Analysis

State & Finite State Machines

Big Bang, Black Holes, No Math

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

Combinational Logic Trainer Lab Manual

Memory, Latches, & Registers

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction: Op-amps in Negative Feedback

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

Lecture 3: Special Matrices

Read this before starting!

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

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

Introduction to Karnaugh Maps

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

State & Finite State Machines

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

Boolean Logic Continued Prof. James L. Frankel Harvard University

CPE100: Digital Logic Design I

Lecture 8: Sequential Networks and Finite State Machines

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Name: Answers. Mean: 83, Standard Deviation: 12 Q1 Q2 Q3 Q4 Q5 Q6 Total. ESE370 Fall 2015

UNIVERSITY OF CALIFORNIA, BERKELEY College of Engineering Department of Electrical Engineering and Computer Sciences

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Correlation. We don't consider one variable independent and the other dependent. Does x go up as y goes up? Does x go down as y goes up?

Part I Electrostatics. 1: Charge and Coulomb s Law July 6, 2008

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

Unit 8: Sequ. ential Circuits

Topic 8: Sequential Circuits

Lecture 5. 1 Review (Pairwise Independence and Derandomization)

2DI90 Probability & Statistics. 2DI90 Chapter 4 of MR

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

CS/COE0447: Computer Organization

17 Neural Networks NEURAL NETWORKS. x XOR 1. x Jonathan Richard Shewchuk

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

Overview. Design Example: Automobile Lock

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Review Problem 1. should be on. door state, false if light should be on when a door is open. v Describe when the dome/interior light of the car

Digital Circuit Engineering

Replay argument. Abstract. Tanasije Gjorgoski Posted on on 03 April 2006

Transcription:

EECS 270, Fall 2014, Lecture 6 Page 1 of 8 Sequential Logic (3.1 and 3.2. 3.2 is a long difficult section you really should read!) One thing we have carefully avoided so far is feedback all of our signals have gone from left-to-right. What if we don t do that? Consider the figure on the left. It is a bi-stable device. That means there are two ways it could be stable. If A=0 then =1 and you d expect that to hold its value (because A is then driven to 0 by. In the same way A=1, =0 is stable. So we ve got two different sets of values for which this could be stable. So is such a device useful? It would then seem like a good candidate for a memory device after all it can keep one of two values. The problem is that we can t write to that device as both A and are already being driven by something else. So let s consider the following device instead X A Y A Now consider the above diagram. Recall that 0+X=X. So if X = Y = 0, those OR gates act like wires. So in that case the device functions exactly the same as the pair of inverters. uestions: 1. What is if X=0 and Y=1? 2. What is if X=1 and Y=0? Definition From our text: 3. What is if X=0 and Y=1 and then X changes to a 0? A sequential circuit is a circuit whose output depends not only on the circuit s present inputs, but also on the circuit s present state, which is all the bits stored in the circuit. The circuit s state in turn depends on the past sequence of the circuit s input values. The net effect is that we are using feedback (as shown above) to create memory. That memory allows us to have state (the information stored in the circuit).

EECS 270, Fall 2014, Lecture 6 Page 2 of 8 S-R latch The above figure is redrawn on the right (figure from text), replacing the OR and NOT gates with NOR gates. And some wires moved around. This is the most common way to draw this device. It is called an SR latch. uestions: 1. Fill in the truth table below 2. Complete the timing diagram. S R 0 0 0 1 1 0 1 1 S R 3. The big problem with an SR latch is what happens when the inputs go from S=R=1 to S=R=0. What happens in that case?

EECS 270, Fall 2014, Lecture 6 Page 3 of 8 SR-latch with enable (which our text calls a level-sensitive SR latch) One improvement: Add an enable or clock. Only allow S and R to change when C=1. Fill in the timing diagram below. S C R S1 R1

EECS 270, Fall 2014, Lecture 6 Page 4 of 8 D latch The D latch, shown below, is a very common type of latch. It has the property that S and R can t both be high at the same time. Fill in the timing diagram below. D C S R

EECS 270, Fall 2014, Lecture 6 Page 5 of 8 State machines (3.3) Say I wish to have something occur over a time period. Maybe I want to send a message over a wire one bit at a time. Maybe I want to read a message coming over a wire (again one bit at a time) and do something based on that message. How do I do that? Well, with combinational logic, I can t. There is no sense of time or history: inputs purely determine the outputs. So we need sequential logic a device that can keep track of history and has a sense of timing. Consider the following diagram from our text: (The term clk^ represents the rising edge of a clock) This State Transition Diagram describes a Finite State Machine All that it s saying is that on every rising edge of some signal (clk) an output x will be changing from 1 to 0 or 0 to 1. The little arrow that s hanging out by itself indicates the start state. Our State Transition Diagram is a way to describe the desired behavior of a sequential circuit. Let s steal another example from the book. Say we have a smart key for our car. When the key is put in the lock, the lock asks the key for its code. When asked for the code, the key provides the code 1101 one bit at a time. This state transition diagram will generate the code 1101 one bit at a time when the signal a is set to 1. Notice that the clk^ is missing. It is always the case that a transition from one state to another will only occur on the rising edge of the clock. Your state transition diagrams should never include the clock. NEVER. A comment on the text. Our author uses the term state diagram to describe what I m calling a state transition diagram. Feel free to use either term, I will. However, he also sometimes doesn t distinguish between the diagram and the underlying machine. That s an important distinction.

EECS 270, Fall 2014, Lecture 6 Page 6 of 8 Let s do some design. Design a state diagram which has one input x and generates a z if (and only if) the last four values of x were 1100. Now do the same but for 1010. (It turns out this one is a bit more tricky, why?)

EECS 270, Fall 2014, Lecture 6 Page 7 of 8 Let s consider another problem from the book. Say we have a door with color-coded locks. Unlock door (u=1) only when buttons pressed in sequence: start, then red, blue, green, red Input from each button: s, r, g, b Also, output a indicates that some colored Before we pick apart issues with this design, let s notice some stuff. 1. From every state we always know exactly where to go. a. Put differently, for every input in every state we have exactly one state to go to. b. Notice that not all inputs need be used in each state 2. We ve made the initial state clear (how?) 3. Each state has all of the outputs defined (okay, only one in this case). The above three things are all important properties of a state diagram! uestion Why would this diagram not actually work in the real world? (Think about what would happen if you held the button for more than one clock tick (which you would)). How would you fix that? The moral of the story here is that for embedded systems (things used by people) you need to keep in mind that we do have a clock even though it doesn t show up in our state transition diagrams!

EECS 270, Fall 2014, Lecture 6 Page 8 of 8 Back to gates for a bit (3.2) It s pretty clear we d like to do things on the rising edge of the clock. How do we manage that? Answer: two back-to-back latches and an inverter. Clk D/Dm Cm m/ds Cs s