Datasheet 搜索 > 微处理器 > NXP(恩智浦) > MPC8349EVVAGDB 数据手册 > MPC8349EVVAGDB 产品描述及参数 5/12 页

¥ 1158.94
MPC8349EVVAGDB 产品描述及参数 - NXP(恩智浦)
制造商:
NXP(恩智浦)
分类:
微处理器
封装:
TBGA-672
描述:
PowerPC系列 400MHz
Pictures:
3D模型
符号图
焊盘图
引脚图
产品图
MPC8349EVVAGDB数据手册
Page:
of 12 Go
若手册格式错乱,请下载阅览PDF原文件

Instruction and Data Cache Locking on the e300 Processor Core, Rev. 1
Freescale Semiconductor 5
Load the Caches
5.2 Data Cache
If a non-empty data cache contains modified data that cannot be discarded, the data cache must be flushed
before it can be invalidated. To flush the data cache, fill the data cache with known data and then flush this
data with a series of dcbf
1
instructions. The following code sequence shows how to flush the data cache:
# r6 contains a block-aligned address in memory with which to fill
# the data cache. For this example, address 0x0 is used
li r6, 0x0
# CTR = number of data blocks to load
# Number of blocks = (32K) / (32 Bytes/block)
# = 2^15 / 2^5 = 2^10 = 0x400
li r1, 0x400
mtctr r1
# Save the total number of blocks in cache to r8
mr r8, r1
# Load the entire cache with known data
loop: lwz r2, 0(r6)
addi r6, r6, 32 # Find the next block
bdnz loop # Decrement the counter, and
# branch if CTR != 0
# Now, flush the cache with dcbf instructions
li r6, 0x0 # Address of first block
mtctr r8 # Number of blocks
loop2: dcbf r0, r6
addi r6, r6, 32 # Find the next block
bdnz loop2 # Decrement the counter, and
# branch if CTR != 0
If the contents of the data cache do not need to be flushed to memory, the cache can be directly invalidated.
The entire data cache is invalidated through the data cache invalidate bit HIDO[DCFI], bit 21. Setting
HID0[DCFI] and then immediately clearing it causes the entire instruction cache to be invalidated. The
following assembly code invalidates the entire data cache (does not flush modified entries):
# Set and then clear the HID0[DCFI] bit, bit 21
mfspr r1, HID0
mr r2, r1
ori r1, r1, 0x0400
mtspr HID0, r1
mtspr HID0, r2
sync
6 Load the Caches
This section discusses preloading and loading instructions and data into the instruction and data cache,
respectively.
1. The dcbf instruction forces a flush and invalidation of a data cache block.
器件 Datasheet 文档搜索
AiEMA 数据库涵盖高达 72,405,303 个元件的数据手册,每天更新 5,000 多个 PDF 文件