{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 24 - Finite State Machine Word Problems ECSE-2610 Computer...

This preview shows pages 1–9. Sign up to view the full content.

1 Finite State Machine Finite State Machine Word Problems Word Problems ECSE-2610 Co mputer C omponents & O perations (CoCO) Fall 2006 11/09/06

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Word Problems Word Problems One of the most difficult problems in digital design is making an imprecise description of a problem into a precise one (e.g. a clearly defined FSM). How do you know if you have covered all the states? Omissions can cause failures, crashes, destruction, dismemberment, death, devastation, ... This is the hardware equivalent of a software programming error.
3 Example: String Recognizer Example: String Recognizer One input: X One output: Z Description: Z is 1 if the 3 previous input bits are 010, and 100 has never been seen. Unstated assumptions: RESET starts the FSM at the "reset" state Z is asserted when the following bit is seen. A Moore Machine implementation. Description

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Example Example continued continued X: 0 0 1 0 1 0 1 0 0 1 0 Z: - 0 0 0 1 0 1 0 1 0 0 0 Z is 0 even though the three previous inputs are Z is 0 even though the three previous inputs are 010, 010, because 100 was seen earlier. because 100 was seen earlier. Serial Behavior
5 S0 [0] S1 [0] S2 [0] S3 [1] S4 [0] S5 [0] S6 [0] Reset 0 1 1 0 0 0 0,1 Formal Design Formal Design Create sequences of states for the strings that the machine recognizes: 010 010 and and 100 100 . Note we reset to S0 S0. Consider the unlabelled transitions. State Transition Diagram

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 S0 [0] S1 [0] S2 [0] S3 [1] S4 [0] S5 [0] S6 [0] Reset 01? 01? 100 100 010 010 1 0 State S3 State S3 Where do we go from S3 S3? A 1 1 means the last 3 bits are 101 101 , so go to S2 . A 0 0 means we’ve seen 100 100, so go to S6 . 0 1 1 0 0 0 0,1 Diagram Development
7 S0 [0] S1 [0] S2 [0] S3 [1] S4 [0] S5 [0] S6 [0] Reset 0 1 1 0 0 0,1 0 0 0 1 1 0? 0? States S1 and S4 States S1 and S4 Loop in S1 S1 until we see our first 1 1 . Loop in S4 S4 until we see our first 0 0 . 01? 01? 100 100 010 010 1? 1? Diagram Development

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 States S2 and S5 States S2 and S5 S2 S2 means the last 2 bits are 01 01 , which is a prefix of 010 010 if the next bit is 0. 0. But if the next bit is 1 1 , the last 2 bits are now 11 11 , which maybe a prefix of 100 100 . That’s S4 S4 . S5 S5 : Last 2 bits are 10 10 . If next bit is 1 1 , maybe that’s a prefix for 010 010 . Go to S2 S2 . S0 [0] S1 [0] S2 [0] S3 [1] S4 [0] S5 [0] S6 [0] Reset 0 0 1 1 0 0,1 0 0 0 1 10? 10? 1 1 1 1? 1? 0? 0? 01?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 32

24 - Finite State Machine Word Problems ECSE-2610 Computer...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online