hugemx830202 Posted April 27, 2011 Report Share Posted April 27, 2011 (edited) Hi, Today, I met a new issue with UVM1.0p1, I want to set a paramter based interface from module top level to my env, but it is unsuccessful, I don't why, please help to see if I made mistakes, thanks, here are what I have done: 1. create the parameter interface like this: interface ubus_if_parameter (parameter int DATAMSB=32) ; ... endinterface:ubus_if_parameter 2. in my env, declare such interface like this: virtual interface ubus_if_parameter vif_para;//leave the DATAMSB as default value 32 3. in module top level: declare such interface as: ubus_if_parameter #(.DATAMSB(64)) vif_para();//change the DATAMSB value as 64 But the problem is that, if set as the following line: uvm_config_db#(virtual ubus_if_parameter)::set(uvm_root::get(), "*", "vif_para", vif_para); then, IUS will report : ncelab: *E,TYCMPAT (./ubus_tb_top.sv,58|92): formal and actual do not have assignment compatible data types (expecting datatype compatible with 'virtual interface ubus_if_parameter#(.DATAMSB(32))' but found an incompatible 'ubus_if_parameter#(.DATAMSB(62)) instance' instead). But if I set as: uvm_config_db#(virtual ubus_if_parameter#(.DATAMSB(62)))::set(uvm_root::get(), "*", "vif_para", vif_para); I found that the vif_para in my env is null pointer. So I want to ask where is wrong with my method, how to use uvm_config_db to set parameter based interface to my env?Thanks a lot! BR MEIXIAO Edited April 27, 2011 by hugemx830202 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.