Hi,
I am trying following example of a simple immediate assertion:
bit not_sig , sig ;
assign not_sig = !sig ;
always_comb begin
assert ( not_sig != sig ) $display("T:%0t Pass",$time);
else $display("T:%0t Fails",$time);
end
initial begin
#4; sig = 1;
#4; sig = 0;
end
LRM 9.2.2.2 : The procedure is automatically triggered once at time zero, after all initial and always procedures have been started so that the outputs of the procedure are consistent with the inputs.
I have a few questions
(1) At time:0 does the always_comb block execute after assign statement ?
(2) Every time ‘sig’ changes , both always_comb and assign execute, does the LRM define a pre-defined order of execution between them ?
(3) One of the output I observe
T:0 Pass
T:0 Pass
T:4 Pass
T:8 Pass
How is it that there are 2 pass reports at time:0 ?
(4) Is there a possibility that always_comb executes before assign( whenever ‘sig’ changes ) so that the simple immediate assertion might fail ?
(5) Does the action block of a simple immediate assertion execute in the same region where the ‘assert’ statement executes ?
For the above code, could I state that the action block executes in Active region ?