Finite State Machines
Finite State Machines
? Design methodology for sequential logic -- identify distinct states -- create state transition diagram -- choose state encoding -- write combinational Verilog for next-state logic -- write combinational Verilog for output signals
? Lots of examples
6.111 Fall 2017
Lecture 6
1
Finite State Machines
? Finite State Machines (FSMs) are a useful abstraction for sequential circuits with centralized "states" of operation
? At each clock edge, combinational logic computes outputs and next state as a function of inputs and present state
inputs +
present state
n
Combinational Logic
outputs +
next state
n
Q
D
Registers
CLK
6.111 Fall 2017
Lecture 6
2
Two Types of FSMs
Moore and Mealy FSMs : different output generation
? Moore FSM:
inputs
x0...xn
Comb. Logic
? Mealy FSM:
inputs
x0...xn
Comb. Logic
next state
S+
n
CLK
D
Q
Registers
present state S
Comb. Logic
n
direct combinational path!
S+
D
Q
n
Registers
CLK
S
Comb. Logic
n
outputs
yk = fk(S)
outputs
yk = fk(S, x0...xn)
6.111 Fall 2017
Lecture 6
3
Design Example: Level-to-Pulse
? A level-to-pulse converter produces a singlecycle pulse each time its input goes high.
? It's a synchronous rising-edge detector. ? Sample uses:
? Buttons and switches pressed by humans for arbitrary periods of time
? Single-cycle enable signals for counters
Whenever input L goes from low to high...
Level to L Pulse P
Converter
CLK
6.111 Fall 2017
Lecture 6
...output P produces a single pulse, one clock
period wide.
4
Step 1: State Transition Diagram
? Block diagram of desired system:
Synchronizer
unsynchronized user input
CLK
DQ
DQ
Edge Detector
Level to L Pulse P
FSM
? State transition diagram is a useful FSM representation and design aid:
"if L=1 at the clock edge, then jump to state 01."
L=1
L=1
Binary values of states
00
L=0
Low input,
Waiting for rise
P = 0
01
Edge Detected!
P = 1
L=0
"if L=0 at the clock edge, then stay in state
00."
1111
High input, Waiting for fall
L=1
P = 0
L=0
This is the output that results from this state. (Moore or Mealy?)
6.111 Fall 2017
Lecture 6
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- paper 2 application of computational thinking
- the oscilloscope and the function generator
- finite state machines
- lesson 11 transformer name plate data and connections
- parents name combination for baby girl
- ownerowner manualmanual
- chapter 2 digital modulation 2 1 introduction
- msc generator
- materials that cause static electricity
- electrical plan symbols electrical one line symbols
Related searches
- finite integral
- finite volume method cfd
- finite difference and finite element
- solidworks finite element analysis tutorial
- finite element analysis basics
- finite element method book pdf
- finite element analysis book pdf
- finite element analysis textbook pdf
- finite element structural analysis pdf
- finite element analysis
- finite element analysis tutorial pdf
- finite element analysis training