← Design Verification Interviews

Interview Question · Concept

What a Cover Property Reports in Simulation

L1 JuniorL2 Mid-Levelsvacovercoverage

The Question

The interviewer asks

You add cover property (@(posedge clk) req ##[1:3] ack);. What does the simulator count, and how is that different from a covergroup?

Reveal the Model Answer

A cover property counts how many attempts matched the sequence. It is a temporal check: it can see "ack within 1 to 3 cycles of req". A covergroup samples values at chosen moments and counts them into bins. Use covers for sequences of events, and covergroups for value combinations and their crosses.

How a Cover Property CountsArrows show what happens to each attempt of cover property (req ##[1:3] ack).
How a Cover Property CountsArrows show what happens to each attempt of `cover property (req ##[1:3] ack)`. component Each clock edge Starts a new attempt component One attempt req now, then ackwithin 1 to 3 cycles component Sequence matched The cover count goesup by one component No match Nothing is counted;there is no error component Coverage report One count per coverproperty startack in timeno ackcount
Read the diagram as text
  • Each clock edge: Starts a new attempt
  • One attempt: req now, then ack within 1 to 3 cycles
  • Sequence matched: The cover count goes up by one
  • No match: Nothing is counted; there is no error
  • Coverage report: One count per cover property
  • Each clock edge → One attempt: start
  • One attempt → Sequence matched: ack in time
  • One attempt → No match: no ack
  • Sequence matched → Coverage report: count

A cover never fails. It only counts the attempts that matched, so a count of zero means the scenario never ran.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Junior)

A good junior answer says a cover counts matches of a sequence over time. It gives a scenario that a covergroup cannot easily describe.

Cross-Questions

Where the interviewer goes next. Open a node to practise that follow-up.

WhyProve ItBreak ItCompareScale It

  1. What a Cover Property Reports in Simulation
  2. CompareCover Property vs Cover SequenceL2 Mid-Level

    Compare cover property (s) with cover sequence (s) for a sequence with a delay range.

    Reveal the Model Answer

    cover property counts each attempt once, at its first match. cover sequence counts every match, so one attempt of req ##[1:3] ack can add up to three hits. Use cover property to ask "did it happen?", and cover sequence to ask "how many ways did it happen?".

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "They are two spellings of the same statement."

    They differ in how many successes one attempt can report.

    Source IEEE 1800-2017 §16.14.3

  3. WhyWhy Count Every MatchL2 Mid-Level

    Why would you ever want every match counted?

    Reveal the Model Answer

    Every match is a different timing of the same scenario. Counting them shows whether the tests reached each latency in the window, such as ack after 1, 2 and 3 cycles. A plain yes or no would hide a test that only ever produced one latency.

    Self-Check

    Tick each key point you covered in your answer.

    Half-Truth

    "More hits always mean better coverage."

    Many hits of one timing still leave the other timings untested. What matters is which matches occurred.

  4. Break ItA Match Count That Hides the LatencyL2 Mid-Level

    Break it: the cover of req ##[1:3] ack reports 300 matches. Does that prove the 3-cycle latency was hit?

    Reveal the Model Answer

    No. The count adds up matches of every latency, so all 300 could be latency 1. Write one cover per latency: req ##1 ack, req ##2 ack and req ##3 ack. Or sample the latency into a covergroup with one bin per value.

    Self-Check

    Tick each key point you covered in your answer.

    Half-Truth

    "A big match count means every latency was exercised."

    The count does not say which latency matched. One latency repeated many times gives the same count.

  5. Prove ItWriting the Cover That Proves an Assertion Checked SomethingL1 JuniorL2 Mid-Level

    Write the cover you would add next to assert property (@(posedge clk) disable iff (rst) req |=> ack);.

    Reveal the Model Answer

    Cover the antecedent with the same clock and reset: cover property (@(posedge clk) disable iff (rst) req);. A nonzero count shows the consequent was checked at least that often. Many teams also cover the whole scenario, req ##1 ack, to show the good path happened.

    Self-Check

    Tick each key point you covered in your answer.

    Missed Corner

    Writes the cover without the assertion's disable iff.

    Then it counts req during reset, when the assertion was disabled, and overstates how often the check ran.

    Source IEEE 1800-2017 §16.12 (disable iff); Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.) §6.8 p102-104

  6. Prove ItSolve 6.6.6: Hold the OfferSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem 6.6.6

  7. Scale ItAssertion Covers in the Coverage PlanL3 Senior

    How do assertion covers fit into the coverage plan for an IP block?

    Reveal the Model Answer

    Each temporal scenario in the plan gets a cover property, next to the covergroups for values. The plan also lists one antecedent cover per important assertion. Coverage closure then needs every cover hit in regression. A cover that stays at zero is reviewed like a failure, because it means a check never ran.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Senior)

    A good senior answer makes a cover with zero hits block sign-off. It links each cover to one line of the verification plan.

    Wrong Altitude

    "Covers are for formal; simulation coverage is covergroups."

    Simulators collect cover property results into the same coverage database. Leaving them out loses the temporal half of the plan.

What People Get Wrong

Common wrong answers and why they fail.

Tool as Truth

"I count cover hits in the pass action, so a zero count means it never happened."

Verilator 5.052, as measured, never runs a cover's pass action. Its count stays 0 even when the cover matches. Read the tool's coverage report instead.

Source ASIC Point engine notes (Verilator 5.052 SVA probes), row "cover property pass action runs"

Misconception

"A cover property and a covergroup measure the same thing."

A covergroup records values at sample points. A cover property recognises a sequence across several clock ticks. They complement each other.

Source IEEE 1800-2017 §16.14.3

Spec Misquote

"A cover with a range counts once per match of every thread."

A cover property reports at most one success per attempt. A cover sequence statement can report every match.

Source IEEE 1800-2017 §16.14.3

Learn It, Then Prove It