src/Sim/Thread/Thread.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_THREAD_THREAD_H
00033 #define SIM_THREAD_THREAD_H
00034 
00035 #include "Sim/Foundation/Hook/HookDecl.h"
00036 #include "Sim/Foundation/Resource/ResourceNode.h"
00037 #include "Sim/Foundation/Checkpoint/CheckpointedData.h"
00038 
00039 
00040 namespace Onikiri 
00041 {
00042     class EmulatorIF;
00043     class Core;
00044     class InorderList;
00045     class CheckpointMaster;
00046     class MemOrderManager;
00047     class RegDepPredIF;
00048     class MemDepPredIF;
00049     class Recoverer;
00050 
00051     class Thread : 
00052         public PhysicalResourceNode
00053     {
00054         
00055     public:
00056         BEGIN_RESOURCE_MAP()
00057             RESOURCE_ENTRY( EmulatorIF,         "emulator",         m_emulator )
00058             RESOURCE_ENTRY( InorderList,        "inorderList",      m_inorderList )
00059             RESOURCE_ENTRY( MemOrderManager,    "memOrderManager",  m_memOrderManager )
00060             RESOURCE_ENTRY( CheckpointMaster,   "checkpointMaster", m_checkpointMaster )
00061             RESOURCE_ENTRY( RegDepPredIF,       "regDepPred",       m_regDepPred )
00062             RESOURCE_ENTRY( MemDepPredIF,       "memDepPred",       m_memDepPred )
00063             RESOURCE_ENTRY( Core,               "core",             m_core )
00064             RESOURCE_ENTRY( Recoverer,          "recoverer",        m_recoverer )
00065         END_RESOURCE_MAP()
00066 
00067         Thread();
00068         virtual ~Thread();
00069         void Initialize(InitPhase phase);
00070 
00071         int GetTID();
00072         int GetTID( const int index );
00073         void SetLocalThreadID(int localTID);
00074         int  GetLocalThreadID() const;
00075 
00076         bool IsActive();
00077         void Activate( bool active );
00078         void InitializeContext(PC pc);
00079 
00080         void SetFetchPC(const PC& pc);
00081         PC   GetFetchPC() const;
00082         u64  GetOpRetiredID();
00083         u64  GetOpSerialID();
00084         void AddOpRetiredID(u64 num);
00085         void AddOpSerialID(u64 num);
00086 
00087         void SetThreadCount(const int count);
00088         // accessors
00089         Core*               GetCore()               const   { return m_core;                }
00090         InorderList*        GetInorderList()        const   { return m_inorderList;         }
00091         MemOrderManager*    GetMemOrderManager()    const   { return m_memOrderManager;     }
00092         CheckpointMaster*   GetCheckpointMaster()   const   { return m_checkpointMaster;    }
00093         RegDepPredIF*       GetRegDepPred()         const   { return m_regDepPred;          }
00094         MemDepPredIF*       GetMemDepPred()         const   { return m_memDepPred;          }
00095         Recoverer*          GetRecoverer()          const   { return m_recoverer;           }
00096 
00097     private:
00098         // member variables
00099         EmulatorIF*         m_emulator;
00100         Core*               m_core;
00101         InorderList*        m_inorderList;
00102         CheckpointMaster*   m_checkpointMaster;
00103         MemOrderManager*    m_memOrderManager;
00104         RegDepPredIF*       m_regDepPred;
00105         MemDepPredIF*       m_memDepPred;
00106         Recoverer*          m_recoverer;
00107 
00108         int m_localTID;
00109         bool m_active;
00110         CheckpointedData<PC> m_fetchPC;
00111 
00112         // ^CAUOpCfbNX
00113         // FetchiKUA`FbN|Cg
00114         CheckpointedData<u64> m_retiredOpID; 
00115         u64 m_serialOpID; 
00116 
00117     };  // class Thread
00118 
00119 }   // namespace Onikiri 
00120 
00121 #endif  // #ifndef SIM_THREAD_THREAD_H
00122 
00123 

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