Hi All,
I want to pass a two dimensional array using uvm_config_db set and get method.
I tried a using typedef, but failed.
Any help is appreciated.
Thanks,
Subhamay
Hi All,
I want to pass a two dimensional array using uvm_config_db set and get method.
I tried a using typedef, but failed.
Any help is appreciated.
Thanks,
Subhamay
In reply to subhamay:
Could you please Elaborate a Little bit more. You can pass any data type to the config_db, including class-based data types.
In reply to subhamay:
Please show an example and explain how it failing.
BTW, we strongly recommend limiting the number of configuration variables and grouping them into class configuration objects.
Hi chr_sue/Dave,
I got the solution. I am not sure it is corrector not.
bit [0:288] tx_size3_bit_lane_slot_mem [0:39];
//Config_db set
foreach(tx_size0_bit_lane_slot_mem[i])
uvm_config_db#(bit [0:288])::set(null, “*”, $sformatf(“tx_size3_bit_lane_slot_mem[%0d]”,i), tx_size0_bit_lane_slot_mem[i]);
//Config_db get
foreach(tx_size3_bit_lane_slot_mem[i])
uvm_config_db#(bit [0:288])::get(null, this.get_full_name(), $sformatf(“tx_size3_bit_lane_slot_mem[%0d]”,i), tx_size3_bit_lane_slot_mem[i]);
Thanks,
Subhamay
In reply to subhamay:
This is a very inefficient way to use the uvm_config_db() and can potentially lead to some significant performance impact. You should really follow Dave’s advice and use a class configuration object.
In reply to cgales:
The question is how many additional values you are passing to the config_db.
If you have only the virtual Interfaces, maybe a Register model and some values it is fine.
If you have more values you want to pass to the config_db and you might randimize These values it is highly recommended you are using a configuration object (configuration class). If you are using such a class don’t Register this with the registry. This gives you the freedom to write your own constructor with individual Arguments.