Hi all ,
Generally while writing properties we mention the clock before antecedent
property ab ;
@( posedge clk ) a |=> b ;
endproperty
I have observed properties where multiple clocks are specified in the property
property mclocks1 ;
@( posedge clk0 ) a |=> @( posedge clk1 ) b ;
endproperty
property mclocks2 ;
@( posedge clk0 ) c |-> @( posedge clk1 ) d ;
endproperty
Above property ’ mclocks1 ’ looks for ’ a ’ being True at posedge of clk0 .
Then ’ b ’ Must be True at the Immediate Next posedge of clk1 ( following posedge clk0 ) .
Same goes for property ’ mclocks1 ’
i.e ’ d ’ Must be True at the Immediate Next posedge of clk1 following posedge of clk0
For Duty Cycle related assertions I observe the code as follows ::
property check_Ton ;
realtime current_time;
@(posedge clk) ( 1, current_time = $realtime ) |=>
@(negedge clk) ( ton_time == ( $realtime - current_time ) );
endproperty
My question is regarding the combination of |=> @( negedge clk )
Suppose I have Clock generation as ::
bit clk ;
initial forever #5 clk = ! clk ;
So Posedge of Clk Occurs at TIME : 5 , 15 , 25 , 35 etc whereas Negedge occurs at TIME : 10 , 20 , 30 , 40 etc .
Let us assume at TIME : 5 the property is evaluated . So current_time would be 5ns ( Assuming 1ns / 1ns )
So what does the combination of |=> @( negedge clk ) mean ?
[1] Does it wait for Next posedge of clk ( due to |=> ) i.e TIME : 15 and then wait for negedge of clk at TIME : 20 ?
[2] Also if I were to write |-> instead of |=> would it’s meaning change ?