src/Sim/System/SimulationSystem/EmulatorWrapper.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 __EMULATOR_WRAPPER_H
00033 #define __EMULATOR_WRAPPER_H
00034 
00035 #include "Interface/EmulatorIF.h"
00036 #include "Sim/Foundation/Resource/ResourceNode.h"
00037 
00038 namespace Onikiri 
00039 {
00040     class EmulatorWrapper : 
00041         public EmulatorIF, 
00042         public PhysicalResourceNode
00043     {
00044         EmulatorIF* m_body;
00045     public:
00046 
00047         EmulatorWrapper()
00048         {
00049             m_body = NULL;
00050         }
00051 
00052         ~EmulatorWrapper()
00053         {
00054             ReleaseParam();
00055         }
00056 
00057         void SetEmulator( EmulatorIF* body )
00058         {
00059             m_body = body;
00060         }
00061 
00062         //
00063         // PhysicalResourceNode
00064         //
00065         BEGIN_RESOURCE_MAP()
00066         END_RESOURCE_MAP()
00067 
00068         void Initialize(InitPhase phase)
00069         {
00070         };
00071 
00072 
00073         //
00074         // EmulatorIF
00075         //
00076         std::pair<OpInfo**, int> GetOp(PC pc)
00077         {
00078             return m_body->GetOp( pc );
00079         }
00080 
00081         MemIF* GetMemImage()
00082         {
00083             return m_body->GetMemImage();
00084         }
00085 
00086         void Execute( OpStateIF* opStateIF, OpInfo* opInfo )
00087         {
00088             m_body->Execute( opStateIF, opInfo );
00089         }
00090 
00091         void Commit( OpStateIF* opStateIF, OpInfo* opInfo )
00092         {
00093             m_body->Commit( opStateIF, opInfo );
00094         }
00095 
00096         int GetProcessCount() const
00097         {
00098             return m_body->GetProcessCount();
00099         }
00100 
00101         PC GetEntryPoint(int pid) const
00102         {
00103             return m_body->GetEntryPoint( pid );
00104         }
00105 
00106         u64 GetInitialRegValue(int pid, int index) const
00107         {
00108             return m_body->GetInitialRegValue( pid, index );
00109         }
00110 
00111         ISAInfoIF* GetISAInfo()
00112         {
00113             return m_body->GetISAInfo();
00114         }
00115 
00116         PC Skip(PC pc, u64 skipCount, u64* regArray, u64* executedInsnCount, u64* executedOpCount)
00117         {
00118             return m_body->Skip( pc, skipCount, regArray, executedInsnCount, executedOpCount );
00119         }
00120 
00121         void SetExtraOpDecoder( ExtraOpDecoderIF* extraOpDecoder ) 
00122         {
00123             m_body->SetExtraOpDecoder( extraOpDecoder );
00124         }
00125     };
00126 }
00127 
00128 #endif // #ifndef __EMULATOR_WRAPPER_H

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