21 using namespace sc_core;
22 using namespace sc_dt;
24 typedef SC_GRIDPOINT_ID_TYPE SC_CORE_ID_TYPE;
25 typedef SC_GRIDPOINT_MASK_TYPE SC_CORE_MASK_TYPE;
27 #ifdef MEASURE_PERFORMANCE
28 #define PERFORMANCE_COUNTINSTRUCTION CountInstruction();
29 #define PERFORMANCE_COUNTMETAINSTRUCTION CountMetaInstruction();
30 #define PERFORMANCE_ADDINSTRUCTIONTIME(t) mInstructionTime +=t;
31 #define PERFORMANCE_ADDMETAINSTRUCTIONTIME(t) mMetaInstructionTime +=t;
32 #define PERFORMANCE_ADDMEMORYTIME(t) mMemoryTime +=t;
33 #define PERFORMANCE_ADDFETCHTIME(t) mFetchTime +=t;
34 #define PERFORMANCE_ADDWAITTIME(t) mWaitTime +=t;
36 #define PERFORMANCE_COUNTINSTRUCTION
37 #define PERFORMANCE_COUNTMETAINSTRUCTION
38 #define PERFORMANCE_ADDINSTRUCTIONTIME(t)
39 #define PERFORMANCE_ADDMETAINSTRUCTIONTIME(t)
40 #define PERFORMANCE_ADDMEMORYTIME(t)
41 #define PERFORMANCE_ADDFETCHTIME(t)
42 #define PERFORMANCE_ADDWAITTIME(t)
43 #endif // MEASURE_PERFORMANCE
47 #define USE_DEBUG_DATA_TYPES
49 #ifdef USE_DEBUG_DATA_TYPES
50 typedef int32_t SC_REGISTER_TYPE;
51 typedef int SC_COOPERATION_MODE_TYPE;
52 typedef int32_t SC_REGISTER_MASK_TYPE;
54 typedef sc_dt::sc_uint<CORE_REGISTER_BITS> SC_REGISTER_TYPE;
55 typedef sc_dt::sc_uint<COOPERATION_MODE_WIDTH> SC_COOPERATION_MODE_TYPE;
56 typedef sc_dt::sc_uint<MAX_NUMBER_OF_REGFteregicISTERS> SC_REGISTER_MASK_TYPE;
57 #endif //USE_DEBUG_DATA_TYPES
81 Q_CREATE, Q_CREATER, Q_CREATET, Q_CREATEF,
90 typedef SC_GRIDPOINT_MASK_TYPE SC_CORE_MASK_TYPE;
91 typedef int SC_REGISTER_TYPE;
111 using namespace sc_core;
using namespace std;
173 IsMorphingInstructionFetched(
scHThread* H){
return true;}
196 RegisterValue_Get(uint8_t R,
bool Performance=
true);
198 RegisterValue_Set(uint8_t R, SC_WORD_TYPE V,
bool Performance=
true);
222 MetaInstructionName_Get(
void){
return "";}
224 RegisterContentStrings_Get(SC_REGISTER_MASK_TYPE M,
bool AlsoCC){
return "";}
226 HandleEndOfWaiting(
void);
228 doCanTerminate( SC_CORE_MASK_TYPE Address);
230 PrepareNextInstruction(
void);
231 #ifdef MEASURE_PERFORMANCE
233 InstructionCount_Get(){
return mInstructionCount;}
235 MetaInstructionCount_Get(){
return mMetaInstructionCount;}
236 void CountInstruction(){mInstructionCount++;}
237 void CountMetaInstruction(){mMetaInstructionCount++;}
239 InstructionTime_Get() {
return mInstructionTime;}
241 MetaInstructionTime_Get(){
return mMetaInstructionTime;}
243 MemoryTime_Get(){
return mMemoryTime;}
245 FetchTime_Get(){
return mFetchTime;}
247 WaitTime_Get() {
return mWaitTime;}
248 #endif //MEASURE_PERFORMANCE
258 EXECUTEMETA_thread(
void);
269 QCREATE_thread(
void);
271 QCREATEMETA_thread(
void);
273 QWAITMETA_thread(
void);
281 doFindHostToProcess(SC_ADDRESS_TYPE Offs, SC_GRIDPOINT_MASK_TYPE Mask)
282 {
return dynamic_cast<AbstractCore*
>(scGridPoint::doFindHostToProcess(Offs, Mask));}
285 doExecuteMetaInstruction();
287 HandleMetaInstruction(
void);
289 HandleConventionalInstruction(
void);
291 TerminateExecution(
void);
294 FinishPrefetching(
void);
301 ReleasePreAllocatedCores(
void);
306 readInstrMem(SC_WORD_TYPE addr);
308 writeInstrMem(SC_WORD_TYPE addr, uint32_t C);
309 #ifdef MAKE_PERFORMANCE_DIAGRAM
316 AllocationBegin_Get(
void) {
return msAllocationBegin;}
318 AllocationBegin_Set(sc_time T) {msAllocationBegin = T;}
319 #endif //MAKE_PERFORMANCE_DIAGRAM
350 #ifdef MEASURE_PERFORMANCE
354 mMetaInstructionCount;
359 mMetaInstructionTime,
361 #endif //MEASURE_PERFORMANCE
365 #endif // AbstractCore_h