Code Coverage
Code coverage tests typically include line coverage, conditional overrides, FSM coverage, rollover coverage, and so on. There are different coverage at different code levels, behavioral code contains LINE+CONDITION+PATH (branch) +FSM; RTL Code contains LINE+CONDITION+PATH+TOGGLE+FSM ; Gate-level code contains only toggle coverage.
What is the Code Coverage?
- Has all the line of the RTL been stimulated?
- Has all the states of a FSM been exercised?
- Has all the conditions of a "if" statement in the RTL simulated?
- Has all the blocks of a "case" statement been exercised?
What is the code Coverage is not?
- Functional Coverage, which answer questions such as:
- Has all possible combinations of instructions been verified on a processor?
- Has all the "corner-cases" been tested for a design?
- Did all asynchronous interrupt occur when a cache miss is being handled by the processor?
If you are using VCs to view Code coverage, simply add code coverage parameters when VCs compiles and executes:-cm LINE+COND+FSM+BRANCH+TGL
VCS View Code Coverage
VCS generates the Simv.vdb folder by default in the working directory, which contains code coverage-related information, and can be used to view code coverage with the following command:
Dve–covdir *.vdb &
Problem:
What methods and tools are used to solve the problem of functional coverage?
VCS View Code Coverage