Functional coverage is a user-defined metric that measures how much of the design's functionality has been exercised during verification. Unlike code coverage (which is automatic), functional coverage requires you to specify what scenarios you want to track.
The Verification Problem
Consider this scenario:
- Your design has 100 possible transaction types
- You run random tests and achieve 95% code coverage
- But have you actually tested all 100 transaction types?
- Code coverage won't tell you - functional coverage will!
Types of Coverage
| Type | What it Measures | Automatic? |
|---|---|---|
| Code Coverage | Lines, branches, conditions exercised in RTL | Yes (tool-generated) |
| Functional Coverage | Design features, scenarios, corner cases | No (user-defined) |
| Assertion Coverage | Which assertions were triggered | Yes (from SVA) |