ral_bfm_md.sv

来自「VMM 文档加源码, synopsys公司很好的验证资料」· SV 代码 · 共 69 行

SV
69
字号
//// Template for physical access BFM that can be used by RAL//// <XACT>       Name of physical-level transactor// <TR>         Name of physical-level transaction descriptor class// <DOM>        Name of domain// [filename]   XACT_DOM_ral_bfm//`ifndef XACT_DOM_RAL_BFM__SV`define XACT_DOM_RAL_BFM__SV`include "XACT.sv"`include "vmm_ral.sv"class XACT_DOM_ral_bfm extends vmm_rw_xactor;   XACT bfm;   function new(string        instance,                int unsigned  stream_id,                XACT          bfm);      super.new("XACT RAL Master for DOM domain", instance, stream_id);      this.bfm = bfm;   endfunction: new      virtual function void start_xactor();      super.start_xactor();      this.bfm.start_xactor();   endfunction      virtual function void stop_xactor();      super.stop_xactor();      this.bfm.stop_xactor();   endfunction      virtual function void reset_xactor(vmm_xactor::reset_e rst_typ = vmm_xactor::SOFT_RST);      super.reset_xactor(rst_typ);      this.bfm.reset_xactor(rst_typ);   endfunction      virtual task execute_single(vmm_rw_access tr);      TR cyc;            // ToDo: Translate the generic RW into an appropriate RW      // for the specified domain      cyc = new;      if (tr.kind == vmm_rw::WRITE) begin         // Write cycle         // ...      end      else begin         // Read cycle         // ...      end      this.bfm.in_chan.put(cyc);      // ToDo: Send the result of read cycles back to the RAL      if (tr.kind == vmm_rw::READ) begin         tr.data = ...      end   endtask: execute_singleendclass: XACT_DOM_ral_bfm

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?