Functions create_map() and add_reg() usage in UVM register model

The following prototype is picked directly from the cookbook(UVM register model). I don’t understand “byte_addressing” usage ?


//
// Prototype for the create_map method
//
function uvm_reg_map create_map(string name, // Name of the map handle
uvm_reg_addr_t base_addr, // The maps base address
int unsigned n_bytes, // Map access width in bytes
uvm_endianness_e endian, // The endianess of the map
bit byte_addressing=1); // Whether byte_addressing is supported
//
// Example:
//
AHB_map = create_map("AHB_map", 'h0, 4, UVM_LITTLE_ENDIAN);

Also I need to know how the argument value(offset) should be incremented,if my work includes includes a simple register file with all regs 8-bit wide and their address is incremented by 1 (i.e. 0x1,0x2, …) ?
I think I may use 8’b01,8’b02 … and so on in my case


function void add_reg (uvm_reg rg, // Register object handle
	uvm_reg_addr_t offset, // Register address offset
	string rights = "RW", // Register access policy
	bit unmapped=0, // If true, register does not appear in the address map
			// and a frontdoor access needs to be defined
	uvm_reg_frontdoor frontdoor=null);// Handle to register frontdoor access object

Thanks in advance

In reply to Mustafa:

Also in the add_reg() function, what register access policy should I use for (string rights) if the register contains fields with different access policies ?

Thanks in advance

byte_addressing specifies whether consecutive addresses refer are 1 byte apart (TRUE) or n_bytes apart (FALSE). Default is TRUE. means addressing to registers with any width will be consecutive if we set that field to 0 or if it is 1, it will keep addressing every byte consecutively irrespective of register width.

byte_addressing specifies whether consecutive addresses refer are 1 byte apart (TRUE) or n_bytes apart (FALSE). Default is TRUE. means addressing to registers with any width will be consecutive if we set that field to 0 or if it is 1, it will keep addressing every byte consecutively irrespective of register width.