CS 61C L14 State (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #14: State and FSMs 2005-07-13 Andy.

Slides:



Advertisements
Similar presentations
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Advertisements

CS61C L16 Representations of Combinatorial Logic Circuits (1) Beamer, Summer 2007 © UCB Scott Beamer Instructor inst.eecs.berkeley.edu/~cs61c CS61C :
CS 61C L13 Combinational Logic (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #13: Combinational.
CS61C L21 State Elements: CircuitsThat Remember (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L14 Combinational Logic (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #14: Combinational.
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
CS61C L21 State Elements : Circuits that Remember (1) Spring 2007 © UCB 161 Exabytes In 2006  In 2006 we created, captured, and replicated 161 exabytes.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2008 © UCB 100 MPG Car contest!  The X Prize Foundation has put up two prizes;
CS61C L21 State Elements : Circuits that Remember (1) Garcia, Fall 2006 © UCB One Laptop per Child  The OLPC project has been making news recently with.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
1 Digital Logic
CS61C L14 Introduction to Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Eric, Spring 2010 © UCB Cal Alumni Wins 2009 Turing Award! Charles P. Thacker was named.
Give qualifications of instructors: DAP
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L14 Synchronous Digital Systems & State Elements I (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks.
CS 61C L21 State Elements: CircuitsThat Remember (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L28 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L17 Combinational Logic (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17.
CS 61C: Great Ideas in Computer Architecture Finite State Machines
CS61C L14 Introduction to Synchronous Digital Systems (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L15 Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 61C L15 State & Blocks (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #15: State 2 and Blocks.
CS61C L25 Representations of Combinational Logic Circuits (1) Garcia, Spring 2013 © UCB Android Brain on Robots!  “Half the weight of some robots is.
1 Lecture 15 Registers Counters Finite State Machine (FSM) design.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Sequential Networks Two major classes of Sequential Circuits 1.Fundamental Mode – A sequential circuit where: Only one input is allowed to change at any.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Functional Units Instructor: Sagar Karandikar
COE 202: Digital Logic Design Sequential Circuits Part 1
Chap 4. Sequential Circuits
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
1 CSE370, Lecture 15 Lecture 15 u Logistics n HW5 due this Friday n HW6 out today, due Friday Feb 20 n I will be away Friday, so no office hour n Bruce.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Latches & Flip-Flops.
Introduction to Sequential Logic Design Bistable elements.
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: John Wawrzynek & Vladimir Stojanovic
CS 61C L4.1.2 State (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture State and FSMs Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
CS 61C L4.1.1 Combinational Logic (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Logic Gates and Combinational Logic
Logic Gates M. AL-Towaileb1. Introduction Boolean algebra is used to model the circuitry of electronic devices. Each input and each output of such a device.
Instructor: Justin Hsia 7/24/2013Summer Lecture #181 CS 61C: Great Ideas in Computer Architecture Combinational and Sequential Logic, Boolean Algebra.
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C: Great Ideas in Computer Architecture Sequential Elements, Synchronous Digital Systems 1 Instructors: Vladimir Stojanovic & Nicholas Weaver
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
5.3 Sequential Circuits - An Introduction to Informatics WMN Lab. Hey-Jin Lee.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
1 CHAPTER 12 REGISTERS AND COUNTERS This chapter in the book includes: Objectives Study Guide 12.1Registers and Register Transfers 12.2Shift Registers.
Revisão de Circuitos Lógicos PARTE I. What are “Machine Structures”? Coordination of many levels of abstraction I/O systemProcesso r Compiler Operating.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Flip Flops Lecture 10 CAP
Computer Architecture & Operations I
State Circuits : Circuits that Remember
ECE Digital logic Lecture 16: Synchronous Sequential Logic
There is one handout today at the front and back of the room!
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #21 State Elements: Circuits that Remember Hello to James Muerle in the.
Instructor Paul Pearce
Inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 23 – Representations of Combinatorial Logic Circuits TA/Punner.
en.wikipedia.org/wiki/Conway%27s_Game_of_Life
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture #8 – State Elements, Combinational Logic Greet class James Tu, TA.
Lecturer PSOE Dan Garcia
Guest Lecture by David Johnston
TA David “The Punner” Eitan Poll
Sequential Logic.
Lecturer SOE Dan Garcia
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Michael Greenbaum
Presentation transcript:

CS 61C L14 State (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #14: State and FSMs Andy Carle

CS 61C L14 State (2) A Carle, Summer 2005 © UCB Outline Waveforms State Clocks FSMs

CS 61C L14 State (3) A Carle, Summer 2005 © UCB Review (1/3) Use this table and techniques we learned to transform from 1 to another

CS 61C L14 State (4) A Carle, Summer 2005 © UCB (2/3): Circuit & Algebraic Simplification

CS 61C L14 State (5) A Carle, Summer 2005 © UCB (3/3):Laws of Boolean Algebra

CS 61C L14 State (6) A Carle, Summer 2005 © UCB Signals and Waveforms Outputs of CL change over time With what?  Change in inputs Can graph changes with waveforms …

CS 61C L14 State (7) A Carle, Summer 2005 © UCB Signals and Waveforms: Adders

CS 61C L14 State (8) A Carle, Summer 2005 © UCB Signals and Waveforms: Grouping

CS 61C L14 State (9) A Carle, Summer 2005 © UCB Signals and Waveforms: Circuit Delay

CS 61C L14 State (10) A Carle, Summer 2005 © UCB State With CL, output is always a function of CURRENT input With some (variable) propagation delay Clearly, we need a way to introduce state into computation

CS 61C L14 State (11) A Carle, Summer 2005 © UCB Accumulator Example Want: S=0; for i from 0 to n-1 S = S + X i

CS 61C L14 State (12) A Carle, Summer 2005 © UCB First try…Does this work? Nope! Reason #1… What is there to control the next iteration of the ‘ for ’ loop? Reason #2… How do we say: ‘ S=0 ’? Need a way to store partial sums! … Feedback!

CS 61C L14 State (13) A Carle, Summer 2005 © UCB Circuits with STATE (e.g., register) Need a Logic Block that will: 1. store output (partial sum) for a while, 2. until we tell it to update with a new value.

CS 61C L14 State (14) A Carle, Summer 2005 © UCB Register Details…What’s in it anyway? n instances of a “Flip-Flop”, called that because the output flips and flops betw. 0,1 D is “data” Q is “output” Also called “d-q Flip-Flop”,“d-type Flip-Flop”

CS 61C L14 State (15) A Carle, Summer 2005 © UCB What’s the timing of a Flip-flop? (1/2) Edge-triggered D-type flip-flop This one is “positive edge-triggered” “On the rising edge of the clock, the input d is sampled and transferred to the output. At all other times, the input d is ignored.”

CS 61C L14 State (16) A Carle, Summer 2005 © UCB What’s the timing of a Flip-flop? (2/2) Edge-triggered D-type flip-flop This one is “positive edge-triggered” “On the rising edge of the clock, the input d is sampled and transferred to the output. At all other times, the input d is ignored.”

CS 61C L14 State (17) A Carle, Summer 2005 © UCB Bus a bunch of D FFs together … Register of size N: n instances of D Flip-Flop

CS 61C L14 State (18) A Carle, Summer 2005 © UCB Second try…How about this? Rough timing… Yep!

CS 61C L14 State (19) A Carle, Summer 2005 © UCB Accumulator Revisited (proper timing 1/2)

CS 61C L14 State (20) A Carle, Summer 2005 © UCB Accumulator Revisited (proper timing 2/2)

CS 61C L14 State (21) A Carle, Summer 2005 © UCB Pipelining to improve performance (1/2) Timing…

CS 61C L14 State (22) A Carle, Summer 2005 © UCB Pipelining to improve performance (2/2) Timing…

CS 61C L14 State (23) A Carle, Summer 2005 © UCB Peer Instruction 1 Simplify the following Boolean algebra equation: Q = !(A*B) + !(!A * C) Use algebra, individual steps, etc. Don’t just look at it and figure it out, or I’ll have to start using harder examples.

CS 61C L14 State (24) A Carle, Summer 2005 © UCB Administrivia HW 45 due Monday Project 2 will be released soon If you want to get a little bit ahead (in a moderately fun sort of way), start playing with Logisim:

CS 61C L14 State (25) A Carle, Summer 2005 © UCB Clocks Need a regular oscillator: Wire up three inverters in feedback?… Not stable enough 1->0 and 0->1 transitions not symmetric. Solution: Base oscillation on a natural resonance. But of what?

CS 61C L14 State (26) A Carle, Summer 2005 © UCB Clocks Crystals and the Piezoelectric effect: Voltage  deformation  voltage  … Deformations have a resonant freq. -Function of crystal cut

CS 61C L14 State (27) A Carle, Summer 2005 © UCB Clocks Controller puts AC across crystal: At anything but resonant freqs  destructive interference Resonant freq  CONSTRUCTIVE!

CS 61C L14 State (28) A Carle, Summer 2005 © UCB Signals and Waveforms: Clocks

CS 61C L14 State (29) A Carle, Summer 2005 © UCB FSMs With state elements, we can build circuits whose output is a function of inputs and current state. State transitions will occur on clock edges. present state FlipFlop Combinational Logic input output next state

CS 61C L14 State (30) A Carle, Summer 2005 © UCB Finite State Machines Introduction

CS 61C L14 State (31) A Carle, Summer 2005 © UCB Finite State Machine Example: 3 ones… Draw the FSM… PSInputNSOutput

CS 61C L14 State (32) A Carle, Summer 2005 © UCB Hardware Implementation of FSM + =?

CS 61C L14 State (33) A Carle, Summer 2005 © UCB General Model for Synchronous Systems

CS 61C L14 State (34) A Carle, Summer 2005 © UCB Peer Instruction 2 Two bit counter: 4 States: 0, 1, 2, 3 When input c is high, go to next state -(3->0) When input is low, don’t change state On the transition from state 3 to state 0, output a 1. At all other times, output 0.