|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 american007 于 2018-5-9 12:22 编辑
下面代码中 :make_stimulus ,而且两个函数里都有, 这句表示啥啥意思?
function void build_phase(uvm_phase phase);
if(!uvm_config_db #(tinyalu_agent_config)::get(this, "","config",
tinyalu_agent_config_h))
`uvm_fatal("AGENT", "Failed to get config object");
is_active = tinyalu_agent_config_h.get_is_active();
if (get_is_active() == UVM_ACTIVE) begin : make_stimulus
command_f = new("command_f", this);
tester_h = tester::type_id::create( "tester_h",this);
driver_h = driver::type_id::create("driver_h",this);
end
command_monitor_h = command_monitor::type_id::create("command_monitor_h",this);
result_monitor_h = result_monitor::type_id::create("result_monitor_h",this);
coverage_h = coverage::type_id::create("coverage_h",this);
scoreboard_h = scoreboard::type_id::create("scoreboard_h",this);
cmd_mon_ap = new("cmd_mon_ap",this);
result_ap = new("result_ap", this);
endfunction : build_phase
function void connect_phase(uvm_phase phase);
if (get_is_active() == UVM_ACTIVE) begin :make_stimulus
driver_h.command_port.connect(command_f.get_export);
tester_h.command_port.connect(command_f.put_export);
end
command_monitor_h.ap.connect(cmd_mon_ap);
result_monitor_h.ap.connect(result_ap);
command_monitor_h.ap.connect(scoreboard_h.cmd_f.analysis_export);
command_monitor_h.ap.connect(coverage_h.analysis_export);
result_monitor_h.ap.connect(scoreboard_h.analysis_export);
endfunction : connect_phase |
|