Clock Frequency Check ( considering Jitter )

In reply to hisingh:

Time scale or time units is the problem here. $realtime returns the time scaled to current time scale/unit. The period of a 1Mhz clock is 1us. If the current timescale is 1ns, $realtime returns 1000.0, not 10**-6. The you use a time literal, then you don’t have to worry about the current time scale

assert  property( clock_frequency( 1us  , 0.05 * 1us)  //  1MHz  Clock  Frequency  with  5%  Jitter  acceptable 
         else  $display(" TIME : %0t  Assertion  Fails " , $time ) ;