Compiler Support on StarCore
To understand how global optimization makes best use of available information, perform these steps:
6.Recompile the application with
7.Rename the .sl files as Ex3_main1.sl and Ex3_prod1.sl.
8.Open the files to see what the compiler has produced.
9.Enable global optimization: ccsc100
10.Open Ex3_main.sl to see what the compiler has produced.
Since the compiler has all information on the application, it optimizes the application further than with local optimization. The compiler avoids calling the function by
Congratulations, you have completed Exercise 3.
Good To Know
•Global optimization requires a longer compilation time than local optimization.
•Global optimization further optimizes the application speed.
4 Memory Alignment Exercise
The memory alignment exercise shows the usage of wide data moves and the necessary alignments for performing these moves. The SC140 memory has byte granularity (as represented in Figure 7). Two arithmetic address units (AAUs) transfer the data from memory to the 4 ALUs (and vice versa) via two
If the compiler must generate the wide data move instructions available in the StarCore instruction
P:0x00 | AA |
| BB |
| CC | DD |
| EE |
| FF |
| AB | BC | 8 bytes | |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
P:0x08 | 01 |
| 23 |
| 45 |
| 67 |
| 89 |
| AB |
| CD |
| EF |
| 8 bytes |
P:0x10 .... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
| Figure 7. | Memory Granularity |
|
12 | Introduction to the SC140 Tools |