Datasheet
4-22 MCF5307 User’s Manual
Cache Registers
4.10.2 Access Control Registers (ACR0–ACR1)
The ACRs, Figure 4-9, assign control attributes, such as cache mode and write protection,
to specified memory regions. Registers are accessed with the MOVEC instruction with the
Rc encodings in Figure 4-9.
For overlapping regions, ACR0 takes priority. Data transfers to and from these registers are
longword transfers. Bits 12–7, 4, 3, 1, and 0 are always read as zeros.
27 HLCK Half-cache lock mode
0 Normal operation. The cache allocates the lowest invalid way. If all ways are valid, the cache
allocates the way pointed at by the counter and then increments this counter modulo-4.
1 Half-cache operation. The cache allocates to the lower invalid way of levels 2 and 3; if both are
valid, the cache allocates to way 2 if the high-order bit of the round-robin counter is zero;
otherwise, it allocates way 3 and increments the round-robin counter modulo-2. This locks the
content of ways 0 and 1. Ways 0 and 1 are still updated on write hits and may be pushed or
cleared by specific cache push/invalidate instructions.
This implementation allows maximum use of available cache memory and provides the flexibility
of setting HLCK before, during, or after allocations occur.
26–25 — Reserved, should be cleared.
24 CINVA Cache invalidate all. Writing a 1 to this bit initiates entire cache invalidation. Once invalidation is
complete, this bit automatically returns to 0; it is not necessary to clear it explicitly. Note the
caches are not cleared on power-up or normal reset, as shown in Figure 4-4.
0 No invalidation is performed.
1 Initiate invalidation of the entire cache. The cache controller sequentially clears V and M bits in
all sets. Subsequent accesses stall until the invalidation is finished, at which point, this bit is
automatically cleared. In copyback mode, the cache should be flushed using a CPUSHL
instruction before setting this bit.
23–11 — Reserved, should be cleared.
10 DNFB Default noncacheable fill buffer. Determines if the fill buffer can store noncacheable accesses
0 Fill buffer not used to store noncacheable instruction accesses (16 or 32 bits).
1 Fill buffer used to store noncacheable accesses. The fill buffer is used only for normal (TT = 0)
instruction reads of a noncacheable region. Instructions are loaded into the fill buffer by a burst
access (same as a line fill). They stay in the buffer until they are displaced, so subsequent
accesses may not appear on the external bus.
Note that this feature can cause a coherency problem for self-modifying code. If DNFB = 1 and a
cache-inhibited access uses the fill buffer, instructions remain valid in the fill buffer until a
cache-invalidate-all instruction, another cache-inhibited burst, or a miss that initiates a fill. A write
to the line in the fill buffer goes to the external bus without updating or invalidating the buffer.
Subsequent reads of that written data are serviced by the fill buffer and receive stale information.
9–8 DCM Default cache mode. Selects the default cache mode and access precision as follows:
00 Cacheable, write-through
01 Cacheable, copy-back
10 Cache-inhibited, precise exception model
11 Cache-inhibited, imprecise exception model. Precise and imprecise modes are described in
Section 4.9.2, “Cache-Inhibited Accesses.”
7–6 — Reserved, should be cleared.
5 DW Default write protect. Use of this bit is described in Section 4.9.1, “Caching Modes.”
0 Read and write accesses permitted
1 Write accesses not permitted
4–0 — Reserved, should be cleared.
Table 4-4. CACR Field Descriptions (Continued)
Bits Name Description
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
