HDL & Verification

How does Verilog's nonblocking assignment (<=) behave?

  1. AThe left side updates immediately, and the next line sees the new value
  2. BAll right-hand sides at that time step are evaluated first, and then the left-hand sides are updated together
  3. CThe result is discarded and nothing changes
Show answer and explanation

Answer: B. All right-hand sides at that time step are evaluated first, and then the left-hand sides are updated together

With nonblocking assignment, at the clock edge every <= right-hand side is first evaluated using the old values, and only then are all left-hand sides updated together. This mirrors real hardware, where many flip-flops on the same clock capture their pre-edge inputs simultaneously. That is why nonblocking assignment is the rule for describing clocked sequential logic.

  • A. That is the behavior of blocking assignment (=).
  • B. Correct. It matches flip-flops capturing values simultaneously.
  • C. The value is updated.