ML66525 Family User’s Manual
Chapter 4
Memory Control Functions
4 - 2
4.3
ROM Window Function
The ROM window function reads the contents of the program memory space specified by the
ROM window register (ROMWIN), located in the SFR area, by using the same address in the
data memory space as a window.
In other words, when the ROM window function is enabled and an instruction that accesses
(reads) the data memory space is executed, instead of accessing (reading) data in the data
memory space, data will be accessed (read) at the same addresses in the segment that is
specified by TSR in the program memory space.
Compared to the number of instruction cycles to be required to access normal data memory,
accessing the ROM window once requires additional 3 cycles for a byte instruction and
additional 6 cycles for a word instruction.
[Note]
If the ROM window function is enabled and a write instruction is executed, that result will
not be guaranteed.
However, in this case additional cycles will not be added.
ROM Window Register (ROMWIN)
The ROM window register (ROMWIN) is an 8-bit register.
The lower 4 bits indicate the
start address of the ROM window and the upper 4 bits indicate the end address of the ROM
window.
(Bits 4 and 5 of the upper 4 bits must be written as “1”s.)
When 64 KB of the
program memory space is represented in hexadecimal number (HEX), each of above 4-bit
registers specifies the upper 1 digit of 4 digits.
If the value of the lower 4 bits is all zeros,
the ROM window function will not operate.
Figure 4-1 shows the configuration of ROMWIN.
These 4 bits specify the start address
of the ROM window.
(The upper 1 digit of 4 digits when the
64 KB memory space is represented
in hexadecimal format (HEX).)
7
6
5
4321
0
ROMWIN
Address: 000B [H]
R/W access: R/W
(W is only performed once after reset)
“1”
Bits 4 and 5 must be set to “1”.
“1”
At reset
(undefined)
These 4 bits specify the end address
of the ROM window.
(The upper 1 digit of 4 digits when the
64 KB memory space is represented
in hexadecimal format (HEX).)
Figure 4-1
ROMWIN Configuration