Skip to content

Commit

Permalink
cpu-o3: In reg arbitration, give smaller value higher priority (#224)
Browse files Browse the repository at this point in the history
Change-Id: I723ce9d0299a6640607dd75c791075cba59cb1ab
  • Loading branch information
tastynoob authored Dec 11, 2024
1 parent 5cae0e5 commit 8eb80f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions configs/common/FUScheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# must be consistent with issue_queue.cc
maxTotalRFPorts = (1 << 6) - 1
# portid, priority
# smaller value get higher priority
def IntRD(id, p):
# [7:6] [5:2] [1:0]
assert id < 16
Expand Down
2 changes: 1 addition & 1 deletion src/cpu/o3/issue_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ Scheduler::useRegfilePort(const DynInstPtr& inst, const PhysRegIdPtr& regid, int
}
assert(typePortId < rfPortOccupancy.size());
if (rfPortOccupancy[typePortId].first) {
if (rfPortOccupancy[typePortId].second > pri) {
if (rfPortOccupancy[typePortId].second < pri) { // smaller is higher priority
// inst arbitration failure
arbFailedInsts.push_back(inst);
DPRINTF(Schedule, "[sn:%llu] arbitration failure, typePortId %d occupied by [sn:%llu]\n", inst->seqNum, typePortId,
Expand Down

0 comments on commit 8eb80f7

Please sign in to comment.