aaron626 Posted March 31, 2011 Report Share Posted March 31, 2011 (edited) In testcase: function void build_phase(uvm_phase phase); super.build_phase(phase); // Enable slaves uvm_config_db#(uvm_active_passive_enum)::set(this, "tb_inst", "en_slave*", UVM_PASSIVE); uvm_config_db#(uvm_active_passive_enum)::set(this, "tb_inst", "en_slave_cpu_rw1", UVM_ACTIVE); ... In tb_top, I have defined en_slave_cpu_rw1,en_slave_cpu_rw2,en_slave_cpu_rw3,en_slave_cpu_rw4 Using above configuation, expected: en_slave_cpu_rw is UVM_ACTIVE, other is UVM_PASSIVE; But to check the run log file, ALL en_* are UVM_PASSIVE If codes like this: set_config_int("ocp_tb_inst", "en_slave*", UVM_PASSIVE); set_config_int("ocp_tb_inst", "en_slave_cpu_rw1", UVM_ACTIVE); Only the en_slave_cpu_rw1 is UVM_ACTIVE, and others are UVM_PASSIVE. By the way: In build phase of tb_top, I have used uvm_config_db::get.. If not using them, we can not set en_slave* by group, only one by one. virtual function void build_phase(uvm_phase phase); super.build_phase(phase); void'(uvm_config_db#(uvm_active_passive_enum)::get(this, "", "en_slave_cpu_rw1", en_slave_cpu_rw1)); void'(uvm_config_db#(uvm_active_passive_enum)::get(this, "", "en_slave_cpu_rw2", en_slave_cpu_rw2)); void'(uvm_config_db#(uvm_active_passive_enum)::get(this, "", "en_slave_cpu_rw3", en_slave_cpu_rw3)); void'(uvm_config_db#(uvm_active_passive_enum)::get(this, "", "en_slave_cpu_rw4", en_slave_cpu_rw4)); So I think the UVM code should be improvemented. Edited March 31, 2011 by aaron626 Quote Link to comment Share on other sites More sharing options...
hugemx830202 Posted March 31, 2011 Report Share Posted March 31, 2011 I think it truly a potential bug in UVM1.0p1, so could you tell me how to work around this issue? It is so urgent to us as our TB uses a lot of wildcard settings. Quote Link to comment Share on other sites More sharing options...
uwes Posted April 1, 2011 Report Share Posted April 1, 2011 hi, if you use set_config_int, get_config_int or the automatic apply_config_setting (same applies to other numeric types such as _enum) your set() should be uvm_config_db#(uvm_bitstream_t)::set(). note the type "uvm_bitstream_t" instead of your enum. Quote Link to comment Share on other sites More sharing options...
Bart Posted April 1, 2011 Report Share Posted April 1, 2011 There is a bug with using wildcards in the field name with uvm_config_db::get. Wildcards work OK in the pathname, but are not being picked up in the fieldname. You can still use set_config_int() calls - these are not deprecated in UVM1.0p1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.