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.
Hi Team
Customer try to move PFC control logic form C28x to CLA, but they find when put the same C code into .c file and .cla file, the code size is significantly larger in .cla than in .c, which can be found in found in .map file.
I can also test this issue using "cla_ex4_pwm_control" demo, just to add some simple function and click "build".
Questions are:
1. Why there is the difference happen?
2. How to optimize the CLA code to make the code size as small as possible.
Thanks and best regards
Joe
25th April.
Hi Joe,
Here are a couple potential reasons as to why the CLA code is taking up more memory:
int
type variables in their code, these would take up double the amount of memory on the CLA (32 bits rather than 16 bits). To avoid this issue, they can use type declarations that specify the size information, for example: uint16_t
, int16_t
etc. to ensure 32 bits aren't being taken up in memory when only 16 bits of the value are needed/used. This would also avoid any type discrepancies/issues when porting the code over to CLA as well.In general, the CLA is meant to offload real-time tasks to reduce c28x overhead. It isn't necessarily made to do the same amount/level of computations and logic that the c28x core is capable of, which is why they are seeing a memory tradeoff when attempting this.
Best Regards,
Delaney