![Freescale Semiconductor MCF54455 Скачать руководство пользователя страница 165](http://html1.mh-extra.com/html/freescale-semiconductor/mcf54455/mcf54455_reference-manual_2330541165.webp)
Cache
6-20
Freescale Semiconductor
cmpi.l
#4,d0
;flushed all the ways?
bne
setloop
rts
The following CACR loads assume: the instruction cache has been invalidated, the default instruction
cache mode is cacheable, the default data cache mode is copyback.
dataCacheLoadAndLock:
move.l
#0xa3080800,d0
; enable and invalidate data cache ...
movec
d0,cacr
; ... in the CACR
The following code segments preload half of the data cache (8 Kbytes). It assumes a contiguous block of
data is to be mapped into the data cache, starting at a 0-modulo-8K address.
move.l
#512,d0
; 512 16-byte lines in 8K space
lea
data_,a0
; load pointer defining data area
dataCacheLoop:
tst.b
(a0)
; touch lo load into data cache
lea
16(a0),a0
; increment address to next line
subq.l
#1,d0
; decrement loop counter
bne.b
dataCacheLoop
; if done, then exit, else continue
; A 8K region has been loaded into ways 0 and 1 of the 16K data cache. lock it!
move.l
#0xaa088000,d0
; set the data cache lock bit ...
movec
d0,cacr
; ... in the CACR
rts
align
16
The following CACR loads assume the data cache has been previously invalidated, the default instruction
cache mode is cacheable, and the default operand cache mode is copyback.
This function must be mapped into a cache-inhibited or SRAM space or these text lines are to be
prefetched into the instruction cache. This may displace some of the 8-Kbyte space being explicitly
fetched.
instructionCacheLoadAndLock:
move.l
#0xa2088100,d0
; enable and invalidate the instruction
movec
d0,cacr
; cache in the CACR
The following code segments preload half of the instruction cache (8 Kbytes). It assumes a contiguous
block of data is to be mapped into the cache, starting at a 0-modulo-8K address
move.l
#512,d0
; 512 16-byte lines in 8K space
lea
code_,a0
; load pointer defining code area
instCacheLoop:
intouch (a0)
; touch lo load into instruction cache
; Note in the assembler we use, there is no INTOUCH opcode. The following
; is used to produce the required binary representation
cpushl
#nc,(a0)
;touch lo load into
;instruction cache
lea
16(a0),a0
;increment address to next line
subq.l
#1,d0
;decrement loop counter
bne.b
instCacheLoop
;if done, then exit, else continue
; A 8K region was loaded into levels 0 and 1 of the 16-Kbyte instruction cache. lock it!
move.l
#0xa2088800,d0
;set the instruction cache lock bit
Содержание MCF54455
Страница 33: ...xxviii Freescale Semiconductor ...
Страница 67: ...Freescale Semiconductor 1 ...
Страница 125: ...Freescale Semiconductor 1 ...
Страница 145: ...Enhanced Multiply Accumulate Unit EMAC 5 21 Freescale Semiconductor ...
Страница 173: ...Cache 6 28 Freescale Semiconductor ...
Страница 179: ...Static RAM SRAM 7 6 Freescale Semiconductor ...
Страница 207: ...Power Management 9 16 Freescale Semiconductor ...
Страница 323: ...Reset Controller Module 13 8 Freescale Semiconductor ...
Страница 389: ...Pin Multiplexing and Control 16 44 Freescale Semiconductor ...
Страница 575: ...PCI Bus Controller 22 58 Freescale Semiconductor ...
Страница 600: ...Advanced Technology Attachment ATA Freescale Semiconductor 23 25 ...
Страница 601: ...Freescale Semiconductor 1 ...
Страница 842: ...I2 C Interface Freescale Semiconductor 33 16 ...
Страница 843: ...Freescale Semiconductor 1 ...
Страница 921: ...Revision History A 6 Freescale Semiconductor ...