#include <RMT.h>
Onikiri::RMTに対する継承グラフ
RMT::RMT | ( | ) |
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] |
int RMT::AllocateReg | ( | OpIterator | op, | |
const int | lno | |||
) | [virtual] |
Onikiri::RegDepPredIFを実装しています。
参照先 AllocateRegBody()・Onikiri::HookEntry()・Onikiri::RMT::HookParam::physicalRegNum・s_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] |
参照先 Onikiri::RegisterFreeList::Allocate()・ASSERT・Onikiri::Dependency::Clear()・GetRegisterSegmentID()・Onikiri::RMT::HookParam::logicalRegNum・m_allocationTable・m_numLogicalReg・m_regFreeList・m_releaseTable・Onikiri::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を実装しています。
参照先 Onikiri::RegisterFreeList::GetFreeEntryCount()・GetRegisterSegmentID()・m_numRegSegment・m_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を実装しています。
参照先 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] |
参照先 ASSERT・GetRegisterSegmentID()・Onikiri::RMT::HookParam::logicalRegNum・m_numLogicalReg・m_regFreeList・Onikiri::RMT::HookParam::physicalRegNum・Onikiri::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を実装しています。
参照先 m_numRegSegment・m_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] |
参照先 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] |
int RMT::GetTotalLogicalRegCount | ( | ) | [virtual] |
void RMT::Initialize | ( | InitPhase | phase | ) | [virtual] |
参照先 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_CONNECTION・m_allocationTable・m_checkpointMaster・m_emulator・m_numLogicalReg・m_numRegSegment・m_regFreeList・m_registerFile・m_releaseTable・m_segmentTable・Onikiri::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を実装しています。
参照先 ASSERT・m_allocationTable・m_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を実装しています。
参照先 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] |
参照先 ASSERT・GetRegisterSegmentID()・Onikiri::RMT::HookParam::logicalRegNum・m_numLogicalReg・m_regFreeList・m_releaseTable・Onikiri::RMT::HookParam::physicalRegNum・Onikiri::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を実装しています。
参照先 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] |
CheckpointMaster* Onikiri::RMT::m_checkpointMaster [protected] |
Core* Onikiri::RMT::m_core [protected] |
EmulatorIF* Onikiri::RMT::m_emulator [protected] |
int Onikiri::RMT::m_numLogicalReg [protected] |
int Onikiri::RMT::m_numRegSegment [protected] |
RegisterFreeList* Onikiri::RMT::m_regFreeList [protected] |
RegisterFile* Onikiri::RMT::m_registerFile [protected] |
std::vector<int> Onikiri::RMT::m_releaseTable [protected] |
boost::array<int, SimISAInfo::MAX_REG_COUNT> Onikiri::RMT::m_segmentTable [protected] |
HookPoint< RMT, RMT::HookParam > Onikiri::RMT::s_allocateRegHook [static] |
HookPoint< RMT, RMT::HookParam > Onikiri::RMT::s_deallocateRegHook [static] |
HookPoint< RMT, RMT::HookParam > Onikiri::RMT::s_releaseRegHook [static] |