Academic Program

Cache Policy Comparison Chart

Cache Policy Comparison Chart

The following table summarizes some of the pros and cons of each cache policy. The default cache policy for the PIC32MZ family, as is present in the start-up code supplied in the development tools, is write-back with write allocation.

 

Policy Pros Cons
Uncached No cache coherency issues. Greatly impaired performance since every memory access must account for bus transfer time and memory wait states.
Write-back with write allocation Best performance is achieved with this policy. All transactions are done using the cache with memory accesses performed only when needed. The application must address coherency on both reads and writes to memory
Write-through with no write allocation Cache coherency issues are eliminated for writes as memory is always updated. Results in the CPU taking a larger percentage of the memory bus bandwidth since every CPU write results in a bus transaction. Even back to back writes are written to memory. Cache coherency for CPU reads must still be addressed.
Write-through with Write Allocation Cache coherency issues are eliminated for writes as memory is always updated. Writes to memory also fill cache so the data written is immediately available for a CPU read. Results in the CPU taking a larger percentage of the memory bus bandwidth since every CPU write results in a bus transaction. Even back to back writes are written to memory. Cache coherency for CPU reads must still be addressed. Writes to memory also fill the cache which can result in needed data being evicted from the cache.