[UVM]UVM环境搭建之 env

       前言:通常我们会在env中例化agent,Create RAL Model,Get Interface,Create Configure Object,Connect PORT。通常ENV该怎么部署比较好?本文将做一个详细的介绍。

一、声明Interface

virtual svt_apb_if                apb_mst_vif();
virtual dut_if                    dut_vif();

二、声明Configure Class

svt_clk_agent                    clk_agent[3];
svt_clk_cfg                      clk_cfg[3];
svt_rst_agent                    rst_agent[3];
svt_rst_cfg                      rst_cfg[3];

sys_ral_mode                     duv_ral_mode;
sys_cfg                          dut_cfg;

dut_scb                          dut_scb_i;
dut_sub                          dut_sub_i;
dut_vsqr                         dut_vsqr_i;

int                              slv_id;

三、Create Agent

function void dut_env::build_phase();

  foreach(clk_agent[i]) begin
    clk_agent[i] = svt_clk_agent::type_id::create($sformatf("clk_agent[%0d]", i), this);
  end

endfunction : build_phase


四、Connect PORT

function void dut_env::connect_phase();
  
endfunctiom : connect_phase 
发布了140 篇原创文章 · 获赞 81 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/gsjthxy/article/details/105017807
env