scheduler.cc (13095:836fd7929940) scheduler.cc (13096:9295fa397b3f)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 110 unchanged lines hidden (view full) ---

119 e->run();
120 deltas.clear();
121
122 for (auto ets: eventsToSchedule)
123 eq->schedule(ets.first, ets.second);
124 eventsToSchedule.clear();
125
126 if (_started) {
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 110 unchanged lines hidden (view full) ---

119 e->run();
120 deltas.clear();
121
122 for (auto ets: eventsToSchedule)
123 eq->schedule(ets.first, ets.second);
124 eventsToSchedule.clear();
125
126 if (_started) {
127 if (starved() && !runToTime)
127 if (!runToTime && starved())
128 scheduleStarvationEvent();
129 kernel->status(::sc_core::SC_RUNNING);
130 }
131
132 initDone = true;
133}
134
135void

--- 103 unchanged lines hidden (view full) ---

239 } while (!readyList.empty());
240
241 if (!empty)
242 _numCycles++;
243
244 // The update phase.
245 update();
246
128 scheduleStarvationEvent();
129 kernel->status(::sc_core::SC_RUNNING);
130 }
131
132 initDone = true;
133}
134
135void

--- 103 unchanged lines hidden (view full) ---

239 } while (!readyList.empty());
240
241 if (!empty)
242 _numCycles++;
243
244 // The update phase.
245 update();
246
247 if (starved() && !runToTime)
248 scheduleStarvationEvent();
249
250 // The delta phase.
251 for (auto &e: deltas)
252 e->run();
253 deltas.clear();
254
247 // The delta phase.
248 for (auto &e: deltas)
249 e->run();
250 deltas.clear();
251
252 if (!runToTime && starved())
253 scheduleStarvationEvent();
254
255 if (runOnce)
256 schedulePause();
257}
258
259void
260Scheduler::update()
261{
262 Channel *channel = updateList.getNext();

--- 35 unchanged lines hidden (view full) ---

298 _started = true;
299 _paused = false;
300 _stopped = false;
301 runToTime = run_to_time;
302
303 maxTick = max_tick;
304
305 if (initDone) {
255 if (runOnce)
256 schedulePause();
257}
258
259void
260Scheduler::update()
261{
262 Channel *channel = updateList.getNext();

--- 35 unchanged lines hidden (view full) ---

298 _started = true;
299 _paused = false;
300 _stopped = false;
301 runToTime = run_to_time;
302
303 maxTick = max_tick;
304
305 if (initDone) {
306 if (starved() && !runToTime)
306 if (!runToTime && starved())
307 scheduleStarvationEvent();
308 kernel->status(::sc_core::SC_RUNNING);
309 }
310
311 schedule(&maxTickEvent, maxTick);
312
313 // Return to gem5 to let it run events, etc.
314 Fiber::primaryFiber()->run();

--- 45 unchanged lines hidden ---
307 scheduleStarvationEvent();
308 kernel->status(::sc_core::SC_RUNNING);
309 }
310
311 schedule(&maxTickEvent, maxTick);
312
313 // Return to gem5 to let it run events, etc.
314 Fiber::primaryFiber()->run();

--- 45 unchanged lines hidden ---