1my_reg1.myfield2.set(0x11);2my_reg1.myfield3.set(1);3my_reg1.update(); 2.2 update源码 1//uvm_reg_field.svh2functionbit uvm_reg_field::needs_update();3needs_update = (m_mirrored != m_desired) |m_volatile;4endfunction: needs_update56//uvm_reg.svh7functionbit uvm_reg::need...
virtual function uvm_reg get_parent() Get the parent register get_lsb_pos virtual function int unsigned get_lsb_pos() Return the position of the field Returns the index of the least significant bit of the field in the register that instantiates it. An offset of 0 indicates a field that ...
uvm_reg_field:包含uvm_reg_data_t类型的三个成员变量value,m_mirrored,m_desire。 uvm_reg:包含成员变量m_fields,加入各个uvm_reg_field。 uvm_reg_block:uvm_reg的集合,uvm_reg需要加入到uvm_reg_map中,且属于同一个uvm_reg_block。每个uvm_reg_block至少包含一个uvm_reg_map。uvm_reg_block中也可以再...
field automation机制还提供自动得到使用config_db::set设置的参数的功能 field automation机制中标志位的使用 对于多出来的这个ecc_err字段,是不是也应该用uvm_field_int宏来注册呢?如果不使用宏注册的话,那么当调用print函数时,在显示结果中就看不到其值,但是如果使用了宏,结果就是这个根本就不需要在pack和unpack...
uvm_reg_map,uvm_mem,uvm_reg_field,uvm_reg,uvm_reg_field,uvm_reg_block等与寄存器相关的众多的类都是派生自uvm_object,都是用于register model。 3.1.2 常用的派生自uvm_component的类 uvm_driver:所有的driver都要派生自uvm_driver,driver的功能主要就是向sequencer索要sequence_item,并将sequence_item的信息...
(4) uvm_reg_field的例化以及configure函数的调用均在uvm_reg的build函数内实现; 1functionvoid uvm_reg_field::configure(uvm_reg parent,2intunsignedsize,3intunsignedlsb_pos,4stringaccess,5bit volatile,6uvm_reg_data_t reset,7bit has_reset,8bit is_rand,9bit individually_accessible);10m_parent =pa...
在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. ...
uvm_reg_field中的desired,mirrored,m_parent,m_access变量都是local的,继承类中完全看不到,只能 通过function来得到数据。 m_access,指定field的access policy。 m_written,指定是否是只能被写入一次的。 reset可以被设置为多种类型的reset的值。 主要functionconfigure。
If the register is mapped in more than one address map, the default address map of the parent block is used. Whether a register field can be read or written depends on both the field’s configured access policy (see <uvm_reg_field::configure>) and the register’s accessibility rights in...
1.get_parent: 那m_parent又是什么呢? parent又是什么? 原来就是new的时候,我们传的参!返回的是指针,不是字符串。 2.get_child get_parent()不用传参是因为一个component 只有一个父类。但是一个component 有可能有很多child,所以要指定: 如果有就返回,没有warning。m_children 又是什么?