这里面最重要的变量是is_active, 用来定义user_agent 中是否实例化driver. build_phase 中关于is_active 的值是在UVM1.2中新加的在uvm-1.1d中实现特别简单 if(get_config_int("is_active", active)) is_active = uvm_active_passive_enum'(active);...
(agent_cfg)::get(this,"*","agt_cfg",m_agt_cfg);if(get_is_active())beginm_seqr0=uvm_sequencer#(my_data)::type_id::create("m_seqr0",this);m_drv0=my_driver::type_id::create("m_drv0",this);m_drv0.vif=m_agt_cfg.vif;endm_mon0=my_monitor::type_id::create("m_mon0",...
virtualfunctionvoidbuild_phase(uvm_phasephase);// If this UVM agent is active, then build driver, and sequencerif(get_is_active())beginm_seqr0=uvm_sequencer#(my_data)::type_id::create("m_seqr0",this);m_drv0=my_driver::type_id::create("m_drv0",this);end// Both active and pass...
uvm_component parent);7super.new(name,parent);8endfunction: new91011functionvoid build_phase(uvm_phase phase);1213virtual tinyalu_bfm class_bfm, module_bfm;14env_config env_config_h;1516if(!uvm_config_db #(virtual tinyalu_bfm)::get(this,"","class_bfm", class_...
active agent & passive agent 是属于同一个agent,区别在于passive agent只有monitor没有driver sequencer;这是同一个设备的不同工作状态 master和slave agent则是两个不同的agent is active作为一个枚举类型,选择是passive还是active;体现在16 24行code上