Virtual to Physical Address Translation for Branch Predictor

42 views
Skip to first unread message

Upasna _

unread,
Apr 13, 2024, 6:44:49 AM4/13/24
to Sniper simulator
Hello Everyone

I've read that Branch Predictor uses Virtual Address, but in Sniper I see, there is a virtual to physical address translation being done in accessBranchPredictor function in trace_thread.cc as follows:

bool mispredict = core->accessBranchPredictor(va2pa(eip), taken, false, va2pa(address));

Although I see that in Sniper, Virtual and Physical Addresses are same, but had the actual va2pa translation being done, would branch predictor work on physical address?

I would be so grateful for any clarification in this regard.

Thanks & Regards
Upasna






Reply all
Reply to author
Forward
0 new messages