module nb_blocking_order (
input clk,
input b,
output reg c_block,
output reg c_nblk
);
reg a1, a2;
initial begin
a1 = 1'b0; a2 = 1'b0;
c_block = 1'b0; c_nblk = 1'b0;
end
always @(posedge clk) begin
// Flow 1: both blocking -> c_block sees NEW b immediately
a1 = b;
c_block = a1;
// Flow 2: NBA then blocking -> c_nblk sees OLD a2 this edge
a2 <= b; // schedules update for end of timestep
c_nblk = a2; // reads old a2 now
end
endmodule
= executes now, in order; later statements see the new value.<= takes a snapshot now but updates at the end of the timestep.c_nblk = a2; a2 <= b;, c_nblk still sees old a2 this edge.c_block = this cycle’s bc_nblk = previous cycle’s b= in combinational, <= in sequential. Avoid driving the same reg from different always blocks or mixing =/<= across blocks.