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 --- 273 unchanged lines hidden (view full) --- 282 deschedule(ts); 283 timeSlots.erase(tsit); 284 } 285 } 286 287 void 288 completeTimeSlot(TimeSlot *ts) 289 { |
290 assert(ts == timeSlots.begin()->second); 291 timeSlots.erase(timeSlots.begin()); 292 if (!runToTime && starved()) 293 scheduleStarvationEvent(); 294 scheduleTimeAdvancesEvent(); 295 } 296 297 // Pending activity ignores gem5 activity, much like how a systemc --- 60 unchanged lines hidden (view full) --- 358 bool paused() { return status() == StatusPaused; } 359 bool stopped() { return status() == StatusStopped; } 360 bool inEvaluate() { return status() == StatusEvaluate; } 361 bool inUpdate() { return status() == StatusUpdate; } 362 bool inDelta() { return status() == StatusDelta; } 363 bool inTiming() { return status() == StatusTiming; } 364 365 uint64_t changeStamp() { return _changeStamp; } |
366 void stepChangeStamp() { _changeStamp++; } |
367 368 void throwToScMain(); 369 370 Status status() { return _status; } 371 void status(Status s) { _status = s; } 372 373 void registerTraceFile(TraceFile *tf) { traceFiles.insert(tf); } 374 void unregisterTraceFile(TraceFile *tf) { traceFiles.erase(tf); } --- 114 unchanged lines hidden (view full) --- 489 void trace(bool delta); 490}; 491 492extern Scheduler scheduler; 493 494inline void 495Scheduler::TimeSlot::process() 496{ |
497 scheduler.stepChangeStamp(); |
498 scheduler.status(StatusTiming); 499 500 try { 501 while (!events.empty()) 502 events.front()->run(); 503 } catch (...) { 504 if (events.empty()) 505 scheduler.completeTimeSlot(this); --- 14 unchanged lines hidden --- |