Technical information
24 Porting and Optimizing DSP56800 Applications to DSP56800E
6.1 Extending Data Memory Size From 64K to 16M
There are two assembler switches that instruct the DSP56800E application to use more than 16 bits for
addresses: -od21 and -od24. Following these instructions, all addresses will become 24 bits long instead of
16 bits. Source code changes must be made to support this.
Instructions that are forced by the ‘>’ operator to use 16-bit data addresses must be forced with the new
‘>>’ operator to use 24-bit addresses. Code Example 35 displays the use of the force operator.
Code Example 35. Using the 24-Bit Force Operator Instead of 16-Bit Force Operator
move a1,x:>buffer ; forced to use 16-bit address
; DSP56800 original code
move.w a1,x:>>buffer ; forced to use 24-bit address
; DSP56800E ported code
Instructions that load addresses wider than 16 bits into address registers must also be modified, as shown in
Code Example 36.
Code Example 36. Loading 24-bit Immediates into Address Registers
move #buffer,r1
; DSP56800 original code
move.l #buffer,r1
; DSP56800E ported code
The memory storage size for pointers to data memory must also be extended from 16 bits to 32 bits as
shown in Code Example 37. Care must be taken to ensure that storage location is 2 word aligned.
Code Example 37. Extending Memory Storage Size for Pointers to Data Memory
pointer ds 1
;DSP56800 original code
pointer dsm 2
;DSP56800E ported code
Instructions that store the values of address registers in memory must also be modified to store not only
16 bits, but also 24 bits. These modifications are shown in Code Example 38.
Code Example 38. Saving 24-bit Values from Address Registers
move r1,x:pointer ; save LSP 16 bits of r1
; DSP56800 original code
move.l r1,x:pointer ; save all 24 bits of r1
; DSP56800E ported code
All the instructions that access these memory locations must be changed as shown in Code Example 39.
Code Example 39. Modifying Instructions to Access Memory on 32 Bits
inc x:pointer ; increment the word at x:pointer
; DSP56800 original code
inc.l x:pointer ; increment the 2-word value at x:pointer
; DSP56800E ported code
Note that on more complex applications which are ported to use data memory space above 64K require
more complex modifications. For example, 16-bit arithmetic on pointers must be replaced with 32-bit
arithmetic.
A summary of the extended data memory size for this project is presented in the Table 9.
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...