Professional Documents
Culture Documents
Glitz in DC
Glitz in DC
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
1
Glitches and Hazards in Digital Circuits
Hazards
Glitches and a Hazards
A glitch is a fast “spike” usually unwanted.
static-one hazard;
signal is one, glitch falls.
dynamic hazard;
signal is changing, up or down
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
2
Glitches and Hazards in Digital Circuits The Two Basic Static-Hazard Circuits
x 1
Any circuit with a static-0 hazard must reduce to the equivalent circuit of FIG. 1-1,
if other variables are set to appropriate constants.
FIG. 1-2 An imbedded static-0 hazard
0
1 1
x
x x x
0 x
x 0
x x
1 0
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
3
Glitches and Hazards in Digital Circuits The Two Basic Static-Hazard Circuits
Any circuit with a static-1 hazard must reduce to the equivalent circuit of FIG. 1-3
1 0
0 x
x
0 x
1 1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
4
Glitches and Hazards in Digital Circuits The Two Basic Dynamic-Hazard Circuits
delay
FIG. 1-6 The basic dynamic hazard
circuit with an imbedded
static-0 hazard.
Note that a dynamic hazard always has three parallel paths.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
5
Glitches and Hazards in Digital Circuits The Two Basic Dynamic-Hazard Circuits
x 0
• Adding an equal delay in the other path removes the falling-edge glitch.
• Adding too much delay will make the glitch appear on the rising edge.
At the silicon layout level, one might balance delays closely enough to suppress the
glitch.
With standard cells and field-programmable arrays, balancing is harder.
But see ”Absorption of Glitches by Gates” on page 53.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
6
Glitches and Hazards in Digital Circuits Hazards on a Karnaugh Map
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
7
Glitches and Hazards in Digital Circuits Hazards on a Karnaugh Map
Masking a Hazard.
To mask static-1 hazards add a gate that stays high across the transition.
This gate is logically redundant.
AB FIG. 1-11 The equation
X 00 01 11 10 F = BX + AX
0 0 BX 0
AB
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
8
Glitches and Hazards in Digital Circuits DeMorgan’s General Theorem (Review)
Examples
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
9
Glitches and Hazards in Digital Circuits Product of Sum ( Π of Σ) Maps (Review)
{X + B}·{ X + A}
F = {X + B}·{ X + A}
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
10
Glitches and Hazards in Digital Circuits Showing a Static-0 Hazard on a P of S Map
XD
FIG. 1-12 Get Π of Σ implementation.
E 00 01 11 10 Plot “0s” not “1s.”
D+X
0 1 E+X Connect letters with OR, not AND.
1 1 1 1 D + X, E + X
D hazard Gaps between adjacent circles
X D+X show
static-0 hazards.
F = (D + X)(E + X)
Consider wrap around
E E+X
E D+E D+E
E+X
1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
11
Glitches and Hazards in Digital Circuits Algebra and Hazards.
For work with dynamic hazards, avoid the distributive law. (Factoring)
The distributive laws can create dynamic hazards from static hazards,
even a masked one.
They will not remove or create static hazards.
The Distributive Laws
x(y + z) = xy + xz
x + yz = (x + y)(x + z)
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
12
Glitches and Hazards in Digital Circuits Algebra of Hazards
Algebra of Hazards
The basic forms for hazards and their equations.
x and x are treated as separate variables.
If a circuit has a hazard, the equation of the circuit will reduce to one of these forms.
FIG. 1-14 Static-0 x
x Dynamic
xx xx + x
x Static-1 x Dynamic
x+x (x + x )x
An Example
Below, a hazard in x must reduce to a basic hazard circuit when c=1 or when c=0.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
13
Glitches and Hazards in Digital Circuits Algebra of Hazards
c x
x
c
Static-1 hazard
xc + x = (c + x )(x + x)
When c=1 x + x (1 + x )(x + x) = x + x Static-1 hazard when c = 1;
(0 + x )(x + x) = x(x + x)Dynamic hazard when c = 0
x x
c c
Masked Hazard
xc(c + x ) = xc + xcx
When c=1 x1(1 + x ) = x x1 + x1x = x + xx Dynamic hazard when c = 1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
14
Glitches and Hazards in Digital Circuits Method
Method
1. Remove confusing extended overbars. 1. (A + B) + A·C => A·B + (A + C)
2. Find which variables cannot have hazards. 2. Need both X and X
3. Check for hazards in each variable. 3. X·X, X + X, X + X·X
Select one variable for checking AX + (BX + C)
make other variables 1 or 0 to bring out hazard 1X + (1X + 0)
X + X
4. Find masking terms if needed.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
15
Glitches and Hazards in Digital Circuits Find All The Hazards In F.
Example
Find All The Hazards In F.
b
c
F
a
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
16
Glitches and Hazards in Digital Circuits Find All The Hazards In F.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
17
Glitches and Hazards in Digital Circuits Find All The Hazards In F.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
18
Glitches and Hazards in Digital Circuits Locating Hazards From the Circuit Equation
0 0 c 0 (0 + c) (0 + c)+c0 cc Static-0
0 0 c 1 0 + c 0 + c c1 cc+c Dynamic
0 1 c 1 0 + c 1 + c c1 c+c Static-1
0 1 c 0 0 + c 1 + c c0 c
1 0 c 0 1 + c 0 + c c0 c
1 0 c 1 1 + c 0 + c c1 c+c
1 1 c 1 1 + c 1 + c c1 1+c
1 1 c 0 1 + c 1 + c c0 1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
19
Glitches and Hazards in Digital Circuits Same Example With More Organization and
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
20
Glitches and Hazards in Digital Circuits Locating Hazards; More Complex Exmple
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
21
Glitches and Hazards in Digital Circuits
[cd]
0 1 0
c a b d
1 0 1
0 1 [cd] 0
d a b c
1 0 1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
22
Glitches and Hazards in Digital Circuits Locating Hazards; Example three
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
23
Glitches and Hazards in Digital Circuits
1
a e no a
0
no a
0 1 0
b c e y no b
1 0 1
no b no b
1 1 0
c e y b no c
0 0 1
1 0 1
e c y b e+e
0 1 0
1 1 1
y a c e no y
0 0 0
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
24
Glitches and Hazards in Digital Circuits
Masking Hazards
Mask a static-1 with an AND gate.
A hazard is between two squares
Since hazard is static-1, the function is 1 in those two squares
Mask it with a function which is guaranteed
1 in those two squares
0 elsewhere
That function is G = AB
.
FIG. 1-21 Masking a static-1
AB AB
X 00 01 11 10 X 00 01 11 10
0 0 1 1 0 0 0 0 1 0
1 0 0 1 1 1 0 0 1 0
A G X
AB
A AX
X AX BX + AX + G
AX + BX
G
BX B
B
BX
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
25
Glitches and Hazards in Digital Circuits Masking Hazards Algebraically
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
26
Glitches and Hazards in Digital Circuits Masking Hazards Algebraically
Expression F = (a + c)(b + c) + cd
c·c Static-0 for 0 0 c 0 ab a
cd 00 01 11 10
00
Masking the static-0 hazard, c·c
01
The hazard appears when a,b,d = 0,0,0 and c c. d 11
F was designed to be “0” there. 10
but F actually has a hazard there. b
ab
cd 00 01 11 10
00 0 1 1 1
Define H:
01 1 1 1
H=0 when a,b,d = 0,0,0 H 1
H=1 anywhere else. 11 1 1 1 1
10 0 1 1 1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
27
Glitches and Hazards in Digital Circuits Masking Both Hazards at Once
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
28
Glitches and Hazards in Digital Circuits Masking Dynamic Hazards, cc + c
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
29
Glitches and Hazards in Digital Circuits Masking Dynamic Hazards, cc + c
As a check, consider a.
b c d (a + b) {(a + c)(b + c)} + cd + abd F Type of hazard.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
30
Glitches and Hazards in Digital Circuits An Example of Locating Hazards
a
a f
f
b
b
b)
a)
Residual inverters are better at the inputs.
a a
f f
b b
c)
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
31
Glitches and Hazards in Digital Circuits An Example of Locating Hazards
Explanation of b + bb + b
FIG. 1-23 Explanation the weird hazard
FIGURE 1.24
bb
b+b
Ideally they cancel
Realistically, only
the static-1 appears
This could even be a
“glitch inside glitch.”
With very good luck the two glitches to come exactly at the same time and cancel.
More likely the rising glitch will be lost in the static 1 signal.
Only the falling glitch will appear.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
32
Glitches and Hazards in Digital Circuits Sum-of-Product Circuits Have No Static-0
Rule I:
a
Except for the gross carelessness of including terms like acc, c
Σ of Π implementations have no static-0 hazards.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
33
Glitches and Hazards in Digital Circuits
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
34
Glitches and Hazards in Digital Circuits Sum-of-Product Circuits Have Only Easily
ab
0 0
Hazard when a,b = 1,1. 1 ax ax
Add term ab to mask the hazard.
F = bx + ax + ab
Is shown on the right.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
35
Glitches and Hazards in Digital Circuits Product-of Sum Circuits Have No Static-1
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
36
Glitches and Hazards in Digital Circuits Product-of Sum Circuits Have Only Easily
00 0 1 1 1 00 0 b·cd 1 bc 00 0 1 1 1
01 0 0 0 0 01 0 0 0 0 01 0 0 0 0
11 1 1 1 1 11 1 ab 11 1 ad 1 1
ac
10 0 1 1 1 10 0 1 1 10 0 1 1 1
b·cd bc
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
37
Glitches and Hazards in Digital Circuits Factoring and Hazards For Σ of Π / Π of Σ
1. Algebraic operations do not create hazards unless they make x interact with x.
See "Algebra and Hazards.," p.12
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
38
Glitches and Hazards in Digital Circuits Factoring and Hazards For Σ of Π / Π of Σ
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
39
Glitches and Hazards in Digital Circuits Two-variable-change hazards
AB00 01 11 10 FIG. 1-28 Start at square A,B,X =1,1,0 (the tail of the arrows)
X Change both B and X to move to square A,B,X =1,0,1
0 0 BX AX (the head of the arrows).
1 BX 0 0 If B changes slightly before X,
one travels the upper route .
A The valley between AX and BX may glitch.
AX
X A masking term AB can cover the valley.
F It only removes the glitch on the upper path.
BX
AX + BX + BX If X changes slightly before B,
one takes the lower path .
B This will always glitch.
BX It cannot be covered.
Covering the offending “0” changes the function.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
40
Glitches and Hazards in Digital Circuits Two-variable-change hazards
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
41
Glitches and Hazards in Digital Circuits Two-variable-change hazards
RAYDON COSMIC
DECAY RAY
AB May Cancel Won’t Cancel
A F
DETECTOR A
AIR AB + AB
B
Recall
DETECTOR B
A⊕B = AB + AB
AB
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
42
Glitches and Hazards in Digital Circuits General Multiple Variable Changes
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
43
Glitches and Hazards in Digital Circuits General Multiple Variable Changes
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
44
Glitches and Hazards in Digital Circuits General Multiple Variable Changes
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
45
Glitches and Hazards in Digital Circuits Multiple Variable Change Hazards are Plentiful
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
46
Glitches and Hazards in Digital Circuits Hazards do not hurt synchronous circuits
FIG. 1-31 The flip-flops only respond in the circled region on the waveforms below.
A glitch at any other time will not influence state of the machine.
The glitches die out long before the clock edge.
The glitches have negligible influence.
Q1 D2 Q2 D3 Q3
INPUT 1D 1D slow 1D
CLOCK C1 C1 C1
D INPUT
CLOCK
Q1
D2
Q2
D3
Q3
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
47
Glitches and Hazards in Digital Circuits Hazards Kill Asynchronous Circuits
KILLER GLITCH
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
48
Glitches and Hazards in Digital Circuits Hazards Kill Asynchronous Circuits
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
49
Glitches and Hazards in Digital Circuits Outputs where hazards are of concern
Memories
Memory chips are asynchronous latches, and are sensitive to
glitches.
Memory control leads must be glitch free.
QA FALSE SIGNAL
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
50
Glitches and Hazards in Digital Circuits Outputs where hazards are of concern
En A B=1 C=0 D
En En En En
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
51
Glitches and Hazards in Digital Circuits Outputs where hazards are of concern
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
52
Glitches and Hazards in Digital Circuits Absorption of Glitches by Gates
A Propagation
A rule of thumb Delay
B
A pulse shorter than the propagation delay of the gate
will not pass through it. A
This is called gate inertia or inertial delay. B
Synchronous circuits would have many many glitches except for inertial delay.
Digital simulator software uses inertial delay to keep simulation waveform displays
from being a wasteland of glitches.
Simulators normally suppress glitches shorter that a certain duration.
The default duration is the propagation delay of the gate passing the glitch.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
53
Glitches and Hazards in Digital Circuits Glitches Increase Power Consumption
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
54
Glitches and Hazards in Digital Circuits Glitches Increase Power Consumption
• Adding too much delay will make the glitch appear on the opposite input edge.
Rising delay
Falling 0
x 0 x
0 0
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
55
Glitches and Hazards in Digital Circuits Glitches Increase Power Consumption
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
56
Glitches and Hazards in Digital Circuits Glitches Increase Power Consumption
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
57
Glitches and Hazards in Digital Circuits Glitches Increase Power Consumption
Summary Of Hazards
Single variable change hazards
Can be found and cured.
© John Knight Electronics Department, Carleton University Printed; March 19, ’01
Modified; November 1, ’97
58