Hi all ,
I am trying various sample code to note differences between property and sequence
I have the following code ::
module top ;
bit req , gnt , clk ;
`ifdef PROP
property sr1 ;
`else
sequence sr1 ;
`endif
@( posedge clk ) req ##2 gnt ;
`ifdef PROP
endproperty
`else
endsequence
`endif
always @ ( sr1 ) $display(" TIME:%0t Assertion PASS " , $time ) ;
initial forever #5 clk = ! clk ;
initial begin
#4 ; req = 1 ;
#20 ; gnt = 1 ;
#2 ;
$finish() ;
end
endmodule
For +define+PROP , I observe that Simulator1 throws a Compilation error whereas it isn’t so with Simulator2 .
Although Simulator2 doesn’t report anything i.e No Pass report .
For No +define the O/P is same across both Simulators :: TIME:25 Assertion PASS
[ Q ] My question is whether it’s valid to use a property in sensitivity list as per LRM ?