AM2432: How to disable Branch Prediction

Part Number: AM2432

Hello Support Team,

I would like to know whether it is possible to disable the branch prediction mechanism on the Sitara AM2432 (Cortex-R5F core).
 
Could you please provide information on the following:
1. Whether branch prediction can be disabled on the AM2432.
2. Any relevant registers, configuration settings, or software procedures required to disable it.
3. Any available documentation, application notes, or example projects related to this configuration.
 
Thank you in advance for your support. I look forward to your guidance.

Best regards,
Karila Palma Silva.

  • Hello Karila Palma Silva,
    Could you please explain your specific use case?
    What exactly are you trying to achieve by modifying or disabling the branch prediction mechanism?
    Regards,
    Anil
  • Hello Anil,

    My use case is related to Worst-Case Execution Time (WCET) analysis for a safety-critical application running on the AM2432 Cortex-R5F.

    The objective is to understand and, if possible, reduce the timing variability introduced by the branch prediction mechanisms. Since branch predictors depend on execution history and internal microarchitectural state, execution time can vary depending on the contents of structures such as the Branch Target Buffer (BTB), Branch History Table (BHT), and other prediction-related resources.

    For the WCET analysis, I am evaluating two possible approaches:

    1. Disable branch prediction completely, if supported by the device, so that branch behavior becomes more deterministic and independent of predictor state.
    2. Characterize the worst-case predictor state, if branch prediction cannot be disabled, to determine the maximum execution-time penalty caused by branch mispredictions.

    Any guidance on the recommended configuration for deterministic execution on the AM2432 Cortex-R5F would be greatly appreciated.

    Best regards,

    Karila Palma Silva.

  • Hello Anil,

    I would like to follow up on the questions I sent regarding the AM2432 Branch Prediction mechanism.

    Have you had a chance to review them? Please let me know if you need any additional information from my side.

    Best regards,

    Karila Palma Silva.

  • Hello Karila Palma Silva,

    I have reviewed the R5F core settings in the MCU+ SDK, and by default, the branch prediction setting is disabled.

    Please review the register configuration below.

    Therefore, you do not need to modify any register bits to disable branch prediction manually

    Regards,

    Anil.