以下は私が現在使用しているプロパティです。+/-許容誤差%を持つクロックの周波数をチェックする最良の方法は何ですか?
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
(これはちょうど私が探しています何のデモンストレーションのために、動作しません。)以下のような何かを探しています
+/-トレランス%ですか?
タイプミスのタイトルを確認したい場合があります。 –
はい、それはコックです。 – Bathsheba
ありがとうございます。修正されました:) –