Verilog の Specify チートシート の履歴(No.2)
更新概要 Specify チートシート†
http://verilog.renerta.com/source/vrg00052.htm
を元に。
Specify の書き方†
LANG:verilog module ... ... specify ... endspecify ... endmodule
の形で module 内に specify ブロックを作成し、 モジュール内の信号同士の間のディレイを規定する。
各種関数†
影付きの部分にかかるとエラーになる。
- $setup(tested_event, reference_event, limit[, notifier])
- $skew(reference_event, tested_event, limit[, notifier])
- $hold(reference_event, tested_event, limit[, notifier])
- $recovery(reference_event, tested_event, limit[, notifier])
- $setuphold(reference_event, tested_event, setup_limit, hold_limit[, notifier])
- $width(reference_event, limit, threshold [,notifier])
- $period(reference_event, limit[,notifier])
- $nochange(reference_event, data_event, start_edge_offset, end_edge_offset [,notifier])
以下注釈。
- limit の単位は `timescale の第1引数
- `timescale 10ns / 10ps ならば 10ns の何倍かで指定する
- reference_event に &&& で条件を付けられる
- 例えば posedge clk &&& !rst とすれば !rst の時に限りチェックされる
- width における tested_event は reference_event の逆エッジ
- period における tested_event は reference_event と同じイベント
- notifier に reg を指定すると、エラー時に 1 が代入される
- ゼロで初期化しておく
パスの宣言†
LANG:verilog specify (In1 => Out1) = (10); endspecify specify specparam TRise = 10, TFall = 15; (In2 => Out2) = (TRise, TFall) ; endspecify
- 入力 In1 から Out1 への遅延が単位時間の10倍
- 入力 In2 から Out2 への遅延が rise, fall 別に単位時間の10倍, 15倍
Counter: 14025 (from 2010/06/03),
today: 2,
yesterday: 5