Deleted Added
sdiff udiff text old ( 13626:d6a6358aa6db ) new ( 13685:bb3377c81303 )
full compact
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 */
321 virtual void condBranchUpdate(
322 ThreadID tid, Addr branch_pc, bool taken, BranchInfo* bi,
323 int nrand, Addr corrTarget);
324
325 /**
326 * TAGE prediction called from TAGE::predict
327 * @param tid The thread ID to select the global
328 * histories to use.
329 * @param branch_pc The unshifted branch PC.
330 * @param cond_branch True if the branch is conditional.
331 * @param bi Pointer to the BranchInfo

--- 33 unchanged lines hidden (view full) ---

365 */
366 virtual unsigned getUseAltIdx(BranchInfo* bi);
367
368 /**
369 * Extra calculation to tell whether TAGE allocaitons may happen or not
370 * on an update
371 * For this base TAGE implementation it does nothing
372 */
373 virtual void adjustAlloc(bool & alloc, bool taken);
374
375 /**
376 * Handles Allocation and U bits reset on an update
377 */
378 virtual void handleAllocAndUReset(
379 bool alloc, bool taken, BranchInfo* bi, int nrand);
380
381 /**

--- 13 unchanged lines hidden (view full) ---

395 virtual void resetUctr(uint8_t & u);
396
397 /**
398 * Extra steps for calculating altTaken
399 * For this base TAGE class it does nothing
400 */
401 virtual void extraAltCalc(BranchInfo* bi);
402
403 /**
404 * Algorithm for returning a random number
405 * This base TAGE class just uses random_mt, but some derived classes
406 * may want to use a more realistic implementation or force some values
407 */
408 static int getRandom();
409
410 void btbUpdate(ThreadID tid, Addr branch_addr, BranchInfo* &bi);
411 unsigned getGHR(ThreadID tid, BranchInfo *bi) const;
412 int8_t getCtr(int hitBank, int hitBankIndex) const;
413 unsigned getTageCtrBits() const;
414 int getPathHist(ThreadID tid) const;
415 bool isSpeculativeUpdateEnabled() const;
416
417 protected:

--- 83 unchanged lines hidden ---