以下是我目前使用的属性。
property freq_chk (time clk_period , bit disable_chk=0);
time current_time;
disable iff ( disable_chk )
('1, current_time = $time) |=>
( (($time - current_time) >= (clk_period-1)) &&
(($time - current_time) <= (clk_period+1)) );
endproperty : freq_chk
因此,我们在这里将时钟周期中的容差限制视为 +/-1。什么是通过公差百分比并相应检查频率的最佳方法。
我正在查看类似下面的内容(这不起作用,只是为了演示我正在查看的内容。)
property freq_chk_with_tol (time clk_period , bit disable_chk=0, int tolerance=0);
time current_time;
disable iff ( disable_chk )
('1, current_time = $time) |=>
( (($time - current_time) >= ( (clk_period * (1 - (tolerance/100) )) - 1)) &&
(($time - current_time) <= ( (clk_period * (1 + (tolerance/100) )) + 1)) );
endproperty : freq_chk_with_tol
检查具有 +/- 容差 % 的时钟频率的最佳方法是什么?