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.

TDA4VH-Q1: How to reduce cpuload?

Part Number: TDA4VH-Q1

Hi experts,

               We currently deploy AutoSar on R5F1_1 in the MCU domain.

               As business deployment increases, we find that the cpuload of R5F_1 is too high.

               May I ask, what factors will cause the cpuload to increase? How to reduce cpuload?

  • Hello,

    You can share the applications to run on other main domain cores as well if that is possible for you. What is the current load on the core and may i know how you are quantifying it ?

    Regards

    Tarun Mukesh

  • 1. What is the current load on the core?

    about 85%

    how you are quantifying it ?

    time_spent_in_actual_task / (time spent in idle task + time_spent_in_actual_task)] * 100

    what factors will cause the cpuload to increase?

  • Hi Zhisong,

    CPU loading is a large topic, and there are many things that cause increased utilization. But at the simplest level, there are instructions doing something useful towards your usecase that are running on the CPU core. The question is how can you lower the number of instructions to do the same task you wish to complete or how can you optimize the instructions for shorter duration.

    These are all optimization techniques, and to optimize code there needs to be an analysis of what is running. We have an optimization for memory regions used, this can help with the latency of functions you may be running more often than others:

    https://www.ti.com/lit/an/spradc1/spradc1.pdf

    We can give suggestions based on the SoC and the compiler as well as our SDK reference software. If you have some specific question on the performance of particular code, please provide a reference of your analysis. It is most helpful if you take an example from our SDK.

    There are other optimization guidelines but you would need to give much more detail on your code and what your tasks are doing and where you see a loading overhead that looks like it can be optimized. If you are working with an AUTOSAR vendor for your stack, they would be the best point-of-contact for optimization questions regarding the software they offer.

    Thanks,

    Erick

  • Thank you very much for your answer. I will optimize the memory distribution first and see the effect. Thanks again