Lecture 22 Logistics Last lecture Today

Slides:



Advertisements
Similar presentations
Lecture 21 State minimization via implication charts.
Advertisements

Some Slides from: U.C. Berkeley, U.C. Berkeley, Alan Mishchenko, Alan Mishchenko, Mike Miller, Mike Miller, Gaetano Borriello Gaetano Borriello Introduction.
CSE 311 Foundations of Computing I
VIII - Working with Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite state machine optimization State minimization  fewer.
Give qualifications of instructors: DAP
Nonlinear & Neural Networks LAB. CHAPTER 13 Analysis of Clocked Sequential Circuit 13.1 A Sequential Parity Checker 13.2 Analysis by Signal Tracing 13.3.
Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
ECE 331 – Digital System Design
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE C03 Lecture 131 Lecture 13 Finite State Machine Optimization Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Give qualifications of instructors: DAP
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
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.
CSCI 3301 Transparency No. 9-1 Chapter #9: Finite State Machine Optimization Contemporary Logic Design.
Lecture 17 General finite state machine (FSM) design
Lecture 18 More Moore/Mealy machines.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
1 CSE370, Lecture 18 Lecture 20 u Logistics n HW6 due Wednesday n Lab 7 this week (Tuesday exception) n Midterm 2 Friday (covers material up to simple.
DLD Lecture 26 Finite State Machine Design Procedure.
1 CSE370, Lecture 24 Lecture 26 u Logistics n HW8 due Friday n Ant extra credit due Friday n Final exam a week from today, 12/8 8:30am-10:20am here n Review.
Capabilities, Minimization, and Transformation of Sequential Machines
Finite state machine optimization
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Finite state machine optimization
1.3 Finite State Machines.
Lecture 13 Derivation of State Graphs and Tables
Lecture 12 Analysis of Clocked Sequential Network
Lecture 26 Logistics Last lecture Today HW8 due Friday
Analysis of Clocked Sequential Circuit
SLIDES FOR CHAPTER 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
CS 352 Introduction to Logic Design
EEL 3705 / 3705L Digital Logic Design
Lecture 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
CSE 140L Discussion Finite State Machines.
Synthesis of sequential circuits
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 25 Logistics Last lecture Today HW8 posted today, due 12/5
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
Implement FSM with fewest possible states • Least number of flip flops
Instructor: Alexander Stoytchev
Lecture 25 Logistics Last lecture Today HW8 posted today, due 12/5
Lecture 21 Logistics Last lecture Today HW7 due Wednesday
CSE 370 – Winter Sequential Logic-2 - 1
ECE 352 Digital System Fundamentals
Lecture 24 Logistics Last lecture Today HW7 back today
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 20 Logistics Last lecture Today Graded HW back today
Lecture 20 State minimization via row matching.
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 23 Logistics Last lecture Today HW8 due Wednesday, March 11
ECE 352 Digital System Fundamentals
Lecture 18 Logistics Last Lecture Today HW6 due today Midterm 2
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
ECE 352 Digital System Fundamentals
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 11 February 23 W’05 Yutao He 4532B Boelter Hall
EGR 2131 Unit 12 Synchronous Sequential Circuits
ECE 352 Digital System Fundamentals
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 19 A bigger FSM example: Hungry Robot Ant in Maze.
Chapter 9 -- Simplification of Sequential Circuits
Presentation transcript:

Lecture 22 Logistics Last lecture Today HW 8 posted later today, due 3/11 Will need material from Friday’s lecture Lab 9 this week Last lecture Robot ant in maze State matching for FSM simplification Today General FSM minimization

Two Methods for FSM Minimization Row matching Easier to do by hand Misses minimization opportunities Implication table Guaranteed to find the most reduced FSM More complicated algorithm (but still relatively easy to write a program to do it)

Simple row matching does not guarantee most reduced state machine Next State Present State X=0 X=1 Output S0 S1 S2 1

The Implication chart method Here’s a slightly funkier FSM as an example You can convince yourself that the row matching method doesn’t work

Implication Chart Method Basic Idea: assume that all states are grouped together and only split state pairs that must be split Algorithm Draw a table with a box for every pair of states Use output values to cross out boxes for pairs of states that cannot be combined Fill rest of table with transition pairs For each box and possible input, list pairs of destination states, one per source state Repeatedly do: If box (Si,Sj) contains some transition pair Sk-Sl corresponding to an already crossed-out box then cross out box (Si,Sj) Until no more boxes can be crossed out Combine all pairs of states that are not crossed out

Step 1: Draw the table of pairs of states

Step 2: Consider the outputs

Step 3: Add transition pairs C-R 1

Step 3: Add transition pairs Each pair listed first from Column state then from Row state (not important) C-R 1 01 01 01 Transitivity: if states are combined then successor states must be combined  if successor states cannot be combined then states cannot be combined

Step 4 (repeated): Consider transitions

Final reduced FSM

Odd parity checker revisited Next State Present State X=0 X=1 Output S0 S1 S2 1 S1 S2 S0 S0-S2 S1–S1

More complex state minimization Multiple input example inputs here 10 01 11 00 S0 [1] S2 [1] S4 [1] S1 [0] S3 S5 present next state output state 00 01 10 11 S0 S0 S1 S2 S3 1 S1 S0 S3 S1 S4 0 S2 S1 S3 S2 S4 1 S3 S1 S0 S4 S5 0 S4 S0 S1 S2 S5 1 S5 S1 S4 S0 S5 0 symbolic state transition table

Minimized FSM Implication chart method cross out incompatible states based on outputs then cross out more cells if indexed chart entries are already crossed out S1 S2 S3 S4 S5 S0 present next state output state 00 01 10 11 S0 S0 S1 S2 S3 1 S1 S0 S3 S1 S4 0 S2 S1 S3 S2 S4 1 S3 S1 S0 S4 S5 0 S4 S0 S1 S2 S5 1 S5 S1 S4 S0 S5 0 S0-S1 S1-S3 S2-S2 S3-S4 S0-S1 S3-S0 S1-S4 S4-S5 S0-S0 S1-S1 S2-S2 S3-S5 S1-S0 S3-S1 S2-S2 S4-S5 S0-S1 S3-S4 S1-S0 S4-S5 S4-S0 S5-S5 S1-S1 S0-S4

Minimized FSM present next state output state 00 01 10 11 S0 S0 S1 S2 S3 1 S1 S0 S3 S1 S4 0 S2 S1 S3 S2 S4 1 S3 S1 S0 S4 S5 0 S4 S0 S1 S2 S5 1 S5 S1 S4 S0 S5 0 S1 S2 S3 S4 S5 S0 S0-S1 S1-S3 S2-S2 S3-S4 S0-S1 S3-S0 S1-S4 S4-S5 minimized state table (S0==S4) (S3==S5) present next state output state 00 01 10 11 S0' S0' S1 S2 S3' 1 S1 S0' S3' S1 S3' 0 S2 S1 S3' S2 S0' 1 S3' S1 S0' S0' S3' 0 S0-S0 S1-S1 S2-S2 S3-S5 S1-S0 S3-S1 S2-S2 S4-S5 S0-S1 S3-S4 S1-S0 S4-S5 S4-S0 S5-S5 S1-S1 S0-S4

Optimality and Moore vs Mealy Any two (Moore) FSMs with the same functionality lead to the same minimized FSM (up to state names) and this is best possible Proof in CSE 322 For Mealy FSMs need to do different marking for outputs in step 2 List pairs of outputs for each input value and cross out boxes with any pair of different outputs Then erase these output pairs from the non-crossed-out boxes and continue as in Step 3 for the Moore FSM

Minimizing incompletely specified FSMs Equivalence of states is transitive when machine is fully specified But its not transitive when don't cares are present e.g., state output S0 X 0 S1 is compatible with both S0 and S2 S1 1 X but S0 and S2 are incompatible S2 X 1 Hard to determine best grouping of states to yield the smallest number of final states

Minimizing FSMs isn’t always good Two FSMs for 0  1 edge detection

Minimal state diagram: not necessarily best circuit In Q1 Q0 Q1+ Q0+ 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 – 1 0 – – Q1+ = In (Q1 + Q0) Q0+ = In Out = Q1’ Q0

Minimal state diagram: not necessarily best circuit In Q1 Q0 Q1+ Q0+ 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 1 Q1+ = Q0 Q0+ = In Out = Q1’ Q0

A little perspective These kinds of optimizations are what CAD(Computer Aided Design)/EDA(Electronic Design Automation) is all about The interesting problems are almost always computationally intractable to solve optimally People really care about the automation of the design of billion-transistor chips