
8-40
ColdFire CF4e Core User’s Manual
For More Information On This Product,
Go to: www.freescale.com
Cache Overview
In determining whether a memory location is cacheable or cache-inhibited, the CPU checks
memory-control registers in the following order:
1. RAMBARs
2. ROMBARs
3. ACR0 and ACR2
4. ACR1 and ACR3
5. If an access does not hit in the RAMBARs, ROMBARs, or the ACRs, the default is
provided for all accesses in CACR.
Cache-inhibited write accesses bypass the cache and a corresponding external write is
performed. Cache-inhibited reads bypass the cache and are performed on the external bus,
except when all of the following conditions are true:
The cache-inhibited fill-buffer bit, CACR[DNFB], is set.
The access is an instruction read.
The access is normal (that is, TT = 0).
In this case, a fetched line is stored in the fill buffer and remains valid there; the cache can
service additional read accesses from this buffer until another fill occurs or a
cache-invalidate-all operation occurs.
If ACR
n
[CM] indicates cache-inhibited mode, precise or imprecise, the controller bypasses
the cache and performs an external transfer. If a line in the cache matches the address and
the mode is cache-inhibited, the cache does not automatically push the line if it is modified,
nor does it invalidate the line if it is valid. Before switching cache mode, execute a
CPUSHL instruction or set CACR[DCINVA,ICINVA] to invalidate the entire cache.
If ACR
n
[CM] indicates precise mode, the sequence of read and write accesses to the region
is guaranteed to match the instruction sequence. In imprecise mode, the processor core
allows read accesses that hit in the cache to occur before completion of a pending write
from a previous instruction. Writes are not deferred past data-read accesses that miss the
cache (that is, that must be read from the bus).
Precise operation forces data-read accesses for an instruction to occur only once by
preventing the instruction from being interrupted after data is fetched. Otherwise, if the
processor is not in precise mode, an exception aborts the instruction and the data may be
accessed again when the instruction is restarted. These guarantees apply only when
ACR
n
[CM] indicates precise mode and aligned accesses.
CPU space-register accesses, such as MOVEC, are treated as cache-inhibited and precise.
8.7.6 Cache Protocol
The following sections describe the cache protocol for processor accesses and assumes that
the data is cacheable (that is, write-through or copyback). Note that the discussion of write
operations applies to the data cache only.
F
Freescale Semiconductor, Inc.
n
.