Verification Engineerの戯言 : SystemVerilogの世界へようこそ
tlm_bindは、PortとExportを接続するための関数です。
一方、tlm_unbindは既に接続してあるものを解放するための関数です。
tlm_unbindを使うことで動的にPortとExportの接続ができることになります。
一方、tlm_unbindは既に接続してあるものを解放するための関数です。
tlm_unbindを使うことで動的にPortとExportの接続ができることになります。
VMM 1.2 User GuideのPage.A-871の例題を見てみましょう。
class my_env extends vmm_group; producer p1; consumer c1, c2; function void connect_ph(); p1.b_port.tlm_bind(c1.b_export); endfunction endclass class test2 extends vmm_test; function void configure_test_ph(); env.p1.b_port.tlm_unbind(); env.p1.b_port.tlm_bind(c2.b_export); endfunction endclass
test2クラスのconfigure_test_ph関数でtlm_unbindとtlm_bindでc1.b_exportからc2.b_exportに接続し直しています。
検証、Verification、SystemVerilog、VMM、Verification Methodology Manual