How can we verify a memory whose address location is swapped

In reply to debashis_paul:

I can think of an inefficient method of doing this - but please let me know your thoughts/suggestions.

If there is an address decoding problem, lets say there are 10 locations, we can write all 0s to 9 locations and a known pattern to one location,0x20(at a time). Then, when we do a read of all locations, if there is address swap, then 0x40/any other addr will read the value that we wrote instead of showing 0s.

Will this work? But this means that we have to iterate through every address.

Thanks