
Instruction Cache
MCF5253 Reference Manual, Rev. 1
Freescale Semiconductor
5-3
5.4.2
Memory Reference Attributes
For every memory reference the ColdFire core or the debug module generates, a set of “effective
attributes” is determined based on the address and the Access Control Registers (ACR0, ACR1). This set
of attributes includes the cacheable/noncacheable definition, the precise/imprecise handling of operand
write, and the write-protect capability.
In particular, each address is compared to the values programmed in the Access Control Registers (ACR).
If the address matches one of the ACR values, the access attributes from that ACR are applied to the
reference. If the address does not match either ACR, then the default value defined in the Cache Control
Register (CACR) is used. The specific algorithm is as follows:
if (address = ACR0_address including mask)
Effective Attributes = ACR0 attributes
else if (address = ACR1_address including mask)
Effective Attributes = ACR1 attributes
else Effective Attributes = CACR default attributes
5.4.3
Cache Coherency and Invalidation
The instruction cache does not monitor ColdFire core data references for accesses to cached instructions.
Therefore, software must maintain cache coherency by invalidating the appropriate cache entries after
modifying code segments.
The cache invalidation can be performed in two ways. The assertion of bit 24 in the CACR forces the entire
instruction cache to be marked as invalid. The invalidation operation requires 512 cycles because the cache
sequences through the entire tag array, clearing a single location each cycle. Any subsequent instruction
fetch accesses are postponed until the invalidation sequence is complete.
The privileged CPUSHL instruction can invalidate a single cache line. When this instruction is executed,
the cache entry defined by bits[12:4] of the source address register is invalidated, provided bit 28 of the
CACR is cleared.
These invalidation operations can be initiated from the ColdFire core or the debug module.
5.4.4
Reset
A hardware reset clears the CACR disabling the instruction cache. The contents of the tag array are not
affected by the reset. Accordingly, the system startup code must explicitly perform a cache invalidation by
setting CACR[24] before the cache can be enabled.
5.4.5
Cache Miss Fetch Algorithm/Line Fills
As detailed in
Section 5.1, “Instruction Cache Features,”
the instruction cache hardware includes a 16-byte
line fill buffer for providing temporary storage for the last fetched instruction.
With the cache enabled as defined by CACR[31], a cacheable instruction fetch that misses in both the tag
memory and the line-fill buffer generates a external fetch. The size of the external fetch is determined by
Summary of Contents for MCF5253
Page 1: ...Document Number MCF5253RM Rev 1 08 2008 MCF5253 Reference Manual...
Page 26: ...MCF5253 Reference Manual Rev 1 xxvi Freescale Semiconductor...
Page 32: ...MCF5253 Reference Manual Rev 1 xxxii Freescale Semiconductor...
Page 46: ...MCF5253 Introduction MCF5253 Reference Manual Rev 1 1 14 Freescale Semiconductor...
Page 62: ...Signal Description MCF5253 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Page 98: ...Instruction Cache MCF5253 Reference Manual Rev 1 5 10 Freescale Semiconductor...
Page 104: ...Static RAM SRAM MCF5253 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Page 128: ...Synchronous DRAM Controller Module MCF5253 Reference Manual Rev 1 7 24 Freescale Semiconductor...
Page 144: ...Bus Operation MCF5253 Reference Manual Rev 1 8 16 Freescale Semiconductor...
Page 176: ...System Integration Module SIM MCF5253 Reference Manual Rev 1 9 32 Freescale Semiconductor...
Page 198: ...Analog to Digital Converter ADC MCF5253 Reference Manual Rev 1 12 6 Freescale Semiconductor...
Page 246: ...DMA Controller MCF5253 Reference Manual Rev 1 14 18 Freescale Semiconductor...
Page 282: ...UART Modules MCF5253 Reference Manual Rev 1 15 36 Freescale Semiconductor...
Page 344: ...Audio Interface Module AIM MCF5253 Reference Manual Rev 1 17 46 Freescale Semiconductor...
Page 362: ...I2 C Modules MCF5253 Reference Manual Rev 1 18 18 Freescale Semiconductor...
Page 370: ...Boot ROM MCF5253 Reference Manual Rev 1 19 8 Freescale Semiconductor...