We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
recently I did some measurements concerning the SysTick-Timer and consumend clock cycles (because of performance reasons).
I wrote a simple function in assembly, which gets called from a C file. Before and after the call i read the value of the SysTick-Timer to determine the cycles neeed for loading the parameter value into register r0, the call and all the assembly code in the function.
Taking into account, that two consecutive (simple) LDR instructions can get pipeplined, it seems they don't get pipelined - at least when looking at the clock cycles.
Am I right assuming that loads to different memory regions (for SysTick-Timer and stack) don't get (ever) pipelined ? And maybe a slightly other question: do loads get pipelined when crossing boundaries concerning "minimum memory part sizes" (AHB-Lite) in the same memory region?
Thanks in advance,
Alex
Hi Alex,
You do have a point that needs clarification. Here is what I imagine can be done (a slight chance you have already seen and tried this). In the Load/Store Timing section of the documentation, possible scenarios involving an LDR instruction are explained as follows:
LDR [any]
LDR
STR
LDR R0,[R1]; LDR R1,[R2]
LDR R0,[R1,R2]; STR R0,[R3,#20]
LDR R0,[R1,R2]; STR R1,[R3,R2]
LDR R0,[R1,R5]; LDR R1,[R2]; LDR R2,[R3,#4]
Given the above explanation, I would recommend taking a look at the entire piece of your code at the assembly level to check whether the destination of the first LDR is not being used to compute the address of the next LDR. Hope this helps.
Regards,
Sadanand Gulwadi
ARM University Program Manager, Bangalore