cancel
Showing results for 
Search instead for 
Did you mean: 

About branch prediction of STM32H7(Cortex-M7)

RIG
Associate III

I don't know so please let me know.

I would like to use Cortex-M7 branch prediction. 

Is it necessary to set registers in particular?

6 REPLIES 6

AFAIK details are not public.

I would be surprised if this would go beyond remembering result of the last or last few branches and assuming they will go the same way again. This is a good strategy e.g. for basic for loops.

JW

Thank you for your reply this time as well.

What is AFAIK?

As Far As I Know

https://www.st.com/content/ccc/resource/training/technical/product_training/group0/84/37/18/81/04/b7/40/b3/STM32F7_System_Core/files/STM32F7_System_Core.pdf/jcr:content/translations/en.STM32F7_System_Core.pdf

One might surmise that it prefetches from potential branch targets, and pipelines speculative execution, so that if it mis-judges the flow there's only a single cycle cost rather than a full pipeline cost.

https://developer.arm.com/documentation/ddi0489/b/system-control/register-descriptions/auxiliary-control-register

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
RIG
Associate III

Thank you for your answer.

>if it mis-judges the flow there's only a single cycle cost rather than a full pipeline cost.

->Do you recognize that even if you misjudgment the flow, the branch processing time will be very short because it will be a single cycle cost?

Thank you for the document.

Please tell me how to set the Axial Control Register (ACTLR) to use branch prediction properly.

Piranha
Chief II