1、关于function new里的string name、uvm_component parent?
(截至目前的答案)是new函数里的默认参数,不一定要赋值,直接像下面这么写就可以:
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
2、build_phase和main_phase是什么?
uvm验证总结(三)------phase机制 - 知乎 (zhihu.com)
(参考以上内容,只记录我想要的部分)
UVM中的phase总体可以分为function phase和task phase两大类,其中function phase 不消耗仿真时间,task phase 需要消耗仿真时间。
这里面除了run_phase是task_phase之外,其余全都是function_phase。因此,得出以下结论:
(1)build_phase是function_phase,main_phase是task_phase。
(2)在build_phase中可以定义一些组件例化和配置的任务,main_phase中通常要执行激励、采样等任务。