Jump to content

Difference between configure and add_hdl_path() methods

Recommended Posts

Hi there


What is the difference between using uvm_reg_block::configure() method and uvm_reg_block::add_hdl_path() methods?


These two methods seem to perform the same function with different inputs.

ie., They both try to add prefix to the backdoor hdl_path to a UVM_REG_BLOCK.


My requirement:


A register block has been defined as follows:

class BLOCK extends UVM_REG_BLOCK; (1st level inheritance)



class SAMPLE_BLOCK extends BLOCK;




SAMPLE_BLOCK has 2nd level inheritance with UVM_REG_BLOCK.

I wanted to reprogram SAMPLE_BLOCK at different levels of verification hierarchy.



SAMPLE_BLOCK instance may be present at "top.abc" in block level verification.

SAMPLE_BLOCK has been reused at "top.xxx.abc" in Larger IP level verification.

SAMPLE_BLOCK has been reused at "top.yyy.xxx.abc" in Device or Top level verification.


Please note that at each higher level hierarchy, new prefix gets added to the hdlpath. ie., 'xxx' gets prefixed in Larger IP level verification and 'yyy' gets prefixed in Device level verification.

When I use the add_hdl_path() method, the hdlpath gets linked hierarchically.


When I use the configure() method on SAMPLE_BLOCK, the hdlpath doesnot get linked hierarchically.

Am I missing something here? What's wrong here?

Could this be a bug in UVM_REG?


Best regards

Balasubramanian G

Link to comment
Share on other sites

  • 1 month later...

Hi Balasubramanian,


 I think you need to give a full hdl path of your block and separate it with configure() and add_hdl_path(). These two functions all add hdl path to the reg block.


 add_hdl_path() can append hdl_path at the current path, while configure should be called in different files like top level env files.


 Hope this can help you.




Link to comment
Share on other sites



Thanks for your reply.


My idea is to append newer paths at higher levels of reuse hierarchy. Somehow, configure() does not allow me to prepend() hdlpaths. As per my testing, add_hdl_path() method seems to work in same as well as different hierarchy. (I don't know what is the correct way to implement this)

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