Previous Section Next Section

14.2 Why Coverage?

Coverage information is highly valuable because it ensures that verification is performed in the most effective manner. Coverage measurement provides the following information:

The following sub-sections discuss how coverage can improve various aspects of the verification environment.

14.2.1 Coverage Improves Stimulus

The quality of the stimulus can be improved by measurement of coverage of the input fields. If a particular input combination is missing, coverage can immediately report the missing combination. Such feedback is important to improve the quality of the stimulus. Figure 14-2 shows how coverage can help improve stimulus quality.

Figure 14-2. Coverage Improves Stimulus

graphics/14fig02.gif

14.2.2 Coverage Improves Checking

The quality of checking can also be improved by measurement of coverage. Often, if the monitor does not report an error, it is assumed that the DUT is working properly. However, it is possible that the DUT did not enter a state where it would encounter a bug. For example, Figure 14-3 shows that if the DUT never enters the !ready state, the checker will never report an error. Since coverage reports that the DUT never entered the !ready state, the verification engineer knows that the checking is not complete.

Figure 14-3. Coverage Improves Checking

graphics/14fig03.gif

14.2.3 Coverage Verifies the DUT

Coverage also verifies that the DUT works for a varied distribution of results. Thus, the DUT is not verified for a single case but a wide distribution of cases. This helps better verification of the DUT in different scenarios that the DUT will face in real-life environments. For example, Figure 14-4 shows how a DUT can be tested for arbitration fairness (reasonable latencies to get grants) and a reasonable latency distribution.

Figure 14-4. Coverage Verifies the DUT

graphics/14fig04.gif

14.2.4 Coverage Measures Progress

Coverage ensures that every additional test that is run improves the coverage. This guarantees that each test is effective towards verifying an additional part of the DUT. This guarantees continuous progress. Figure 14-5 shows how the verification engineer can focus attention on scenario d, if scenarios a, b, and c are already covered.

Figure 14-5. Coverage Measures Progress

graphics/14fig05.gif

14.2.5 Coverage Enables Regression Optimization

Coverage allows the optimization of a regression run. Tests that repeat scenarios already covered in previous runs can be omitted. Let us assume that a regression suite contains only three tests. Figure 14-6 shows that without coverage all three tests have to be run because there is no insight into which scenarios are covered by the tests. However, when these tests are run with coverage, we realize that test 3 repeats scenarios a and b that are already covered by tests 1 and 2. Hence, test 3 should be omitted from the regression because it does not test any new scenario but only wastes valuable computing resources.

Figure 14-6. Coverage Enables Regression Optimization

graphics/14fig06.gif

Previous Section Next Section