Texas Instruments TMS320 User Manual page 45

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

2.3.3.3 Referencing Static DSP/BIOS Objects in the Large Model
a) Declare a new memory segment by creating a MEM object and
setting its properties (i.e., the base and length); or use one of the
preexisting data memory MEM objects.
b) Place all objects that are referenced by small model code in this
memory segment.
c) Place Uninitialized Variables Memory (.bss) in this same segment.
In the large model, all compiled code accesses data by first loading the entire
32-bit address into an address register and then using the indirect addressing
capabilities of the LDW instruction to load the data. For example:
MVKL
_x, A0
MVKH
_x, A0
LDW
*A0, A0
Application code compiled with any of the large model variants is not affected
by the location of static objects. If all code that directly references statically-
created objects is compiled with any large model option, code can reference
the objects as ordinary data:
extern PIP_Obj inputObj;
if (PIP_getReaderNumFrames(&inputObj)) {
. . .
}
The -ml0 large model option is identical to small model except that all
aggregate data is assumed to be far. This option causes all static objects to
be assumed to be far objects but allows scalar types (such as int, char, long)
to be accessed as near data. As a result, the performance degradation for
many applications is quite modest.
Configuring DSP/BIOS Applications Statically
; move low 16-bits of _x's address into A0
; move high 16-bits of _x's address into A0
; load _x into A0
Program Generation
2-15

Advertisement

Table of Contents
loading

Table of Contents