set_name --- 设置此对象的实例名,覆盖先前给出的任何名称。 get_name --- 返回对象的名称,由new构造函数中的name参数或set_name方法提供。 get_full_name --- 返回此对象的完整层次名字。 get_type --- 返回此对象的类型代理(包装器)。 get_type_name --- 此函数返回这个对象的类型名字,这个类型名字通...
1.function void uvm_object::set_name (string name); //设置leaf_name 2.function string uvm_object::get_name ();//返回leaf_name(由new设置或者通过set_name更改) 3.function string uvm_object::get_full_name ();//调用2 1. 返回对象的全部层次名,The default implementation is the same as get...
top = uvm_root::get(); //uvm_top //component 获取这个节点的完整层次(路径实例名,不是类名 ) //object 实例名,object不作为uvm树的节点,会有不同的返回值 get_full_name() //uvm_test_top.env_inst.comp1_inst //获取当前节点的实例名,不是类名(创建对象时,传入的字符串) get_name() //comp...
代码清单3-3来源:UVM源代码36virtualclassuvm_scoreboardextendsuvm_component; …44functionnew(string name, uvm_component parent);45super.new(name, parent);46endfunction4748const static string type_name ="uvm_scoreboard";4950virtual function string get_type_name ();51returntype_name;52endfunction5354e...
class uvm_object_registry#(type T=uvm_object, string Tname="<unknown>") extends uvm_object_wrapper; typedef uvm_object_registry #(T,Tname) this_type; local static this_type me = get(); // Function: get // // Returns the singleton instance of this type. Type-based factory operation...
所以它的key-value就是uvm_object的类名(class name)和类的名称(string)。随着这个宏的展开,我们相当于给class额外定义了两个函数:get_type()和get_object_type()。由于uvm_object_registry #(T,“S”)是一个singletone的class,所以get_type()和get_object_type()的函数内容一样,区别在于返回值的句柄不同。
functionbitcompare(uvm_object rhs,uvm_comparer comparer=null);functionvoidrecord(uvm_recorder recorder=null);...// These two functions have to be redefined by child classesvirtualfunctionuvm_object create(stringname="");returnnull;endfunctionvirtualfunctionstringget_type_name();return"";endfunction...
if (!uvm_config_db #(virtual my_intf #(`MY_N))::get(this, "", "my_vif", cfg.vif)) `uvm_fatal(get_type_name(), "Didn't get a handle to the virtual interface!") uvm_config_db #(int)::get(this, "", "my_n", cfg.my_n); ...
function new (string name = "tb_v_seq"); // { super.new(name); endfunction : new // } // Driving the Reset virtual task tb_reset (); ... `uvm_info(get_type_name(),"Resetting DUT done",UVM_NONE) endtask : tb_reset endclass...
uvm_config_db #(virtual tinyalu_bfm)::get(this,"","class_bfm", class_bfm))17`uvm_fatal("DUAL TEST","Failed to get CLASS BFM");18if(!uvm_config_db #(virtual tinyalu_bfm)::get(this,"","module_bfm", module_bfm))19`uvm_fatal("DUAL TEST","Failed to get MODULE BFM");2021env...