Jump to content

handle to uvm_component in uvm_object


Recommended Posts

Hi,

 

Is there a way to avoid the "complex type usage" error when needing to feed a uvm_object a handle to an uvm_component?

What I need to do is access within a sequence a method of one component in the environment.

uvm_component:

@build_phase
uvm_config_db#(comp_type)::set(this, "*", comp_handle_name", this)


uvm_sequence:

@body:
comp_type comp_inst;
 uvm_config_db #(comp_type)::get(this, "*", "comp_handle_name", comp_inst)

 comp_inst.my_method();
 
Link to comment
Share on other sites

You could use uvm_root in the 'set' and 'get' methods for the context argument.  You could also use uvm_root or uvm_top in the set method and use m_sequencer as the context to get the handle.  Also, the handle to the component could be placed in the configuration object that is scoped to m_sequencer.  

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