Professional Documents
Culture Documents
04 Design in Hazard States PDF
04 Design in Hazard States PDF
K.B. Gan
Electrical & Electronic Program
Universiti Kebangsaan Malaysia
1
Learning Outcome
• Gate delays
• Timing waveforms
• Static/dynamic hazards and glitches
• Designs to avoid hazards
• Identify
• Eliminate
• Algebra of Hazards
2
Time Response in Combinational
Networks
• emphasis on timing behavior of circuits
rise time— time for output to transition from low to high voltage
fall time— time for output to transition from high to low voltage
3
Concepts of Delays and Timing
• Logic gates do not produce an output
simultaneously with a change in input.
• There is a finite propagation delay through all gates.
input output
input
output
time
propagation delay
4
Gate Delays
• Why is there a gate delay?
• There are actual resistances and capacitances
inside digital logic
• If you apply a unit step voltage signal to an input,
the output will not respond immediately, but after
a delay proportional to R.C
T delay = R.C Resistance of driver
Capacitance
Input Output
of load
5
Delays in Combinational Logic
Input
transition Output
transition
Delay (nsec)
High drive
Wire load
Capacitance C
Load capacitance
(pF)
7
Designing Logic With High Performance
Reduce high load due to fanout
b
a
c
b c
a a
b b
c c
tPD tPD tPLH tPHL
(c)tPD = tPLH= tPHL (d)tPLH< tPHL
Chapter 2 10
Gate Delay Specifications
• Power dissipation and propagation delays for
several logic families
Chapter 2 11
Gate Delays for Typical TTL Families
• Propagation delays of primitive 74LS series gates
tPLH tPHL
Chip Function Typical Maximum Typical Maximum
74LS04 NOT 9 15 10 15
74LS00 NAND 9 15 10 15
74LS02 NOR 10 15 10 15
74LS08 AND 8 15 10 20
22
74LS32 OR 14 22 14 22
Chapter 2 12
Specifying Delays
• Inertial Delay Model
• reflects physical inertia of physical systems
• glitches of very small duration not reflected in outputs
• SIG_OUT <= not SIG_IN after 7 nsec
• Logic gates exhibit lowpass filtering
10ns 3 ns
SIG_IN
2ns
SIG_OUT
9 ns 19 ns
13
Transport Delays
• Under this model, ALL input signal changes are
reflected at the output
• SIG_OUT <= transport not SIG_IN after 7 ns;
10ns 3 ns
SIG_IN
2ns
SIG_OUT
9 ns 19 ns 30 ns
14
Pulse Shaping Circuit
A B C D
F
100
A
B
C
D
F
15
Another Pulse Shaping Circuit
+
Resistor
A B
Open C D
Switch
Initially undefined
A
B
C
D
16
Hazards and Glitches
Hazard is a momentary unwanted switching transient at a logic
function’s output (i.e. a glitch).
Usual solutions:
wait until signals are stable (by using a clock)
17
Static Hazards
• Static‐0 Hazard:
• Occurs when output is 0 and should remain at 0, but
temporarily switches to a 1 due to a change in an input.
• Static-1 Hazard:
• Occurs when output is 1 and should remain at 1, but
temporarily switches to a 0 due to a change in an input.
18
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 B
S
F
S
S'
B
F
S' hazard
static-0 hazard static-1 hazard
19
Dynamic Hazards
• Dynamic Hazard:
• Occurs when an input changes, and a circuit output
should change 0 -‐> 1 or 1 -‐> 0, but temporarily flips
between values.
20
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
B 2
B2
1
B3
C
F
hazard
dynamic hazards 21
Detecting Static 1-Hazards
We can detect hazards in a two-level AND-OR circuit using
the following procedure:
22
Illustration
• Consider the following
circuit with delays where
only one input (input b)
changes…
• Draw a timing diagram to
see what happens at
output with delays.
• From the logic expression,
we see that b changing
should result in the output
remaining at logic level 1…
• Due to delay, the output
goes 1-‐>0-‐ >1 and this is
an output glitch; we see a
static-1 hazard.
23
Fixing Hazards (2‐level circuits)
24
Fixing Hazards (2-level circuits)
25
Fixing Hazards (2-level circuits)
27
Detecting Static 0-Hazards
We can detect hazards in a two-level OR-AND circuit using
the following procedure:
28
Detecting Static 0-Hazards
Z=(A+C)(A’+C’)(B’+C’+D)
29
Removing Static 0-Hazards
30
Algebra of Hazards
31
Algebra of Hazards
• Example:
Algebra of Hazards
• Example:
35
Locating Hazards in Circuits Algebraically
Locating Hazards in Circuits Algebraically
38
Locating Hazards in Circuits Algebraically
Level 3 Level 1
Estimating which variables might
have hazards
• A hazard, has two paths which reconverge in an
AND or OR gate.
• One path must have an even number of inversions,
and the other path must have an odd number.
• One need only check for hazards in variables which
have such paths.
40
Checking a circuit for potentially
hazardous paths
41
Locating Hazards From the Circuit
Equation
42
Summary
• Gate delays
• Timing waveforms
• Static/dynamic hazards and glitches
• Hazards elimination
• Algebra of Hazards
43