Chapter 8. Local Memory
For More Information On This Product,
Go to: www.freescale.com
8-31
ROM Overview
The mapping of a given access into the ROM uses the following algorithm to determine if
the access hits in the memory:
if (ROMBAR[0] = 1)
if (((access = instructionFetch) & (ROMBAR[7] = 1)) |
((access = dataReference) & (ROMBAR[7] = 0)))
if (requested address[31:n] = ROMBAR[31:n]
if (AS
n
of the requested type = 0)
Access is mapped to the ROM module
if (access = read)
Read the ROM and return the data
if (access = write)
if (ROMBAR[8] = 0)
Write the data into the ROM
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.6.3 ROM Initialization
After a hardware reset, the contents of each ROM module are undefined. If the ROM
requires initialization with instructions or data, the following steps should be performed:
1. Load ROMBAR
n
with bit 7 = 0, mapping the ROM module to the desired location.
Clearing ROMBAR
n
[7] logically connects the ROM module to the processor’s data
bus.
2. Read the source data and write it to the ROM. Various instructions support this
function, including memory-to-memory move instructions and the move multiple
instruction (MOVEM). MOVEM is optimized to generate line-sized burst fetches on
line-aligned addresses, so it generally provides maximum performance.
3. After the data is loaded into the ROM, it may be appropriate to revise the ROMBAR
attribute bits, including the write-protect and address space mask fields. If the ROM
contains instructions, ROMBAR[D/I] must be set to logically connect the memory
to the processor’s internal instruction bus.
Remember that the ROM cannot be accessed by on-chip DMAs. The on-chip system
configuration allows concurrent core and DMA execution where the core can execute code
out of internal ROM or cache during DMA access.
0111
32 Kbytes
31:15
14:9
1000
64 Kbytes
31:16
15:9
1001–1111
Reserved
1
The KROM size input vector is determined by the core input signals kram0size[3:0] and kram1size[3:0].
Therefore, the KROMs sizes are independently selected.
Table 8-25. KROM Size Configuration (Continued)
KROM Size Input Vector
1
KROM Size
Active Base Address Bits
Ignored Base Address Bits
F
Freescale Semiconductor, Inc.
n
.