When neither cache maintenance, through the Optimized ACE ports, nor Control interface are available, cache lines can still be evicted but with less control and more overhead. This eviction is achieved by reading enough dummy data to ensure that an address is evicted from any of the Cache Lines in a Set that the address can be mapped to. The amount of dummy data that needs to be read equals the set associativity that is implemented.
Preferably the dummy data should be located a multiple of the System Cache core
cache size away from the memory region that needs to be cleared. From this point the
dummy reads should be performed with a distance of the system cache size (
C_CACHE_SIZE) divided by number of sets association
C_NUM_WAYS). This has to be repeated for each
cache line that is covered by the memory region that should be cleared.
For large memory regions it is probably easiest to read data in a system cache
sized memory region with a step size of the system cache line length in bytes (
4 * C_CACHE_LINE_LENGTH). As this method is equivalent to a
flush cache maintenance operation it has to be performed before another master updates
the memory locations in question, otherwise old dirty data could potentially overwrite
the new data as cache lines are evicted.