Memory Management Using Overlays
The next set of instructions represents a load function call.
R0 = 1 (Z);
p0.h = prefetch;
p0.l = prefetch;
[P0] = R0;
/* Set prefetch flag to 1 to indicate a load */
call fft_middle_stages;
/* Pre-loads the function into the */
/* overlay run memory. */
The code executes the first function and transfers the second function and
so on. In this implementation, each function resides in a unique overlay
and requires two run-time locations. While one overlay loads into one
run-time location, a second overlay function executes in another run-time
location.
The following code segment allocates the functions to overlays and forces
two run-time locations.
OVERLAY_GROUP1 {
OVERLAY_INPUT
{
ALGORITHM(ALL_FIT)
OVERLAY_OUTPUT(fft_one.ovl)
INPUT_SECTIONS( Fft_ovl.doj (program) )
} >ovl_code
OVERLAY_INPUT
{
ALGORITHM(ALL_FIT)
OVERLAY_OUTPUT(fft_three.ovl)
INPUT_SECTIONS( Fft_ovl.doj (program) )
} >ovl_code
} > mem_code
OVERLAY_MGR {
INPUT_SECTIONS(ovly_mgr.doj(pm_code))
} > mem_code
5-20
// Overlay to live in section ovl_code
// Overlay to live in section ovl_code
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?