代码拉取完成,页面将自动刷新
`ifndef MY_AGENT_SV
`define MY_AGENT_SV
class my_agent extends uvm_agent;
// data or class properties
`uvm_component_utils(my_agent)
my_driver drv;
my_monitor mon;
my_sequencer sqr;
uvm_analysis_port#(my_transation) ap;
function new(string name="my_agent", uvm_component parent);
super.new(name, parent);
endfunction : new
extern virtual function void build_phase(uvm_phase phase);
extern virtual function void connect_phase(uvm_phase phase);
endclass : my_agent
function void my_agent::build_phase(uvm_phase phase);
super.build_phase(phase);
if(is_active==UVM_ACTIVE) begin
drv=my_driver::type_id::create("drv", this);
sqr=my_sequencer::type_id::create("sqr", this);
end
mon=my_monitor::type_id::create("mon", this);
endfunction
function void my_agent::connect_phase(uvm_phase phase);
super.connect_phase(phase);
if(is_active==UVM_ACTIVE) begin
drv.seq_item_port.connect(sqr.seq_item_export);
end
ap = mon.ap;
endfunction
`endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。