Memory Management Using Overlays
The following code segment calls the four FFT functions.
fftrad2:
call fft_first_2_stages;
call fft_middle_stages;
call fft_next_to_last;
call fft_last_stage;
wait:
NOP;
jump wait;
The linker replaces each overlay function call with a call to the appropriate
entry in the PLIT. For this example, only three instructions are placed in
each entry of the PLIT, as follows.
PLIT
{
R0.l = PLIT_SYMBOL_OVERLAYID;
R1.h = PLIT_SYMBOL_ADDRESS;
R1.l = PLIT_SYMBOL_ADDRESS;
JUMP OverlayManager;
}
Register
contains the overlay ID that contains the referenced symbol,
R0
and register
R1
The final instruction moves the program counter (PC) to the starting
address of the overlay manager. The overlay manager uses the overlay ID
in conjunction with the overlay constants generated by the linker to trans-
fer the proper overlay into internal memory. Once the transfer is
complete, the overlay manager sends the PC to the address of the refer-
enced symbol stored in
5-14
contains the run-time address of the referenced symbol.
.
R1
VisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
Need help?
Do you have a question about the VisualDSP++ 3.5 and is the answer not in the manual?