eventq.cc (9328:2fa2b16bdfc2) eventq.cc (9356:b279bad40aa3)
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"
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.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()) {
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
204 event->process();
205 if (event->isExitEvent()) {
206 assert(!event->flags.isSet(Event::AutoDelete) ||
207 !event->flags.isSet(Event::IsMainQueue)); // would be silly
208 return event;
209 }
210 } else {
211 event->flags.clear(Event::Squashed);

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

424#endif
425 cprintf("Scheduled for %d, priority %d\n", when(), _priority);
426 } else {
427 cprintf("Not Scheduled\n");
428 }
429}
430
431EventQueue::EventQueue(const string &n)
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)
432 : objName(n), head(NULL)
435 : objName(n), head(NULL), _curTick(0)
433{}
436{}