Configuring DSP/BIOS Applications Statically
Program Generation
2-13
There are four methods for dealing with this issue. These methods are
described in the sections following and have the pros and cons as shown in
Table 2-1.
Table 2-1.
Methods of Referencing C6000 Global Objects
2.3.3.2 Referencing Static DSP/BIOS Objects in the Small Model
In the small model, all compiled code accesses global data relative to a data
page pointer register. The register B14 is treated as a read-only register by
the compiler and is initialized with the starting address of the .bss section
during program startup. Global data is assumed to be at a constant offset
from the beginning of the .bss section and this section is assumed to be at
most 32K bytes in length. Global data, therefore, can be accessed with a
single instruction like the following:
LDW *+DP(_x), A0 ; load _x into A0 (DP = B14)
Since objects created statically are not placed in the .bss section, you must
ensure that application code compiled with the small model references them
correctly. There are three ways to do this:
Method
Declare
objects
with far
Use global
object
pointers
Objects
adjacent
to .bss
Compile
with large
model
Code works independent of compilation model
Yes
Yes
Yes
Yes
Code works independent of object placement
Yes
Yes
No
Yes
C code is portable to other compilers
No
Yes
Yes
Yes
Statically-created object size not limited to 32K bytes
Yes
Yes
No
Yes
Minimizes size of .bss
Yes
Yes
No
Yes
Minimizes instruction cycles
No
(3 cycles)
No
(2-6 cycles)
Yes
(1 cycle)
No
(3 cycles)
Minimizes storage per object
No
(12 bytes)
No
(12 bytes)
Yes
(4 bytes)
No
(12 bytes)
Easy to program; easy to debug
Somewhat
Error prone
Somewhat
Yes
Содержание TMS320 Series
Страница 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Страница 16: ...xvi ...
Страница 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Страница 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Страница 202: ...5 20 ...
Страница 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Страница 288: ...Index 10 Index ...