
4-12
MCF5272 User’s Manual
MOTOROLA
Instruction Cache Overview
When an external fetch is initiated and data is loaded into the line-ll buffer, the instruction
cache maintains a special most-recently-used indicator that tracks the contents of the ll
buffer versus its corresponding cache location. At the time of the miss, the hardware
indicator is set, marking the ll buffer as most recently used. If a subsequent access occurs
to the cache location dened by bits 9–4 of the ll buffer address, the data in the cache
memory array is now most-recently used, so the hardware indicator is cleared. In all cases,
the indicator denes whether the contents of the line-ll buffer or the cache memory data
array are most recently used. If the entire line is present at the time of the next cache miss,
the line-ll buffer contents are written into the cache memory array and the ll buffer data
is still most recently used compared to the cache memory array.
The ll buffer can also be used as temporary storage for line-sized bursts of non-cacheable
references under control of CACR[CEIB]. With this bit set, a noncacheable instruction
fetch is processed as dened by
Table 4-6. For this condition, the ll buffer is loaded and
subsequent references can hit in the buffer, but the data is never loaded into the cache
memory array.
Table 4-6 shows the relationship between CENB, CEIB, and the type of instruction fetch.
4.5.3 Instruction Cache Programming Model
Three supervisor registers dene the operation of the instruction cache and local bus
controller: the cache control register (CACR) and two access control registers (ACR0,
ACR1).
Table 4-7 shows the memory map of the CACR and ACRs. These registers have the
following characteristics:
The CACR and ACRs can be accessed only in supervisor mode using the MOVEC
instruction with an Rc value of 0x002 (CACR), 0x004 (ACR0), and 0x005 (ACR1).
Addresses not assigned to the registers and undened register bits are reserved for
future expansion. Write accesses to these reserved address spaces and reserved
register bits have no effect; read accesses return zeros.
Table 4-6. Instruction Cache Operation as Defined by CACR[CENB,CEIB]
CACR[CENB,CEIB]
Type of Fetch
Description
00
N/A
Instruction cache and line-ll buffer are disabled; fetches are word or
longword in size.
01
N/A
Instruction cache is disabled but because the line-ll buffer is enabled,
CACR[CLNF] denes fetch size and instructions can be bursted into the
line-ll buffer.
1X
Cacheable
Cache is enabled; CACR[CLNF] denes fetch size and line-ll buffer contents
can be written into the cache memory array.
10
Noncacheable
Cache is enabled but the linell buffer is disabled; fetches are either word or
longword and are not loaded into the line-ll buffer.
11
Noncacheable
Cache and line buffer are enabled; CACR[CLNF] denes fetch size; fetches
are loaded into the line-ll buffer but never into the cache memory array.