1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * Copyright (c) 2008 The Hewlett-Packard Development Company 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37#include <vector> 38 39#include "base/hashmap.hh" 40#include "base/misc.hh" 41#include "base/trace.hh" 42#include "cpu/smt.hh" 43#include "debug/Config.hh" 44#include "sim/core.hh" |
45#include "sim/eventq_impl.hh" |
46 47using namespace std; 48 49// 50// Main Event Queue 51// 52// Events on this queue are processed at the *beginning* of each 53// cycle, before the pipeline simulation is performed. --- 142 unchanged lines hidden (view full) --- 196 } else { 197 // this was the only element on the 'in bin' list, so get rid of 198 // the 'in bin' list and point to the next bin list 199 head = head->nextBin; 200 } 201 202 // handle action 203 if (!event->squashed()) { |
204 // forward current cycle to the time when this event occurs. 205 setCurTick(event->when()); 206 |
207 event->process(); 208 if (event->isExitEvent()) { 209 assert(!event->flags.isSet(Event::AutoDelete) || 210 !event->flags.isSet(Event::IsMainQueue)); // would be silly 211 return event; 212 } 213 } else { 214 event->flags.clear(Event::Squashed); --- 212 unchanged lines hidden (view full) --- 427#endif 428 cprintf("Scheduled for %d, priority %d\n", when(), _priority); 429 } else { 430 cprintf("Not Scheduled\n"); 431 } 432} 433 434EventQueue::EventQueue(const string &n) |
435 : objName(n), head(NULL), _curTick(0) |
436{} |