What is Blocking assignment?

Verilog's "=" assignment, which updates the left side immediately so the next statement sees the new value. Used in combinational always blocks and testbenches.

Field: HDL & Verification

Blocking assignment in the explanations

Questions that mention Blocking assignment (3)

  1. In a testbench, changing a design input with a blocking assignment at the same instant as the rising clock edge can cause problems. Which pairs the reason with a fix correctly?
  2. In the code above, a = 0 and b = 1 just before a rising clock edge. What are a and b after the edge?
  3. Intending a two-stage shift register, someone wrote the code above with blocking assignments (=). What goes wrong?

Related terms

Testbench SystemVerilog Nonblocking assignment Shift register Asynchronous reset Combinational loop Constrained random verification Four-state logic Gate-level simulation Generate statement

Back to the glossary