Skip to main content

SystemVerilog Blocking vs Non-Blocking Assignments Explained

· loading · loading · ·
Hardware Design SystemVerilog Blocking Non-Blocking RTL Design Simulation Always Block
Hardware Design
Axolot Logic
Author
Axolot Logic
Digital Design Engineer
Table of Contents
SystemVerilog Design Series - This article is part of a series.
Part 13: This Article

⛓️ Blocking vs Non-Blocking Assignments in SystemVerilog
#

SystemVerilog provides two types of procedural assignments inside always or initial blocks:


➡️ Blocking Assignment (=)
#

  • Executes immediately and in sequence
  • Each line blocks the next until it’s done
  • Typically used in combinational logic

✅ Example:
#

always @(*) begin
  a = b;
  c = a;  // uses updated 'a'
end

Think: Like normal programming assignments (step-by-step).


Non-Blocking Assignment (<=)
#

  • Schedules the update — doesn’t happen immediately
  • Allows all right-hand sides to be evaluated before updating left-hand sides
  • Used in sequential (clocked) logic

✅ Example:
#

always @(posedge clk) begin
  a <= b;
  c <= a;  // 'a' is not updated yet, uses old value
end

Think: Like flip-flop behavior — values update at the end of the clock cycle.


🧠 Best Practice
#

ContextPreferred Assignment
Combinational logic (always @(*))= (blocking)
Sequential logic (always @(posedge clk))<= (non-blocking)

Never mix = and <= in the same always block — it can lead to confusing and incorrect simulation behavior.


SystemVerilog Design Series - This article is part of a series.
Part 13: This Article

Related

SystemVerilog Data Types
· loading · loading
Hardware Design Verification SystemVerilog Verilog RTL Design Data Types Synthesis Simulation
Hardware Design Verification
SystemVerilog Unsized Literals
· loading · loading
Hardware Design SystemVerilog Literals RTL Design Initialization Synthesis Reset Logic
Hardware Design
SystemVerilog Clocking Block – Timing Control for Testbenches
· loading · loading
Verification Hardware Design SystemVerilog Clocking Block RTL Design Testbench UVM Timing
Verification Hardware Design
SystemVerilog Enum Data Type
· loading · loading
Hardware Design Verification SystemVerilog Enum FSM RTL Design Testbench Debugging
Hardware Design Verification
SystemVerilog Interface – Modular Signal Grouping with modport and Clocking Blocks
· loading · loading
Hardware Design Verification SystemVerilog Interface Modport Testbench RTL Design Connectivity
Hardware Design Verification
SystemVerilog Intoduction
· loading · loading
Hardware Design Verification SystemVerilog Verilog RTL Design UVM Hardware Verification IEEE 1800
Hardware Design Verification