src/cpu/pred/tage_base.cc
// Update the bimodal predictor: a hysteresis bit is shared among N prediction
// bits (N = 2 ^ logRatioBiModalHystEntries)
Update the bimodal predictor: a hysteresis bit is shared among N prediction
bits (N = 2 ^ logRatioBiModalHystEntries)
Update the bimodal predictor : a hysteresis bit is shared among N prediction bits ( N = 2 ^ logRatioBiModalHystEntries )
void
TAGEBase::baseUpdate(Addr pc, bool taken, BranchInfo* bi)
{
    int inter = (btablePrediction[bi->bimodalIndex] << 1)
        + btableHysteresis[bi->bimodalIndex >> logRatioBiModalHystEntries];
    if (taken) {
        if (inter < 3)
            inter++;
    } else if (inter > 0) {
        inter--;
    }
    const bool pred = inter >> 1;
    const bool hyst = inter & 1;
    btablePrediction[bi->bimodalIndex] = pred;
    btableHysteresis[bi->bimodalIndex >> logRatioBiModalHystEntries] = hyst;
    DPRINTF(Tage, "Updating branch %lx, pred:%d, hyst:%d\n", pc, pred, hyst);
}
void TAGEBase :: baseUpdate ( Addr pc , bool taken , BranchInfo * bi ) { int inter = ( btablePrediction [ bi -> bimodalIndex ] << 1 ) + btableHysteresis [ bi -> bimodalIndex >> logRatioBiModalHystEntries ] ; if ( taken ) { if ( inter < 3 ) inter ++ ; } else if ( inter > 0 ) { inter -- ; } const bool pred = inter >> 1 ; const bool hyst = inter & 1 ; btablePrediction [ bi -> bimodalIndex ] = pred ; btableHysteresis [ bi -> bimodalIndex >> logRatioBiModalHystEntries ] = hyst ; DPRINTF ( Tage , " \n " , pc , pred , hyst ) ; }
Update the bimodal predictor: a hysteresis bit is shared among N prediction
bits (N = 2 ^ logRatioBiModalHystEntries)
Update the bimodal predictor : a hysteresis bit is shared among N prediction bits ( N = 2 ^ logRatioBiModalHystEntries )