









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Lecture 21
Overview
° Understanding flip flop state:
° Clocked sequential circuits:
° Representations of state:
° Finite state machines
Output and State Equations
° Next state dependent on previous state.
State equations
Output equation y(t) = x(t)Q 1 (t)Q 0 (t) Q 0 (t+1) = D 0 (t) = x(t)Q 1 (t) Q 1 (t+1) = D 1 (t) = x(t) + Q 0 (t)
x Q 1
Q 0
D
Q Q’
D
Q Q’
y
Q 0
Q 1
D 0
D 1
Clk
State Table
° Sequence of outputs, inputs, and flip flop states enumerated in state table
° Present state indicates current value of flip flops
° Next state indicates state after next rising clock edge
° Output is output value on current clock edge
0 0 0 1 1 0 1 1
Present State
Next State x=0 x= 00 10 0 0 10 10 0 0 00 11 0 0 10 11 0 1
Q 1 (t) Q 0 (t) Q 1 (t+1) Q 0 (t+1)
x=0 x=
Output
State Table
State Diagram
° Circles indicate current state ° Arrows point to next state ° For x/y, x is input and y is output
0 0 0 1 1 0 1 1
Present State
Next State x=0 x= 00 10 0 0 10 10 0 0 00 11 0 0 10 11 0 1
x=0 x=
Output
00 01 0/0^10 1/
1/0 0/
0/0 0/
11
1/
1/
State Diagram
s 0 s 1 0/0^ s 2 1/
1/0 0/
0/0 0/ s 3
1/
1/
° Each state has two arrows leaving ° One for x = 0 and one for x = 1 ° Unlimited arrows can enter a state ° Note use of state names in this example ° Easier to identify
Analysis with D Flip-Flops
° Identify flip flop input equations ° Identify output equation
Note: this example has no output
Mealy Machine
Comb. Logic X(t)
Q(t+1)
Q(t) Y(t)
clk
present state present input
next state Comb. Logic
Flip Flops
OutputLogic Outputs Combina- tional
Combina- tional
Logic
Input Memory Element
Inputs
Mealy Model
OutputLogic Outputs
Combina- tional
Combina- tional
Logic
Input
Memory Element
Inputs
Moore Model
Mealy versus Moore
State Diagram with One Input & One Mealy Output
° Mano text focuses on Mealy machines ° State transitions are shown as a function of inputs and current outputs.
S
S
S
S
1/
1/0 1/
1/
Input(s)/Output(s) shown in transition
0/
e.g. 1 0/
0/0 0/
Clocked Synchronous State-machine Analysis – next class
Given the circuit diagram of a state machine: 1 Analyze the combinational logic to determine flip-flop input (excitation) equations: Di = Fi (Q, inputs)
Summary
° Flip flops contain state information
° State can be represented in several forms:
° Possible to convert between these forms
° Circuits with state can take on a finite set of values
° Two types of “machines”