Jump to content

Recommended Posts

I'm trying to declare a memory like this:

class some_mem extends uvm_mem;
  function new(string name = "some_mem");
    super.new(name, 2 ** 24, 8, "RO");
  endfunction
endfunction

Later on, I'm trying to add this memory to an address map that was created like this:

default_map = create_map("some_map", 0, 4, UVM_NO_ENDIAN);

By using the default value for the byte_addressing argument I want each address to represent a one byte location. The problem I'm seeing is that the uvm_reg_map_info associated with this memory shows an end address of 32'03ff_ffff and a stride of 4, instead of 32'00ff_ffff and a stride of 1. I've narrowed it down to the function uvm_reg_map::get_physical_address(...), at line 1378 of uvm_reg_map.svh:

int multiplier = m_byte_addressing ? bus_width : 1;

I guess this should be the other way around:

int multiplier = m_byte_addressing ? 1: bus_width;

Even better would be to use:

int multiplier = get_addr_unit_bytes();
Link to post
Share on other sites
  • 2 weeks later...
  • 7 months later...

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