User’s Manual U15109EJ3V0UD
489
CHAPTER 16 ROM CORRECTION FUNCTION
16.1 General
The ROM correction function provided in the V850/SC1, V850/SC2, and V850/SC3 is a function that replaces part
of a program in the mask ROM with a program in the internal RAM.
First, the instruction of the address where the program replacement should start (correction address) is replaced
with the JMP r0 instruction and instructed to jump to 00000000H. The correction request register (CORRQ) is then
checked. At this time, if the CORRQn flag is set to 1, program control shifts to the internal RAM after jumping to the
internal ROM area by an instruction such as a jump instruction (n = 0 to 3).
Instruction bugs found in the mask ROM can be avoided, and program flow can be changed by using the ROM
correction function.
Up to four correction addresses can be specified.
Cautions 1.
The ROM correction function cannot be used for the data in the internal ROM; it can only be
used for instruction codes. If the ROM correction is carried out on data, that data will replace
the instruction code of the JMP r0 instruction.
2.
ROM correction for the instructions that access the CORCN, CORRQ, or CORAD0 to CORAD3
registers is prohibited.
Figure 16-1. Block Diagram of ROM Correction
ROM
(1 MB area)
Instruction address bus
S Q
R
Correction address
register n (CORADn)
Comparator
Correction control register
(CORCNn bit)
JMP r0 instruction
generator
Instruction
replacement
Instruction data
bus
Correction request
register (CORRQn bit)
0 clear instruction
Remark
n = 0 to 3