Hi,
I have a clk frequency randomized between 10Mhz -100Mhz and want to check the frequency through assertions … whether frequency is correct or not ,Can any one help me , how to resolve below error…and I am using cadence ncsim…
//Checking clock period range
assert property (period_chk)
else
$error(0,“Wrong clock frequency”,$time);
I understand that you want to trigger the time sampling at one posedge of smb_clk and check if the time difference is within the desired range at the following posedge.
For this, you should change $rose with @(posedge smb_clk) (to trigger the sampling), and use the non-overlapping implication operator |=> instead of |-> so that the next posedge does not overlap with the current one, like this :