FA-89055 / Digital logic simulation / Member archive
Blocking chain reads stale pre-step values · case 05
A value computed by a blocking statement is not visible to the next statement in the same step.
Case contract
Input [regs, stmts, cycles]. Each clock step executes stmts [kind, lhs, op, a, b] in order (ops copy/inv/and/xor on 0/1). Blocking ('b') statements update the working state immediately; non-blocking ('nb') statements evaluate their right side at the statement against the working state and queue the update. After all statements, queued updates apply in statement order (last write wins). Every variable, blocking or not, keeps its value into the next step. Return per-step values sorted by variable name.
Why this case matters
Event-driven RTL simulation depends on the active/NBA region split; mis-scheduling produces races that do not exist in hardware.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| blocking chain inside one step | [[0, 0, 0], [0, 1, 0]] | [[0, 0, 0], [1, 1, 1]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗