Jump to content

problem about uvm_config_db


Recommended Posts

Sure, Instead of using this for the context of the uvm_config_db#()::set(this,...), you can use null, uvm_root::get(), or use find() to get a higher level context. As long as the get() call is in a later phase than the set() call, this should work.

 

Hi dave,

Thanks for your reply. I have other two questions:

1. If it is workable as you saying, then how can i use find() to get a higher level context?

2. I think uvm_config_db#()::set() and uvm_config_db#()::get() are static functions. If i want to use them to pass uvm_event type, can it work when the context where the uvm_config_db#()::get() is receives one triggered uvm_event object in the run time?

Link to comment
Share on other sites

uvm_config_db is just a typed key-value store. the key is made from (context,path,field). context is a reference to a uvm_component (any method will do (this,null, find_component(),get_parent(),get_parent_sequencer() but also just a path like my_parent.some_subcomponent.somesubsubcomponent).

 

you can share the handle to a uvm_event via the config db. everyone would see the same uvm_event object and therefore any event raised in there would be visible in all other places.

 

/uwe 

Link to comment
Share on other sites

uvm_config_db is just a typed key-value store. the key is made from (context,path,field). context is a reference to a uvm_component (any method will do (this,null, find_component(),get_parent(),get_parent_sequencer() but also just a path like my_parent.some_subcomponent.somesubsubcomponent).

 

you can share the handle to a uvm_event via the config db. everyone would see the same uvm_event object and therefore any event raised in there would be visible in all other places.

 

/uwe 

 

Hi uwe,

Thanks for your reply, I will have a try. I have two questions to ask you.

1. Can it use uvm_config_db#()::set() or uvm_config_db#()::get() in uvm_object?

2. How can i check or debug the uvm_config_db mechanism if it doesn't work correctly?

Thanks in advance!

Link to comment
Share on other sites

Hi uwe,

Thanks for your reply, I will have a try. I have two questions to ask you.

1. Can it use uvm_config_db#()::set() or uvm_config_db#()::get() in uvm_object?

2. How can i check or debug the uvm_config_db mechanism if it doesn't work correctly?

Thanks in advance!

 

#1 you can use a static call anywhere (in contrast non-static calls have to be invoked on an object)

#2 you can enable read/write trace and audit, you can dump the whole database, you can trace via +UVM_CONFIG_DB_TRACE, you can find written-but-not-read data in the config-db. all of this should help to figure out where the issue is (mismatching key issues, mismatching type issues, ordering/prio/precedence issue)

Link to comment
Share on other sites

#1 you can use a static call anywhere (in contrast non-static calls have to be invoked on an object)

#2 you can enable read/write trace and audit, you can dump the whole database, you can trace via +UVM_CONFIG_DB_TRACE, you can find written-but-not-read data in the config-db. all of this should help to figure out where the issue is (mismatching key issues, mismatching type issues, ordering/prio/precedence issue)

 

Hi uwes,

Thanks very much. I will have a try.

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