Cache Policy Comparison Chart

The following table summarizes some of the pros and cons for 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. 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 cache.
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.