Jump to content

UVM 1.1 Change of the Agent to Passive does not work as documented

Recommended Posts

Hi All,

I was trying to use the documented way of changing the "is_active" state inside of

an uvm_agent.

Which looked as followed:

   set_config_int("*kr_0_mon", "is_active", UVM_PASSIVE);
   kr_0_mon = kr_agent::type_id::create("kr_0_mon",this);

The working code instead was this: (And I think that is what should be updated):

   // Inside of the env build process:
   uvm_config_db#(uvm_active_passive_enum)::set(this, "*kr_0_mon", "is_active", UVM_PASSIVE);
   kr_0_mon = kr_agent::type_id::create("kr_0_mon",this);

   // Inside of the agent build process:
   void'(uvm_config_db#(uvm_active_passive_enum)::get(this, "", "is_active", is_active));

So for my understanding this is a BUG inside of the documentation can someone confirm this?



Link to comment
Share on other sites

Did you hide the uvm_agent::is_active variable with your own implementation version? The is_agent in uvm_agent is explicitly loaded by get_config_int.

If you had a new variable, You could also implicitly load your new variable by putting it into a `uvm_component_util_begin which would also expect set_config_int.

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.

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