Most simulators (VCS, Questa, Xcelium) provide these standard metrics automatically.
Did the simulator execution flow pass through this specific line?
if (reset) begin
count <= 0; // Lines checked green are covered
end else begin
count <= count + 1; // Red lines = dead code or missing test
end
Goal: 100%. If you can't hit a line, it's either dead code (delete it) or a bug in your test plan.
Did every bit of a signal flip 0→1 and 1→0?
- Target: Every wire, register, and port.
- Why: Catch "Stuck-at" faults or unconnected wires.
- Example: A 32-bit address bus where bit[31] never goes high suggests you aren't testing high memory addresses.
Checking all permutations of logic conditions.
if (A && B && C) ...
Line coverage counts this as "covered" if it executes
once.
Condition coverage demands you test:
- A=0, B=x, C=x
- A=x, B=0, C=x
- A=1, B=1, C=1
Automatic extraction of State Machines.
- State Coverage: Were IDLE, BUSY, ERROR states reached?
- Arc Coverage: Did we transition IDLE->BUSY and BUSY->IDLE?