How can we verify a memory whose address location is swapped

In reply to RonakShah:

I agree with that, it goes along with the first test scenario that I suggested: you need to find out the hierarchical path of the RTL memory array and use it in your testcase. Whether to preload defined data using $readmemh, or to check on already written data by an if statement in your SV testcase. Ex:

if (Design.Memarray[20] != 'h20) $error();