|
 |

Selecting A Code Coverage Tool
by Michael Y.T. McNamara
President, SureFire Verification
Code coverage tools are gaining widespread acceptance in the register-transfer level (RTL) verification flow. Coverage tools work by modifying the original source design description, inserting code to monitor coverage during simulation. The extra code increases the simulation run time, but does not change the functionality of the design.
The simulation overhead added by coverage depends on the type of coverage metrics being tracked, on the coding style of the source design, and on the simulator being used. As a design team or company starts evaluating code coverage tools, how these factors influence the performance of the coverage tool should be evaluated by means of technical benchmarks. It is also useful to discuss feature sets and other non-technical criteria for the coverage product.
Feature Set
Technical capabilities of code coverage tools can be grouped into a few categories, including integration with the existing flow, coverage metrics, reporting capabilities and regression utilities.
Integration
- The coverage tool should impose a small overhead on simulation runtime. Since test suites to measure coverage for are usually large, it is important that the simulation runtime overhead be as low as possible. Overhead should be no greater than 50 to 100 percent, and ideally should be below 50 percent.
- The coverage tool should not require the need to modify the source design description to direct the coverage tool or to explicitly identify state machines. This is time consuming and can introduce errors. Comments to direct a coverage tool may need to be removed if the design is reused.
- The instrumentation process should also be fast, and allow the use of common Verilog simulation command-line arguments such as command files (-f), libraries and directories.
- The tool should run on Unix, Linux, and Windows NT platforms, with a multi-platform floating license.
- Operation from both command line and GUI should be allowed.
Coverage Metrics
- Block/Line Coverage: A block is defined as a section of code that will be executed in sequence if the first line is executed. Because blocks can consist of multiple lines, block coverage is inherently more efficient than line coverage, while providing the same information.
- Arc/Branch Coverage: Transfers of control from one block to another.
- Finite State Machine State Coverage: Check that a state has been visited.
- Finite State Machine State Transition Coverage: Check that each transition is exercised.
- Interactive FSM Path Query: Allows the selection of a path or a series of states through a finite state machine and checks coverage for the path, not just the individual states and transitions.
- Expression Coverage: Checks that all possible input states for a conditional expression have been executed. It is important here that the tool eliminate redundant input states, because they can cause significant overhead. It is also important that information provided by the tool be able to point the designer or verification engineer directly toward additional tests that need to be developed to plug the coverage hole.
- Event Coverage: Checks that each of the possible events to trigger an always block (the sensitivity list of the always statement) has been exercised.
- Toggle Coverage: Checks that bits ports, signals, registers, wires have come to a known value, and that the value has gone to both 0 and 1.
Reporting Capabilities
- Coverage reports should be easy to read, and should contain only useful and actionable information. It should be presented in a way that is easy to see and easy for tests to be written tests for sections of code that have not been covered.
- Coverage reports and displays should show actual source code that is covered/not covered, in addition to coverage statistics.
Editor's note: This week Verisity Ltd. announced a definitive agreement to acquire SureFire Verification. For more information on SureFire Verification and its code coverage products, visit the company's website at www.surefirev.com, or visit www.verisity.com. Additional information can also be obtained by contacting Nanette Collins at (617) 437-1822 or nanette@nvc.com.
|
 |