Jump to content

Not able to configure thru +uvm_set_config_int:


Recommended Posts

Hi,

I want to configure a variable thru command line interface +uvm_set_config_int=uvm_test_top.env,test_variable,7

In my env. i have declared test variable as

int test_variable;

I am able to get UVM_CMDLINE_PROC calling in test.log

UVM_INFO @ 0: reporter [uVM_CMDLINE_PROC] Applying config setting from the command line: +uvm_set_config_int=uvm_test_top.env,test_variable,7

but when i print value of test_variable it's coming 0.

By configuring thru command line +uvm_set_config_int, it calls set_config_int(), which call uvm_config_db.

My question is i need do get the value of test_variable by uvm_config_db#(int), then i will be able to get the correct value as 7 or I am missing something here?

I am using UVM-1.1a and VCS compiler F-2011.12-SP1-1_Full64

Thanks

Pankaj

Link to comment
Share on other sites

Hi,

I want to configure a variable thru command line interface +uvm_set_config_int=uvm_test_top.env,test_variable,7

In my env. i have declared test variable as

int test_variable;

I am able to get UVM_CMDLINE_PROC calling in test.log

UVM_INFO @ 0: reporter [uVM_CMDLINE_PROC] Applying config setting from the command line: +uvm_set_config_int=uvm_test_top.env,test_variable,7

but when i print value of test_variable it's coming 0.

By configuring thru command line +uvm_set_config_int, it calls set_config_int(), which call uvm_config_db.

My question is i need do get the value of test_variable by uvm_config_db#(int), then i will be able to get the correct value as 7 or I am missing something here?

I am using UVM-1.1a and VCS compiler F-2011.12-SP1-1_Full64

Thanks

Pankaj

Set-config-int corresponds to uvm_config_db#(uvm_bitstream_t).

/uwe

Link to comment
Share on other sites

Thanks for response.

So you mean to say after +uvm_set_config_int=uvm_test_top.env,test_variable,7.

I need to get the value by

uvm_config_db#(bit[3:0])::get(this,"","test_variable",test_variable_i);

I tried this also, but didn't work, still getting value as 0.

--Pankaj

Link to comment
Share on other sites

  • 4 months later...

I have exactly the same problem. This a legacy code.

int var_size=4096;

setting from cmd line as follows , didnt overwrite the default value and reflect the new value 512.

+uvm_set_config_int=*,var_size,512

even after changing the type to uvm_bitstream_t also , it didnt work.

The code also has other int type variables that get set thru +uvm_set_config_int. So I am guessing

probaly there is some localparam that has the same name var_size. but didnt find anything yet. Since noticed this post , thought of reposting the question.. any clues on how else I can debug this? Thanks.

Link to comment
Share on other sites

  • 6 years later...

Not directly, but you could create two knobs and use them in a constraint.

+uvm_set_config.int=*,minsize,100 +uvm_set_config_int,*,max_size,500

then internally

class MySeq extends uvm_sequence #(MyTrans);
  `uvm_object_utils(MySeq)
  rand  int var_size;
  rand int min_size, max_size;
  constraint Size { min_size <= var_size; var_size <= max_size; }
  ....
endclass: MySeq

 

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.

×
×
  • Create New...