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 specied memory regions. Registers are accessed with the MOVEC instruction with the
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 specic cache push/invalidate instructions.
This implementation allows maximum use of available cache memory and provides the exibility
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 nished, at which point, this bit is
automatically cleared. In copyback mode, the cache should be ushed using a CPUSHL
instruction before setting this bit.
23–11
—
Reserved, should be cleared.
10
DNFB
Default noncacheable ll buffer. Determines if the ll 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 ll buffer is used only for normal (TT = 0)
instruction reads of a noncacheable region. Instructions are loaded into the ll buffer by a burst
access (same as a line ll). 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 ll buffer, instructions remain valid in the ll buffer until a
cache-invalidate-all instruction, another cache-inhibited burst, or a miss that initiates a ll. A write
to the line in the ll buffer goes to the external bus without updating or invalidating the buffer.
Subsequent reads of that written data are serviced by the ll 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
7–6
—
Reserved, should be cleared.
5
DW
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
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.