verilog modeling output x
Your problem is you are using blocking assignments to write to b. That means your always @a procedure gets blocked for 2 time units before its able to see the next change on a.
By using a non-blocking assignment, the assignment gets queued, and the always procedure immediately goes back to the top waiting for the next change on a
always @(*)
begin
    b &lt;= 3'bx;
    b &lt;= #2 a;
end