Procedural code runs inside a discrete-event scheduler: at each simulation time it works through a fixed order of regions, and that order decides which value every statement sees.
This topic starts with the blocks and assignments you write every day, then opens the scheduler itself in The Event Scheduler.
Lesson | What it covers |
|---|---|
Intent contracts, sensitivity including functions, and the latch-inference fix. | |
Two schedules, the swap classic, shift pipelines, and RTL and testbench rules. | |
The time rule, automatic storage, and argument directions including | |
Regions in one time slot, | |
Loop shapes, |
d at a clock edge while the testbench drives a new d with <= at the same edge. Which value does the flop take, and in which region does the drive commit?The flop takes the pre-edge value. A nonblocking drive commits in the NBA region, after every Active-region sample has finished. A blocking = drive at that edge would be a race instead.