クラス Onikiri::RMT

#include <RMT.h>

Onikiri::RMTに対する継承グラフ

Inheritance graph
[凡例]
Onikiri::RMTのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public メソッド

virtual int AllocateReg (OpIterator op, const int lno)
virtual bool CanAllocate (OpIterator *infoArray, int numOp)
virtual void DeallocateReg (OpIterator op, const int lno, int phyRegNo)
virtual int GetLogicalRegCount (int segment)
virtual int GetRegSegmentCount ()
virtual int GetTotalLogicalRegCount ()
virtual void Initialize (InitPhase phase)
virtual int PeekReg (const int lno) const
virtual void ReleaseReg (OpIterator op, const int lno, int phyRegNo)
virtual int ResolveReg (const int lno)
 RMT ()
virtual ~RMT ()

Static Public 変数

static HookPoint< RMT, HookParams_allocateRegHook
static HookPoint< RMT, HookParams_deallocateRegHook
static HookPoint< RMT, HookParams_releaseRegHook

Protected メソッド

virtual void AllocateRegBody (HookParam *param)
virtual void DeallocateRegBody (HookParam *param)
int GetRegisterSegmentID (int index)
virtual void ReleaseRegBody (HookParam *param)

Protected 変数

CheckpointedData< boost::array<
int, SimISAInfo::MAX_REG_COUNT > > 
m_allocationTable
CheckpointMasterm_checkpointMaster
Corem_core
EmulatorIFm_emulator
int m_numLogicalReg
int m_numRegSegment
RegisterFreeListm_regFreeList
RegisterFilem_registerFile
std::vector< int > m_releaseTable
boost::array< int, SimISAInfo::MAX_REG_COUNTm_segmentTable

構成

struct  HookParam

説明

RMT.h51 行で定義されています。


コンストラクタとデストラクタ

RMT::RMT (  ) 

RMT.cpp55 行で定義されています。

00055          :
00056     m_numLogicalReg(0),
00057     m_numRegSegment(0),
00058     m_core(0),
00059     m_checkpointMaster(0),
00060     m_emulator(0),
00061     m_registerFile(0),
00062     m_regFreeList(0),
00063     m_allocationTable()
00064 {
00065 }

RMT::~RMT (  )  [virtual]

RMT.cpp67 行で定義されています。

参照先 Onikiri::PhysicalResourceNode::ReleaseParam().

00068 {
00069     ReleaseParam();
00070 }

関数の呼び出しグラフ:


関数

int RMT::AllocateReg ( OpIterator  op,
const int  lno 
) [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp151 行で定義されています。

参照先 AllocateRegBody()Onikiri::HookEntry()Onikiri::RMT::HookParam::physicalRegNums_allocateRegHook.

00152 {
00153     HookParam hookParam = {op, lno, 0};
00154     HookEntry(
00155         this,
00156         &RMT::AllocateRegBody,
00157         &s_allocateRegHook,
00158         &hookParam 
00159     );
00160     return hookParam.physicalRegNum;
00161 }

関数の呼び出しグラフ:

void RMT::AllocateRegBody ( HookParam param  )  [protected, virtual]

RMT.cpp189 行で定義されています。

参照先 Onikiri::RegisterFreeList::Allocate()ASSERTOnikiri::Dependency::Clear()GetRegisterSegmentID()Onikiri::RMT::HookParam::logicalRegNumm_allocationTablem_numLogicalRegm_regFreeListm_releaseTableOnikiri::RMT::HookParam::physicalRegNum.

参照元 AllocateReg().

00190 {
00191     int lno = param->logicalRegNum;
00192     int segment = GetRegisterSegmentID( lno );
00193 
00194     ASSERT( 
00195         lno >= 0 && lno < m_numLogicalReg,
00196         "illegal register No.: %d\n", lno
00197     );
00198 
00199     // t[XgWX^
00200     int phyRegNo = m_regFreeList->Allocate( segment );
00201 
00202     // allocationWX^
00203     PhyReg* phyReg = (*m_registerFile)[ phyRegNo ];
00204     phyReg->Clear();
00205 
00206     // regcommitWX^m_releaseTableo^
00207     // reg_WX^WX^
00208     m_releaseTable[ phyRegNo ] = ( m_allocationTable.GetCurrent() )[ lno ];
00209 
00210     // <_WX^AWX^>}bsOe[uXV
00211     ( m_allocationTable.GetCurrent() )[ lno ] = phyRegNo;
00212 
00213     param->physicalRegNum = phyRegNo;
00214 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

bool RMT::CanAllocate ( OpIterator infoArray,
int  numOp 
) [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp248 行で定義されています。

参照先 Onikiri::RegisterFreeList::GetFreeEntryCount()GetRegisterSegmentID()m_numRegSegmentm_regFreeList.

00249 {
00250     // KvWX^ZOg
00251     boost::array<size_t, SimISAInfo::MAX_REG_SEGMENT_COUNT> requiredRegCount;
00252     requiredRegCount.assign(0);
00253 
00254     for(int i = 0; i < numOp; ++i) {
00255         OpInfo* opInfo = infoArray[i]->GetOpInfo();
00256 
00257         int dstNum = opInfo->GetDstNum();
00258         for( int k = 0; k < dstNum; ++k ){
00259             int dstOperand = opInfo->GetDstOperand( k );
00260             int segment = GetRegisterSegmentID( dstOperand );
00261             ++requiredRegCount[segment];
00262         }
00263     }
00264 
00265     // ZOg\f
00266     for(int m = 0; m < m_numRegSegment; ++m){
00267         size_t freeRegCount = (size_t)m_regFreeList->GetFreeEntryCount(m);
00268         if( freeRegCount < requiredRegCount[m] ) {
00269             return false;
00270         }
00271     }
00272     return true;
00273 }

関数の呼び出しグラフ:

void RMT::DeallocateReg ( OpIterator  op,
const int  lno,
int  phyRegNo 
) [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp176 行で定義されています。

参照先 DeallocateRegBody()Onikiri::HookEntry()s_deallocateRegHook.

00177 {
00178     HookParam hookParam = { op, lno, phyRegNo };
00179     HookEntry(
00180         this,
00181         &RMT::DeallocateRegBody,
00182         &s_deallocateRegHook,
00183         &hookParam 
00184     );
00185 }

関数の呼び出しグラフ:

void RMT::DeallocateRegBody ( HookParam param  )  [protected, virtual]

RMT.cpp234 行で定義されています。

参照先 ASSERTGetRegisterSegmentID()Onikiri::RMT::HookParam::logicalRegNumm_numLogicalRegm_regFreeListOnikiri::RMT::HookParam::physicalRegNumOnikiri::RegisterFreeList::Release().

参照元 DeallocateReg().

00235 {
00236     int lno = param->logicalRegNum;
00237     ASSERT(
00238         lno >= 0 && lno < m_numLogicalReg,
00239         "illegal register No.: %d\n", lno 
00240     );
00241 
00242     int segment = GetRegisterSegmentID( lno );
00243 
00244     m_regFreeList->Release( segment, param->physicalRegNum );
00245 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int RMT::GetLogicalRegCount ( int  segment  )  [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp281 行で定義されています。

参照先 m_numRegSegmentm_segmentTable.

00282 {
00283     if( segment >= m_numRegSegment )
00284         return 0;
00285 
00286     return m_segmentTable[segment];
00287 }

int Onikiri::RMT::GetRegisterSegmentID ( int  index  )  [inline, protected]

RMT.h85 行で定義されています。

参照先 m_segmentTable.

参照元 AllocateRegBody()CanAllocate()DeallocateRegBody()Initialize()ReleaseRegBody().

00086         {
00087             return m_segmentTable[index];
00088         }

Here is the caller graph for this function:

int RMT::GetRegSegmentCount (  )  [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp276 行で定義されています。

参照先 m_numRegSegment.

00277 {
00278     return m_numRegSegment;
00279 }

int RMT::GetTotalLogicalRegCount (  )  [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp289 行で定義されています。

参照先 m_numLogicalReg.

00290 {
00291     return m_numLogicalReg;
00292 }

void RMT::Initialize ( InitPhase  phase  )  [virtual]

RMT.cpp72 行で定義されています。

参照先 Onikiri::RegisterFreeList::Allocate()Onikiri::PhysicalResourceNode::CheckNodeInitialized()Onikiri::Dependency::Clear()Onikiri::EmulatorIF::GetInitialRegValue()Onikiri::EmulatorIF::GetISAInfo()Onikiri::ISAInfoIF::GetRegisterCount()Onikiri::ISAInfoIF::GetRegisterSegmentCount()GetRegisterSegmentID()Onikiri::ISAInfoIF::GetRegisterSegmentID()Onikiri::RegisterFile::GetTotalCapacity()Onikiri::PhysicalResourceNode::INIT_POST_CONNECTIONm_allocationTablem_checkpointMasterm_emulatorm_numLogicalRegm_numRegSegmentm_regFreeListm_registerFilem_releaseTablem_segmentTableOnikiri::Dependency::Set()Onikiri::PhyReg::SetVal()Onikiri::CheckpointMaster::SLOT_RENAME.

00073 {
00074     if(phase == INIT_POST_CONNECTION){
00075         // o`FbN
00076         CheckNodeInitialized( "registerFile",   m_registerFile );
00077         CheckNodeInitialized( "regFreeList",    m_regFreeList );
00078         CheckNodeInitialized( "emulator",       m_emulator );
00079         CheckNodeInitialized( "checkpointMaster", m_checkpointMaster );
00080 
00081         ISAInfoIF* isaInfo = m_emulator->GetISAInfo();
00082 
00083         m_numLogicalReg = isaInfo->GetRegisterCount();
00084         m_numRegSegment = isaInfo->GetRegisterSegmentCount();
00085 
00086         // checkpointedData 
00087         CheckpointMaster* checkpointMaster = m_checkpointMaster;
00088         m_allocationTable.Initialize(
00089             checkpointMaster,
00090             CheckpointMaster::SLOT_RENAME
00091         );
00092 
00093         // ZOge[ui[
00094         m_segmentTable.assign(-1);
00095         for (int i = 0; i < m_numLogicalReg; ++i) {
00096             int segment = isaInfo->GetRegisterSegmentID(i);
00097             m_segmentTable[i] = segment;
00098         }
00099         vector<int> logicalRegNum( m_numRegSegment , 0 );
00100         
00101         // _WX^WX^
00102         for (int i = 0; i < m_numLogicalReg; i++) {
00103             // freelist 1WX^
00104             int segment = GetRegisterSegmentID(i);
00105             int phyRegNo = m_regFreeList->Allocate(segment);
00106             logicalRegNum[segment]++;
00107 
00108             // _WX^WX^
00109             (*m_allocationTable)[i] = phyRegNo;
00110 
00111             // WX^
00112             // allocate
00113             PhyReg* phyReg = (*m_registerFile)[phyRegNo];
00114             phyReg->Clear();
00115 
00116             // SfB
00117             phyReg->Set();
00118             // value  m_emulator
00119             phyReg->SetVal(m_emulator->GetInitialRegValue(0, i));
00120         }
00121 
00122         // pe[u
00123         // fXeBl[VWX^WX^
00124         // 
00125         m_releaseTable.resize(m_registerFile->GetTotalCapacity(), -1);
00126     }
00127 }

関数の呼び出しグラフ:

int RMT::PeekReg ( const int  lno  )  const [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp139 行で定義されています。

参照先 ASSERTm_allocationTablem_numLogicalReg.

参照元 ResolveReg().

00140 {
00141     ASSERT(
00142         lno >= 0 && lno < m_numLogicalReg,
00143         "illegal register No.: %d\n", lno
00144     );
00145 
00146     return ( m_allocationTable.GetCurrent() )[lno];
00147 }

Here is the caller graph for this function:

void RMT::ReleaseReg ( OpIterator  op,
const int  lno,
int  phyRegNo 
) [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp164 行で定義されています。

参照先 Onikiri::HookEntry()ReleaseRegBody()s_releaseRegHook.

00165 {
00166     HookParam hookParam = { op, lno, phyRegNo };
00167     HookEntry(
00168         this,
00169         &RMT::ReleaseRegBody,
00170         &s_releaseRegHook,
00171         &hookParam 
00172     );
00173 }

関数の呼び出しグラフ:

void RMT::ReleaseRegBody ( HookParam param  )  [protected, virtual]

RMT.cpp217 行で定義されています。

参照先 ASSERTGetRegisterSegmentID()Onikiri::RMT::HookParam::logicalRegNumm_numLogicalRegm_regFreeListm_releaseTableOnikiri::RMT::HookParam::physicalRegNumOnikiri::RegisterFreeList::Release().

参照元 ReleaseReg().

00218 {
00219     int lno = param->logicalRegNum;
00220     ASSERT(
00221         lno >= 0 && lno < m_numLogicalReg,
00222         "illegal register No.: %d\n", lno 
00223     );
00224     
00225     int segment = GetRegisterSegmentID( lno );
00226 
00227     // WX^t[Xg
00228     int releasedPhyReg = m_releaseTable[ param->physicalRegNum ];
00229     m_regFreeList->Release( segment, releasedPhyReg );
00230     param->physicalRegNum = releasedPhyReg;
00231 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int RMT::ResolveReg ( const int  lno  )  [virtual]

Onikiri::RegDepPredIFを実装しています。

RMT.cpp130 行で定義されています。

参照先 PeekReg().

00131 {
00132     // RMT CResolveReg pC
00133     // PeekReg 
00134     return PeekReg(lno);
00135 }

関数の呼び出しグラフ:


変数

CheckpointedData< boost::array< int, SimISAInfo::MAX_REG_COUNT > > Onikiri::RMT::m_allocationTable [protected]

RMT.h78 行で定義されています。

参照元 AllocateRegBody()Initialize()PeekReg().

CheckpointMaster* Onikiri::RMT::m_checkpointMaster [protected]

RMT.h60 行で定義されています。

参照元 Initialize().

Core* Onikiri::RMT::m_core [protected]

RMT.h59 行で定義されています。

EmulatorIF* Onikiri::RMT::m_emulator [protected]

RMT.h63 行で定義されています。

参照元 Initialize().

int Onikiri::RMT::m_numLogicalReg [protected]

RMT.h55 行で定義されています。

参照元 AllocateRegBody()DeallocateRegBody()GetTotalLogicalRegCount()Initialize()PeekReg()ReleaseRegBody().

int Onikiri::RMT::m_numRegSegment [protected]

RMT.h56 行で定義されています。

参照元 CanAllocate()GetLogicalRegCount()GetRegSegmentCount()Initialize().

RegisterFreeList* Onikiri::RMT::m_regFreeList [protected]

RMT.h73 行で定義されています。

参照元 AllocateRegBody()CanAllocate()DeallocateRegBody()Initialize()ReleaseRegBody().

RegisterFile* Onikiri::RMT::m_registerFile [protected]

RMT.h66 行で定義されています。

参照元 Initialize().

std::vector<int> Onikiri::RMT::m_releaseTable [protected]

RMT.h82 行で定義されています。

参照元 AllocateRegBody()Initialize()ReleaseRegBody().

boost::array<int, SimISAInfo::MAX_REG_COUNT> Onikiri::RMT::m_segmentTable [protected]

RMT.h69 行で定義されています。

参照元 GetLogicalRegCount()GetRegisterSegmentID()Initialize().

HookPoint< RMT, RMT::HookParam > Onikiri::RMT::s_allocateRegHook [static]

RMT.h149 行で定義されています。

参照元 AllocateReg().

HookPoint< RMT, RMT::HookParam > Onikiri::RMT::s_deallocateRegHook [static]

RMT.h151 行で定義されています。

参照元 DeallocateReg().

HookPoint< RMT, RMT::HookParam > Onikiri::RMT::s_releaseRegHook [static]

RMT.h150 行で定義されています。

参照元 ReleaseReg().


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:19:21 2013に生成されました。  doxygen 1.4.7