src/Sim/Predictor/LatPred/LatPred.h

説明を見る。
00001 // 
00002 // Copyright (c) 2005-2008 Kenichi Watanabe.
00003 // Copyright (c) 2005-2008 Yasuhiro Watari.
00004 // Copyright (c) 2005-2008 Hironori Ichibayashi.
00005 // Copyright (c) 2008-2009 Kazuo Horio.
00006 // Copyright (c) 2009-2013 Naruki Kurata.
00007 // Copyright (c) 2005-2013 Ryota Shioya.
00008 // Copyright (c) 2005-2013 Masahiro Goshima.
00009 // 
00010 // This software is provided 'as-is', without any express or implied
00011 // warranty. In no event will the authors be held liable for any damages
00012 // arising from the use of this software.
00013 // 
00014 // Permission is granted to anyone to use this software for any purpose,
00015 // including commercial applications, and to alter it and redistribute it
00016 // freely, subject to the following restrictions:
00017 // 
00018 // 1. The origin of this software must not be misrepresented; you must not
00019 // claim that you wrote the original software. If you use this software
00020 // in a product, an acknowledgment in the product documentation would be
00021 // appreciated but is not required.
00022 // 
00023 // 2. Altered source versions must be plainly marked as such, and must not be
00024 // misrepresented as being the original software.
00025 // 
00026 // 3. This notice may not be removed or altered from any source
00027 // distribution.
00028 // 
00029 // 
00030 
00031 
00032 #ifndef SIM_PREDICTOR_LAD_PRED_LAD_PRED_H
00033 #define SIM_PREDICTOR_LAD_PRED_LAD_PRED_H
00034 
00035 #include "Sim/Predictor/LatPred/LatPredResult.h"
00036 #include "Sim/Op/OpArray/OpArray.h"
00037 #include "Sim/Op/OpContainer/OpExtraStateTable.h"
00038 #include "Sim/Foundation/Resource/ResourceNode.h"
00039 #include "Sim/ExecUnit/ExecLatencyInfo.h"
00040 #include "Sim/Foundation/Hook/Hook.h"
00041 #include "Sim/Predictor/HitMissPred/HitMissPredIF.h"
00042 
00043 namespace Onikiri 
00044 {
00045     class Core;
00046     
00047     // CeV\XPW[OfLatPred.cppQ
00048     // Latency predictor
00049     class LatPred :
00050         public PhysicalResourceNode
00051     {
00052     public:
00053         BEGIN_PARAM_MAP( GetResultPath() )
00054             PARAM_ENTRY( "@NumHit",     m_numHit )
00055             PARAM_ENTRY( "@NumMiss",    m_numMiss )
00056             RESULT_RATE_SUM_ENTRY( 
00057                 "@PredictionHitRate", m_numHit, m_numHit, m_numMiss
00058             )
00059             
00060             PARAM_ENTRY( "@NumLoadHitPredToHit",    m_numLoadHitPredToHit )
00061             PARAM_ENTRY( "@NumLoadHitPredToMiss",   m_numLoadHitPredToMiss )
00062             RESULT_RATE_SUM_ENTRY(
00063                 "@PredictionHitRatePredToHit", 
00064                 m_numLoadHitPredToHit, m_numLoadHitPredToHit, m_numLoadMissPredToHit
00065             )   // L1qbg\\I
00066             
00067             PARAM_ENTRY("@NumLoadMissPredToHit",    m_numLoadMissPredToHit )    
00068             PARAM_ENTRY("@NumLoadMissPredToMiss",   m_numLoadMissPredToMiss )
00069             RESULT_RATE_SUM_ENTRY(
00070                 "@PredictionHitRatePredAsMiss",
00071                 m_numLoadMissPredToMiss, m_numLoadHitPredToMiss, m_numLoadMissPredToMiss
00072             )   // L1~X\\I
00073         END_PARAM_MAP()
00074 
00075         BEGIN_RESOURCE_MAP()
00076             RESOURCE_ENTRY( ExecLatencyInfo, "execLatencyInfo", m_execLatencyInfo )
00077             RESOURCE_ENTRY( HitMissPredIF, "hitMissPred",     m_hmPredictor)
00078             RESOURCE_ENTRY( Core, "core",     m_core)
00079         END_RESOURCE_MAP()
00080 
00081         LatPred();
00082         ~LatPred();
00083         void Initialize( InitPhase phase );
00084         void Predict( OpIterator op );
00085         void Finished( OpIterator op );
00086         void Commit( OpIterator op );
00087         HitMissPredIF* GetHitMissPred() { return m_hmPredictor; }
00088 
00089         static HookPoint<LatPred> s_latencyPredictionHook;
00090 
00091     protected:
00092         // ZbgKタsCeV
00093         ExecLatencyInfo* m_execLatencyInfo;
00094         // LbVHit/Miss\
00095         HitMissPredIF* m_hmPredictor;
00096 
00097         Core* m_core;
00098 
00099         u64 m_numHit;                   // Prediction is hit.
00100         u64 m_numMiss;                  // Prediction is miss.
00101         u64 m_numLoadHitPredToHit;      // A load is predicted to hit  and it hit.
00102         u64 m_numLoadHitPredToMiss;     // A load is predicted to miss and it hit.
00103         u64 m_numLoadMissPredToHit;     // A load is predicted to hit  and it missed.
00104         u64 m_numLoadMissPredToMiss;    // A load is predicted to miss  and it missed.
00105 
00106 
00107     };
00108 
00109 }; // namespace Onikiri
00110 
00111 #endif // SIM_PREDICTOR_LAD_PRED_LAD_PRED_H
00112 

Onikiri2に対してTue Jun 18 14:34:25 2013に生成されました。  doxygen 1.4.7