bpred_unit.hh (10462:e975e8afba8b) | bpred_unit.hh (10785:f56c10663a01) |
---|---|
1/* 2 * Copyright (c) 2011-2012, 2014 ARM Limited 3 * Copyright (c) 2010 The University of Edinburgh 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 83 unchanged lines hidden (view full) --- 92 */ 93 bool predict(const StaticInstPtr &inst, const InstSeqNum &seqNum, 94 TheISA::PCState &pc, ThreadID tid); 95 bool predictInOrder(const StaticInstPtr &inst, const InstSeqNum &seqNum, 96 int asid, TheISA::PCState &instPC, 97 TheISA::PCState &predPC, ThreadID tid); 98 99 // @todo: Rename this function. | 1/* 2 * Copyright (c) 2011-2012, 2014 ARM Limited 3 * Copyright (c) 2010 The University of Edinburgh 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 83 unchanged lines hidden (view full) --- 92 */ 93 bool predict(const StaticInstPtr &inst, const InstSeqNum &seqNum, 94 TheISA::PCState &pc, ThreadID tid); 95 bool predictInOrder(const StaticInstPtr &inst, const InstSeqNum &seqNum, 96 int asid, TheISA::PCState &instPC, 97 TheISA::PCState &predPC, ThreadID tid); 98 99 // @todo: Rename this function. |
100 virtual void uncondBranch(void * &bp_history) = 0; | 100 virtual void uncondBranch(Addr pc, void * &bp_history) = 0; |
101 102 /** 103 * Tells the branch predictor to commit any updates until the given 104 * sequence number. 105 * @param done_sn The sequence number to commit any older updates up until. 106 * @param tid The thread id. 107 */ 108 void update(const InstSeqNum &done_sn, ThreadID tid); --- 146 unchanged lines hidden (view full) --- 255 256 /** Whether this instruction has already mispredicted/updated bp */ 257 bool wasSquashed; 258 }; 259 260 typedef std::deque<PredictorHistory> History; 261 262 /** Number of the threads for which the branch history is maintained. */ | 101 102 /** 103 * Tells the branch predictor to commit any updates until the given 104 * sequence number. 105 * @param done_sn The sequence number to commit any older updates up until. 106 * @param tid The thread id. 107 */ 108 void update(const InstSeqNum &done_sn, ThreadID tid); --- 146 unchanged lines hidden (view full) --- 255 256 /** Whether this instruction has already mispredicted/updated bp */ 257 bool wasSquashed; 258 }; 259 260 typedef std::deque<PredictorHistory> History; 261 262 /** Number of the threads for which the branch history is maintained. */ |
263 uint32_t numThreads; | 263 const unsigned numThreads; |
264 | 264 |
265 |
|
265 /** 266 * The per-thread predictor history. This is used to update the predictor 267 * as instructions are committed, or restore it to the proper state after 268 * a squash. 269 */ 270 std::vector<History> predHist; 271 272 /** The BTB. */ --- 17 unchanged lines hidden (view full) --- 290 /** Stat for percent times an entry in BTB found. */ 291 Stats::Formula BTBHitPct; 292 /** Stat for number of times the RAS is used to get a target. */ 293 Stats::Scalar usedRAS; 294 /** Stat for number of times the RAS is incorrect. */ 295 Stats::Scalar RASIncorrect; 296 297 protected: | 266 /** 267 * The per-thread predictor history. This is used to update the predictor 268 * as instructions are committed, or restore it to the proper state after 269 * a squash. 270 */ 271 std::vector<History> predHist; 272 273 /** The BTB. */ --- 17 unchanged lines hidden (view full) --- 291 /** Stat for percent times an entry in BTB found. */ 292 Stats::Formula BTBHitPct; 293 /** Stat for number of times the RAS is used to get a target. */ 294 Stats::Scalar usedRAS; 295 /** Stat for number of times the RAS is incorrect. */ 296 Stats::Scalar RASIncorrect; 297 298 protected: |
299 /** Number of bits to shift instructions by for predictor addresses. */ 300 const unsigned instShiftAmt; 301 |
|
298 /** 299 * @{ 300 * @name PMU Probe points. 301 */ 302 303 /** 304 * Helper method to instantiate probe points belonging to this 305 * object. --- 21 unchanged lines hidden --- | 302 /** 303 * @{ 304 * @name PMU Probe points. 305 */ 306 307 /** 308 * Helper method to instantiate probe points belonging to this 309 * object. --- 21 unchanged lines hidden --- |