我的工程中主要是对virtual interface用到了config_db,流程是这样的: 1.在testbench中例化了interface,然后通过config_db::set来把interface这个样的一个virtual interface放进resource_pool里面,resource_pool也就是两张表。放起来的目的是为了让需要使用virtual interface的component可以获取这个virtual interface。 module...
注1:在top module中通过config_db机制的set函数设置virtual interface时,set的第一个参数为null; 在这种情况下,UVM会自动把第一个参数替换为uvm_root::get(),即uvm_top; (2.1) set的第一个参数用以说明是哪个component对pre_num_max进行设置,通常是一个uvm_component的指针,一般使用填写this; (2.2) set的第...
uvm中连接interface使用的uvm_config_db机制 配置组件的DUT接口 全局UVM资源 UVM配置机制的选择 UVM调试机制 内容 UVM组件基类 UVM组件的逻辑层次:parent-child关系 组件显示和查询 查询组件的层次关系 使用逻辑层次配置组件 配置组件字段 动态控制变量 物理接口配置 配置组件的DUT接口 全局UVM资源 UVM配置机制的选择 UV...
5.那么如何set呢? 6.在top_tb 中使用config_db 对interface 进行传递,可以使用绝对路径: 7.如果不使用绝对路径,可以通过静态变量来实现。新建一个类,将验证平台中所有可能的interface 放到此类中作为成员变量: 在top_tb 中为这个类的interface 赋值: 1)get 函数是if_object 的一个静态函数,通过它可以得到if_ob...
If the lookup does not exist, a uvm_resource object is created. Unlike the virtual-interface case, the inst_name is not "" this time. In this case, the full name of the cntxt object concatenated with the inst_name is stored as the scope. The value passed to the set() function is...
函数时有五个参数需要我们指定第一个是uvmconfigdb类的参数tt表示我们要set或get的资源的类型它可以是虚拟接口sequencer等等第二个cntxt和第三个参数instname一起定义了uvmconfigdb中set或get函数的作用范围第四个参数决定了是对作用范围中的那个对象或变量进行操作第五个参数value会存储当前操作对象的句柄或着操作变量...
uvm_config_db#(virtual des_if)::get(this, "", "des_if", vif)) `uvm_fatal("TEST", "Did not get vif") uvm_config_db#(virtual des_if)::set(this, "e0.a0.*", "des_if", vif); // Setp pattern queue and place into config db uvm_config_db#(bit[`LENGTH-...
uvm_config_db #(virtual spi_if)::set(null, "", "vif", vif)end endmodule classs spi_drv extend uvm_driver;virtual spi_if vif;uvm_config_db #(virtual spi_if)::get(this, "", "vif", vif);endclass 对于config 机制只需要掌握两个原则:⼀是不同层次进⾏set,以最⾼层为准(...
void uvm_config_db #( type T = int )::set( uvm_component cntxt , string inst_name , ...
UVM中interface数组的set,get 从tb top使用uvm_config_db set interface数组,我这么写 结果直接报语法错误,google后得出结论如下: 不能使用变量来动态索引接口或模块实例的数组。即使可以,您的代码段也只会将vintf_master [1]设置为名为“ vintf_master”的配置条目。 只有最后一次调用set()才会生效。 需要使用...