comparison MasterLoop.c @ 182:7523ee70d66c

merge changes from default
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Fri, 06 Jan 2012 18:55:05 +0100
parents 3bd35fc83c61 c1784868dcea
children 50b29548d4f0
comparison
equal deleted inserted replaced
47:6486bb46d511 49:0c7d3980eb8c
88 volatile VirtProcr *volatileMasterPr; 88 volatile VirtProcr *volatileMasterPr;
89 89
90 volatileMasterPr = animatingPr; 90 volatileMasterPr = animatingPr;
91 masterPr = (VirtProcr*)volatileMasterPr; //used to force re-define after jmp 91 masterPr = (VirtProcr*)volatileMasterPr; //used to force re-define after jmp
92 92
93 bulb b = new_bulb();
94 numSlotsFilled=1;
95 //First animation of each MasterVP will in turn animate this part 93 //First animation of each MasterVP will in turn animate this part
96 // of setup code.. (VP creator sets up the stack as if this function 94 // of setup code.. (VP creator sets up the stack as if this function
97 // was called normally, but actually get here by jmp) 95 // was called normally, but actually get here by jmp)
98 //So, setup values about stack ptr, jmp pt and all that 96 //So, setup values about stack ptr, jmp pt and all that
99 //masterPr->nextInstrPt = &&masterLoopStartPt; 97 //masterPr->nextInstrPt = &&masterLoopStartPt;
129 127
130 requestHandler = masterEnv->requestHandler; 128 requestHandler = masterEnv->requestHandler;
131 slaveScheduler = masterEnv->slaveScheduler; 129 slaveScheduler = masterEnv->slaveScheduler;
132 semanticEnv = masterEnv->semanticEnv; 130 semanticEnv = masterEnv->semanticEnv;
133 131
134 #ifdef DETECT_LOOP_GRAPH
135
136 #endif
137 132
138 //Poll each slot's Done flag 133 //Poll each slot's Done flag
139 numSlotsFilled = 0; 134 numSlotsFilled = 0;
140 for( slotIdx = 0; slotIdx < NUM_SCHED_SLOTS; slotIdx++) 135 for( slotIdx = 0; slotIdx < NUM_SCHED_SLOTS; slotIdx++)
141 { 136 {
219 lastRecord->assigning_core = thisCoresIdx; 214 lastRecord->assigning_core = thisCoresIdx;
220 lastRecord->start_assign_cycles = tmp_cycles; 215 lastRecord->start_assign_cycles = tmp_cycles;
221 lastRecord->start_assign_instrs = tmp_instrs; 216 lastRecord->start_assign_instrs = tmp_instrs;
222 saveCyclesAndInstrs(thisCoresIdx,lastRecord->end_assign_cycles,lastRecord->end_assign_instrs); 217 saveCyclesAndInstrs(thisCoresIdx,lastRecord->end_assign_cycles,lastRecord->end_assign_instrs);
223 #endif 218 #endif
224 #ifdef DETECT_LOOP_GRAPH 219
225
226 #endif
227 writeVMSQ( schedVirtPr, readyToAnimateQ ); 220 writeVMSQ( schedVirtPr, readyToAnimateQ );
228 } 221 }
229 } 222 }
230 223
231 } 224 }