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


New Member
Joined: 6 months ago
Posts: 1
26/11/2021 9:36 pm  

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 ?

Eminent Member
Joined: 1 year ago
Posts: 36
30/11/2021 8:14 am  

Hi prvbharadwaj98,
We are very close to the release of RVfpga v2.0 ( 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 liked