Beruflich Dokumente
Kultur Dokumente
Timing Behavior
Glitches/hazards and how to avoid them
FSM Partitioning
What to do when the state machine doesn’t fit!
State Machine Signaling
Introducing Idle States (synchronous model)
Four Cycle Signaling (asynchronous model)
Dealing with Asynchronous Inputs
Metastability and synchronization
resistor
A B
open C
switch D
close switch
Usual solutions
1) Wait until signals are stable (by using a clock): preferable
(easiest to design when there is a clock – synchronous design)
2) Design hazard-free circuits: sometimes necessary (clock not
used – asynchronous design)
Static 0-hazard 1
Input change causes output to go from 0 to 1 to 0 0 0
Dynamic hazards
1 1
Input change causes a double change
0 0
from 0 to 1 to 0 to 1 OR from 1 to 0 to 1 to 0
1 1
CS 150 - Spring 2008 – Lec #22 – 0 0
Signaling - 5
Static Hazards
Due to a literal and its complement momentarily taking
on the same value
Thru different paths with different delays and reconverging
May cause an output that should have stayed at the
same value to momentarily take on the wrong value
Example:
A
A
S B
F
S
S'
B
F
S'
CS 150 - Spring static-1
static-0 hazard
2008 –hazard
Lec #22 – hazard
Signaling - 6
Dynamic Hazards
Due to the same versions of a literal taking on
opposite values
Thru different paths with different delays and reconverging
May cause an output that was to change value to
change 3 times instead of once
Example: A
C
A
F B1
3
2
B B2
1
B3
C
F
CS 150 - Spring
dynamic hazards
2008 – Lec #22 –
hazard
Signaling - 7
Eliminating Static Hazards
Following 2-level logic function has a hazard, e.g.,
when inputs change from ABCD = 0101 to 1101
A
AB
00 01 11 10 1 1
CD A
G1 1 A
G1
1
\C \C 1
00 0 0 1 1 1 1 1
G3 F G3 F
\A 0 \A 0
G2 G2
D 0 D 0
01 1 1 1 1 0
10
D ABCD = 1100 ABCD = 1101
11 1 1 0 0
No Glitch in this case
C
10 0 0 0 0 This is the fix
B Glitch in this case
1 0 0
A 1 A 0 A 0
G1 G1 G1
\C \C 0 \C 1
1 1 1 1
G3 F G3 F G3 F
\A 0 \A 0 \A 1
G2 G2 G2
D 0 D 0 D 1
1
CS 150 - Spring
1
2008 – Lec #22 – 1
ABCD = 1101 ABCD = 0101 (A is still 0) ABCD = 0101 (A is 1)
Signaling - 8
Eliminating Dynamic Hazards
Very difficult!
A circuit that is static
hazard free can still
have dynamic hazards
\A 1 01
G1
B
01
Best approach:
Slow G3 1 01
Design critical
\B 1 0 circuits to be two
G2 1 01 0 level and eliminate all
\C 10
1 G5 F static hazards
A 0 10
OR, use good clocked
\B G4 synchronous design
10 style
V ery slow
Domino Circuit
Clocked by
Evaluation
HG
TL•C / ST TS / ST
T02 T08 T11 T17
TS' HY FY TS'
T03 T07 T12 T16
TS / ST TL+C' / ST
FG
T04
T06 T13 T15
(TL+C')' [TS]
Communications
Clocked Signals Clocked
Subsystem Subsystem
Request
S1 S2
Data Flow
requester provider
client server
master slave
Acknowledgement
Req
Data
Ack
Clk
Req
Data
Wait
Clk
Req 1 3
Data
Ack 2 4
CS 150 - Spring 2008 – Lec #22 –
Signaling - 39
True Asynchronous Signaling
Alternative scheme: Two-Cycle Signaling
Non-return-to-zero signaling
Transaction start by Req lo-to-hi, finishes Ack lo-to-hi
Next transaction starts by Req hi-to-lo, finishes Ack hi-to-lo
Requires EXTRA state to keep track of the current sense of
the transitions—faster than 4 cycle case, but usually involves
more hardware
Req 1 1
Data
Ack CS 150 - Spring2 2008 – Lec #22 – 2
Signaling - 40
True Asynchronous Timing
Self-Timed Circuits
Uses Req/Ack signaling as described
Components can be constructed with
NO internal clocks
Input Output
Determines on its own when the Combinational
request has been processed logic
logic 1
logic 0
logic 0 logic 1
asynchronous synchronized
D Q D Q
input input
Clk
CS 150 - Spring 2008 – Lec #22 –
Signaling - 44 synchronous system
Handling Asynchronous Inputs
Never allow asynchronous inputs to fan-out to more
than one flip-flop
Synchronize as soon as possible and then treat as
synchronous signal
Clocked Synchronizer
Synchronous
System
Async Q0 Async Q0
D Q Input D Q D Q
Input
Clock Clock
Q1 Q1
D Q D Q
Clock Clock
In
In is asynchronous and
fans out to D0 and D1
Q0
one FF catches the
signal, one does not
Q1 inconsistent state may
be reached!
CLK