Memory partition and frontdoor Write and read from random locations

Hi,

I want to test the memory via UVM_RAL frontdoor (write-read),

While write and read from each location in total memory taking too much time to do,
so i want to break the memory into 4 parts.
let’s say i have memory of depth 100 if i divide it by 4 it will be like (0-24, 25-49, 50-74, 75-99).
And i want to perform write and read in random 4 locations in above 4 ranges each.

Can you suggest me how to do it ?

It will be help full if you understand me with coding snippet.

Thanks.

In reply to balu_vinod:

Hi, try to set a different base address for each instance of your RAL, you want to split them into four pieces right? so…

Build just one RAL with size of 1/4 of your memory.

Into your connect_phase:



  ral_inst0.default_map.set_base_addr(BASE_ADDR0);
  ral_inst1.default_map.set_base_addr(BASE_ADDR1);
  ral_inst2.default_map.set_base_addr(BASE_ADDR2);
  ral_inst3.default_map.set_base_addr(BASE_ADDR3);


Maybe have some clever way to solve that but I cannot think in some better right now.