Jump to content

ask for help: method 'uvm_config_db' does not work in UVM 1.1


Tommy_SH

Recommended Posts

I test the configuration method 'uvm_config_db' as the following code:

---------------------------------------------------------

class my_env extends uvm_env;

function void build_phase(uvm_phase phase);

super.build_phase(phase);

void'(get_config_int("debug", debug));

//set_config_int("inst2.u1", "v", 88);

uvm_config_db #(int)::set(this,"inst2.u1", "v", 9); // does not work !!!!

endfunction

---------------------------------------------------------

the method 'set_config_int' works well, but 'uvm_config_db' does not work, why i met this issue ?

note, i use UVM 1.1 lib.

Thanks for your help.

Tommy

Link to post
Share on other sites

set_config_int uses uvm_bitstream_t:

typedef uvm_config_db#(uvm_bitstream_t) uvm_config_int;

try replacing uvm_config_db #(int)::set(this,"inst2.u1", "v", 9);

with

uvm_config_db #(uvm_bitstream_t)::set(this,"inst2.u1", "v", 9);

In general, when you face unexpected config_db behavior, I recommend using "+UVM_CONFIG_DB_TRACE" flag.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...