Essential Immediate and Concurrent Assertions
Automate local and synchronous checks, detect X/Z values, and disable a check cleanly during reset.
One assertion for one precise rule
An assertion automates a check and executes an action when the check fails. It complements the scoreboard: assertions suit local invariants and signal-level rules, while a scoreboard compares complete transactions.
Immediate assertion: check at the execution point
An immediate assertion is evaluated when a process reaches its statement. It fits inside a task, function, or procedural block:
checks++;
check_result: assert (actual === expected) else begin
errors++;
$error("actual=%h expected=%h time=%0t",
actual, expected, $time);
endThe check_result label makes the source of a failure easy to locate. The else action defines the policy: $warning for a tolerated anomaly, $ to continue collecting failures, or when continuing no longer makes sense.