Jump to content

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


Tommy_SH
 Share

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 comment
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 comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...