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:
for(int j=0 ;j<2;j++)begin
rw = uvm_reg_item::type_id::create("rw");
rw.value = new ;
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);
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?