Jump to content

precedence of set_config/config_db in build phase


Recommended Posts

Hey,

In our environment, we overwrite few variables using set_config/config_db in test file. these variable also have a default value set in base test class.

Following pseudo code shows the guts of it.

class test extends test_base

...

virtual function build()

...

this.set_config_int("*", "timer", 300);

...

endfunction

endclass

class test_base extends uvm_test

...

virtual function build()

...

this.set_config_int("*", "timer", 100);

...

endfunction

endclass

In OVM this was working fine and "timer" used to get the value "300". Now we have the environment migrated to UVM and this is not working anymore.

By adding a print statement in both build(), I see the following behavior:

for OVM:

OVM_INFO @ 0.000 ns: ovm_test_top [ovm_test_top] timer = 100

OVM_INFO @ 0.000 ns: ovm_test_top [ovm_test_top] test: timer = 300

for UVM:

UVM_INFO @ 0.000 ns: uvm_test_top [uvm_test_top] test: timer = 300

UVM_INFO @ 0.000 ns: uvm_test_top [uvm_test_top] timer = 100

Am I missing any thing obvious here, during OVM to UVM migration?

Regards,

Manju Shetty

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...