Previous Section Next Section

14.3 Coverage Approaches

There are many coverage approaches. This section discusses the popular coverage approaches.

14.3.1 Toggle Coverage

One of the oldest coverage measurements, toggle coverage, was historically used for manufacturing tests. Toggle coverage monitors the bits of logic that have toggled during simulation. If a bit doesn't toggle from 0 to 1, or from 1 to 0, it hasn't been adequately verified. Toggle coverage does not ensure completeness. Moreover, toggle coverage is very low level and it may be cumbersome to relate a specific bit to a test plan item. However, toggle coverage is often used to provide additional confidence that the design has been exercised thoroughly.

14.3.2 Code Coverage

A popular coverage metric is code coverage. The basic assumption of code coverage is that unexercised code potentially bears bugs, i.e., the code is guilty until proven innocent. Code coverage checks how well your Register Transfer Level (RTL) code was exercised. Figure 14-7 shows how code coverage measures the level of activity of the RTL code.

Figure 14-7. Code Coverage

graphics/14fig07.gif

14.3.3 Functional Coverage

Functional coverage measures the activity of the DUT against goals derived from the specification. Functional coverage measures how completely the functionality of the DUT was verified. Figure 14-8 shows how functional coverage measures activity as specified coverage points in the DUT.

Figure 14-8. Functional Coverage

graphics/14fig08.gif

14.3.4 Functional Coverage vs. Code Coverage

It is tempting to use only code coverage or functional coverage. However, both coverage techniques are necessary to ensure adequate coverage of the DUT. Figure 14-9 shows the comparison between functional coverage and code coverage. In this book, we focus on functional coverage.

Figure 14-9. Functional vs. Code Coverage

graphics/14fig09.gif

Previous Section Next Section