Hi,
I'd like to know more about XiP. Is it available with the Arduino IDE?
Need help for XiP
-
- Posts: 903
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Need help for XiP
arduino-esp32 is a HAL on top of the ESP-IDF. ESP-IDF uses XiP in normal operations, as it must since the firmware is typically larger than the RAM. Functions must be specifically tagged as memory resident (IRAM) to not be XiP.
Re: Need help for XiP
Thanks for your answer.
If I tag a specific function to be in IRAM, will it be executed faster than if it was not tagged?
If I tag a specific function to be in IRAM, will it be executed faster than if it was not tagged?
-
- Posts: 903
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Need help for XiP
The execution of the code in the function will not be any faster. The overall execution time is less, since it doesn't need to load the instructions off the flash. This may in many cases be a significant part of the time spent by the cpu.
The IRAM attribute is more typically used when the code is running in a protected/critical context (such as an ISR), where the flash simply won't be available to source the code.
The IRAM attribute is more typically used when the code is running in a protected/critical context (such as an ISR), where the flash simply won't be available to source the code.
Re: Need help for XiP
Thanks, that's what I meant: the overall execution time.
My code is an AI inference code that executes blocks of instructions which are very similar: load arrays, perform operations.
These operations are made of several levels of for loops, with array multiplication - addition inside. I think they are what takes time in my code. So I supposed that putting these functions in IRAM would accelerate them and reduce the overall execution time.
I already use the optimized DSP dotprod functions, which already accelerates the execution.
My code is an AI inference code that executes blocks of instructions which are very similar: load arrays, perform operations.
These operations are made of several levels of for loops, with array multiplication - addition inside. I think they are what takes time in my code. So I supposed that putting these functions in IRAM would accelerate them and reduce the overall execution time.
I already use the optimized DSP dotprod functions, which already accelerates the execution.
Who is online
Users browsing this forum: ESP_wangning and 32 guests