Jump to content

(Bug?) uvm_reg_map get_size method ignores the n_bytes attribute


Recommended Posts

In the uvm_reg_map get_size method, the output comes from last known register's address. At the end of the method, the return value is:
 

 return max_addr + 1;

https://github.com/accellera-official/uvm-core/blob/b5f8562d8bee8ea11b06fc2692ed2ba0b5b7eeb7/src/reg/uvm_reg_map.svh#L1324C4-L1324C23

Instead, the function should return:
 

return max_addr + n_bytes;

Which would return the right value.
I've created a playground to demonstrate it:
https://www.edaplayground.com/x/mhic

I have 3 64b registers in the map. I expect the get_size method to return 'd24, because the total map occupies 24 bytes. Instead it returns 'd1

 

UVM_INFO testbench.sv(69) @ 0: uvm_test_top [uvm_test_top] Size of reg map is 17

 

I wasn't sure how to file a bug on UVM, so here I am. 

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