hi,today i got a question about the blocking assignment,in the below 2 statements ,why is the blocking assignment scheduled the different region?
The first statement:
module xxx;
bit[7:0] data_test;
.....
initial begin
data_test = #0 1;//i think that assign at inactive region;
end
initial begin
data_test = 2;//i think that assign at active region;
end
initial begin
$display("result",$sformatf("data_test is %0d",data_test));
end
endmodule
the result is 1;which i think is all right;but the second statement
The second statement:
module xxx;
bit[7:0] data_test;
.....
initial begin
data_test = #0 1;//To assign at inactive region;
data_test = 2;//To assign at active region;
end
initial begin
$display("result",$sformatf("data_test is %0d",data_test));
end
endmodule
in the statement the result is 2? how could it be?