
Cache Architecture
Copyright 2000–2001 by LSI Logic Corporation. All rights reserved.
4-3
The I-cache and D-cache can be direct mapped, or they can be 2-way
or 4-way set associative with a cache line length of 8 words (32 bytes).
Each cache supports single-cycle read access.
Each cache set includes a tag RAM for storing the cache line address
and a data RAM for storing the instructions or data.
During a cache access, all tag RAMs are accessed, and the tag address
is compared with the access address. If a match (or cache hit) occurs,
the data from that set is selected for return to the ARM9E-S core. If none
of the Tags match (a cache miss), then external memory must be
accessed, unless the write buffer is enabled and this access is a buffered
write.
If a read access from a cacheable memory region misses, new data is
loaded into one of the sets. This method is an allocate on read miss
replacement policy. Selection of the set is performed by a set counter
that can be clocked in a pseudo-random manner, or in a predictable
manner based on the replacement algorithm selected.
Critical or frequently accessed instructions or data can be locked into the
cache by restricting the range of the replacement counter. You cannot
replace locked lines. They remain in the cache until they are unlocked or
flushed. The cache cannot be locked if it is direct mapped.
The cache access address from the ARM9E-S core has four parts:
Byte Address (Addr[1:0])
Word Address (Addr[4:2])
Index Address (Addr[N:5])
Tag Address (Addr[31:N+1])
For example, for a 4 Kbyte, 4-way set associative cache, the cache
access address is as shown in
Figure 4.2
.
Figure 4.2
Access Address for a 4 Kbyte Cache
31
10
9
5
4
2
1
0
Tag Address
Index Address
Word
Byte