namespaceといえば、C++だと思っています。
今回紹介するブログ:The right name at the right space: using ‘namespace’ in VMM to set virtual interfacesでは、VMMでのnamespaceについて書かれています。
でも、VMMにnamespaceってあったかな?
今回紹介するブログ:The right name at the right space: using ‘namespace’ in VMM to set virtual interfacesでは、VMMでのnamespaceについて書かれています。
でも、VMMにnamespaceってあったかな?
どうも、ポイントはクラスを生成するときの引数(パラメータ)にラベルを付けて、
namespaceを作っている
namespaceを作っている
initial begin // Create the interface wrapper in the testbench top // with DUTIF as the namespace dut_if_port#(virtual dut_if) dut_if_port = new("DUTIF::intf", intf); endのDUTIF::intfでnamespaceを付けます。
そして、参照するところでは、
オブジェクトを見つけるということになります。
// get interface wrapper from the DUTIF name space and set the interface in the transactor obj = vmm_object::find_object_by_name("DUTIF::intf"); $cast(intf,obf); drv.connect_tif(intf.vitf);のように、find_object_by_nameの引数に先ほど付けたnamespaceにて
オブジェクトを見つけるということになります。
皆さん、いかがでしょうか?
検証、Verification、VMM