Jump to content

UVM reg model access policy of registers

Recommended Posts

A register doesn't have an access policy per se. It can have a certain level of access rights inside an address map. To get this, you have to use the get_reg_map_info(...) method of uvm_reg_map. Be aware that this method isn't part of the standard (the reference guide), but it is public inside the class (if you care about such things).


Here's a snippet (not tested):

uvm_reg_map_info info = my_map.get_reg_map_info(my_reg);
$display("Access rights for my_reg in my_map are ", info.rights);
Link to comment
Share on other sites



registers are rather "dumb" containers of register fields and there might not be a single access policy for a register. fields (uvm_reg_fields) carry most of the functionality in UVM_REG. in order to learn the access policy of the field you can query via somefield.get_access(map). since the effective access policy depends upon the uvm_reg_map used for a potential access you may pass the relevant map into the function as well.



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