The OMAP3530 has 6 ALUs and 2 multipliers. I would like to optimize the calculation of different math functions. Can I at the assembly or C-code level select what ALU or multiplier should be used for certain arithmetic operations?
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The OMAP3530 has 6 ALUs and 2 multipliers. I would like to optimize the calculation of different math functions. Can I at the assembly or C-code level select what ALU or multiplier should be used for certain arithmetic operations?
Thanks
To specify which specific functional unit of the C64x+ core that your math instruction goes to you would need to be writing at the assembly level (perhaps even inline assembly though this is difficult to use properly), at the C level you have to trust the compiler/optimizer to chose the most efficient ordering of instructions to get the most out of the C64x+. In C you do have the option of using intrinsics as discussed in section 7.5.4 of SPRU187 to access particular instructions directly from C code, though these do not chose the particular functional unit, that is still left up to the compiler/optimizer.
In the case of assembly you define the functional unit you use as part of the instruction for example:
ADD .L1 A1, A2, A3
In this case the ADD will happen on the L1 unit, you could change this to L2 to have it on the L2 unit or even D1, D2, S1, or S2 since ADD can happen on any of the functional units other than M1 or M2. This instruction as well as the rest of the C64x+ instruction set is defined in SPRU732.