Embedded Image Processing on the TMS320C6000 DSP: Examples in Code Composer Studio and MATLAB

Appendix B: Code Optimization

Compiler Intrinsics and Optimization Techniques

Overview

Full blown code optimization of complicated algorithms is some of the most difficult work to do on a DSP; in fact it is some of the most difficult programming to do on any architecture. As soon as you find yourself in the situation where you are "cycle-counting", you may possibly be at the point where you have to resort to some fairly hard-core techniques. This may involve hand-tweaking assembly language code, a task definitely not for the faint of heart, especially for anything non-trivial on a VLIW architecture like the C6x. With VLIW architectures, the onus is on the compiler to generate optimal code, as the hardware provides no help in extracting any parallelism at the individual instruction level, in contrast to superscalar CISC CPUs like the Pentium. Thankfully, most developers never reach this point, especially if they have done their due diligence in selecting a DSP with sufficient horsepower and have performed the requisite algorithmic and high-level optimizations. The primary focus of this book has been implementing image processing algorithms on the C67x and C64x DSPs - along the way we have incorporated some high-level optimizations, mostly algorithmic modifications and the use of common-sense C coding practices. Due to advances in compiler technology, TI's compilers have progressed to the point where well-written C code using intrinsics and compiler directives can approach the performance of hand-coded assembly (I do not quote numbers here because that exercise is meaningless there are too many...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Microprocessor and IC Programmers, Compilers, and Debuggers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.