Clear all

How to access branch prediction tables from the GSHARE predictor in the SweRV EH2 core used in the labs


New Member
Joined: 2 years ago
Posts: 1
Topic starter  

One of my projects require evaluating the performance of the branch predictor onboard the EH2 core, for which I need access to the global branch history table maintained inside the core. How do I access this data using OpenOCD ? Additionally, how do I remove/disable branch prediction for the same core ?

Member Admin
Joined: 3 years ago
Posts: 81

Hi prvbharadwaj98,
We are very close to the release of RVfpga v2.0 (Training and Teaching Resources - Imagination University Programme ( In this new version of the RVfpga materials, among many other things, we explain in detail how to enable/disable the different structures of the SweRV EH1 core (including the Branch Predictor), according to Table 10-1 of the PRM. Also, in Lab 16, we perform a detailed analysis of branch instructions and the Branch Predictor used in SweRV EH1. In future RVfpga versions, we plan to include some analysis and exercises about exporting the information of the different core structures (including the Branch Predictor) in simulation.
I hope you find this information useful. If you have any other questions, please let us know.
Best regards

RCWO reacted