L8+FSM+&+Controller - Lecture 8 Finite State...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Digital Design Copyright © 2007 Frank Vahid Lecture 8 Finite State Machine
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Digital Design Copyright © 2007 Frank Vahid Describing Behavior of Sequential Circuit: FSM • Finite-State Machine (FSM) – A way to describe desired behavior of sequential circuit – List states, and transitions among states • Example: Make output x change toggle (0 to 1, or 1 to 0) every clock cycle • Two states: “Off” (x=0), and “On” (x=1) • Transition from Off to On, or On to Off, on rising clock edge • Arrow with no starting state points to initial state (when circuit first starts) Outputs: x On Off x=0 x=1 clk ^ clk ^ On cycle 1 cycle 2 cycle 3 cycle 4 clk state x Outputs:
Background image of page 2
3 Digital Design Copyright © 2007 Frank Vahid FSM Example: 0,1,1,1,repeat • Want 0, 1, 1, 1, 0, 1, 1, 1, . .. – Each value for one clock cycle • Can describe as FSM – Four states – Transition on rising clock edge to next state Off On1 On1On2 On2 On3 On3 clk x State Outputs: Outputs: x On1 On2 On3 clk ^ clk ^ clk ^ x=1 x=1 x=0 x=1 clk ^
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Digital Design Copyright © 2007 Frank Vahid FSM Example: Output with Specific Duration b is a push button Output x to stay on for exactly 3 clock cycles no matter how long b is pushed Wait in “Off” state while b is 0 (b’) When b is 1 (and rising clock edge), transition to On1 – Sets x=1 – On next two clock edges, transition to On2, then On3, which also set x=1 So x=1 for three cycles after button pressed Off On1 Off Off Off On2 On3 clk St at e Outputs: Inputs: x b On2 On1 On3 clk ^ clk ^ x=1 x=1 x=1 x=0 clk ^ b’&clk ^ b&clk ^ Inputs: b; Outputs: x
Background image of page 4
5 Digital Design Copyright © 2007 Frank Vahid FSM Simplification: Rising Clock Edges Implicit • Make implicit – all state transitions are triggered by rising edge of clock Synchronous FSMs – FSM behaviors synchronized to rising edge of clock – Asynchronous FSMs -- less common, advanced topic • Make implicit – Unlabeled path means transition is triggered only by clock, inputs don’t matter On2 On1 On3 Off x=1 x=1 x=1 x=0 b’ b Inputs: b; Outputs: x On2 On1 On3 Off x=1 x=1 x=1 x=0 b’ clk ^ clk ^ ^ clk *clk ^ *clk ^ b Inputs: b; Outputs: x a
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Digital Design Copyright © 2007 Frank Vahid FSM Definition • FSM consists of – Set of states • Ex: {Off, On1, On2, On3} – Set of inputs, set of outputs • Ex: Inputs: {b}, Outputs: {x} – Initial state • Ex: “Off” – Set of transitions • Describes next states • Ex: Has 5 transitions – Set of actions (outputs) • Sets outputs while in states • Ex: x=0, x=1, x=1, and x=1 Inputs: b; Outputs: x On2 On1 On3 Off x=1 x=1 x=1 x=0 b’ b FSM can be represented graphically, known as state diagram FSM can also be represented in tabular form, known as state table
Background image of page 6
7 Digital Design Copyright © 2007 Frank Vahid FSM Example: Secure Car Key • Many new car keys include tiny computer chip – When car starts, car’s computer (under engine hood)
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/14/2011 for the course EE 270/370 taught by Professor Gangzheng during the Fall '11 term at Shanghai Jiao Tong University.

Page1 / 26

L8+FSM+&+Controller - Lecture 8 Finite State...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online