Non-Blocking Assignment
Non-blocking assignment is also known as an RTL assignment
- if used in an always block triggered by a clock edge
- mimic register-transfer-level semantics – all flip-flops change together
// this implements a 3 parallel flip-flopsalways @(posedge clk) begin B = A; C = B; D = C; end
// this implements a shift registeralways @(posedge clk) begin B <= A; C <= B; D <= C; end
// this implements a shift registeralways @(posedge clk) begin {D, C, B} = {C, B, A}; end