Before we start with functional coverage, it is required to understand the term coverage. The coverage provides a set of metrics that are used to measure verification progress.
Need for Coverage
- As you are aware that verification is a long-lasting process and we never know what type of input stimulus can capture the bug. Hence, it is essential to have a set of metrics that decide the endpoint for verification of the design once all metrics are satisfied.
- It is also essential to see whether we verified all kinds of features supported by the design and cover every line from the design code.
Types of Coverage
There are two types of coverage supported
- Code coverage
- Functional coverage
Code Coverage
Code coverage deals with covering design code metrics. It tells how many lines of code have been exercised w.r.t. block, expression, FSM, signal toggling.
The code coverage is further divided as
Toggle coverage – To check whether all bits in variables have changed their states.
Block coverage – To check how many lines of code have been covered.
Expression coverage – To check whether all combinations of inputs have been driven to cover expression completely.
FSM coverage – To check whether all state transitions are covered.