Compiler Support on StarCore

13.Are the offsets used in Ex8.c the same as the offsets used in addvecs.asm? If not, can you explain why?

Congratulations, you have completed Exercise 8.

Good To Know

The stack pointer must always be a multiple of 8. It is illegal to increment it by a non-multiple of 8.

9 The Challenge

This section presents you with a challenge involving an example that implements a complex scalar product. The objective of this session is to optimize the code from Ex9.c for speed and obtain the minimum number of cycles.

Hands On

1.Put into practice the techniques previously explained to optimize Ex9.c. The original number of cycles in the inner loop is:

Original (Inner loop)

So far, after having modified the code, your best result is:

Your Best (Inner loop)

The optimized C code result is:

Target (Inner loop)

1 cycle with ALUs and AAUs 100 percent used

If your best result is within 10 percent of the target result, congratulations. You have completed all the exercises and the challenge as well.

26

Introduction to the SC140 Tools

Page 26
Image 26
Motorola SC140 user manual Challenge, Good To Know