UoB-HPC / SimEng

The University of Bristol HPC Simulation Engine
https://uob-hpc.github.io/SimEng
Apache License 2.0
93 stars 20 forks source link

DI unit balanced port allocation fix #431

Open FinnWilkinson opened 2 months ago

FinnWilkinson commented 2 months ago

Currently, the dispatch issue unit will get one port allocation and if the attached Reservation station is full or has exhausted its dispatch rate for that cycle, the port will be unallocated and a stall will occur.

Given many instructions can have multiple ports to go to, we should be cycling through all legal ports and seeing if an instruction can be accepted into any of its reservation stations. This PR makes such a change and improves & balances the port / reservation station utilisation.

FinnWilkinson commented 4 weeks ago

Looks good but we should make sure there's no performance overhead given the more complex logic could be triggered every cycle

I do agree that performance needs to be a concern, but for me this could be a necessary case where the minor performance hit (if apparent) needs to be taken. Without this change, I don't think we are properly or accurately allocating to ports in a true balanced fashion.

Having said that, if the performance hit is major, then a different solution should be looked into.