Operation Of The Memory Patch Function - Fujitsu MB96300 series Hardware Manual

F2mc-16fx 16-bit
Hide thumbs Also See for MB96300 series:
Table of Contents

Advertisement

MB96300 Super Series Hardware Manual
31.3

Operation of the Memory Patch Function

This section describes the usage of the Memory Patch Function for different application
purposes.
■ Memory Patch Function
This is a data replacement function bound to an address match. It can be used to insert a software interrupt/
break point, branch instruction or to patch the code or data words directly. Consequently, the CPU executes
the instruction or reads the data specified in the patch register instead of the value addressed in the memory.
The memory patch function replaces the read data value on the 16FX core bus with a value loaded to the
patch function data register PFDx. The patch function is sensitive on an address given by PFAx.
To use this function, do the following:
• Select a free MPF channel "x" and disable its usage by clearing the PEx and IEx bits.
• Set all bits in PFCS[15:8] to match all access types.
• Program the address into PFAx (16bit - word access, address bit 0 is ignored)
• Program the replacement data into PFDx. If byte data should be corrected, copy the other byte from the
original memory location (it is not usable to patch byte variables, where the neighboring byte is not
constant).
• Enable the PEx bit
When an address matches the value set in the patch function address register, following operation is
performed by the Memory Patch Function:
• The address match indication bit Ix is set.
• The read access is redirected to the patch function data register, consequently the CPU or DMA will read
the value programmed into the PFDx register.
• A probable write access has no effect.
For the purpose of the implementation of a memory protection function, the address range of the
configuration registers of the address match detection function should be also considered to be protected.
■ Instruction address break
Each MPF channel can be used to act as instruction break. The same procedure is used as described for the
memory patch function. The special case is, that the INT9 instruction code (01
according byte position in the patch function data register. PFAx should specify an address where instruction
code is located.
The mask and range option can be used to define the address region, which is sensitive for the instruction
break.
Be careful with the range option for the instruction address match. Starting from or ending at an odd address
requires the use of a separate channel. When the PE bit is set, the address bit 0 is masked.
■ Operand address break
With the MPF an operand address break can be realized by using its address match functions.
To use this function, do the following:
• Select a free MPF channel "x" and disable its usage by clearing the PEx and IEx bits.
CHAPTER 31 MEMORY PATCH FUNCTION
) is programmed on the
H
829

Advertisement

Table of Contents
loading

Table of Contents