5.get_num_children:返回当前component 所拥有的child 数量: 6.还有has_child, do_flush 等函数。
uvm_test_top的parent是uvm_top,而uvm_top的 parent则是null。 uvm_top提供一系列的方法来控制仿真,例如phase机制、objection防止仿真退出机制等。 层次结构相关的函数 UVM提供了一系列的接口函数用于访问UVM树中的结点。这其中最主要的是以下几个: get_parent 用于得到当前实例的parent,其函数原型为: 代码语言:java...
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 ="");12if(blk_...
function uvm_reg_block uvm_reg_block::get_parent(); get_parent=this.parent; endfunction: get_parent 8.update task uvm_reg_block::update(output uvm_status_e status, input uvm_path_e path=UVM_DEFAULT_PATH, input uvm_sequence_base parent=null, inputintprior = -1, input uvm_object extens...
1、通过在new函数时指定parent参数来形成树形结构。只有uvm_component派生的类,才有节点。 2、phase机制自动执行 build_phase的内容,一般有:利用config_db set/get传递参数;实例化成员变量。 build_phase是一个function,不消耗仿真时间;main_phase是一个task,消耗仿真时间 ...
get_parent:用于得到当前实例的parent,一个component只有一个parent,所以get_parent不需要指定参数。 get_child:需要一个string类型的参数name,表示次child实例在实例化时指定的名字。 get_children:得到一个component的所有函数。参数类型为ref uvm_component children[$]。
UVM的phase机制,config_set/get等机制,都依赖验证环境的层次化树形结构,在这种结构下,每个组件都有自己的hierarchy路径。 uvm_component树形结构的实现机制 通过阅读源码可以发现,uvm_component类包含如下几个参数: m_parent用于存储当前uvm_component组件的parent组件,需要在调用new函数时指定;m_children和m_children_by...
在start()函数中,首先调用了函数set_item_context()函数,这个函数位于sequence的父类uvm_sequence_item中,负责给成员变量m_sequencer, m_parent_sequence赋值。 如果没有指定挂载的sequencer,则挂载到parent_sequence的sequencer上。 此处seq0显示传入了需要挂载的p_sqr0,则调用set_sequencer()函数完成挂载,给m_sequenc...
parent参数:用于实现树形结构,UVM的根节点为uvm_top。接口函数:如get_parent、get_child等,用于访问树中的结点。field automation机制:提供了与变量、数组、队列等相关的宏,用于实现自动化处理。打印信息控制:UVM提供了冗余度阈值设置、信息严重性重载、UVM_ERROR数量控制等机制。支持断点功能、将输出...
创建环境组件时,一般通过create的工厂方法,最终调用uvm_component的new函数完成树结构的连接。每个组件在树结构中的hierarchy路径由get_full_name函数获取。类似地,uvm_reg也利用了parent和children机制实现层次化结构。在uvm_reg_block中,包含多个uvm_reg;在uvm_reg中,存在多个uvm_field。uvm_reg_block...