L9 – State Assignment and gate implementation. States Assignment  Rules for State Assignment  Application of rule  Gate Implementation  Ref: text.

Slides:



Advertisements
Similar presentations
L15 – Specification of State Machines
Advertisements

ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
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.
STATE DIAGRAM AND STATE TABLES
10/2/0810/2/2008ECE 561 -ECE Lecture 51 State Machine Implementation 10/2/20081ECE Lecture 5.
L7 – Derivation of State Graphs and Tables – Moore Machines.
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
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying.
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Give qualifications of instructors: DAP
Synchronous circuit design and analysis. Synchronous circuit design To implement a synchronous circuit corresponding to a given specification Revision.
Digital Logic Design Lecture 28. Announcements Homework 9 due on Thursday 12/11 Please fill out Course Evaluations online. Final exam will be on Thursday,
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)
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for.
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.
Computer Organization and Assembly Language: Chapter 7 The Karnaugh Maps September 30, 2013 By Engineer. Bilal Ahmad.
9/15/09 - L5 Boolean AlgebraCopyright Joanne DeGroat, ECE, OSU1 Boolean Algebra.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
Clocked Synchronous State Machine Design
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Design a clock synchronous sequential circuit with two inputs A, B and a single.
L5 – Sequential Circuit Design
9/15/09 - L6 Standard FormsCopyright Joanne DeGroat, ECE, OSU1 Standard Forms.
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.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 5 Step 2 in behavioral modeling. Use of procedures.
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 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
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.
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 3 Structural Modeling and the Generate Statement.
9/15/09 - L4 Combinational Logic - Gates Copyright Joanne DeGroat, ECE, OSU1 Combinational Logic Circuits – Gates.
Chapter 5 Boolean Algebra and Reduction Techniques 1.
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.
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.
Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the.
L20 – Register Set. The 430 Register Set  Not exactly a dual ported register set, but a dual drive register set.  Ref: text Unit 10, 17, 20 9/2/2012.
THE K-MAP.
9/15/09 - L19 Sequential CircuitsCopyright Joanne DeGroat, ECE, OSU1 Sequential Cirucits.
Common Elements in Sequential Design. Lecture 3 topics  Registers and Register Transfer  Shift Registers  Counters Basic Counter Partial sequence counters.
Finite state machine optimization
Finite state machine optimization
L5 – Sequential Circuit Design
Sequential logic design principles
Copyright Joanne DeGroat, ECE, OSU
State Reduction and State Assignment
Lecture 14 Reduction of State Tables
Instructor: Alexander Stoytchev
L10 – additional State Machine examples
State Machine Design with an HDL
Lecture No. 32 Sequential Logic.
DESIGN OF SEQUENTIAL CIRCUITS
L11 – Midterm Review.
L7s Multiple Output example
L11 – State Machine Analysis
L4 – An overview of Quartis
Copyright Joanne DeGroat, ECE, OSU
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

L9 – State Assignment and gate implementation

States Assignment  Rules for State Assignment  Application of rule  Gate Implementation  Ref: text Unit /2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU2

Rules for State Assignment  Situation: You have arrived at the reduced state table and no further state reduction can be made.  Does it matter how you assign the binary encoding to the states – YES!!!  But how to do it!!! 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU3

Guidelines for State Assignment  To try all equivalent state assignments, i.e., and exhaustive exploration of all possible state assignments is a n-p complete problem.  Do not panic!!! (where does this come from?)  There are guidelines that help  1. States which have the same next state for a given input should be given adjacent assignments.  2. States which are the next states of the same state should be given adjacent assignments.  And third  3. States which have the same output for a given input should be given adjacent assignments. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU4

The starting state  Assign the starting state to the “0” square on an assignment map. (An assignment map looks much like a K-map for logic minimization.) 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU5

Reason for assign “0”  Reasons for assigning “0” as the starting state: The clear input on Flip Flops can be used for initialization. The clear input can also be used on a reset. The alternative is error prone – using a combination of preset and clears to set a specific value can lead to implementation errors. A good practice even when using FPGAs. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU6

Guidlines  Adjacency conditions from Guideline 1 and those from Guideline 2 that are required 2 or more times should be satisfied first.  Example – Guideline 1 for the table S0, S2, S4, and S6 should be made adjacent as they all have S1 as the next state on a 0 input.  S3 and S5 should have adjacent assignment.  S4 and S6 should have adjacent assignment. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU7

Using guidelines  From the state table find the following groupings: 1. (S0,S1,S3,S5) (S3,S5) (S4,S6) (S0,S2,S4,S6) 2. (S1,S2) (S2,S3) (S1,S4) (S2,S5)2x (S1,S6)2x 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU8

Two possible ways  Two possible ways of satisfying the guidelines are: 1. (S0,S1,S3,S5) (S3,S5) (S4,S6) (S0,S2,S4,S6) 2. (S1,S2) (S2,S3) (S1,S4) (S2,S5)2x (S1,S6)2x 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU9

Next state maps  Next state maps may help choose the better assignment.  Look at the next state given current state and input and how this will simplify K-maps for logic. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU10

Choose an assignment  Choose an assignment and implement in gates. Using the left assignment map get the next state map below with encoding.  Map the encoding to K-maps 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU11

Implement in gates  Notes on implementation All F/F outputs are used 6 gates are needed for next state generation only 1 of which is 3 inputs. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU12

Another example  Example in text Use guidelines Next states (b,d) (c,f) (b,e) (a,c) Next state of a state (a,c)2x (d,f) (d,b) (b,f) (c,e) But is state table minimum? 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU13

Assignment map  State table is not minimum but will continue  The two assignment maps are 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU14

Transition table  Resulting in a transition table of and equations of 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU15

Next state generation K-maps  The K-maps for next state generation are 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU16

Another example  From our previous work. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU17

Use guidlines  Same next state (S0,S1,S5) (S2,S4) (S0,S2,S4) (S1,S3,S5)  Next state pairs (S1,S4) (S1,S2)2x (S3,S4)2x (S2,S5) 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU18

The assignment map  Choose S0 as the “0” state and then use guidelines  A possible solution 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU19

Next State Table  Enter the state assignment onto the table  Then generate K-maps and generate logic 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU20

The K maps  Generate the K maps Next State logic A (2 gates) B (1 gate) C (2 gates) 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU21

K map for the output Z  3 gates for the output (2-3 input AND)  (1 OR)  Total logic count 3 D F/Fs 2 – 3 input AND gates 3 – 2 input AND gates 2 – 2 input OR gates 1 – 3 input OR gate 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU22

Lecture summary  Have seen several examples of implementation from the statement of the problem (specification) to implementation. 9/2/2012 – ECE 3561 Lect 9 Copyright Joanne DeGroat, ECE, OSU23