lecture 8 finite state machines
play

Lecture 8: Finite State Machines And Sequential circuit Design - PowerPoint PPT Presentation

Lecture 8: Finite State Machines And Sequential circuit Design CSE 140: Components and Design Techniques for Digital Systems Diba Mirza Dept. of Computer Science and Engineering 1 University of California, San Diego Generalized Model of


  1. Lecture 8: Finite State Machines And Sequential circuit Design CSE 140: Components and Design Techniques for Digital Systems Diba Mirza Dept. of Computer Science and Engineering 1 University of California, San Diego

  2. Generalized Model of Sequential Circuits Y X S(t) CLK 2

  3. Canonical Form: Mealy and Moore Machines Mealy Machine: y i (t) = f i (X(t), S(t)) Moore Machine: y i (t) = f i (S(t)) s i (t+1) = g i (X(t), S(t)) x(t) x(t) y(t) y(t) C1 C2 C1 C2 CLK CLK S(t) S(t) Moore Machine Mealy Machine 3

  4. Differences in State Diagram: Mealy vs. Moore Machines x(t) x(t) y(t) C1 C2 y(t) C1 C2 CLK CLK S(t) S(t) Moore Machine Mealy Machine 4

  5. This Counter Design Is: A. Moore machine B. Mealy machine C. None of the above OUT1 OUT2 OUT3 D Q D Q D Q CLK "1"

  6. Life on Mars? Mars rover has a binary input x. When it receives the input sequence x(t- 2, t) = 001 from its life detection sensors, it means that the it has detected life on Mars  and the output y(t) = 1, otherwise y(t) = 0 (no life on Mars  ). Implement the Life-on-Mars Pattern Recognizer! This pattern recognizer should have A.One state because it has one output B.One state because it has one input C.Two states because the input can be 0 or 1 D. More than two states because …. E.None of the above 6

  7. Life on Mars? Mars rover has a binary input x. When it receives the input sequence x(t- 2, t) = 001 from its life detection sensors, it means that the it has detected life on Mars  and the output y(t) = 1, otherwise y(t) = 0 (no life on Mars  ). 7

  8. Mars Life Recognizer FSM Which of the following diagrams is a correct Mealy solution for the 001 pattern recognizer on the Mars rover? 1/1 A. 1/0 0/0 0/0 S0 S1 S2 0/0 1/0 B. 0/0 1/0 0/0 1/1 S0 S1 S2 1/0 C. Both A and B are correct 0/0 8 D. None of the above

  9. Mars Life Recognizer FFs Pattern Recognizer ‘001’ x(t) 1/1 1/0 y(t) C1 C2 0/0 0/0 S0 S1 S2 0/0 CLK S(t) 1/0 Mealy Machine What does state table need to show to design controls of C1? A.(current input x(t), current state S(t) vs. next state, S(t+1)) B.(current input, current state vs. current output y(t)) C.(current input, current state vs. current output, next state) D.None of the above 9

  10. State Diagram => State Table with State Assignment x(t) 1/1 1/0 y(t) C1 C2 0/0 0/0 S0 S1 S2 0/0 CLK S(t) 1/0 Mealy Machine S(t)\x 0 1 State Assignment S(t)\x 0 1 S0: 00 S0 S1,0 S0,0 00 01,0 00,0 S1: 01 01 10,0 00,0 S1 S2,0 S0,0 S2: 10 10 10,0 00,1 S2 S2,0 S0,1 Q 1 (t+1)Q 0 (t+1), y 10

  11. State Diagram => State Table => Excitation Table => Circuit id Q 1 Q 0 x D 1 D 0 y Q 1 (t) Q 0 (t)\x 0 1 00 01,0 00,0 000 0 0 1 0 01 10,0 00,0 001 1 0 0 0 10 10,0 00,1 010 2 1 0 0 x(t) 011 3 0 0 0 4 100 1 0 0 y(t) C1 C2 101 5 0 0 1 CLK 110 6 X X X S(t) Mealy Machine 111 7 X X X 11

  12. State Diagram => State Table => Excitation Table => Circuit Q 0 id Q 1 Q 0 x D 1 D 0 y D 1 (t): 0 2 6 4 000 0 0 1 0 0 1 X 1 1 3 7 5 001 1 0 0 0 0 0 X 0 x(t) 010 2 1 0 0 Q 1 011 3 0 0 0 D 1 (t) = x’Q 0 + x’Q 1 4 100 1 0 0 D 0 (t)= Q’ 1 Q ’ 0 x ’ 101 5 0 0 1 y= Q 1 x 110 6 X X X 111 7 X X X 12

  13. State Diagram => State Table => Excitation Table => Circuit Q’ 1 Q 0 D 0 Q Q’ 0 D x’ Q’ Q 1 y x’ D 1 Q D Q’ Q 0 Q 1 x x(t) y(t) C1 C2 D 1 (t) = x’Q 0 + x’Q 1 D 0 (t)= Q’ 1 Q ’ 0 x ’ CLK y= Q 1 x S(t) Mealy Machine 13

  14. Summary: Implementation • Set up canonical form • Mealy or Moore machine • Identify the next states • state diagram ⇨ state table • state assignment • Derive excitation table • Inputs of flip flops • Design the combinational logic • don’t care set utilization 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend