Confusion regarding create_map() of uvm_reg_block

Hi ,

I was going through UVM Cookbook :: Register Blocks



function uvm_reg_map create_map(string name, // Name of the map handle
uvm_reg_addr_t base_addr,// base address
int unsigned n_bytes,    // access width in bytes
uvm_endianness_e endian, // endianess of the map
bit byte_addressing=1);

 
" The byte_addressing argument affects how the address is incremented in these consecutive accesses. For example, if
  n_bytes=4 and byte_addressing=0, then an access to a register that is 64-bits wide and at offset 0 will result in two
  bus accesses at addresses 0 and 1. With byte_addressing=1, that same access will result in two bus accesses at
  addresses 0 and 4. "


My confusion is

(1) If n_bytes = 4 and byte_addressing is 0 , then to access register of 64-bits shouldn’t the bus access occur at address 0 and 4 ?

(2) If n_bytes = 4 and byte_addressing is 1 , then shouldn’t access to register of 64 bits occur at addresses 0 and 1 ?

In reply to MICRO_91:

No, it’s correct, when the byte_addressing is 1, it aligns the address to 4B. Thus the 2nd access should be to 4, 3rd access will be to 8, and so on.

byte_addressing specifies whether the address increment is on a per-byte basis. For example, consecutive memory locations with ~n_bytes~=4 (32-bit bus) are 4 apart: 0, 4, 8, and so on. Default is TRUE. [source]