Jump to content
Sign in to follow this  
balasubramanian.g@pmcs.com

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)

...

end

class SAMPLE_BLOCK extends BLOCK;

...

end

 

SAMPLE_BLOCK has 2nd level inheritance with UVM_REG_BLOCK.

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

Example:

 

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

Share this post


Link to post
Share on other sites

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.

 

Regards,

Euphemia

Share this post


Link to post
Share on other sites

Euphemia,

 

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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×