Every declaration answers two questions: can this bit hold X or Z, and is its value resolved from drivers or stored. The five lessons below turn those answers into habits for ports, casts, and testbench types.
Lesson | What it covers |
|---|---|
X and Z modelling, the 2-state discount, the guarded boundary, and X tracing. | |
Resolution against storage, one-driver logic, and buses that still need wires. | |
Widths, signedness, the three casts, and silent truncation rules. | |
Named states, shaped vectors, shared storage, and checked conversions. | |
Dynamic text, testbench reals, opaque handles, and event sync. |
The 4-state to 2-state copy mapped X to 0 silently. The first lesson guards that boundary with an explicit unknown check before the copy.