I am having the hardest time figuring out how realtime boolean expression rounding occurs. Given the following code:
`define CLK350_PERIOD_L 2.857000ns
`define CLK350_PERIOD_H 2.857286ns
(1,current_time=$realtime) |=> (`CLK350_PERIOD_L <= $realtime-current_time && $realtime-current_time <= `CLK350_PERIOD_H);
Into this property, I am passing in a clock whose period measures 2.857ns exactly (from sim waveform set at fs scale). However the assertion continues to fail despite the fact that 2.857ns should fall with the _L and _H macros that I have specified...
I have also tried dividing all $realtime calls by 1fs:
(1,current_time=$realtime/1fs) |=> (`CLK350_PERIOD_L <= $realtime/1fs-current_time && $realtime/1fs-current_time <= `CLK350_PERIOD_H);
Does the boolean expression $realtime-current_time get rounded somehow due to timeunit? How can I get the assertion to not fail?