Optimization Levels
Optimization Tips Summary
Summary: Optimization Tips
Summary: Optimization Tips
Within C functions :
Within C functions :
Use const with variables for parameter constants
Use const with variables for parameter constants
Minimize mixing signed & unsigned ops
Minimize mixing signed & unsigned ops
Keep frames <= 64 ( para PC)
Keep frames <= 64 ( para PC)
Use structures <= 8 words
Use structures <= 8 words
Declare longs first, then declare
Declare longs first, then declare
ints
ints
Avoid: long = (
Avoid: long = (
int
int
*
*
int
int
)
)
Optimizing : Use
Optimizing : Use
-
-
o0,
o0,
-
-
o1,
o1,
-
-
o2,
o2,
-
-
o3 when compiling
o3 when compiling
Inline short/key functions
Inline short/key functions
Pass
Pass
inlines
inlines
between files : static
between files : static
inlines
inlines
in header files
in header files
Invoke automatic
Invoke automatic
inlining
inlining
:
:
-
-
o3
o3
-
-
oi
oi
Give compiler project visibility : use
Give compiler project visibility : use
-
-
pm and
pm and
-
-
o3
o3
Tune memory map via linker command file
Tune memory map via linker command file
Re
Re
-
-
write key code segments to use intrinsics or in assembly
write key code segments to use intrinsics or in assembly
App notes
App notes
3rd Parties
3rd Parties
: SXM changes
: SXM changes
: *
: *
-
-
SP[6bit]
SP[6bit]
: use 3 bit index mode
: use 3 bit index mode
: minimize stack holes
: minimize stack holes
: yields unpredictable results
: yields unpredictable results
The list above documents the steps that can be taken to achieve increasingly higher coding effi-
ciency. It is recommended that users first get their code to work with no optimization, and then
add optimizations until the required performance is obtained.
C28x – C Programming
D - 13
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...