![](http://datasheet.mmic.net.cn/230000/V4ECFUM_datasheet_15625205/V4ECFUM_181.png)
Chapter 8. Local Memory
For More Information On This Product,
Go to: www.freescale.com
8-25
SRAM Overview
The KRAM controller uses the base address bits it needs and ignores lower-order bits to
support the configured KRAM size, as shown in Table 8-22.
The mapping of a given access into the RAM uses the following algorithm to determine if
the access hits in the memory:
if (RAMBAR[0] = 1)
if (((access = instructionFetch) & (RAMBAR[7] = 1)) |
((access = dataReference) & (RAMBAR[7] = 0)))
if (requested address[31:n] = RAMBAR[31:n]
if (AS
n
of the requested type = 0)
Access is mapped to the RAM module
if (access = read)
Read the RAM and return the data
if (access = write)
if (RAMBAR[8] = 0)
Write the data into the RAM
else Signal a write-protect access error
AS
n
refers to the five address space mask bits: C/I, SC, SD, UC, and UD.
8.5.3 SRAM Initialization
After a hardware reset, the contents of each SRAM module are undefined. The valid bits,
RAMBAR
n
[V], are cleared, disabling the SRAM modules. If the SRAM requires
initialization with instructions or data, the following steps should be performed:
1. Load RAMBAR
n
with bit 7 = 0, mapping the SRAM module to the desired location.
Clearing RAMBAR
n
[7] logically connects the SRAM module to the processor’s
data bus.
Table 8-22. KRAM Size Configuration
KRAM Size Input Vector
1
1
The KRAM size input vector is determined by the core input signals kram0size[3:0] and kram1size[3:0].
Therefore, the KRAMs sizes are independently selected.
KRAM Size
Active Base Address Bits
Ignored Base Address Bits
0000
0 Bytes
None
31:9
0001
512 Bytes
31:9
None
0010
1 Kbytes
31:10
9
0011
2 Kbytes
31:11
10:9
0100
4 Kbytes
31:12
11:9
0101
8 Kbytes
31:13
12:9
0110
16 Kbytes
31:14
13:9
0111
32 Kbytes
31:15
14:9
1000
64 Kbytes
31:16
15:9
1001–1111
Reserved
F
Freescale Semiconductor, Inc.
n
.