|

楼主 |
发表于 2015-5-28 21:19:02
|
显示全部楼层
回复 6# admiral1
在env里把reg_model和vsequence实例化,
然后,
uvm_config_db#(reg_model)::set(this,"vseq.cpu_sequence","regmodel",regmodel);
在cpu_sequence里,
task body();
uvm_config_db#(reg_model)::get(this,"","regmodel",regmodel)//这一行报错
endtask
Incompatible complex type usage in task or function call.
The flowing epression is incompatible with the formal parameter of the function.
The type of the actual
is 'class $unit::cpu_sequence',while the type of the formal is 'class uvm_pkg::uvm_component'.
是不是因为env和sequence之间不能直接用config传递数据。
怎么才能把在env里实例化的regmodel传递到cpu_sequence内? |
|