Hi All,
I was trying the following code
module tb;
integer i;
initial begin
for( i = 0 ; i < 4 ; i++) begin
$monitor("i is %0d",i);
end
end
endmodule
I observe the output as i is 4
I am aware that in case of multiple $monitor the last one takes precedence.
Since last $monitor executes with value of i as 3 , why is it that we observe 4 instead of 3 ?