← Design Verification Interviews

Interview Question · Concept

Assert, Assume and Cover

L1 JuniorL2 Mid-Levelsvaassumecoverformal
  • Likely at Broadcom
  • Likely at Synopsys
  • Likely at Qualcomm

The Question

The interviewer asks

What is the difference between assert property, assume property and cover property? Does a simulator treat them differently from a formal tool?

Reveal the Model Answer

assert states a rule the design must obey. assume states a rule the environment, meaning the inputs, must obey. cover asks to see a scenario happen at least once. A simulator checks an assume just like an assert and reports when the stimulus breaks it. A formal tool uses the assume to limit the inputs it explores, and tries to prove each assert for all remaining inputs.

Who Each Directive Talks AboutArrows show signals moving from the environment through the design. Each directive watches one side.
Who Each Directive Talks AboutArrows show signals moving from the environment through the design. Each directive watches one side. component Environment Stimulus or theneighbour block;drives the inputs component assume Rules the inputs mustobey component Design under test Turns inputs intooutputs component assert Rules the design mustobey component cover A scenario we want tosee at least once inputslegal inputsoutputsbehaviour
Read the diagram as text
  • Environment: Stimulus or the neighbour block; drives the inputs
  • assume: Rules the inputs must obey
  • Design under test: Turns inputs into outputs
  • assert: Rules the design must obey
  • cover: A scenario we want to see at least once
  • Environment → assume: inputs
  • assume → Design under test: legal inputs
  • Design under test → assert: outputs
  • Design under test → cover: behaviour

The same three lines mean different work in each tool, as the table shows.

DirectiveIn a simulatorIn a formal tool
assertReports each failure on the traffic that ranTries to prove it for every legal input
assumeChecked like an assert; reports stimulus that breaks itLimits the inputs the tool explores
coverCounts each time the scenario happensFinds a trace that reaches it, or proves it cannot happen

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Junior)

A good junior answer gives one example of each: a design rule, an input rule and a scenario. It says what the simulator reports for each one.

Cross-Questions

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

WhyWhat IfBreak ItCompareScale It

  1. Assert, Assume and Cover
  2. WhyWhy Simulation Checks AssumptionsL1 JuniorL2 Mid-Level

    Why would a simulator bother to check an assume, if it cannot use it to limit the inputs?

    Reveal the Model Answer

    The same file runs in formal and in simulation. If the simulation stimulus breaks an assumption, either the stimulus is wrong or the assumption is too strict. Both are worth knowing, because a too-strict assumption makes formal proofs too easy.

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "A violated assume in simulation means the design is broken."

    An assume is about the inputs. A violation points at the stimulus or at the assumption itself, not at the design.

    Source IEEE 1800-2017 §16.14.2

  3. Break ItAn Assumption on an Internal SignalL2 Mid-Level

    Break it: an assumption names an internal signal of the DUT. What goes wrong in formal and in simulation?

    Reveal the Model Answer

    In formal, the assumption removes behaviour the design can really produce. A bug that needs that behaviour then disappears from the proof. In simulation it fires only if the tests reach that state, and they may never do. Write assumptions on input ports only.

    Self-Check

    Tick each key point you covered in your answer.

    Tool as Truth

    "The assumption never fired in simulation, so it is safe."

    Simulation checks it only on the traffic it ran. A proof applies it to every trace, including ones no test reached.

    Source Lesson F3.2 key points

  4. CompareAn Assume vs a Randomization ConstraintL2 Mid-Level

    Compare assume property (req |=> !req) with a constraint in the stimulus class that never sends two requests in a row.

    Reveal the Model Answer

    The constraint shapes what the testbench generates. The assume states the same rule as a property. Formal tools use it to limit their inputs, and simulators check it against whatever the stimulus did. Keeping both lets the assume catch a stimulus that breaks the rule, for example a directed test that bypasses the constraint.

    Randomization constraintassume property
    ShapesWhat the testbench generatesNothing in simulation; it is checked
    In formalNot usedLimits the inputs the tool explores
    Catches a directed test that breaks the ruleNoYes

    Self-Check

    Tick each key point you covered in your answer.

    Tool as Truth

    "A simulator can generate stimulus from the assume."

    Standard simulation only checks an assume. Generating inputs from properties is a feature of formal tools and of some vendor extensions.

    Source Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.), §15.1

  5. Scale ItWhich Assertions Formal Tools Can UseL3 Senior

    Your team writes many immediate assertions inside testbench classes. A formal lead asks to reuse the block's checks. What do you change?

    Reveal the Model Answer

    Formal tools work on the design and its bound checkers, not on class-based testbench code. Checks inside class methods cannot be reused there. Rewrite the interface rules as concurrent properties over DUT signals, in a checker module you can bind. Leave only transaction-level checks in the classes. The same file then runs in simulation as assertions and in formal as proof targets, with the input rules switched to assumptions.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Senior)

    A good senior answer splits rules on signals from checks on transactions. Signal rules are bound and shared with formal; transaction checks stay in classes. It also switches input rules from assert to assume.

    Misconception

    "Formal can read any assertion in the testbench."

    Formal analyses synthesizable design logic plus properties over it; dynamic class objects and procedural testbench code are outside that model.

    Source Lesson A7.1 review claims (bind; checkers outside the RTL)

  6. What IfA Proof That Passed Because of an AssumeL2 Mid-LevelL3 Senior

    Asked if they mention formal

    What if a formal tool proves every assertion on the first try? What do you check before you trust it?

    Reveal the Model Answer

    Check that the covers are reachable. Add a cover for each important scenario and for each assertion's antecedent. If a cover is unreachable, an assumption has probably removed the inputs that lead there. Then the proof says nothing about those inputs.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Senior)

    A good senior answer asks for cover results with every proof report. It reviews assumptions as carefully as RTL.

    Misconception

    "Proven means the design is correct."

    Proven means correct for the inputs the assumptions allow. An over-strong assumption can allow almost none.

    Source Seligman et al., Formal Verification (2nd ed.), ch. 9 "Vacuity issues"

What People Get Wrong

Common wrong answers and why they fail. Run It shows the wrong belief failing on a real simulator.

Misconception

"Simulation ignores assume; it only matters in formal."

Simulators evaluate an assume like an assert. The twin breaks an input rule in the stimulus, and the simulator reports it.

Run It

A stimulus that breaks an assume on its inputs.

RUNVerilator · simulator service
Edit the code, then run it
Expected: assume violations=1 FAIL: simulation checks an assume like an assert, so the stimulus bug was reported

Half-Truth

"Add more assumes until the formal run passes."

Each assume removes inputs from the search. Too many can remove the very input that shows a bug, and the proof then passes for the wrong reason.

Source Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.), ch. 15

Misconception

"Cover is just an assert with the opposite sense."

A failing assert reports a bug. A cover that never hits reports a hole in the stimulus. They answer different questions.

Source IEEE 1800-2017 §16.14.3

Learn It, Then Prove It