1/* 2 * Copyright (c) 2014 The University of Wisconsin 3 * 4 * Copyright (c) 2006 INRIA (Institut National de Recherche en 5 * Informatique et en Automatique / French National Research Institute 6 * for Computer Science and Applied Mathematics) 7 * 8 * All rights reserved. --- 303 unchanged lines hidden (view full) --- 312 /** 313 * Update TAGE for conditional branches. 314 * @param branch_pc The unshifted branch PC. 315 * @param taken Actual branch outcome. 316 * @param bi Pointer to information on the prediction 317 * recorded at prediction time. 318 * @nrand Random int number from 0 to 3 319 * @param corrTarget The correct branch target |
320 * @param pred Final prediction for this branch |
321 */ 322 virtual void condBranchUpdate( 323 ThreadID tid, Addr branch_pc, bool taken, BranchInfo* bi, |
324 int nrand, Addr corrTarget, bool pred); |
325 326 /** 327 * TAGE prediction called from TAGE::predict 328 * @param tid The thread ID to select the global 329 * histories to use. 330 * @param branch_pc The unshifted branch PC. 331 * @param cond_branch True if the branch is conditional. 332 * @param bi Pointer to the BranchInfo --- 33 unchanged lines hidden (view full) --- 366 */ 367 virtual unsigned getUseAltIdx(BranchInfo* bi); 368 369 /** 370 * Extra calculation to tell whether TAGE allocaitons may happen or not 371 * on an update 372 * For this base TAGE implementation it does nothing 373 */ |
374 virtual void adjustAlloc(bool & alloc, bool taken, bool pred_taken); |
375 376 /** 377 * Handles Allocation and U bits reset on an update 378 */ 379 virtual void handleAllocAndUReset( 380 bool alloc, bool taken, BranchInfo* bi, int nrand); 381 382 /** --- 13 unchanged lines hidden (view full) --- 396 virtual void resetUctr(uint8_t & u); 397 398 /** 399 * Extra steps for calculating altTaken 400 * For this base TAGE class it does nothing 401 */ 402 virtual void extraAltCalc(BranchInfo* bi); 403 |
404 void btbUpdate(ThreadID tid, Addr branch_addr, BranchInfo* &bi); 405 unsigned getGHR(ThreadID tid, BranchInfo *bi) const; 406 int8_t getCtr(int hitBank, int hitBankIndex) const; 407 unsigned getTageCtrBits() const; 408 int getPathHist(ThreadID tid) const; 409 bool isSpeculativeUpdateEnabled() const; 410 411 protected: --- 83 unchanged lines hidden --- |