Functional Coverage and Completion Criteria
Measure planned scenarios, cross important conditions, and close holes without confusing activity with correctness.
Measure the verification plan
Functional coverage measures whether planned situations have been observed. Unlike code coverage, it is defined by the team from product features and risks.
One hundred percent coverage does not prove that the DUT is correct. It only means every defined bin received a sample. A scoreboard and assertions are still needed to judge results.
Coverage is derived from the verification plan, not from the RTL structure. A feature missing from the design cannot be exposed by 100% code coverage when no independent functional goal calls for it.
Covergroups and coverpoints
covergroup command_cg @(posedge i_clk);
option.per_instance = 1;
cp_opcode: coverpoint i_opcode iff (i_valid && i_ready) {
bins read = {2'b00};
bins write = {2'b01};
bins flush = {2'b10};
illegal_bins reserved = {2'b11};
}
cp_wait