Skip to content

Commit

Permalink
cpu-o3: comment updateUftbWhenOverrideByL1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawrence-ID committed Jan 14, 2025
1 parent 918dbcc commit 73a96ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/cpu/pred/ftb/decoupled_bpred.cc
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ DecoupledBPUWithFTB::DBPFTBStats::DBPFTBStats(statistics::Group* parent, unsigne
ADD_STAT(overrideByL1WhenL0Miss, statistics::units::Count::get(), "the number of preds override by L1, when L0 Miss and L1 Hit"),
ADD_STAT(overrideByL2, statistics::units::Count::get(), "the number of preds override by L2"),
ADD_STAT(squashWhenOverriding, statistics::units::Count::get(), "the number of squash when overriding"),
ADD_STAT(overrideBubbles, statistics::units::Count::get(), "number of bpu pred Override Bubbles"),
ADD_STAT(s1PredTakenChangeAtSamePC, statistics::units::Count::get(), "s1 pred different taken at the same bbstart"),
ADD_STAT(overrideBubbles, statistics::units::Count::get(), "number of bpu pred override bubbles"),
ADD_STAT(s1PredTakenChangeAtSamePC, statistics::units::Count::get(), "s1 pred different taken at the same pc"),
ADD_STAT(predsOfEachStage, statistics::units::Count::get(), "the number of preds of each stage that account for final pred"),
ADD_STAT(commitPredsFromEachStage, statistics::units::Count::get(), "the number of preds of each stage that account for a committed stream"),
ADD_STAT(fsqEntryDist, statistics::units::Count::get(), "the distribution of number of entries in fsq"),
Expand Down Expand Up @@ -890,7 +890,7 @@ DecoupledBPUWithFTB::generateFinalPredAndCreateBubbles()
if (s0_entry_slot.condValid() && s1_entry_slot.condValid()) {
if (s0_entry_slot.pc == s1_entry_slot.pc && s0_condTakens[b] != s1_condTakens[b]) {
dbpFtbStats.overrideByL1WhenL0HitButTakenDiff++;
uftb->updateUftbWhenOverrideByL1(predsOfEachStage[0].bbStart, b, s1_condTakens[b]);
// uftb->updateUftbWhenOverrideByL1(predsOfEachStage[0].bbStart, b, s1_condTakens[b]);
break;
} else if (s0_entry_slot.pc == s1_entry_slot.pc && s0_condTakens[b] == 1 && s1_condTakens[b] == 1) {
assert(0); // if taken, then predsOfEachStage0 should equal to predsOfEachStage1
Expand Down
10 changes: 0 additions & 10 deletions src/cpu/pred/ftb/ftb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,18 +514,8 @@ DefaultFTB::updateUftbWhenOverrideByL1(Addr bbStart, int brIdx, bool condTaken){
assert(!not_found);

auto entry_to_update = ftb[ftb_idx][ftb_tag];
DPRINTF(OverrideByL1, "=============================\n");
DPRINTF(OverrideByL1, "s1 Taken: %d, brIdx: %d\n", condTaken, brIdx);
printFTBEntryWhenOverrideByL1(entry_to_update);

updateCtr(entry_to_update.slots[brIdx].ctr, condTaken); // only update the ctr
ftb[ftb_idx][ftb_tag] = entry_to_update;

DPRINTF(OverrideByL1, "-----------------------------\n");

printFTBEntryWhenOverrideByL1(entry_to_update);

DPRINTF(OverrideByL1, "=============================\n");
}

void
Expand Down

0 comments on commit 73a96ec

Please sign in to comment.