10.5 Prefetch Behavior
The prefetch module complements an L1 CPU (CMCC) cache rather than replacing it. Four 128-bit (16-byte) lines hold instructions, two 128-bit (16-byte) lines hold CPU data and two 128-bit (16-byte) lines hold peripheral data from the PFM. The prefetch module uses the Wait state’s value from the PFMWS[3:0] bits (CHECON[3:0]) and Address Wait state ADRWS bit (CHECON[8]) to determine how long it must wait for Flash access when it reads instructions or data from the PFM.
If the instructions or data already reside in the prefetch module line, the prefetch module returns the instruction or data in ‘0
’ Wait states. For CPU instructions, if predictive prefetch is enabled and the code is 100% linear, the prefetch module provides instructions back to the CPU with the Wait states only on the first instruction of the prefetch module line.
If the CPU accesses uncacheable addresses, it bypasses the cache. During the bypass, the prefetch module accesses the PFM for every instruction, incurring an address setup time defined by ADRWS and a Flash access time as defined by PFMWS bits. Therefore, the total Flash wait states is a sum of ADRWS and PFMWS. The Bypass mode is also forced for a cache if its associated I/D/A CHEEN bit (CHECON) is zero.
To allow caching for I and/or D caches, set the I and/or D *CHEEN bit to ‘1
’. To enable a cache, set the ACHEEN bit to ‘1
’.