L7 – Derivation of State Graphs and Tables – Moore Machines.

Slides:



Advertisements
Similar presentations
L15 – Specification of State Machines
Advertisements

L8 – Reduction of State Tables. Reduction of states  Given a state table reduce the number of states.  Eliminate redundant states  Ref: text Unit 15.
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
L9 – State Assignment and gate implementation. States Assignment  Rules for State Assignment  Application of rule  Gate Implementation  Ref: text.
STATE DIAGRAM AND STATE TABLES
Sequential Circuits Storage elements
State-machine structure (Mealy)
Analysis of Clocked Sequential Circuits
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
L18 – VHDL for other counters and controllers. Other counters  More examples Gray Code counter Controlled counters  Up down counter  Ref: text Unit.
Combinational Logic Design
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
ECE 331 – Digital System Design
Give qualifications of instructors: DAP
ECE 331 – Digital System Design Sequential Circuit Design (Lecture #23) The slides included herein were taken from the materials accompanying Fundamentals.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Binary additon & subtraction.
9/15/09 - L22 Sequential Circuit Design Copyright Joanne DeGroat, ECE, OSU1 Sequential Circuit Design Creating a sequential circuit to address a.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
9/15/09 - L3 CodesCopyright Joanne DeGroat, ECE, OSU1 Codes.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
L5 – Sequential Circuit Design
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
State Machines.
Unit 14 Derivation of State Graphs
9/15/09 - L7 Two Level Circuit Optimization Copyright Joanne DeGroat, ECE, OSU1 Two Level Circuit Optimiztion An easier way to generate a minimal.
L16 – Testbenches for state machines. VHDL Language Elements  More examples HDL coding of class examples Testbench for example  Testing of examples.
Lecture 4 – State Machine Design 9/26/20081ECE Lecture 4.
L10 – State Machine Design Topics. States Machine Design  Other topics on state machine design Equivalent sequential machines Incompletely specified.
1/8/ L20 Project Step 8 - Data Path Copyright Joanne DeGroat, ECE, OSU1 State Machine Design with an HDL A methodology that works for documenting.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
L6 – Derivation of State Graphs and Tables. State Graphs and Tables  Problem Statement translation To State Graphs To State Tables  Ref: text : Unit.
1/8/ L23 Project Step 9 - Sequential Machine Copyright Joanne DeGroat, ECE, OSU1 Project Step 9 Beyond the ALU and Datapath. Sequential Machine.
L16 – VHDL for State Machines with binary encoding.
Sequential Design Basics. Lecture 2 topics  A review of devices that hold state A review of Latches A review of Flip-Flops 8/22/2012 – ECE 3561 Lect.
9/15/09 - L4 Combinational Logic - Gates Copyright Joanne DeGroat, ECE, OSU1 Combinational Logic Circuits – Gates.
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
9/15/09 - L21 Sequential Circuit Analaysis Copyright Joanne DeGroat, ECE, OSU1 Sequential Circuit Analysis.
9/15/09 - L24 Other FF TypesCopyright Joanne DeGroat, ECE, OSU1 Other FF Types.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
DLD Lecture 26 Finite State Machine Design Procedure.
9/15/09 - L26 Shift RegistersCopyright Joanne DeGroat, ECE, OSU1 Shift Registers.
9/15/09 - L13 Technology Mapping & Verificaiton Copyright Joanne DeGroat, ECE, OSU1 Technology Mapping and Verification.
L19 – Resolved Signals. Resolved Signals  What are resolved signals In systems In VHDL Resolution – Isn’t that for resolving conflicts?  Ref: text Unit.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
9/15/09 - L19 Sequential CircuitsCopyright Joanne DeGroat, ECE, OSU1 Sequential Cirucits.
Midterm Exam ReviewCopyright Joanne DeGroat, ECE, OSU1 Midterm Exam Notes.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Project 1.  Two parts Implement a 3 bit Gray Code Counter Implement a 4-to-1 muxtiplexer  Can be done on Altera (Quartis) or Xilinx 8/22/2012 – ECE.
Common Elements in Sequential Design. Lecture 3 topics  Registers and Register Transfer  Shift Registers  Counters Basic Counter Partial sequence counters.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
State Machine Design with an HDL
L5 – Sequential Circuit Design
Lecture 13 Derivation of State Graphs and Tables
Lecture 12 Analysis of Clocked Sequential Network
Copyright Joanne DeGroat, ECE, OSU
CENG 241 Digital Design 1 Lecture 11
L10 – additional State Machine examples
L25 – Datapath ALU.
State Machine Design with an HDL
L11 – Midterm Review.
Beyond the ALU and Datapath. Sequential Machine Modeling exercise.
L7s Multiple Output example
L11 – State Machine Analysis
Instructor: Alexander Stoytchev
EGR 2131 Unit 12 Synchronous Sequential Circuits
L25 – Final Review AU 15 Final Exam – Classroom – Journalism 300
Beyond the ALU and Datapath. Sequential Machine Modeling exercise.
Presentation transcript:

L7 – Derivation of State Graphs and Tables – Moore Machines

State Graphs and Tables  Problem Statement translation for Moore Machines To State Graphs To State Tables  Ref: text Unit 14 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU2

Derivation of State Graphs  Problem Statement specifies the desired relationship between the input and output sequences. Sometimes called the specification.  First step is to translate this specification into a state table or state graph.  In the HDL world, there is a style that allows creation of the next state specification that does not require either a state graph or state table. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU3

Consider the sequence detector  The same sequence detector to detect a sequence ending in 101 but this time a Moore machine implementation.  Moore machine implementation is much the same except that the output designation is now indicated within the state. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU4

Start in S0  S0 –a state where you have received a non middle 0 or a long string of 0s. Output is 0.  Output is indicated within the state not on the transition. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU5

Transitions form state 1  On a 0 you stay in state 1  On a 1 you transition to state S1.  Meaning of S1 – have the 1 st 1 of a sequence 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU6

Transition from S1  On a 1 input, have the first 1 of a sequence – stay in S1.  On a 0 now have a sequence that ends in 10 so define a new state S2 and transition to it. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU7

State S2  S2 has meaning that you have an input sequence that ends in 10 so far.  Transitions from S2 0 input – Back to S0 1 input – Valid sequence go to new state S3 which outputs a 1 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU8

State S3  S3 – have received input sequence that ends in 101.  Next input 0 – end of seq (10 so back to S2) 1 – back to S1 (11 so 1 st 1) 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU9

State Table from State Graph  Easy to convert state graph to state table Moore machine note output is function of the state 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU10

Contrast this to Mealy Machine  Mealy machine state graph and state table In Mealy machine the output is a function of the state and the current input 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU11

Now, on to the other example  Detect the sequences 010 and 1001 and on those output a 1.  Starting state on reset is S0 On a 0 transition to S1 - output 0  Have a first 0 On a 1 transition to S3 - output 0  Have a first 1 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU12

In S1/0  State S1 have the first 0 of a possible 010 On a 1 now have 01 Transition to a new state S2/0 with meaning that you have 01 On a 0 stay in S1/0 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU13

From S2/0  S2/0 has meaning that you have 01 so far Input is a 0 – Need a new state S4 with meaning that you have received 010 (so output is a 1) and have a 10 for a start of that string. Input is a 1 so the input is 011 – Go to S3 where as this is the first 1. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU14

From S3/0  S3/0 has meaning that you have the first 1 of the 1001 sequence. Input is a 0 – Go to S5 – meaning have 10 Input is a 1 – stay in S3 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU15

Add transitions from S4/1  S4/1 had meaning that the sequence has been 010 so far. Input is a 0 – Now have 100 – Need a new state with this meaning – S6/0 Input is a 1 – Now have 101 so go back to S2/0 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU16

Transitions from S5/0  S5/0 means you have 10 so far Input is a 0 – transition to S6/0 – have 100 so far Input is a 1 – now have 101 or the 01 which is the meaning of S2/0 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU17

State S6/0  S6/0 has meaning that you have a sequence of 100 so far Input is a 1 so have 1001 – a new state S7/1 to signal the sequence Input is a 0 so have 1000 and back to S1 as you have a first 0. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU18

From S7/1  S7 has meaning of 1001 so you also have the 01 for the start of that sequence Input is a 0 so have 010 – go to S4/1 Input is a 1 so have 011 – go to S3 as you have a first 1. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU19

The state table for each  For the Mealy Machine 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU20

For the Moore machine  The state table for the Moore machine – output is associated with the state. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU21 Present StateNext State X=0Next State X=1Output Z S0S1S30 S1 S20 S4S30 S5S30 S4S6S21 S5S6S20 S6S1S70 S4S31

The next step  The next step to implementation is state assignment  In state assignment the binary code for each state is chosen. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU22

Effect of choosing state assignment  Choosing one state assignment versus another can have significant implications for circuit implementation.  But first – how do you reduce the number of states in the state table? (Coming to a future class near you.) 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU23

Example that has sink state  Programmed Example /2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU24

Initial states  The start of the state graph 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU25

Step 2  More states 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU26

Complete state graph 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU27

Corresponding State Table  From the state graph the state table can be generated 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU28

Lecture summary  Have covered state graphs for Mealy and Moore machines  Have covered how to transition from state graphs to state tables.  HOMEWORK (not for turn in)  Problem where you do both a Mealy and a Moore state graph and state table. Work this and it will be gone over next week.  Problem 14.4 – Answer for a Moore implementation is in book. What is the meaning of each state? Can this be implemented as a Mealy machine? 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU29

Problem 14.5  Answer in text  But answer in text has an error in it. (at least in my version). 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU30

Knowledge base and test prep  Work several of the end of chapter problems until you are comfortable doing this process. 9/2/2012 – ECE 3561 Lect 7 Copyright Joanne DeGroat, ECE, OSU31