env的run_phase中加入打印信息能正常打印,发现当启动sequence时就卡死了
raise_objection/drop_objection 加在哪里?
能否把一部分代码贴上来,方便讨论。
raise_objection和drop_objection 是放在env 中的。
classmy_envextendsuvm_env;
`uvm_component_utils(my_env)
virtualdfe_ifdfe_bfm;
dfe_agentagent1;
functionnew(string name,uvm_component parent=null);
super.new(name,parent);
endfunction
functionvoid build_phase(uvm_phase phase);
super.build_phase(phase);
if(!uvm_config_db#(virtual dfe_if)::get(this,"","dfe_bfm",dfe_bfm))
`uvm_fatal("env","BFM not set")
uvm_config_db#(virtual dfe_if)::set(this,"agent1","bfm",dfe_bfm)
endfunction
taskrun_phase(uvm_phase phase);
my_sequenceseq;
seuper.run_phase(phase);
seq=my_sequence::tpyeid::create("seq");
seq.addr_low=1;
seq.addr_high='h100;
seq.length=10000;
phase.raise_objection(this);
fork
seq.start(agent1.sequencer);
join
phase.drop_objection(this);
endtask
endclass
这个问题我解决掉了,我在monitor中忘记加时序的工作了。