Assertions never see live signals. At each clocking event the simulator takes a snapshot just before the edge, and every check below reasons about those snapshots.
Family | Functions | Question answered |
|---|---|---|
Compare two snapshots |
| Did the signal move since the last tick. |
Reach N back |
| What was this value N qualifying beats ago. |
Classify one snapshot |
| Is this vector well-formed right now. |
Lesson | Idea | Path |
|---|---|---|
Rose, fell, stable, and changed on sampled values, plus the LSB rule. | Required | |
Looking N beats back through bubbles with the gating argument. | Recommended | |
Counting ones, one-hot rules, and X-safe checks. | Recommended | |
Delayed equality, stability, readback, and phase matching. | Optional |
Required lessons are the core first pass for writing working assertions. Recommended lessons are worth reading for most learners once the first pass works. Optional lessons are reference, specialist material or revision, and you can come back to them when a project needs them.
$rose(bus) on an 8-bit bus fires. Which bit moved?Only bit 0 is known to have risen. $rose watches the least significant bit alone, so a bus needs $changed or a reduction such as $rose(|bus).