クラス Onikiri::Op

#include <Op.h>

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

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

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

Public 型

typedef EventList::MaskType EventMask

Public メソッド

void AddEvent (const EventPtr &evnt, TimeWheelBase *timeWheel, int time, EventMask mask=EVENT_MASK_DEFAULT)
void CancelEvent (EventMask mask=EVENT_MASK_ALL)
void ClearEvent ()
void ClearWakeupEvent ()
void DissolveSrcMem ()
void DissolveSrcReg ()
void ExecutionBegin ()
void ExecutionEnd ()
CheckpointGetAfterCheckpoint () const
CheckpointGetBeforeCheckpoint () const
const CacheAccessResultGetCacheAccessResult () const
CoreGetCore () const
virtual const u64 GetDst (const int index) const
DependencyGetDstDep (int index) const
int GetDstDepNum () const
MemDependencyPtr GetDstMem (int index) const
PhyRegGetDstPhyReg (int index) const
int GetDstReg (int index)
int GetDstRegNum () const
const ExceptionGetException () const
ExecUnitIFGetExecUnit () const
OpIterator GetFirstConsumer ()
u64 GetGlobalSerialID () const
InorderListGetInorderList () const
const IssueStateGetIssueState () const
const OpIterator GetIterator () const
const LatPredResultGetLatPredRsult () const
int GetLocalTID () const
const MemAccessGetMemAccess () const
PC GetNextPC ()
int GetNo () const
const OpClassGetOpClass () const
OpInfo *const GetOpInfo () const
virtual PC GetPC () const
PC GetPredPC () const
bool GetReserveExecUnit () const
u64 GetRetireID () const
SchedulerGetScheduler () const
u64 GetSerialID () const
virtual const u64 GetSrc (const int index) const
MemDependencyPtr GetSrcMem (int index) const
int GetSrcReg (int index)
int GetSrcRegNum () const
OpStatus GetStatus () const
virtual bool GetTaken () const
virtual PC GetTakenPC () const
ThreadGetThread () const
void Initialize (const OpInitArgs &args)
bool IsDispatched () const
bool IsSrcReady (int index, const DependencySet *newDeps=NULL) const
 Op (OpIterator iterator)
virtual void Read (MemAccess *access)
void RescheduleSelf (bool clearIssueState)
void ResetDependency ()
void SetAfterCheckpoint (Checkpoint *checkpoint)
void SetBeforeCheckpoint (Checkpoint *checkpoint)
void SetCacheAccessResult (const CacheAccessResult &cacheAccessResult)
virtual void SetDst (const int index, const u64 value)
void SetDstMem (int index, MemDependencyPtr dstMem)
void SetDstReg (int index, int phyRegNo)
void SetException (const Exception &exception)
void SetIssueState (const IssueState &issueState)
void SetLatPredRsult (const LatPredResult &result)
void SetMemAccess (const MemAccess &memAccess)
void SetPredPC (const PC predPC)
void SetReserveExecUnit (bool reserveExecUnit)
void SetScheduler (Scheduler *scheduler)
void SetSrcMem (int index, MemDependencyPtr memDep)
void SetSrcReg (int index, int phyRegNo)
void SetStatus (OpStatus status)
virtual void SetTaken (const bool taken)
virtual void SetTakenPC (const PC takenPC)
std::string ToString (int detail=5, bool valDetail=false, const char *="\t")
virtual void Write (MemAccess *access)
void WriteExecutionResults ()
virtual ~Op ()

Static Public 変数

static const int EVENT_MASK_ALL = EventList::EVENT_MASK_ALL
static const int EVENT_MASK_DEFAULT = 1 << EventList::EVENT_MASK_POS_DEFAULT
static const int EVENT_MASK_WAKEUP_RELATED = 1 << EventList::EVENT_MASK_POS_USER
static const int MAX_DST_MEM_NUM = 1
static const int MAX_SRC_MEM_NUM = 1
static const int UNSET_REG = -1

Protected メソッド

PhyRegGetPhyReg (int phyRegNo)

Protected 変数

Checkpointm_afterCheckpoint
Checkpointm_beforeCheckpoint
CacheAccessResult m_cacheAccessResult
Corem_core
MemDependencyPtr m_dstMem [MAX_DST_MEM_NUM]
int m_dstNum
PhyRegm_dstPhyReg [SimISAInfo::MAX_DST_REG_COUNT]
int m_dstReg [SimISAInfo::MAX_DST_REG_COUNT]
u64 m_dstResultValue [SimISAInfo::MAX_DST_REG_COUNT]
EventList m_event
Exception m_exception
u64 m_globalSerialID
InorderListm_inorderList
IssueState m_issueState
OpIterator m_iterator
LatPredResult m_latPredResult
int m_localTID
MemAccess m_memAccess
int m_no
const OpClassm_opClass
OpInfom_opInfo
PC m_pc
PC m_predPC
RegisterFilem_regFile
bool m_reserveExecUnit
u64 m_retireID
Schedulerm_scheduler
u64 m_serialID
MemDependencyPtr m_srcMem [MAX_SRC_MEM_NUM]
int m_srcNum
PhyRegm_srcPhyReg [SimISAInfo::MAX_SRC_REG_COUNT]
int m_srcReg [SimISAInfo::MAX_SRC_REG_COUNT]
OpStatus m_status
bool m_taken
PC m_takenPC
Threadm_thread

説明

Op.h68 行で定義されています。


型定義

typedef EventList::MaskType Onikiri::Op::EventMask

Op.h77 行で定義されています。


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

Op::Op ( OpIterator  iterator  ) 

Op.cpp57 行で定義されています。

00057                           :
00058     m_opInfo     (0),
00059     m_opClass    (0),
00060     m_no         (0),
00061     m_localTID   (TID_INVALID),
00062     m_serialID   (0),
00063     m_globalSerialID     (0),
00064     m_retireID   (0),
00065     m_thread     (0),
00066     m_core       (0),
00067     m_inorderList(0),
00068     m_beforeCheckpoint (0), 
00069     m_afterCheckpoint (0), 
00070     m_taken      (false),
00071     m_latPredResult(),
00072     m_issueState (),
00073     m_scheduler  (0),
00074     m_regFile    (0),
00075     m_srcNum     (0),
00076     m_dstNum     (0),
00077     m_iterator   (iterator)
00078 {
00079 }

Op::~Op (  )  [virtual]

Op.cpp81 行で定義されています。

00082 {
00083 }


関数

void Op::AddEvent ( const EventPtr evnt,
TimeWheelBase timeWheel,
int  time,
EventMask  mask = EVENT_MASK_DEFAULT 
)

Op.cpp267 行で定義されています。

参照先 Onikiri::EventList::AddEvent()Onikiri::TimeWheelBase::AddEvent()m_event.

00273 {
00274     timeWheel->AddEvent( evnt, time );
00275     if( !evnt->IsUpdated() ){
00276         m_event.AddEvent( evnt, mask );
00277     }
00278 }

関数の呼び出しグラフ:

void Op::CancelEvent ( EventMask  mask = EVENT_MASK_ALL  ) 

Op.cpp280 行で定義されています。

参照先 Onikiri::EventList::Cancel()m_event.

参照元 RescheduleSelf().

00281 {
00282     m_event.Cancel( mask );
00283 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Op::ClearEvent (  ) 

Op.cpp285 行で定義されています。

参照先 Onikiri::EventList::Clear()m_event.

00286 {
00287     m_event.Clear();
00288 }

関数の呼び出しグラフ:

void Onikiri::Op::ClearWakeupEvent (  ) 

void Op::DissolveSrcMem (  ) 

Op.cpp352 行で定義されています。

参照先 GetStatus()m_iteratorm_srcMemMAX_SRC_MEM_NUMOnikiri::OpStatus::OS_FETCH.

00353 {
00354     if( GetStatus() == OpStatus::OS_FETCH ){
00355         return;
00356     }
00357     for( int i = 0; i < MAX_SRC_MEM_NUM; ++i ) {
00358         if( m_srcMem[i] != NULL ) {
00359             m_srcMem[i]->RemoveConsumer( m_iterator );
00360         }
00361     }
00362 }

関数の呼び出しグラフ:

void Op::DissolveSrcReg (  ) 

Op.cpp342 行で定義されています。

参照先 GetStatus()m_iteratorm_srcNumm_srcPhyRegOnikiri::OpStatus::OS_FETCH.

00343 {
00344     if( GetStatus() == OpStatus::OS_FETCH ){
00345         return;
00346     }
00347     for( int i = 0; i < m_srcNum; ++i ) {
00348         m_srcPhyReg[i]->RemoveConsumer( m_iterator );
00349     }
00350 }

関数の呼び出しグラフ:

void Op::ExecutionBegin (  ) 

Op.cpp321 行で定義されています。

参照先 Onikiri::EmulatorIF::Execute()Onikiri::Core::GetEmulator()m_corem_opInfo.

00322 {
00323     m_core->GetEmulator()->Execute(this, m_opInfo);
00324 }

関数の呼び出しグラフ:

void Op::ExecutionEnd (  ) 

Op.cpp326 行で定義されています。

参照先 ASSERTGetStatus()Onikiri::OpStatus::OS_EXECUTINGOnikiri::OpStatus::OS_FINISHEDSetStatus()WriteExecutionResults().

関数の呼び出しグラフ:

Checkpoint* Onikiri::Op::GetAfterCheckpoint (  )  const [inline]

Op.h211 行で定義されています。

参照先 m_afterCheckpoint.

00211 { return m_afterCheckpoint; }

Checkpoint* Onikiri::Op::GetBeforeCheckpoint (  )  const [inline]

Op.h209 行で定義されています。

参照先 m_beforeCheckpoint.

00209 { return m_beforeCheckpoint; }

const CacheAccessResult& Onikiri::Op::GetCacheAccessResult (  )  const [inline]

Op.h202 行で定義されています。

参照先 m_cacheAccessResult.

00203         { return m_cacheAccessResult;               }

Core* Onikiri::Op::GetCore (  )  const [inline]

Op.h188 行で定義されています。

参照先 m_core.

00188 { return m_core;          }

const u64 Op::GetDst ( const int  index  )  const [virtual]

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

Op.cpp163 行で定義されています。

参照先 ASSERTOnikiri::PhyReg::GetVal()m_dstPhyRegm_dstRegUNSET_REG.

参照元 ToString().

00164 {
00165     ASSERT(m_dstReg[index] != UNSET_REG,
00166         "physical register not set at index %d.", index);
00167 
00168     return m_dstPhyReg[index]->GetVal();
00169 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

Dependency * Op::GetDstDep ( int  index  )  const

Op.cpp474 行で定義されています。

参照先 GetDstPhyReg()m_dstMemm_dstNum.

参照元 ResetDependency().

00475 {
00476     if( index < m_dstNum ){
00477         return GetDstPhyReg( index );
00478     }
00479     else{
00480         return m_dstMem[ index - m_dstNum ].get();
00481     }
00482 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int Op::GetDstDepNum (  )  const

Op.cpp460 行で定義されています。

参照先 m_dstMemm_dstNumMAX_DST_MEM_NUM.

参照元 ResetDependency().

00461 {
00462     int memDepNum = 0;
00463     for( int i = 0; i < MAX_DST_MEM_NUM; i++ ){
00464         if( m_dstMem[i] ){
00465             memDepNum++;
00466         }
00467         else{
00468             break;
00469         }
00470     }
00471     return m_dstNum + memDepNum;
00472 }

Here is the caller graph for this function:

MemDependencyPtr Onikiri::Op::GetDstMem ( int  index  )  const [inline]

Op.h160 行で定義されています。

参照先 m_dstMem.

00160 { return m_dstMem[index]; }

PhyReg* Onikiri::Op::GetDstPhyReg ( int  index  )  const [inline]

Op.h154 行で定義されています。

参照先 m_dstPhyReg.

参照元 GetDstDep().

00154 { return m_dstPhyReg[index]; }

Here is the caller graph for this function:

int Op::GetDstReg ( int  index  ) 

Op.cpp449 行で定義されています。

参照先 m_dstReg.

参照元 ToString().

00450 {
00451     return m_dstReg[index];
00452 }

Here is the caller graph for this function:

int Onikiri::Op::GetDstRegNum (  )  const [inline]

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

参照先 m_dstNum.

00151 { return m_dstNum ;}

const Exception& Onikiri::Op::GetException (  )  const [inline]

Op.h198 行で定義されています。

参照先 m_exception.

00198 { return m_exception;      }

ExecUnitIF * Op::GetExecUnit (  )  const

Op.cpp485 行で定義されています。

参照先 ASSERTOnikiri::Scheduler::GetExecUnit()GetOpClass()m_scheduler.

00486 {
00487     ASSERT( m_scheduler != NULL );
00488     return m_scheduler->GetExecUnit( GetOpClass().GetCode() ); 
00489 }

関数の呼び出しグラフ:

OpIterator Op::GetFirstConsumer (  ) 

Op.cpp366 行で定義されています。

参照先 Onikiri::MemOrderManager::GetConsumerLoad()Onikiri::Dependency::GetConsumers()Onikiri::Thread::GetMemOrderManager()Onikiri::OpIterator::IsNull()Onikiri::OpClass::IsStore()m_dstMemm_dstNumm_dstPhyRegm_dstRegm_iteratorm_memAccessm_opClassm_threadMAX_DST_MEM_NUMUNSET_REG.

00367 {
00368     OpIterator result(0);
00369 
00370     // WX^tFb`consumerT
00371     int dstRegNum = m_dstNum;
00372     for( int i = 0; i < dstRegNum; ++i ) {
00373         if(m_dstReg[i] == UNSET_REG) continue;
00374 
00375         PhyReg* phyReg = m_dstPhyReg[i];
00376         const Dependency::ConsumerListType& consumers = phyReg->GetConsumers();
00377         
00378         if( consumers.empty() ) continue;
00379         
00380         // vOEI[_l[sXg
00381         // XgtFb`
00382         OpIterator frontOp = consumers.front();
00383         if( result.IsNull() || result->GetSerialID() > frontOp->GetSerialID() ) {
00384             result = frontOp;
00385         }
00386     }
00387 
00388     // WX^tFb`consumerT
00389     int dstMemNum = MAX_DST_MEM_NUM;
00390     for( int i = 0; i < dstMemNum; ++i ) {
00391         MemDependencyPtr memDependency = m_dstMem[i];
00392         if( memDependency == 0 ) continue;
00393 
00394         const Dependency::ConsumerListType& consumers = memDependency->GetConsumers();
00395         if( consumers.empty() ) continue;
00396         
00397         // vOEI[_l[sXg
00398         // XgtFb`
00399         OpIterator frontOp = consumers.front();
00400         if( result.IsNull() || result->GetSerialID() > frontOp->GetSerialID() ) {
00401             result = frontOp;
00402         }
00403     }
00404     
00405     if( m_opClass->IsStore() ){
00406         MemOrderManager* memOrder = m_thread->GetMemOrderManager();
00407         OpIterator consumer = memOrder->GetConsumerLoad( m_iterator, m_memAccess, 0 );
00408         if( !consumer.IsNull() && 
00409             ( result.IsNull() ||
00410               result->GetSerialID() > consumer->GetSerialID() 
00411             )
00412         ){
00413             result = consumer;
00414         }
00415     }
00416     return result;
00417 
00418 }

関数の呼び出しグラフ:

u64 Onikiri::Op::GetGlobalSerialID (  )  const [inline]

Op.h185 行で定義されています。

参照先 m_globalSerialID.

参照元 Onikiri::TraceDumper::Dump()Onikiri::TraceDumper::DumpStallBegin()Onikiri::TraceDumper::DumpStallEnd()ToString().

00185 { return m_globalSerialID; }            // RASXbhSerialID

Here is the caller graph for this function:

InorderList* Onikiri::Op::GetInorderList (  )  const [inline]

Op.h189 行で定義されています。

参照先 m_inorderList.

00189 { return m_inorderList; }

const IssueState& Onikiri::Op::GetIssueState (  )  const [inline]

Op.h217 行で定義されています。

参照先 m_issueState.

00217 { return m_issueState;       }

const OpIterator Onikiri::Op::GetIterator (  )  const [inline]

Op.h226 行で定義されています。

参照先 m_iterator.

00226 { return m_iterator; }

const LatPredResult& Onikiri::Op::GetLatPredRsult (  )  const [inline]

Op.h214 行で定義されています。

参照先 m_latPredResult.

00214 { return m_latPredResult;   }

int Onikiri::Op::GetLocalTID (  )  const [inline]

Op.h178 行で定義されています。

参照先 m_localTID.

00178 { return m_localTID;               }

const MemAccess& Onikiri::Op::GetMemAccess (  )  const [inline]

Op.h195 行で定義されています。

参照先 m_memAccess.

参照元 ToString().

00195 { return m_memAccess;      }

Here is the caller graph for this function:

PC Op::GetNextPC (  ) 

Op.cpp200 行で定義されています。

参照先 m_pcm_takenm_takenPC.

00201 {
00202     if( m_taken ) {  
00203         return m_takenPC;
00204     }else {
00205         SimPC nextPC(m_pc);
00206         nextPC++;
00207         return nextPC;
00208     }
00209 }

int Onikiri::Op::GetNo (  )  const [inline]

Op.h182 行で定義されています。

参照先 m_no.

参照元 ToString().

00182 { return m_no; }

Here is the caller graph for this function:

const OpClass& Onikiri::Op::GetOpClass (  )  const [inline]

Op.h180 行で定義されています。

参照先 m_opClass.

参照元 GetExecUnit()ToString().

00180 { return *m_opClass;               }

Here is the caller graph for this function:

OpInfo* const Onikiri::Op::GetOpInfo (  )  const [inline]

Op.h179 行で定義されています。

参照先 m_opInfo.

参照元 ToString().

00179 { return m_opInfo;               }

Here is the caller graph for this function:

virtual PC Onikiri::Op::GetPC (  )  const [inline, virtual]

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

Op.h90 行で定義されています。

参照先 m_pc.

参照元 ToString().

00090 { return m_pc; }

Here is the caller graph for this function:

PhyReg * Op::GetPhyReg ( int  phyRegNo  )  [protected]

Op.cpp150 行で定義されています。

参照先 Onikiri::RegisterFile::GetPhyReg()m_regFile.

参照元 SetDstReg()SetSrcReg().

00151 {
00152     return m_regFile->GetPhyReg(phyRegNo);
00153 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

PC Onikiri::Op::GetPredPC (  )  const [inline]

Op.h206 行で定義されています。

参照先 m_predPC.

00206 { return m_predPC; }

bool Onikiri::Op::GetReserveExecUnit (  )  const [inline]

Op.h220 行で定義されています。

参照先 m_reserveExecUnit.

00220 { return m_reserveExecUnit;             }

u64 Onikiri::Op::GetRetireID (  )  const [inline]

Op.h184 行で定義されています。

参照先 m_retireID.

参照元 ToString().

00184 { return m_retireID; }              

Here is the caller graph for this function:

Scheduler* Onikiri::Op::GetScheduler (  )  const [inline]

Op.h223 行で定義されています。

参照先 m_scheduler.

00223 { return m_scheduler; }

u64 Onikiri::Op::GetSerialID (  )  const [inline]

Op.h183 行で定義されています。

参照先 m_serialID.

参照元 ToString().

00183 { return m_serialID; }              // eXbhSerialID

Here is the caller graph for this function:

const u64 Op::GetSrc ( const int  index  )  const [virtual]

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

Op.cpp155 行で定義されています。

参照先 ASSERTOnikiri::PhyReg::GetVal()m_srcPhyRegm_srcRegUNSET_REG.

参照元 ToString().

00156 {
00157     ASSERT(m_srcReg[index] != UNSET_REG,
00158         "physical register not set at index %d.", index);
00159 
00160     return m_srcPhyReg[index]->GetVal();
00161 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

MemDependencyPtr Onikiri::Op::GetSrcMem ( int  index  )  const [inline]

Op.h157 行で定義されています。

参照先 m_srcMem.

00157 { return m_srcMem[index]; }

int Op::GetSrcReg ( int  index  ) 

Op.cpp455 行で定義されています。

参照先 m_srcReg.

参照元 ToString().

00456 {
00457     return m_srcReg[index];
00458 }

Here is the caller graph for this function:

int Onikiri::Op::GetSrcRegNum (  )  const [inline]

Op.h152 行で定義されています。

参照先 m_srcNum.

00152 { return m_srcNum ;}

OpStatus Onikiri::Op::GetStatus (  )  const [inline]

Op.h192 行で定義されています。

参照先 m_status.

参照元 DissolveSrcMem()DissolveSrcReg()ExecutionEnd()IsDispatched()ToString().

00192 { return m_status;   }

Here is the caller graph for this function:

bool Op::GetTaken (  )  const [virtual]

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

Op.cpp185 行で定義されています。

参照先 m_taken.

参照元 ToString().

00186 {
00187     return m_taken;
00188 }

Here is the caller graph for this function:

PC Op::GetTakenPC (  )  const [virtual]

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

Op.cpp195 行で定義されています。

参照先 m_takenPC.

参照元 ToString().

00196 {
00197     return m_takenPC;
00198 }

Here is the caller graph for this function:

Thread* Onikiri::Op::GetThread (  )  const [inline]

Op.h187 行で定義されています。

参照先 m_thread.

00187 { return m_thread;      }

void Op::Initialize ( const OpInitArgs args  ) 

Op.cpp85 行で定義されています。

参照先 Onikiri::MemAccess::addressOnikiri::Addr::addressOnikiri::OpInitArgs::coreOnikiri::OpInfo::GetDstNum()Onikiri::Thread::GetInorderList()Onikiri::Thread::GetLocalThreadID()Onikiri::OpInfo::GetOpClass()Onikiri::Core::GetRegisterFile()Onikiri::OpInfo::GetSrcNum()Onikiri::OpInitArgs::globalSerialIDm_afterCheckpointm_beforeCheckpointm_cacheAccessResultm_corem_dstMemm_dstNumm_dstPhyRegm_dstRegm_dstResultValuem_exceptionm_globalSerialIDm_inorderListm_issueStatem_latPredResultm_localTIDm_memAccessm_nom_opClassm_opInfom_pcm_regFilem_reserveExecUnitm_retireIDm_schedulerm_serialIDm_srcMemm_srcNumm_srcPhyRegm_srcRegm_statusm_takenm_takenPCm_threadMAX_DST_MEM_NUMOnikiri::SimISAInfoDef::SimISAInfo_IW32_RW64_AS64::MAX_DST_REG_COUNTMAX_SRC_MEM_NUMOnikiri::SimISAInfoDef::SimISAInfo_IW32_RW64_AS64::MAX_SRC_REG_COUNTOnikiri::OpInitArgs::noOnikiri::OpInitArgs::opInfoOnikiri::OpInitArgs::pcOnikiri::LogicalData::pidOnikiri::OpInitArgs::retireIDOnikiri::OpInitArgs::serialIDOnikiri::LogicalResourceBase::SetPID()Onikiri::LogicalResourceBase::SetTID()Onikiri::MemAccess::signOnikiri::MemAccess::sizeOnikiri::OpInitArgs::threadOnikiri::LogicalData::tidUNSET_REGOnikiri::MemAccess::value.

00086 {
00087     m_pc            = *args.pc;
00088     m_opInfo        = args.opInfo;
00089     m_opClass       = &m_opInfo->GetOpClass();
00090     m_no            = args.no;
00091     m_localTID      = args.thread->GetLocalThreadID();
00092     m_serialID      = args.serialID;
00093     m_retireID      = args.retireID;
00094     m_globalSerialID = args.globalSerialID;
00095     m_core          = args.core;
00096     m_thread        = args.thread;
00097     m_inorderList   = args.thread->GetInorderList();
00098     m_status        = OpStatus();
00099     m_beforeCheckpoint  = 0; 
00100     m_afterCheckpoint   = 0; 
00101     m_takenPC       = PC(args.pc->pid, args.pc->tid, args.pc->address+4); 
00102     m_taken         = false;
00103     m_latPredResult = LatPredResult();
00104     m_issueState    = IssueState();
00105     m_reserveExecUnit = false;
00106     m_scheduler     = 0;
00107 
00108     m_memAccess.address = Addr();
00109     m_memAccess.size    = 0;
00110     m_memAccess.sign    = false;
00111     m_memAccess.value   = 0;
00112 
00113     m_exception = Exception();
00114     m_cacheAccessResult = CacheAccessResult();
00115 
00116     m_regFile = m_core->GetRegisterFile();
00117     m_srcNum = m_opInfo->GetSrcNum();
00118     m_dstNum = m_opInfo->GetDstNum();
00119 
00120     SetPID( args.pc->pid );
00121     SetTID( args.pc->tid );
00122 
00123     //m_id            = id;
00124     // m_event  retire/flush 
00125     // m_event.clear();
00126     // m_event.reserve(8);
00127 
00128     for (int i = 0; i < SimISAInfo::MAX_DST_REG_COUNT; i++) {
00129         m_dstReg[i] = UNSET_REG;
00130         m_dstPhyReg[i] = 0;
00131         m_dstResultValue[i] = 0;
00132     }
00133 
00134     for (int i = 0; i < SimISAInfo::MAX_SRC_REG_COUNT; i++) {
00135         m_srcReg[i] = UNSET_REG;
00136         m_srcPhyReg[i] = 0;
00137     }
00138 
00139     for (int i = 0; i < MAX_SRC_MEM_NUM; i++) {
00140         m_srcMem[i].reset();
00141     }
00142 
00143     for (int i = 0; i < MAX_DST_MEM_NUM; i++) {
00144         m_dstMem[i].reset();
00145     }
00146 
00147 }

関数の呼び出しグラフ:

bool Onikiri::Op::IsDispatched (  )  const [inline]

Op.h169 行で定義されています。

参照先 GetStatus()Onikiri::OpStatus::OS_DISPATCHEDOnikiri::OpStatus::OS_NOP.

参照元 RescheduleSelf().

00170         {
00171             OpStatus status = GetStatus();
00172             return ( status >= OpStatus::OS_DISPATCHED && status != OpStatus::OS_NOP );
00173         }

関数の呼び出しグラフ:

Here is the caller graph for this function:

bool Op::IsSrcReady ( int  index,
const DependencySet newDeps = NULL 
) const

Op.cpp232 行で定義されています。

参照先 ASSERTOnikiri::Scheduler::GetIndex()m_schedulerm_srcMemm_srcNumm_srcPhyRegMAX_SRC_MEM_NUM.

00233 {
00234     ASSERT( index == m_scheduler->GetIndex() );
00235 
00236     for( int i = 0; i < m_srcNum; ++i ){
00237         Dependency* dep = m_srcPhyReg[i];
00238         if( dep->GetReadiness( index ) == false ){
00239             if( newDeps ){
00240                 if( !newDeps->IsIncluded( dep ) ){
00241                     return false;
00242                 }
00243             }
00244             else{
00245                 return false;
00246             }
00247         }
00248     }
00249 
00250     for(int i = 0; i < MAX_SRC_MEM_NUM; ++i) {
00251         Dependency* dep = m_srcMem[i].get();
00252         if( dep && dep->GetReadiness(index) == false) {
00253             if( newDeps ){
00254                 if( !newDeps->IsIncluded( dep ) ){
00255                     return false;
00256                 }
00257             }
00258             else{
00259                 return false;
00260             }
00261         }
00262     }
00263 
00264     return true;
00265 }

関数の呼び出しグラフ:

void Op::Read ( MemAccess access  )  [virtual]

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

Op.cpp212 行で定義されています。

参照先 Onikiri::MemAccess::addressOnikiri::Thread::GetMemOrderManager()Onikiri::LogicalResourceBase::GetTID()m_iteratorm_threadOnikiri::MemOrderManager::Read()Onikiri::LogicalData::tid.

00213 {
00214     // Must set a correct TID because this method is called by
00215     // the emulator, which does not set a TID.
00216     access->address.tid = GetTID();
00217     m_thread->GetMemOrderManager()->Read( m_iterator, access );
00218 }

関数の呼び出しグラフ:

void Op::RescheduleSelf ( bool  clearIssueState  ) 

Op.cpp301 行で定義されています。

参照先 CancelEvent()IsDispatched()m_issueStateResetDependency().

00302 {
00303     // XPW[XPW[
00304     if( !IsDispatched() ) {
00305         return;
00306     }
00307 
00308     // dependency Zbg
00309     ResetDependency();
00310     
00311     // event LZ
00312     CancelEvent();
00313 
00314     // Reset an issue state.
00315     if( clearIssueState ){
00316         m_issueState = IssueState();
00317     }
00318 }

関数の呼び出しグラフ:

void Op::ResetDependency (  ) 

Op.cpp292 行で定義されています。

参照先 GetDstDep()GetDstDepNum().

参照元 RescheduleSelf().

00293 {
00294     int dstDepNum = GetDstDepNum();
00295     for( int i = 0; i < dstDepNum; ++i ){
00296         GetDstDep(i)->Reset();
00297     }
00298 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Onikiri::Op::SetAfterCheckpoint ( Checkpoint checkpoint  )  [inline]

Op.h210 行で定義されています。

参照先 m_afterCheckpoint.

00210 { m_afterCheckpoint = checkpoint; }

void Onikiri::Op::SetBeforeCheckpoint ( Checkpoint checkpoint  )  [inline]

Op.h208 行で定義されています。

参照先 m_beforeCheckpoint.

00208 { m_beforeCheckpoint = checkpoint; }

void Onikiri::Op::SetCacheAccessResult ( const CacheAccessResult cacheAccessResult  )  [inline]

Op.h200 行で定義されています。

参照先 m_cacheAccessResult.

00201         { m_cacheAccessResult = cacheAccessResult;  }

void Op::SetDst ( const int  index,
const u64  value 
) [virtual]

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

Op.cpp171 行で定義されています。

参照先 ASSERTm_dstRegm_dstResultValueUNSET_REG.

00172 {
00173     ASSERT(m_dstReg[index] != UNSET_REG,
00174         "physical register not set at index %d.", index);
00175 
00176 //  m_dstPhyReg[index]->SetVal(value);
00177     m_dstResultValue[index] = value;
00178 }

void Op::SetDstMem ( int  index,
MemDependencyPtr  dstMem 
)

Op.cpp443 行で定義されています。

参照先 m_dstMem.

00444 {
00445     m_dstMem[index] = dstMem; 
00446 }

void Op::SetDstReg ( int  index,
int  phyRegNo 
)

Op.cpp436 行で定義されています。

参照先 GetPhyReg()m_dstPhyRegm_dstReg.

00437 {
00438     m_dstReg[index] = phyRegNo; 
00439     PhyReg* phyReg = GetPhyReg(phyRegNo);
00440     m_dstPhyReg[index] = phyReg;
00441 }

関数の呼び出しグラフ:

void Onikiri::Op::SetException ( const Exception exception  )  [inline]

Op.h197 行で定義されています。

参照先 m_exception.

00197 { m_exception = exception; }

void Onikiri::Op::SetIssueState ( const IssueState issueState  )  [inline]

Op.h216 行で定義されています。

参照先 m_issueState.

00216 { m_issueState = issueState; }

void Onikiri::Op::SetLatPredRsult ( const LatPredResult result  )  [inline]

Op.h213 行で定義されています。

参照先 m_latPredResult.

00213 { m_latPredResult = result; }

void Onikiri::Op::SetMemAccess ( const MemAccess memAccess  )  [inline]

Op.h194 行で定義されています。

参照先 m_memAccess.

00194 { m_memAccess = memAccess; }

void Onikiri::Op::SetPredPC ( const PC  predPC  )  [inline]

Op.h205 行で定義されています。

参照先 m_predPC.

00205 { m_predPC = predPC; }

void Onikiri::Op::SetReserveExecUnit ( bool  reserveExecUnit  )  [inline]

Op.h219 行で定義されています。

参照先 m_reserveExecUnit.

00219 { m_reserveExecUnit = reserveExecUnit;  }

void Onikiri::Op::SetScheduler ( Scheduler scheduler  )  [inline]

Op.h222 行で定義されています。

参照先 m_scheduler.

00222 { m_scheduler = scheduler; }

void Op::SetSrcMem ( int  index,
MemDependencyPtr  memDep 
)

Op.cpp429 行で定義されています。

参照先 m_iteratorm_srcMem.

00430 {
00431     m_srcMem[index] = memDep;
00432     memDep->AddConsumer(m_iterator);
00433 }

void Op::SetSrcReg ( int  index,
int  phyRegNo 
)

Op.cpp421 行で定義されています。

参照先 Onikiri::Dependency::AddConsumer()GetPhyReg()m_iteratorm_srcPhyRegm_srcReg.

00422 {
00423     m_srcReg[index] = phyRegNo;
00424     m_srcPhyReg[index] = GetPhyReg(phyRegNo);
00425     GetPhyReg(phyRegNo)->AddConsumer(m_iterator);
00426 }

関数の呼び出しグラフ:

void Onikiri::Op::SetStatus ( OpStatus  status  )  [inline]

Op.h191 行で定義されています。

参照先 m_status.

参照元 ExecutionEnd().

00191 { m_status = status; }

Here is the caller graph for this function:

void Op::SetTaken ( const bool  taken  )  [virtual]

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

Op.cpp180 行で定義されています。

参照先 m_taken.

00181 {
00182     m_taken = taken;
00183 }

void Op::SetTakenPC ( const PC  takenPC  )  [virtual]

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

Op.cpp190 行で定義されています。

参照先 m_takenPC.

00191 {
00192     m_takenPC = takenPC;
00193 }

std::string Op::ToString ( int  detail = 5,
bool  valDetail = false,
const char *  = "\t" 
)

Op.cpp492 行で定義されています。

参照先 Onikiri::MemAccess::addressOnikiri::Addr::addressGetDst()Onikiri::OpInfo::GetDstNum()Onikiri::OpInfo::GetDstOperand()GetDstReg()GetGlobalSerialID()GetMemAccess()Onikiri::OpInfo::GetMnemonic()GetNo()GetOpClass()GetOpInfo()GetPC()Onikiri::LogicalResourceBase::GetPID()GetRetireID()GetSerialID()GetSrc()Onikiri::OpInfo::GetSrcNum()GetSrcReg()GetStatus()GetTaken()GetTakenPC()Onikiri::LogicalResourceBase::GetTID()m_dstRegm_srcRegOnikiri::SimISAInfoDef::SimISAInfo_IW32_RW64_AS64::MAX_DST_REG_COUNTOnikiri::SimISAInfoDef::SimISAInfo_IW32_RW64_AS64::MAX_SRC_REG_COUNTOnikiri::LogicalData::pidOnikiri::MemAccess::signOnikiri::MemAccess::sizeOnikiri::OpClass::ToString()Onikiri::OpStatus::ToString()UNSET_REGOnikiri::MemAccess::value.

参照元 Onikiri::TraceDumper::Dump()Onikiri::TraceDumper::DumpStallBegin()Onikiri::TraceDumper::DumpStallEnd().

00493 {
00494     ostringstream oss;
00495 
00496     // PC
00497     oss 
00498         << "GID: " << GetGlobalSerialID() << delim
00499         << "TID: " << GetTID() << delim
00500         << "SID: " << GetSerialID() << delim
00501         << "RID: " << GetRetireID() << delim
00502         << "PID: " << GetPID() << delim
00503         << "PC: " << GetPC().pid << "/" 
00504         << hex << GetPC().address << dec
00505         << "[" << GetNo() <<"]" << delim;
00506 
00507     if(detail == 0) return oss.str();
00508 
00509     // status 
00510     oss << GetStatus().ToString() << delim;
00511 
00512     if(detail == 1) return oss.str();
00513 
00514     oss << GetOpInfo()->GetMnemonic() << delim;
00515     oss << GetOpClass().ToString() << delim;
00516 
00517     // _WX^
00518     int dstNum = GetOpInfo()->GetDstNum();
00519     for(int i = 0; i < dstNum; ++i) {
00520         oss << "d" << i << ": " ;
00521         oss << GetOpInfo()->GetDstOperand(i) << delim; 
00522     }
00523     for(int i = dstNum;
00524         i < SimISAInfo::MAX_DST_REG_COUNT; ++i)
00525     {
00526         oss << "d" << i << ": -1"<< delim; 
00527     }
00528 
00529     int srcNum = GetOpInfo()->GetSrcNum();
00530     for(int i = 0; i < srcNum; ++i) {
00531         oss << "s" << i << ": "
00532             << GetOpInfo()->GetSrcOperand(i) <<delim; 
00533     }
00534     for(int i = GetOpInfo()->GetSrcNum();
00535         i < SimISAInfo::MAX_SRC_REG_COUNT; ++i)
00536     {
00537         oss << "s" << i << ": -1"<< delim; 
00538     }
00539 
00540     if(detail == 2) return oss.str();
00541 
00542     // next pc 
00543     oss << "TPC: " << GetTakenPC().pid << "/"
00544         << hex << GetTakenPC().address << dec
00545         << ( GetTaken() ? "(t)" : "(n)" ) << delim;
00546 
00547     if(detail == 3) return oss.str();
00548     // WX^
00549     for(int i = 0; i < SimISAInfo::MAX_DST_REG_COUNT; ++i) {
00550         if( m_dstReg[i] != UNSET_REG) {
00551             oss << "r" << GetOpInfo()->GetDstOperand(i)
00552                 << "= p" << GetDstReg(i); 
00553         }else {
00554             oss << "r_ = p_"; 
00555         }
00556         oss << delim;
00557     }
00558 
00559     for(int i = 0; i < SimISAInfo::MAX_SRC_REG_COUNT; ++i) {
00560         if( m_srcReg[i] != UNSET_REG ) {
00561             oss << "r" << GetOpInfo()->GetSrcOperand(i)
00562                 << "= p" << GetSrcReg(i); 
00563         }else {
00564             oss << "r_ = p_"; 
00565         }
00566         oss << delim;
00567     }
00568 
00569     if(detail == 4) return oss.str();
00570 
00571     // WX^l
00572     for(int i = 0; i < SimISAInfo::MAX_DST_REG_COUNT; ++i) {
00573         if( m_dstReg[i] != UNSET_REG) {
00574             oss << "r" << GetOpInfo()->GetDstOperand(i)
00575                 << "= " << GetDst(i); 
00576             if( valDetail ) {
00577                 oss << "/" << (double)GetDst(i)
00578                     << "/" << hex << GetDst(i) << dec;
00579             }
00580         }else {
00581             oss << "r_ = 0"; 
00582         }
00583         oss << delim;
00584     }
00585 
00586     for(int i = 0; i < SimISAInfo::MAX_SRC_REG_COUNT; ++i) {
00587         if( m_srcReg[i] != UNSET_REG ) {
00588             oss << "r" << GetOpInfo()->GetSrcOperand(i)
00589                 << "= " << GetSrc(i); 
00590             if( valDetail ) {
00591                 oss << "/" << (double)GetSrc(i)
00592                     << "/" << hex << GetSrc(i) << dec;
00593             }
00594         }else {
00595             oss << "r_ = 0"; 
00596         }
00597         oss << delim;
00598     }
00599 
00600     if(detail == 5) return oss.str();
00601 
00602     // MemAccess g
00603     oss << "Mem: " << hex << GetMemAccess().address.address << dec << "/"
00604         << GetMemAccess().size << "/"
00605         << (GetMemAccess().sign ? "s" : "u") << "/"
00606         << GetMemAccess().value;
00607 
00608     if( valDetail ) {
00609         oss << "/" << (double)GetMemAccess().value
00610             << "/" << hex << GetMemAccess().value << dec;
00611     }
00612     oss << delim;
00613     return oss.str();
00614 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Op::Write ( MemAccess access  )  [virtual]

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

Op.cpp220 行で定義されています。

参照先 Onikiri::MemAccess::addressOnikiri::Thread::GetMemOrderManager()Onikiri::LogicalResourceBase::GetTID()m_iteratorm_threadOnikiri::LogicalData::tidOnikiri::MemOrderManager::Write().

00221 {
00222     // Must set a correct TID because this method is called by
00223     // the emulator, which does not set a TID.
00224     access->address.tid = GetTID();
00225     m_thread->GetMemOrderManager()->Write( m_iterator, access );
00226 }

関数の呼び出しグラフ:

void Op::WriteExecutionResults (  ) 

Op.cpp334 行で定義されています。

参照先 m_dstNumm_dstPhyRegm_dstResultValue.

参照元 ExecutionEnd().

00335 {
00336     // write back
00337     for( int i = 0; i < m_dstNum; ++i ){
00338         m_dstPhyReg[i]->SetVal( m_dstResultValue[i] );
00339     }
00340 }

Here is the caller graph for this function:


変数

const int Onikiri::Op::EVENT_MASK_ALL = EventList::EVENT_MASK_ALL [static]

Op.h80 行で定義されています。

const int Onikiri::Op::EVENT_MASK_DEFAULT = 1 << EventList::EVENT_MASK_POS_DEFAULT [static]

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

const int Onikiri::Op::EVENT_MASK_WAKEUP_RELATED = 1 << EventList::EVENT_MASK_POS_USER [static]

Op.h79 行で定義されています。

参照元 Onikiri::Scheduler::Finished()Onikiri::ExecUnitBase::RegisterRescheduleEvent()Onikiri::Scheduler::RegisterWakeUpEvent().

Checkpoint* Onikiri::Op::m_afterCheckpoint [protected]

Op.h264 行で定義されています。

参照元 GetAfterCheckpoint()Initialize()SetAfterCheckpoint().

Checkpoint* Onikiri::Op::m_beforeCheckpoint [protected]

Op.h263 行で定義されています。

参照元 GetBeforeCheckpoint()Initialize()SetBeforeCheckpoint().

CacheAccessResult Onikiri::Op::m_cacheAccessResult [protected]

Op.h275 行で定義されています。

参照元 GetCacheAccessResult()Initialize()SetCacheAccessResult().

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

Op.h256 行で定義されています。

参照元 ExecutionBegin()GetCore()Initialize().

MemDependencyPtr Onikiri::Op::m_dstMem[MAX_DST_MEM_NUM] [protected]

Op.h289 行で定義されています。

参照元 GetDstDep()GetDstDepNum()GetDstMem()GetFirstConsumer()Initialize()SetDstMem().

int Onikiri::Op::m_dstNum [protected]

Op.h313 行で定義されています。

参照元 GetDstDep()GetDstDepNum()GetDstRegNum()GetFirstConsumer()Initialize()WriteExecutionResults().

PhyReg* Onikiri::Op::m_dstPhyReg[SimISAInfo::MAX_DST_REG_COUNT] [protected]

Op.h314 行で定義されています。

参照元 GetDst()GetDstPhyReg()GetFirstConsumer()Initialize()SetDstReg()WriteExecutionResults().

int Onikiri::Op::m_dstReg[SimISAInfo::MAX_DST_REG_COUNT] [protected]

Op.h284 行で定義されています。

参照元 GetDst()GetDstReg()GetFirstConsumer()Initialize()SetDst()SetDstReg()ToString().

u64 Onikiri::Op::m_dstResultValue[SimISAInfo::MAX_DST_REG_COUNT] [protected]

Op.h316 行で定義されています。

参照元 Initialize()SetDst()WriteExecutionResults().

EventList Onikiri::Op::m_event [protected]

Op.h303 行で定義されています。

参照元 AddEvent()CancelEvent()ClearEvent().

Exception Onikiri::Op::m_exception [protected]

Op.h278 行で定義されています。

参照元 GetException()Initialize()SetException().

u64 Onikiri::Op::m_globalSerialID [protected]

Op.h250 行で定義されています。

参照元 GetGlobalSerialID()Initialize().

InorderList* Onikiri::Op::m_inorderList [protected]

Op.h257 行で定義されています。

参照元 GetInorderList()Initialize().

IssueState Onikiri::Op::m_issueState [protected]

Op.h297 行で定義されています。

参照元 GetIssueState()Initialize()RescheduleSelf()SetIssueState().

OpIterator Onikiri::Op::m_iterator [protected]

Op.h318 行で定義されています。

参照元 DissolveSrcMem()DissolveSrcReg()GetFirstConsumer()GetIterator()Read()SetSrcMem()SetSrcReg()Write().

LatPredResult Onikiri::Op::m_latPredResult [protected]

Op.h294 行で定義されています。

参照元 GetLatPredRsult()Initialize()SetLatPredRsult().

int Onikiri::Op::m_localTID [protected]

Op.h246 行で定義されています。

参照元 GetLocalTID()Initialize().

MemAccess Onikiri::Op::m_memAccess [protected]

Op.h272 行で定義されています。

参照元 GetFirstConsumer()GetMemAccess()Initialize()SetMemAccess().

int Onikiri::Op::m_no [protected]

Op.h243 行で定義されています。

参照元 GetNo()Initialize().

const OpClass* Onikiri::Op::m_opClass [protected]

Op.h239 行で定義されています。

参照元 GetFirstConsumer()GetOpClass()Initialize().

OpInfo* Onikiri::Op::m_opInfo [protected]

Op.h238 行で定義されています。

参照元 ExecutionBegin()GetOpInfo()Initialize().

PC Onikiri::Op::m_pc [protected]

Op.h236 行で定義されています。

参照元 GetNextPC()GetPC()Initialize().

PC Onikiri::Op::m_predPC [protected]

Op.h281 行で定義されています。

参照元 GetPredPC()SetPredPC().

RegisterFile* Onikiri::Op::m_regFile [protected]

Op.h309 行で定義されています。

参照元 GetPhyReg()Initialize().

bool Onikiri::Op::m_reserveExecUnit [protected]

Op.h300 行で定義されています。

参照元 GetReserveExecUnit()Initialize()SetReserveExecUnit().

u64 Onikiri::Op::m_retireID [protected]

Op.h252 行で定義されています。

参照元 GetRetireID()Initialize().

Scheduler* Onikiri::Op::m_scheduler [protected]

Op.h306 行で定義されています。

参照元 GetExecUnit()GetScheduler()Initialize()IsSrcReady()SetScheduler().

u64 Onikiri::Op::m_serialID [protected]

Op.h249 行で定義されています。

参照元 GetSerialID()Initialize().

MemDependencyPtr Onikiri::Op::m_srcMem[MAX_SRC_MEM_NUM] [protected]

Op.h291 行で定義されています。

参照元 DissolveSrcMem()GetSrcMem()Initialize()IsSrcReady()SetSrcMem().

int Onikiri::Op::m_srcNum [protected]

Op.h312 行で定義されています。

参照元 DissolveSrcReg()GetSrcRegNum()Initialize()IsSrcReady().

PhyReg* Onikiri::Op::m_srcPhyReg[SimISAInfo::MAX_SRC_REG_COUNT] [protected]

Op.h315 行で定義されています。

参照元 DissolveSrcReg()GetSrc()Initialize()IsSrcReady()SetSrcReg().

int Onikiri::Op::m_srcReg[SimISAInfo::MAX_SRC_REG_COUNT] [protected]

Op.h286 行で定義されています。

参照元 GetSrc()GetSrcReg()Initialize()SetSrcReg()ToString().

OpStatus Onikiri::Op::m_status [protected]

Op.h260 行で定義されています。

参照元 GetStatus()Initialize()SetStatus().

bool Onikiri::Op::m_taken [protected]

Op.h269 行で定義されています。

参照元 GetNextPC()GetTaken()Initialize()SetTaken().

PC Onikiri::Op::m_takenPC [protected]

Op.h267 行で定義されています。

参照元 GetNextPC()GetTakenPC()Initialize()SetTakenPC().

Thread* Onikiri::Op::m_thread [protected]

Op.h255 行で定義されています。

参照元 GetFirstConsumer()GetThread()Initialize()Read()Write().

const int Onikiri::Op::MAX_DST_MEM_NUM = 1 [static]

Op.h75 行で定義されています。

参照元 GetDstDepNum()GetFirstConsumer()Initialize().

const int Onikiri::Op::MAX_SRC_MEM_NUM = 1 [static]

Op.h74 行で定義されています。

参照元 DissolveSrcMem()Initialize()IsSrcReady().

const int Onikiri::Op::UNSET_REG = -1 [static]

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

参照元 GetDst()GetFirstConsumer()GetSrc()Initialize()SetDst()ToString().


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