User`s guide

Using the Configuration Tool
2-10
You can guarantee this placement of objects by using the Configuration
Tool as follows:
a) Declare a new memory segment by inserting a MEM object with the
MEM Manager 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 by
right-clicking on the MEM Manager and choosing Properties.
2.2.7.2 Referencing Static DSP/BIOS Objects in the Large Model (C6000 Platform Only)
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 ; move low 16-bits of _x’s address into A0
MVKH _x, A0 ; move high 16-bits of _x’s address into A0
LDW *A0, A0 ; load _x into 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 objects
created with the Configuration Tool 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.
2.2.8 Creating, Referencing, and Deleting Dynamically-Created DSP/BIOS Objects
You can create many, but not all, DSP/BIOS objects by calling the function
XXX_create where XXX names a specific module. Some objects can only be
created in the Configuration Tool. Each XXX_create function allocates
memory for storing the object’s internal state information, and returns a
handle used to reference the newly-created object when calling other
functions provided by the XXX module.