I am trying to generate waveform in verilog using the code below but the result aren't as expected.
initial begin
d = 1'b0;
#8 d <= 1'b1;
#15 d <= 1'b0;
end
Its initial value is 0(OK), at t=8, its 1(OK) but at t=23, its 0. Instead i want it to be 0 at t=15 relative to t=0 and not to t=8(i.e. previous statement).
Is there a way to do so? I have tried interchanging blocking and non-blocking assignments but no luck!