src/cpu/pred/tage_base.cc
// shifting the global history:  we manage the history in a big table in order
// to reduce simulation time
shifting the global history:  we manage the history in a big table in order
to reduce simulation time
shifting the global history : we manage the history in a big table in order to reduce simulation time
void
TAGEBase::updateGHist(uint8_t * &h, bool dir, uint8_t * tab, int &pt)
{
    if (pt == 0) {
        DPRINTF(Tage, "Rolling over the histories\n");
         for (int i = 0; i < maxHist; i++)
             tab[histBufferSize - maxHist + i] = tab[i];
         pt =  histBufferSize - maxHist;
         h = &tab[pt];
    }
    pt--;
    h--;
    h[0] = (dir) ? 1 : 0;
}
void TAGEBase :: updateGHist ( uint8_t * & h , bool dir , uint8_t * tab , int & pt ) { if ( pt == 0 ) { DPRINTF ( Tage , " \n " ) ; for ( int i = 0 ; i < maxHist ; i ++ ) tab [ histBufferSize - maxHist + i ] = tab [ i ] ; pt = histBufferSize - maxHist ; h = & tab [ pt ] ; } pt -- ; h -- ; h [ 0 ] = ( dir ) ? 1 : 0 ; }
shifting the global history:  we manage the history in a big table in order
to reduce simulation time
shifting the global history : we manage the history in a big table in order to reduce simulation time
// Copy beginning of globalHistoryBuffer to end, such that // the last maxHist outcomes are still reachable // through pt[0 .. maxHist - 1].