Dsp56300 Ram Patch Mechanism; Sample Code For Dsp56305 Patch Mechanism - Motorola DSP56305 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

Memory Configuration
RAM Configuration
3.2.1

DSP56300 RAM Patch Mechanism

The 56300 series patch mechanism is intended for use when certain ROM code locations
need to be replaced by RAM. The replacements are generally intended for lines of code,
rather than whole blocks of code. For example, a call to a certain subroutine could be
replaced by a call to a subroutine at a different location.The patch mechanism is
implemented using the cache circuitry — the cache must be activated for the patch to
work, and using the patch will affect the availability of cache space.
To use the patch, do the following:
1. activate cache (set sr bit 19)
2. activate patch (set omr bit 23)
3. initialize all cache tags to different values (required for proper functioning)
4. lock the desired patch location
5. write the desired replacement data to the (virtual) patch locations
6. reading (or fetching) the location to be replaced will then return the replacement
data instead of the ROM data
3.2.1.1

Sample Code for DSP56305 Patch Mechanism

M_PROMS
EQU
$ff0800
M_PROME
EQU
$ff08ff
PATCH_OFSET
equ
move
#M_PROMS,r0
; 3 - regular write (activate patch)
bset
#M_CE,sr
bset
#M_PAE,omr
move
#$800000,r1
move
#128,n1
move
#(M_PROMS+PATCH_OFSET),r2
rep
#8
punlock (r1)+n1
3-8
; ROM area Start
; ROM area End
64
; patch offset
DSP56305 User's Manual
; CacheEnable = 1
; PatchEnable = 1
; any external address
; 128/256 for 1/2K RAM, sector size
; initialize TAGs to different values
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents