Lecture 4 – State Machine Design 9/26/20081ECE 561 - Lecture 4.

Slides:



Advertisements
Similar presentations
10/2/0810/2/2008ECE 561 -ECE Lecture 51 State Machine Implementation 10/2/20081ECE Lecture 5.
Advertisements

Sequential Circuits Storage elements
State-machine structure (Mealy)
State Machine Design Procedure
CS 140 Lecture 10 Sequential Networks: Implementation Professor CK Cheng CSE Dept. UC San Diego 1.
State Machine Design.
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 6 – Part 1.
Circuits require memory to store intermediate data
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
1 EE365 Sequential-circuit analysis. 2 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered.
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
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
Sequential Circuit Design. 2 State Optimization Equivalent States:  Two states are equivalent if, for each member of the set of inputs,  they give exactly.
EECC341 - Shaaban #1 Lec # 14 Winter Clocked Synchronous State-Machines Such machines have the characteristics: –Sequential circuits designed.
5. Choose a flip-flop type for the state memory. ReturnNext 7.4 Clocked Synchronous State-Machine Design 1. Construct a state/output table corresponding.
1 COMP541 State Machines Montek Singh Feb 6, 2007.
Overview Sequential Circuit Design Specification Formulation
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
A clocked synchronous state-machine changes state only when a triggering edge or “tick” occurs on the clock signal. ReturnNext  “State-machine”: is a.
ECE 301 – Digital Electronics
Digital Logic Design Lecture 26. Announcements Exams will be returned on Thursday Final small quiz on Monday, 12/8. Final homework will be assigned 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)
1 Synchronous Sequential Circuit Analysis. 2 Synchronous Sequential Circuit State Memory – A set of n edge-triggered flip-flops that store the current.
9/15/09 - L22 Sequential Circuit Design Copyright Joanne DeGroat, ECE, OSU1 Sequential Circuit Design Creating a sequential circuit to address a.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 4 – Part 3 Tom Kaminski & Charles.
IKI c-Synthesis of Sequential Logic Bobby Nazief Semester-I The materials on these slides are adopted from: Prof. Daniel Gajski’s transparency.
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.
Digital Computer Design Fundamental
ECE 331 – Digital Systems Design Sequential Logic Circuits: FSM Design (Lecture #20)
L5 – Sequential Circuit Design
T Flip-Flop A T (toggle) flip-flop is a complementing flip-flop and can be obtained from a JK flip-flop when the two inputs are tied together. When T =
Unit 14 Derivation of State Graphs
Chap 4. Sequential Circuits
Introduction to Sequential Circuit By : Pn Siti Nor Diana Ismail CHAPTER 5.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Introduction to Sequential Logic Design Finite State-Machine Design.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
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.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
Fall 2004EE 3563 Digital Systems Design EE3563 Chapter 7, 8, 10 Reading Assignments  7.1, 7.2, 7.3  8.1, ,   8.5.1, 8.5.2,
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
Registers; State Machines Analysis Section 7-1 Section 5-4.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
Sequential Design Motivation Sequential processing often more tractable than parallel Example Sequential processing sometimes only method that works Example.

Latches and Flip-Flops
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Synthesis Synchronous Sequential Circuits synthesis procedure –Word description of problem /hardest; art, not science/ –Derive state diagram & state table.
Introduction to Sequential Logic Design Finite State-Machine Analysis.
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #3 Flip-Flops, Registers, Shift registers, Counters, Memory 3/3/2005.
Common Elements in Sequential Design. Lecture 3 topics  Registers and Register Transfer  Shift Registers  Counters Basic Counter Partial sequence counters.
State Machine Design Shiva choudhary En No.: Electronics and comm. Dept K.I.T.,Jamnagar 1.
1 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered from the same master clock signal,
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
Week #7 Sequential Circuits (Part B)
L5 – Sequential Circuit Design
Introduction to Sequential Logic Design
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
ECE 301 – Digital Electronics
Princess Sumaya University
L11 – Midterm Review.
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
Presentation transcript:

Lecture 4 – State Machine Design 9/26/20081ECE Lecture 4

State Machine Design State Machine types and some basics State Machine Design Process State Machine Design Examples State Machine Design in the HDL world 9/26/20082ECE Lecture 4

Types of state machines Mealy Machine Characterized by – Outputs are a function of both inputs and current state 9/26/20083ECE Lecture 4

State Machine Types Moore machine Characterized by – Outputs are a function current state only 9/26/20084ECE Lecture 4

Mealy and Moore Implementaions Both Mealy and Moore machine implementation can be implemented with any sequential element. Why choose one elements over another? – Efficiency – The next state logic may differ significantly when using different F/F types. – Efficiency of implementation is also drastically affected by choice of state assignment 9/26/20085ECE Lecture 4

Characteristic Equations The Characteristic Equation formally specifies the flip-flop’s next state as a function of its current state and inputs Q* means the next state value for the Q output of the F/F 9/26/20086ECE Lecture 4

Characteristic Equations S-R Latch D Latch D F/F D F/F with Enable J-K F/F T F/F Q* = S + R’ Q Q* = D Q* = EN D + EN’ Q Q* = J Q’ + K’ Q Q* = Q’ 9/26/20087ECE Lecture 4

Designing a Synchronous System Steps for designing a clocked synchronous state machine starting from a word description or specification First understand the description or specification and resolve any questions Step 1: Construct a state/output table corresponding to the description/spec. (Or create a state diagram) 9/26/20088ECE Lecture 4

Example Description – Design a clocked synchronous state machine with two inputs A and B, and a single output Z that is 1 if: A had the same value at each of the two previous clocks Or B has been 1 since the last time that the first condition was true – Otherwise the output is 0 9/26/20089ECE Lecture 4

Evolution of a state table Figures 7-46 and 7-47 of text Set up table having columns for the relevant info. As we have 2 inputs need the 4 choices for inputs. 9/26/200810ECE Lecture 4

First input What happens when first input arrives A0 – have one 0 on A A1 – have one 1 on A 9/26/200811ECE Lecture 4

Second Input Now what happens when in state A0? May have a value of 0 or 1 on the next A input. New state OK OK says have 2 of the same on A 9/26/200812ECE Lecture 4

Second input (cont) Now if you are in state A1 what happens at next input? 9/26/200813ECE Lecture 4

The next input Now resolve state OK May have to split state OK 9/26/200814ECE Lecture 4

Next input (1) Refine state OK to indicate if A is 0s or 1s 9/26/200815ECE Lecture 4

Refined state OK Two 0s on the A input 9/26/200816ECE Lecture 4

Refined state OK (2) Fill in state OK1 9/26/200817ECE Lecture 4

Next step Step 2 - Minimize the number of states – called state minimization – This step was a major part of state machine design. – With current HDL synthesis tools no so much so today Step 3 – Choose a set of state variables and assign state-variable combinations to named states. 9/26/200818ECE Lecture 4

The final steps Step 5 – choose a F/F type – today almost always a D type F/F Step 6 – Construct an excitation table Step 7 – Derive excitation equations from the table. Step 8 – Derive output equations from the table Step 9 – Draw a logic diagram 9/26/200819ECE Lecture 4

Example of finishing design State and output table to be implemented 9/26/200820ECE Lecture 4

Implement with D F/F Assign coding to state Why are 3 F/F used? 9/26/200821ECE Lecture 4

Develop excitation equations 9/26/200822ECE Lecture 4

A note on maps These are 5 variable maps Each is a function of 5 variables – input A, input B, and the 3 F/F outputs Q1,Q2,Q3 End up with – D1 = Q1 + Q2’ Q3 – D2 = Q1 Q3’ A + Q1 Q3 A + Q1 Q2 B – D3 = Q1 A + Q2’ Q3’ A – Z = Q1 Q2 Q3’ + Q1 Q2 Q3 = Q1 Q2 9/26/200823ECE Lecture 4

Assignment Prob 7.46 from text – Due Wednesday Oct 8 9/26/200824ECE Lecture 4