src/Sim/Dumper/DumpState.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_DUMPER_DUMP_STATE_H
00033 #define SIM_DUMPER_DUMP_STATE_H
00034 
00035 
00036 namespace Onikiri 
00037 {
00038     enum DUMP_STATE
00039     {
00040         DS_FETCH = 0,
00041         DS_RENAME,
00042         DS_DISPATCH,
00043         DS_SCHEDULE_R,
00044         DS_SCHEDULE_W,
00045         DS_WAITING_UNIT,
00046         DS_READY_SIG,
00047         DS_WAKEUP,
00048         DS_SELECT,
00049         DS_ISSUE_PRE,
00050         DS_ISSUE,
00051         DS_EXECUTE,
00052         DS_WRITEBACK,
00053         DS_COMMITTABLE,
00054         DS_COMMIT,
00055         DS_RETIRE,
00056 
00057         DS_STALL,
00058         DS_FLUSH,
00059         DS_RESCHEDULE,
00060         DS_RESC_REISSUE_EVENT,
00061         DS_RESC_REISSUE_FINISH,
00062         DS_RESC_LPREDMISS,
00063         DS_BRANCH_PREDICTION_MISS,
00064         DS_LATENCY_PREDICTION_MISS,
00065         DS_ADDRESS_PREDICTION_MISS,
00066         DS_LATENCY_PREDICTION_UPDATE,
00067 
00068         DS_INVALID
00069     };
00070 
00071     // Lanes are used for print stages that are independent each other.
00072     // For example, normal pipeline stages and stall states are managed 
00073     // independently, and stall states are overlayed on normal stages.
00074     // Users can overlay user defined stages on them by calling
00075     // PrintRawOutput with DL_USER_0 or a later constant.
00076     enum DumpLane
00077     {
00078         DL_OP    = 0,       // Reserved for dumping normal pipeline stages.
00079         DL_STALL = 1,       // Reserved for dumping stall states.
00080         DL_USER_0,
00081         DL_USER_1,
00082         DL_USER_2,
00083         DL_USER_3
00084     };
00085 
00086     // Users can print user defined dependency arrows by calling 
00087     // PrintOpDependency with DDT_USER_0 or a later constant.
00088     enum DumpDependency
00089     {
00090         DDT_WAKEUP = 0,     // Reserved for dumping wakeup.
00091         DDT_USER_0,
00092         DDT_USER_1,
00093         DDT_USER_2,
00094     };
00095 
00096 
00097     static const char* g_traceDumperStrTbl[] = 
00098     {
00099         "fetch          ",  // DS_FETCH
00100         "rename         ",  // DS_RENAME
00101         "dispatch       ",  // DS_DISPATCH
00102         "schedule(r)    ",  // DS_SCHEDULE_R
00103         "schedule(w)    ",  // DS_SCHEDULE_W
00104         "waiting unit   ",  // DS_WAITING_UNIT
00105         "ready sig      ",  // DS_READY_SIG
00106         "wakeup         ",  // DS_WAKEUP
00107         "select         ",  // DS_SELECT
00108         "issue pre      ",  // DS_ISSUE_PRE
00109         "issue          ",  // DS_ISSUE
00110         "execute        ",  // DS_EXECUTE
00111         "writeback      ",  // DS_WRITEBACK
00112         "committable   ",   // DS_COMMITTABLE
00113         "commit         ",  // DS_COMMIT
00114         "retire         ",  // DS_RETIRE
00115 
00116         "stall          ",  // DS_STALL
00117         "flush          ",  // DS_FLUSH
00118         "reschedule     ",  // DS_RESCHEDULE
00119         "rsc event      ",  // DS_RESC_REISSUE_EVENT
00120         "rsc finish     ",  // DS_RESC_REISSUE_FINISH
00121         "rsc ltpred miss",  // DS_RESC_LPREDMISS
00122         "br  pred miss  ",  // DS_BRANCH_PREDICTION_MISS
00123         "lat pred miss  ",  // DS_LATENCY_PREDICTION_MISS
00124         "adr pred miss  ",  // DS_ADDRESS_PREDICTION_MISS
00125         "lat pred update",  // DS_LATENCY_PREDICTION_UPDATE
00126 
00127     };
00128 
00129     static const char* g_visualizerDumperStrTbl[] = 
00130     {
00131         "F",    // DS_FETCH
00132         "Rn",   // DS_RENAME
00133         "D",    // DS_DISPATCH
00134         "Sr",   // DS_SCHEDULE_R
00135         "Sw",   // DS_SCHEDULE_W
00136         "Wat",  // DS_WAITING_UNIT
00137         "rs",   // DS_READY_SIG
00138         "Wku",  // DS_WAKEUP
00139         "Slc",  // DS_SELECT
00140         "Ip",   // DS_ISSUE_PRE
00141         "I",    // DS_ISSUE
00142         "X",    // DS_EXECUTE
00143         "Wb",   // DS_WRITEBACK
00144         "f",    // DS_COMMITTABLE
00145         "Cm",   // DS_COMMIT
00146         "Rt",   // DS_RETIRE
00147 
00148         "stl",  // DS_STALL
00149         "fls",  // DS_FLUSH
00150         "rsc",  // DS_RESCHEDULE
00151         "rse",  // DS_RESC_REISSUE_EVENT
00152         "rsf",  // DS_RESC_REISSUE_FINISH
00153         "rsl",  // DS_RESC_LPREDMISS
00154         "Xbm",  // DS_BRANCH_PREDICTION_MISS
00155         "Xlm",  // DS_LATENCY_PREDICTION_MISS
00156         "Xam",  // DS_ADDRESS_PREDICTION_MISS
00157         "Xlu",  // DS_LATENCY_PREDICTION_UPDATE
00158     };
00159 
00160     inline const char* GetTraceDumperStr( DUMP_STATE state )
00161     {
00162         return g_traceDumperStrTbl[ state ];
00163     }
00164 
00165     inline const char* GetVisualizerDumperStr( DUMP_STATE state )
00166     {
00167         return g_visualizerDumperStrTbl[ state ];
00168     }
00169 }
00170 
00171 
00172 #endif // SIM_DUMPER_DUMP_STATE_H
00173 

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