#include <StoreSet.h>
Onikiri::StoreSetに対する継承グラフ
Public メソッド | |
virtual void | Allocate (OpIterator op) |
virtual bool | CanAllocate (OpIterator *infoArray, int numOp) |
virtual void | Commit (OpIterator op) |
virtual void | Flush (OpIterator op) |
virtual void | Initialize (InitPhase phase) |
virtual void | OrderConflicted (OpIterator producer, OpIterator consumer) |
virtual void | Resolve (OpIterator op) |
StoreSet () | |
virtual | ~StoreSet () |
StoreSet.h の 52 行で定義されています。
StoreSet::StoreSet | ( | ) |
StoreSet.cpp の 40 行で定義されています。
00040 : 00041 m_core(0), 00042 m_storeIDTable (0), 00043 m_producerTable (0), 00044 m_numStoreIDTableEntryBits (0), 00045 m_numStoreIDTableWays (0), 00046 m_numProducerTableEntryBits (0), 00047 m_numProducerTableWays (0), 00048 m_numStoreIDTableEntries (0), 00049 m_numProducerTableEntries (0), 00050 m_numAccessOrderViolated (0) 00051 { 00052 }
StoreSet::~StoreSet | ( | ) | [virtual] |
StoreSet.cpp の 54 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::ReleaseParam().
00055 { 00056 if( m_storeIDTable ) { 00057 delete m_storeIDTable; 00058 } 00059 if( m_producerTable ) { 00060 delete m_producerTable; 00061 } 00062 00063 // entry count 00064 m_numStoreIDTableEntries = (1 << m_numStoreIDTableEntryBits); 00065 m_numProducerTableEntries = (1 << m_numProducerTableEntryBits); 00066 ReleaseParam(); 00067 }
関数の呼び出しグラフ:
void StoreSet::Allocate | ( | OpIterator | op | ) | [virtual] |
Onikiri::MemDepPredIFを実装しています。
StoreSet.cpp の 105 行で定義されています。
00106 { 00107 // allocate only stores 00108 if( !op->GetOpClass().IsStore() ) { 00109 return; 00110 } 00111 00112 StoreSetID storeSetID = GetStoreSetID(op); 00113 if( storeSetID.address != INVALID_STORESET_ID) { 00114 // update tables and allocate dependency 00115 UpdateProducerTable(storeSetID, op); 00116 AllocateMemDependency(op); 00117 } 00118 }
bool StoreSet::CanAllocate | ( | OpIterator * | infoArray, | |
int | numOp | |||
) | [virtual] |
void StoreSet::Commit | ( | OpIterator | op | ) | [virtual] |
void StoreSet::Flush | ( | OpIterator | op | ) | [virtual] |
Onikiri::MemDepPredIFを実装しています。
StoreSet.cpp の 127 行で定義されています。
参照先 Onikiri::OpStatus::OS_FETCH.
00128 { 00129 if( op->GetStatus() == OpStatus::OS_FETCH ){ 00130 return; 00131 } 00132 if( op->GetOpClass().IsMem() ) { 00133 Deallocate(op); 00134 } 00135 }
void StoreSet::Initialize | ( | InitPhase | phase | ) | [virtual] |
StoreSet.cpp の 69 行で定義されています。
参照先 Onikiri::Core::GetOpArray()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::ParamExchange::LoadParam().
00070 { 00071 if( phase == INIT_PRE_CONNECTION ) { 00072 LoadParam(); 00073 } else if( phase == INIT_POST_CONNECTION ) { 00074 m_storeIDTable = 00075 new StoreIDTableType( 00076 HasherType( m_numStoreIDTableEntryBits, WORD_BITS ), 00077 m_numStoreIDTableWays 00078 ); 00079 m_producerTable = 00080 new ProducerTableType( 00081 HasherType( m_numProducerTableEntryBits, WORD_BITS ), 00082 m_numProducerTableWays 00083 ); 00084 m_allocatedStoreIDTable.Resize(*m_core->GetOpArray()); 00085 } 00086 00087 }
関数の呼び出しグラフ:
void StoreSet::OrderConflicted | ( | OpIterator | producer, | |
OpIterator | consumer | |||
) | [virtual] |
Onikiri::MemDepPredIFを実装しています。
StoreSet.cpp の 138 行で定義されています。
参照先 Onikiri::Addr::address・ASSERT.
00139 { 00140 ASSERT(producer->GetOpClass().IsStore(), "producerOp is not store(%s)", producer->ToString(6).c_str()); 00141 ASSERT(consumer->GetOpClass().IsMem(), "consumerOp is not load/store(%s)", consumer->ToString(6).c_str()); 00142 00143 m_numAccessOrderViolated++; 00144 00145 StoreSetID producerID = GetStoreSetID(producer); 00146 StoreSetID consumerID = GetStoreSetID(consumer); 00147 00148 // update method varies depending on which Store Set IDs are present 00149 if( producerID.address == INVALID_STORESET_ID && consumerID.address == INVALID_STORESET_ID ) { 00150 // no entry exists, so create a new entry 00151 StoreSetID id = GetNewID(producer); 00152 UpdateStoreSetIDTable(producer, id); 00153 UpdateStoreSetIDTable(consumer, id); 00154 } else if( producerID.address != INVALID_STORESET_ID && consumerID.address == INVALID_STORESET_ID ) { 00155 // producer ID exists, so set consumer ID to the same number 00156 UpdateStoreSetIDTable(consumer, producerID); 00157 } else if( producerID.address == INVALID_STORESET_ID && consumerID.address != INVALID_STORESET_ID ) { 00158 // consumer ID exists, so set producer ID to the same number 00159 UpdateStoreSetIDTable(producer, consumerID); 00160 } else { 00161 if( producerID == consumerID ) { 00162 // same conflict occurred in the past 00163 return; 00164 } 00165 00166 // if both IDs exist, compare them and set the bigger one to the smaller one 00167 if( producerID.address < consumerID.address ) { 00168 UpdateStoreSetIDTable(consumer, producerID); 00169 } else { 00170 // producer's table entry go out of use, so invalidate the entry 00171 ReleaseProducerTable(producer); 00172 UpdateStoreSetIDTable(producer, consumerID); 00173 } 00174 } 00175 }
void StoreSet::Resolve | ( | OpIterator | op | ) | [virtual] |
Onikiri::MemDepPredIFを実装しています。
StoreSet.cpp の 89 行で定義されています。
参照先 Onikiri::Addr::address・Onikiri::OpIterator::IsNull().
00090 { 00091 if( !op->GetOpClass().IsMem() ) { 00092 return; 00093 } 00094 00095 StoreSetID storeSetID = GetStoreSetID(op); 00096 if( storeSetID.address != INVALID_STORESET_ID) { 00097 OpIterator producer = GetProducerStore(storeSetID); 00098 if( !producer.IsNull() ) { 00099 ResolveMemDependency(op, producer); 00100 } 00101 } 00102 }
関数の呼び出しグラフ: