(
and you will!)
, you must understand how to design hazard-free. The various kinds of hazards are summarized in Figure 3.30.
A static hazard occurs when it is possible for an output to undergo a momentary transition when it is expected to remain unchanged. A static 1-hazard occurs when the output momentarily goes to 0 when it should remain at 1. Similarly, a static 0-hazard occurs when the output should remain at 0 but momentarily changes to 1. We will develop techniques that can eliminate static hazards from two-level and multilevel circuits.
Dynamic hazards occur when the output signal has the potential to change more than once when it is expected to make a single transition from 0 to 1 or 1 to 0. Dynamic hazards cause glitches in multilevel circuits, where there are multiple paths with different delays from the inputs to the outputs. Unfortunately, it is quite difficult to eliminate dynamic hazards in general. The best approach to dealing with this problem is to transform a multilevel circuit with a dynamic hazard into a static hazard-free two-level circuit.
(
A,B,C,D)
=
S m(
1,3,5,7,8,9,12,13)
. Its K-map is shown in Figure 3.31. The minimum sum of products form for the function is .
The gate-level implementation of F is given in Figure 3.32. Let's examine what happens when the inputs change from ABCD =
1100 to 1101. When the inputs are 1100, the output of gate G1 is 1 while G2's output is 0. Thus, the output from G3 is 1. When the input changes by a single bit to 1101, the outputs of the gates remain unchanged. G1 implements the prime implicant that covers both of the input configurations we considered; it remains asserted despite the input changes. A glitch cannot happen in this case.
Now consider an input change from 1101 to 0101, another single-bit change in the inputs. When A goes low, goes high, but only after a gate delay. For a short time, both A and are low. This allows the outputs from G1 and G2 to be low at the same time, and thus F goes low. When finally does go high, G2 will go high and F will return to 1. A glitch has happened! The step-by-step process is shown in Figure 3.33.
A close examination of the K-map of Figure 3.31 suggests what caused the problem. When the initial and final inputs are covered by the same prime implicant, no glitch is possible. But when the input change spans prime implicants, a glitch can happen. Of course, if G1 is much slower to change than G2, you might not see the glitch on F. The hazard is always there. Whether you actually see the glitch depends on the timings of the individual gates.
A strategy for eliminating the hazard is to add redundant prime implicants to guarantee that all single-bit input changes are covered by one such implicant. Suppose we add the implicant to the implementation for F. This strategy does not change the function's truth table. By adding the term , F remains asserted for the inputs 1101 and 0101, independent of the change to input A.
This method eliminates the static 1-hazard, but what about static 0-hazards? First, reexpress the function F in minimum product of sums form:
The K-map in Figure 3.34 clearly indicates that a static 0-hazard exists when the input changes from 1110 to 0110.
The solution is to add the redundant prime implicant to the product of sums expression for F. The resulting expression is equivalent to the sum of products form that eliminates the static 1-hazard:
Alternatively, we can use a shortcut to analyze the function for 0-hazards. We start with the expression that is free of static 1-hazards and work with its complement. We can then superimpose the analysis on the original K-map, looking at the zeros of the original function. A static 0-hazard exists if the implicants of the complement do not cover all adjacent 0's.
This collection of terms does indeed cover all adjacent 0's in the K-map for the revised F. This expression is free of both static 1-hazards and 0-hazards.
General Strategy for Static Hazard Elimination The preceding example leads to a general strategy for eliminating static hazards in two-level networks. Let's consider static 1-hazards first. Starting with the K-map, we examine it to make sure that all adjacent elements of the on-set are covered by a prime implicant. If they are not, we add redundant prime implicants until all elements of the on-set are covered.
We follow a similar procedure to eliminate static 0-hazards. Given the sum of products form for the function that eliminates the static 1-hazards, we write it in product of sums form using Boolean algebra. Then we verify that adjacent elements of the off-set are covered by a common prime implicant in the product of sums form. If necessary, we add more prime implicants to cover any uncovered adjacencies.
Example A Multilevel Function
Let's consider the following multilevel Boolean function:(
it does indicate that a 0-hazard exists)
, so it can be eliminated from consideration when analyzing for 1-hazards. The K-map for the remaining terms is shown in Figure 3.35. The function contains static 1-hazards, such as an input transition from ABCD =
1111 to 0111 or 1111 to 1101.
The remedy is to add the necessary redundant prime implicants. In the K-map of Figure 3.35, this is achieved by adding the terms AB and BD to the sum of products form of F:
Because AB completely covers the term ABC, we have eliminated it from F2.
Figure 3.38 compares the timing behavior of the original function F and its revised expression F2. Notice that F glitches on the input transitions 1111 to 0111 and 1111 to 1101, while F2 eliminates the glitches.
We use the shortcut method to verify that the new expression is free of static 0-hazards. For the original function F, is
This expression corresponds to the circled 0's in the K-map of Figure 3.37.
Figure 3.38. This problem can be fixed by adding the implicant to . The following is a two-level expression for F that is free of static 0-hazards:
Expanding F3 to place it into sum of products form yields F2. Both expressions are simultaneously free of static 0- and 1-hazards.
The K-map with circled terms is shown in Figure 3.39.F (
A,B,C,D)
=
S m(
1,3,5,7,8,9,12,13,14,15)
This yields the expression
This result is the same as the expression for F2 in the previous subsection. Factoring via the distributive law yields the following multilevel static-hazard-free expression:
This expression requires five gates, as was the case for the original expression for F given at the beginning of this section.
=
000, F =
1 and the final configuration is 010 with F =
0. In the starting configuration, G1 =
0, G2 =
1, G3 =
1, G4 =
1, and G5 =
1. The initial gate inputs and outputs are shown in plain text in the figure.Although it is possible to extend the techniques for static hazard elimination to dynamic hazards, the process is rather complicated and goes beyond the scope of this text. It is not enough to eliminate the static hazards-a multilevel network free of static hazards may still have dynamic hazards. If you need a hazard-free network, it is best to design it as a two-level network using the techniques of Section 3.4.4.
[Top] [Next] [Prev]