Lecture 24 Logistics Last lecture Today HW7 due today

Slides:



Advertisements
Similar presentations
(Synchronous) Finite 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.
Lecture 21 State minimization via implication charts.
Some Slides from: U.C. Berkeley, U.C. Berkeley, Alan Mishchenko, Alan Mishchenko, Mike Miller, Mike Miller, Gaetano Borriello Gaetano Borriello Introduction.
VIII - Working with Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite state machine optimization State minimization  fewer.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
Introduction to CMOS VLSI Design Lecture 14: CAMs, ROMs, and PLAs Credits: David Harris Harvey Mudd College (Material taken/adapted from Harris’ lecture.
CAMs, ROMs, and PLAs. 2 Outline  Content-Addressable Memories  Read-Only Memories  Programmable Logic Arrays.
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.
Lecture 20: CAMs, ROMs, PLAs. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 20: CAMs, ROMs, and PLAs2 Outline  Content-Addressable Memories  Read-Only Memories.
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
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.
State Machines The first problem set is now online! (Due on Jan. 31st, 2011)
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.

Introduction to CMOS VLSI Design Lecture 14: CAMs, ROMs, and PLAs
Week #7 Sequential Circuits (Part B)
Finite state machine optimization
Finite state machine optimization
Introduction to CMOS VLSI Design Lecture 14: CAMs, ROMs, and PLAs
CS 352 Introduction to Logic Design
Lecture 26 Logistics Last lecture Today HW8 due Friday
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
What Are They? Who Needs ‘em? An Example: Scoring in Tennis
Typical Timing Specifications
Lecture 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
Sequential circuit design
Sequential circuit design
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 25 Logistics Last lecture Today HW8 posted today, due 12/5
Sequential circuit design
Lecture 24 Logistics Last lecture Today HW7 due today
Instructor: Alexander Stoytchev
Lecture 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Implement FSM with fewest possible states • Least number of flip flops
Instructor: Alexander Stoytchev
Guest Lecture by David Johnston
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
Sequential circuit analysis
Lecture 22 Logistics Last lecture 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 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 18 Logistics Last Lecture Today HW6 due today Midterm 2
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Sequential Circuit Analysis
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
ECE 352 Digital System Fundamentals
EGR 2131 Unit 12 Synchronous Sequential Circuits
Lecture 20: CAMs, ROMs, PLAs
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
ECE 352 Digital System Fundamentals
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
Software Development Techniques
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 19 A bigger FSM example: Hungry Robot Ant in Maze.
Introduction to CMOS VLSI Design Lecture 18: CAMs, ROMs, and PLAs
Presentation transcript:

Lecture 24 Logistics Last lecture Today HW7 due today No lecture on Wednesday Lab as usual next week (M,T,W) Last lecture A bigger FSM example: Hungry Robot Ant in Maze --- Started Today Continue on the same example FSM simplification 24

Robotic ant in a maze Robot ant, physical maze Maze has no islands Corridors are wider than ant Design the robotic ant’s brain to get to the food! Food! start 24

Robot Ant behavior A: Following wall, touching Go forward, turning left slightly B: Following wall, not touching Go forward, turning right slightly D: Hit wall again Back to state A C: Break in wall Go forward, turning right slightly E: Wall in front Turn left until... F: ...we are here, same as state B G: Turn left until... LOST: Forward until we touch something 24

Notations Sensors on L and R antennae Movement Sensor = “1” if touching wall; “0” if not touching wall L'R'  no wall L'R  wall on right LR'  wall on left LR  wall in front Movement F  forward one step TL  turn left slightly TR  turn right slightly 24

1. State Diagram L + R L’ R LOST (F) L’ R’ E (TL) L’ R A/D (TL, F) L+R B/F (TR, F) L’ R’ L’R L C (TR, F) L’ R’ G (TL) L’ R’ L’ R’ L + R L 24

1. State Diagram L + R L’ R LOST (F) L’ R’ E/G (TL) L+R L’ R A/D (TL, F) L L’ R’ B/F (TR, F) L’ R’ L’R L C (TR, F) L’ R’ L’ R’ L 24

2. State Transition Table Using symbolic states and outputs state L R next state outputs LOST 0 0 LOST F LOST X 1 E F LOST 1 X E F E 0 0 B TL E X 1 E TL E 1 X E TL B 0 0 C TR, F B 0 1 A TR, F B 1 X E TR, F A 0 0 B TL, F A 0 1 A TL, F A 1 X E TL, F C 0 0 C TR, F C 0 1 A TR, F C 1 X E TR, F 24

3. State minimization Merging B/F and C LOST (F) E/G (TL) A/D (TL, F) B/C/F (TR, F) L’ R’ L’ R L L + R L 24

4. State encoding state L R next state outputs LOST 0 0 LOST F LOST X 1 E F LOST 1 X E F E 0 0 B TL E X 1 E TL E 1 X E TL A 0 0 B TL, F A 0 1 A TL, F A 1 X E TL, F B 0 0 B TR, F B 0 1 A TR, F B 1 X E TR, F state L R next state outputs X Y X+ Y+ F TR TL 0 0 0 0 0 0 1 0 0 0 0 X 1 0 1 1 0 0 0 0 1 X 0 1 1 0 0 0 1 0 0 1 1 0 0 1 0 1 X 1 0 1 0 0 1 0 1 1 X 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 X 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 X 0 1 1 1 0 24

5. Next state logic minimization 0 1 1 1 0 0 1 1 0 0 0 0 X X+ Y R L 0 1 1 1 1 1 1 1 1 1 0 0 X Y+ Y R L state L R next state outputs X Y X+ Y+ F TR TL 0 0 0 0 0 0 1 0 0 0 0 X 1 0 1 1 0 0 0 0 1 X 0 1 1 0 0 0 1 0 0 1 1 0 0 1 0 1 X 1 0 1 0 0 1 0 1 1 X 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 X 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 X 0 1 1 1 0 1 0 1 1 1 0 1 1 X F Y R L 0 0 1 0 X TR Y R L 0 1 0 1 X TL Y R L 24

6. Circuit Implementation Outputs are a function of the current state only - Moore machine L R F TR TL Next State Current State output logic next state logic X+ Y+ X Y 24

The “WHY” slide FSM minimization It is best to minimize FSM before expressing it as a logic circuit. As you saw in the ant robot example, minimization step is about looking for some patterns and merging states. There are systematic ways to do this (rather than the way we’d done it for the ant example) and we will learn them here. 24

FSM Minimization Two simple FSMs for odd parity checking 24

Collapsing States We can make the top machine match the bottom machine by collapsing states S0 and S2 onto one state If you’re a skeptical sort of person, you might ask, “why would anyone ever design the top state machine?” 24

FSM Design on the Cheap Let’s say we start with this FSM for even parity checking 24

FSM Design on the Cheap Now an enterprising engineer comes along and says, “Hey, we can turn our even parity checker into an odd parity checker by just adding one state.” An example this small is a little silly, but this kind of thing really happens on a larger scale 24

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) 24

A simple problem Design a Mealy machine with a single bit input and a single bit output. The machine should output a 0, except once every four cycles, if the previous four inputs matched one of two patterns (0110, 1010) Example input/output trace: in: 0010 0110 1100 1010 0011 … out: 0000 0001 0000 0001 0000 … The spaces in the traces are just for readability 24

… and a simple solution 24

Find matching rows Next State Output Input Sequence Present State X=0 Reset S0 S1 S2 S3 S4 1 S5 S6 00 S7 S8 01 S9 S10 10 S11 S12 11 S13 S14 000 001 010 011 100 101 110 111 24

Merge the matching rows Next State Output Input Sequence Present State X=0 X=1 Reset S0 S1 S2 S3 S4 1 S5 S6 00 S7 S8 01 S9 S10’ 10 S11 11 S13 S14 000 001 010 011 or 101 100 110 111 24

Merge until no more rows match Next State Output Input Sequence Present State X=0 X=1 Reset S0 S1 S2 S3 S4 1 S5 S6 00 S7’ 01 S10’ 10 11 Not (011 or 101) 011 or 101 24

The final state transition table Next State Output Input Sequence Present State X=0 X=1 Reset S0 S1 S2 S3’ S4’ 1 00 or 11 S7’ 01 or 10 S10’ Not (011 or 101) 011 or 101 24

A more efficient solution 24