8.get_parent 1functionuvm_reg_block uvm_reg::get_parent();2return get_block();3endfunction45functionuvm_reg_block uvm_reg::get_block();6get_block =m_parent;7endfunction89functionvoid uvm_reg::configure (uvm_reg_block blk_parent,10uvm_reg_file regfile_parent=null,11stringhdl_path ="...
在UVM中,get_parent是一个非常重要的方法,它用于获取当前对象的父级对象。 get_parent方法的用法如下: 1. 语法 get_parent方法的语法如下所示: uvm_object_base #(T) get_parent() 其中,uvm_object_base是一个UVM中的基类,#(T)表示泛型类型。get_parent方法返回一个uvm_object_base类型的父级对象。 2. ...
1.get_parent: 那m_parent又是什么呢? parent又是什么? 原来就是new的时候,我们传的参!返回的是指针,不是字符串。 2.get_child get_parent()不用传参是因为一个component 只有一个父类。但是一个component 有可能有很多child,所以要指定: 如果有就返回,没有warning。m_children 又是什么? 前两个if不走,...
对于顶层的寄存器模型来说,get_parent()返回的就是null,也就是说寄存器模型中的寄存器会自下而上层层判断有没有自定义的uvm_reg_backdoor句柄,如果都没有,图2中的代码段1执行的get_backdoor()函数最终返回的就是null。于是乎代码段2中执行的就是backdoor_read()任务,而backdoor_read()中又调用了backdoor_rea...
get_parent 用于得到当前实例的parent,其函数原型为: externvirtualfunctionuvm_componentget_parent(); get_child函数,与get_parent不同的是,get_child需要一个string类型的参数name,表示此child实例在实例化时指定的名字。因为一个component只有一个parent,所以get_parent不需要指定参数;而可能有多个child,所以必须指定...
extern virtualfunctionuvm_componentget_parent(); get_child函数,与get_parent不同的是,get_child需要一个string类型的参数name,表示此child实例在实例化时指定的名字。因为一个component只有一个parent,所以get_parent不需要指定参数;而可能有多个child,所以必须指定name参数。
m_parent=parent;if(size ==0) begin `uvm_error("RegModel", $sformatf("Field \"%s\" cannot have 0 bits", get_full_name())); size=1; end m_size=size; m_volatile=volatile; m_access=access.toupper(); m_lsb=lsb_pos; m_cover_on=UVM_NO_COVERAGE; ...
get_parent:用于得到当前实例的parent,一个component只有一个parent,所以get_parent不需要指定参数。 get_child:需要一个string类型的参数name,表示次child实例在实例化时指定的名字。 get_children:得到一个component的所有函数。参数类型为ref uvm_component children[$]。
m_parent,指向的uvm_reg_block; m_is_busy,当该reg正在执行frontdoor的读写操作时,该信号置 1,避免此时做predict。 m_backdoor,外部设置进去的backdoor的方法。 m_maps[uvm_reg_map],该reg挂载在的map的对象,在default_map,add_reg时,指定。
在start()函数中,首先调用了函数set_item_context()函数,这个函数位于sequence的父类uvm_sequence_item中,负责给成员变量m_sequencer, m_parent_sequence赋值。 如果没有指定挂载的sequencer,则挂载到parent_sequence的sequencer上。 此处seq0显示传入了需要挂载的p_sqr0,则调用set_sequencer()函数完成挂载,给m_sequenc...