Chapter 8. Local Memory
For More Information On This Product,
Go to: www.freescale.com
8-13
Local Memory Connection Specification
(misses in the cache), the K2M (K-Bus to M-Bus) controller performs a transfer on the
M-Bus.
The four-way set-associative cache is organized as four levels (ways) of 32, 64, 128, 256,
or 512 sets (for 2-, 4-, 8-, 16-, or 32-Kbyte cache sizes, respectively), with each line
containing 16 bytes (four longwords) of storage.
Table 8-9 shows the various cache set counts, line counts, address bits, tag bits, etc., for
each available cache size. For all caches sizes, a 16-byte line is used (i.e., column G, line
size, is always 16 bytes and the in-line address is always A3–A0) and the level of
associativity is always 4 (that is, column F, number of levels, is always 4). The number of
sets (column E) is related to the number of bits in the set index by the expression number
of sets equals 2
n
where n is the number of bits in the set index. Any address bits A31–A0
not used in the set index or the in-line address are used for the tag address (column B).
Finally, the cache size can be calculated as: cache size = number of sets x number of levels
x line size.
Address bits A[12:4] (as needed for the selected cache size) provide an index to select a set.
Levels are selected according to the rules of set association.
Each line consists of an address tag (the upper 19–23 bits of the addresses needed for the
selected cache size), two status bits, and four longwords of data. The two status bits consist
of a valid bit (V) and a dirty bit (D) for the line. The dirty bit indicates the line was been
written or modified. The instruction cache never sets this bit during normal operation but
this bit must be implemented for correct array test operation. Address bits A3 and A2 select
the longword within the line.
Table 8-9. Instruction Cache Sizes and Configurations
A
B
C
D
E
F
G
Cache Size
Tag Address
Set Index
In-line Address
Number of Sets
Number of Levels
Line Size
2 Kbytes
A31–A09
A08–A04
A03–A00
32
4
16 bytes
4 Kbytes
A31–A10
A09–A04
A03–A00
64
4
16 bytes
8 Kbytes
A31–A11
A10–A04
A03–A00
128
4
16 bytes
16 Kbytes
A31–A12
A11–A04
A03–A00
256
4
16 bytes
32 Kbytes
A31–A13
A12–A04
A03–A00
512
4
16 bytes
F
Freescale Semiconductor, Inc.
n
.