Backdoor_read_func for memory

Hi all,

I have a memory which has 128 rows, each containing 128 bits. I’m trying to read it by using the backdoor_read_func function. The problem is that it can only read 64 bits max each time, and only the first bits. The offset defined for each of the readings is the row number of the memory.
I’m using the following code:


        uvm_reg_item rw;
	for(int j=0 ;j<2;j++)begin
		
		rw = uvm_reg_item::type_id::create("rw");
		
		rw.value = new [1];
		rw.offset = (32*(entry_index+counter)+(SRAM_BASE_ADDRESS_BYTES*msg.msg_queue_num))/16 +j ;
		rw.status = cfg.hwsw_mem.backdoor_read_func(rw);
        end

In the code, I try to read 2 rows (j index) given the offset of the first row. After printing the results, I can see only the first 32 bits of each of the rows I tried to read.
rw.value is a 64 bit dynamic array and defined in the uvm_reg_item class. backdoor_read_func is adding the size of the dynamic array to the offset, thus enlarging it (therefore I read only the first bits of each row)
Any suggestions what can I do in order to read the entire 128 bits properly?

In reply to Mark_c:

In addition, how can I re-define UVM_REG_DATA_WIDTH? it is currently defined to be 64 bits. I’d like to change it to be 128 bits.