01 uvm_component中get_name系列小函数 比如在UVM验证平台中,我们在这样的一个class中调用这几个函数,代码如下: classjerry_componentextendsuvm_component; … $display(“%0s”,get_name()); $display(“%0s”,get_full_name()); $display("%0s",get_type()); $display(“%0s”,get_type_name())...
returntype_id::get(); endfunction endclass 然后,使用 factory.set_type_override(cmd::get_type(),subcmd::get_type()); 如果使用,此函数将通过`uvm_*_utils宏实现。 get_type_name virtual function string get_type_name () 这个函数返回此对象的类型名,通常是用引号括起来的类型标识符。它用于库中...
// In the TB env:uvm_config_db #(int)::set(this,"*","var",666);// In the TB driver:intget_value;if( !uvm_config_db #(int)::get(this,"*","var", get_value) ) begin `uvm_fatal(get_type_name(),"var is missing in config_db") endelsebegin `uvm_info(get_type_name(),...
3.定义了函数get_object_type,返回值为实际指向type_id类型的uvm_object_wrapper类型 4.定义了create函数,返回值为实际指向apb_transfer类型的uvm_object类型(这就是我们在factory机制中创建对象调用的create函数) 5.定义了静态字符串常量type_name 6.定义了函数get_type_name返回type_name uvm_object_wrapper类 src...
`uvm_info(get_type_name(), "TEST continous read transaction...", UVM_LOW) repeat(test_num) begin addr = this.get_rand_addr(); `uvm_do_with(single_read_seq, {addr == local::addr;}) void'(this.check_mem_data(addr, single_read_seq.data)); ...
1. get_type_name()是uvm_object类的一个内置函数,其解释如下: AI检测代码解析 This function returns the type name of the object, whichis typically the type identifier enclosed in quotes. 1. 2. 带parameter的类需要用uvm_component_param_utils注册,注册时需要传递参数,如: ...
get_type_name()是一个宏,这个宏的可以和uvm_info一起用,打印层次信息,不过uvm message已经包含了层次结构了,所以用后的效果如下: 第七章 条件细节打印 我们在debug时有个一策略是想在run_phase之前,打印整个uvm testbench的结构以及factory configuration。这个打印应该放在什么phase里呢?这个phase应该是在bulid,con...
please explain the implementation and significance of get_function, get_type_name, get_type function in uvm. tfitz June 17, 2014, 2:38pm 2 The get() function is a standard OO programming pattern to return an object of a specific type. In UVM, it’s usually used with the uvm_config...
uvm_report_info(get_type_name(), $psprintf(“Scoreboard Report \n%s”, this.sprint()), UVM_LOW); endfunction : report endclass : Scoreboard endif //now all components is ready connect them in env or agent class my_agent extends uvm_agent; //virtual interface fifo_interface itf; my_...
`uvm_fatal(get_name(), $sformatf("Could not cast to acme_apb_mon_transfer: %s", bus_item.get_type_name())) end endfunction endclass 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19.