Verification Engineerの戯言 : SystemVerilogの世界へようこそ
Is "assign_vi" the only way to pass interface to the components from environment??の中で
メンターのDaveさんが興味深い例をアップしていた。
メンターのDaveさんが興味深い例をアップしていた。
上記のOVM Forumのスレッドからの引用
class vm_wrapper #(type T=int) extends ovm_object; T m; function new(string name=""); super.new(name); endfunction endclassテンプレートとして、T型を指定している一般的なクラス。
で、次がキーとなる記述
typedef virtual intf v_intf_t; vm_wrapper #(v_intf_t) vintf = new(); intf itf(); initial begin v_intf.m = itf; //PAss an actual handle interface set_config_object("*","wrapper",wrapper,0); end endmodulevm_wrapperクラスのパラメータになんと、virtual intfを渡している。
こんなやり方ありなんだーと。
SystemVerilogは奥が深い。
P.S
この時点でISUは上記の記述はサポートされていなかったが、ISU 9.xではサポートされたのだろうか?
Cadence関係者の皆さん、コメントください。
この時点でISUは上記の記述はサポートされていなかったが、ISU 9.xではサポートされたのだろうか?
Cadence関係者の皆さん、コメントください。
検証、Verification、SystemVerilog、OVM、Open Verification Methodology