← Design Verification Interviews
Interview Question · Concept
Assertoff, Assertkill and Disable Iff
The Question
The interviewer asks
When would you turn assertions off with $assertoff or $assertkill from the test, rather than writing disable iff in the property?
You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
disable iff belongs to the property. It states when the rule does not apply, such as reset. It travels with the checker into every test and into formal. $assertoff, $asserton and $assertkill are switches in the test. They cover situations the rule cannot know about, such as an error-injection test or a power-down. $assertoff stops new attempts but lets attempts already running finish; $assertkill also aborts those.
The standard's behaviour. Verilator 5.052 differs; see the pitfalls.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer keeps reset inside the property with disable iff. It uses the control tasks only for situations special to one test.
What Interviewers Listen For (Mid-Level)
A good mid-level answer separates $assertoff from $assertkill by what happens to attempts already running. It aims each call at one module or instance, not the whole design.
What Interviewers Listen For (Senior)
A good senior answer requires every switch-off to be scoped, logged and switched back on. It warns that a forgotten $assertoff silently turns off checking for the rest of the test.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfCompareScale It
- Assertoff, Assertkill and Disable Iff
-
CompareWhat Happens to the Attempt Already RunningL2 Mid-Level
Compare
$assertoffand$assertkillfor an attempt that started two cycles before the call and is still waiting for its consequent.2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
With
$assertoffthat attempt runs to completion and can still fail; only attempts that would start later are suppressed. With$assertkillit is aborted at once and reports nothing. Use$assertkillwhen the scenario that started those attempts has become meaningless, for example after an injected error.$assertoff$assertkillNew attempts Not started Not started An attempt already running Runs to the end and can still fail Aborted at once; reports nothing Use it when Running attempts are still meaningful The scenario behind them is now meaningless Self-Check
Tick each key point you covered in your answer.
Misconception
"
$assertonresumes the attempts that$assertkillstopped."Killed attempts are gone.
$assertonlets new attempts start at the following clock ticks.Source IEEE 1800-2017 §20.12
-
What IfAssertions During an Error-Injection TestL2 Mid-Level
Asked if they mention error-injection tests
What if a test deliberately corrupts a CRC to check the error path? Write the control around the injection so only the right checks are switched off.
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Switch off only the checker instance that would fire on the injected error, with a scoped call such as
$assertkill(0, tb.dut.rx.u_crc_chk). Inject the error, wait for the error path to finish, then call$asserton(0, tb.dut.rx.u_crc_chk). Keep the error-response checks on, since they are what the test is for, and log both calls.Self-Check
Tick each key point you covered in your answer.
Missed Corner
Calls
$assertoff;with no arguments for the whole test.That disables every assertion in the design, including the ones that check the error response, for the rest of the run.
Source IEEE 1800-2017 §20.12
-
WhyWhy Assertion Control Lives in the TestL1 Junior
If properties can describe their own exceptions, why does the language also give the test switches?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Some exceptions depend on what the test is doing, not on design signals. Examples are an injected fault, a power-aware run with a domain switched off, or a bring-up test that runs before configuration. Encoding those in every property would couple checkers to tests. Control tasks keep the checker generic and put the test-specific decision in the test.
Self-Check
Tick each key point you covered in your answer.
Half-Truth
"Control tasks are a debugging convenience only."
They are a standard part of assertion methodology for scenarios the properties cannot observe.
Source Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.), §9.6 (PDF p196)
-
What IfAn Assertoff That Was Never UndoneL1 JuniorL2 Mid-Level
What if the test calls
$assertofffor an error injection and never calls$assertonagain?2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
The rest of the test then runs with those checks off, and it still passes. Scope the call to the assertions the fault affects and to the window it lasts. Turn them back on with
$assertonat a known point. Log both calls, so a review can see what was off and when.Self-Check
Tick each key point you covered in your answer.
Missed Corner
"
$assertoffis harmless; the next test starts fresh."Within this test it stays in force until
$asserton. Bugs after the injection window then pass without a check.Source Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.), §9.6 (PDF p196)
-
Scale ItA Regression Policy for Suppressed AssertionsL3 SeniorL4 Staff
In a large regression, how do you stop assertion suppression from quietly hiding bugs?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Route all control through one testbench utility that logs each call with its scope and time. Fail the test if any scope is still off at the end. Report per test which checkers were suppressed and for how long, and review that list like waivers. Prefer fixing an over-strict property to suppressing it.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Staff)
A good staff answer makes every switch-off auditable: logged, scoped, switched back on and reviewed. It treats a growing list of switched-off checks as a sign of weak properties.
Wrong Altitude
"Each test owner manages their own
$assertoffcalls."Unreviewed, unscoped calls accumulate, and a single forgotten one disables checking for every following phase of a test.
What People Get Wrong
Common wrong answers and why they fail.
Misconception
"$assertoff kills the checks already running, like a reset."
Attempts already under way finish normally; only new attempts stop. Aborting them is what $assertkill is for.
Source Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.), §9.6 (PDF p196)
Tool as Truth
"On our simulator $assertoff(0, tb.p_off) silenced only p_off and dropped its in-flight attempt, so that is the rule."
In a probe for this batch Verilator 5.052 silenced every assertion, not just the listed one, and dropped the attempt already running. The standard limits the call to the listed scope and lets running attempts finish.
Source Measured for this batch on Verilator 5.052: $assertoff(0, tb.p_off) at 30 also silenced an uncontrolled assertion and the 15 ns attempt never reported
Wrong Altitude
"Use $assertoff during reset instead of disable iff; it is less typing."
Then the rule is wrong outside that test: formal and any other test that resets mid-run see false failures. Reset belongs in the property.