I need help in writing the below assertion.
My requirement is :
After Sig1 asserted, Sig2 should be stable until sig3 asserted.
Thank you…
I need help in writing the below assertion.
My requirement is :
After Sig1 asserted, Sig2 should be stable until sig3 asserted.
Thank you…
In reply to Bharath@Intel:
//Use the
property_expr s_until property_expr
| property_expr until_with property_expr
$rose(Sig1) |=> $stable(Sig2) s_until sig3[->1];
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
// Try this one also
$rose(s1) |=> first_match($stable(s2) ##[0:$] $rose(s3),$display($stime(),"PASS"));
In reply to Bharath@Intel:
In reply to Raghunandan Reddy:
The above property is is error because the requirement is for Sig2 to be be stable at all cycles until sig3 asserted.
// INCORRECT ($rose(s1) |=>
// first_match(stable(s2) ##[0:] $rose(s3),$display($stime(),“PASS”));)
You would need
ap_s123: assert property(@ (posedge clk) $rose(s1) |=>
first_match($stable(s2)[*0:$] ##1 $rose(s3)));
BTW,
An until property of the non-overlapping form (i.e., until, s_until) evaluates to true if property_expr1 evaluates to true at every clock tick beginning with the starting clock tick of the evaluation attempt and continuing until at least one tick before a clock tick where property_expr2 (called the terminating property) evaluates to true.
An until property of one of the overlapping forms (i.e., until_with, s_until_with) evaluates to true if property_expr1 evaluates to true at every clock tick beginning with the starting clock tick of the evaluation attempt and continuing until, and including a clock tick at which property_expr2 evaluates to true.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
Thank you guys for the reply:
I am going to have three solutions and update which one doing good for my requirement:
$rose(Sig1) |=> $stable(Sig2) s_until sig3[->1];
$rose(s1) |=> first_match(stable(s2) ##[0:] $rose(s3),$display($stime(),“PASS”));
ap_s123: assert property(@ (posedge clk) $rose(s1) |=>
first_match(stable(s2)[*0:] ##1 $rose(s3)));
In reply to Raghunandan Reddy:
In above code some typo error is there where i forget to mention the continuous repeat operator(*) which ben had rectified in his reply.
// I can conclude my code should be as below
property check_1;
$rose(s1) |=> first_match($stable(s2) ##[*0:$] ##1 $rose(s3),$display($stime(),"PASS"));
endproperty
CHECK_1: assert property (@(posedge clk) check_1) $display("Assertion pass 1");
In reply to ben@SystemVerilog.us:
Thank you ben for your quick feedback