Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

How to pass down configuration objects to non-uvm_component objects like uvm_transaction?

$
0
0

Passing down config objects from top level ENV thru uvm_config_db is pretty straight-forward and the scoping helps all the lower components to get the right config object from uvm_config_db. However, I have objects that are of uvm_transaction nature. They also need a copy of my config object. These objects are dynamic ones unlike uvm_component objects. They are created and given some string names that do not usually contain a hierarchical path like uvm_components do (when you do a get_full_name on them).

Also, I have multiple ENV's that use the same config class but different instances of the config class are created for each ENV. The lower components of these ENV's create these uvm_transaction based objects but they give them the same string name.

How do I make sure these uvm_transaction based objects get the correct config object from the uvm_config_db? What is the general recommended methodology for passing config objects to non-uvm_component objects?

 

So far this is what I've come up with: Prefix the string name of the uvm_transaction based objects with get_full_name of the component that creates it:

this.cd = command_descriptor::type_id::create({get_full_name(), ".cd"});

This way, these objects will be able to get the correct instance of the config object just like any components of uvm_component nature does.

But I am facing resistance from my team that this is too much overhead due to long string names for these objects.

 


Viewing all articles
Browse latest Browse all 756

Trending Articles