when i add $display in following property i get an error saying
“” Property operator usage is not allowed in sequence context. Implication used in sequence context “”
(('1,current_time=$realtime) |=> (clk_1G_period <= $realtime-(current_time-0.001ns)) || (clk_1G_period >= $realtime-(current_time + 0.001ns)), $display(“clk is 1G”));
how can i overcome this?
In reply to Kirankumar V Hiremath:
Your error is caused by extraneous and improper use of parenthesis.
property chk;
realtime current_time;
@(posedge clk) ('1,current_time=$realtime)
|=> (clk_1G_period <= $realtime-current_time-0.001ns ||
clk_1G_period >= $realtime-current_time+0.001ns, $display("clk is 1G") );
endproperty
That removes the error, but you probably did not want the $display in the property, you want it in the assertion only if it passes.
assert property (chk) $info("clk is 1G");
In reply to dave_59:
As you mentioned my intention was to print it only if assertion passes and Thanks for suggesting the solution in both ways, it helped.