summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-03-05 05:50:33 -0500
committerNathan Binkert <binkertn@umich.edu>2004-03-05 05:50:33 -0500
commit01f493a28ad8a85b0796058f8e032c90f3c4ac5d (patch)
tree66caf008ceb5f580aa0d087741fc735df997a99e /sim
parent1a300ef60da887fd3e90add708af4344e19770cb (diff)
parenta57bc93e82ac074204a32011a2c756ad1daedad5 (diff)
downloadgem5-01f493a28ad8a85b0796058f8e032c90f3c4ac5d.tar.xz
Merge zizzer.eecs.umich.edu:/bk/m5
into ziff.eecs.umich.edu:/z/binkertn/research/m5/latest --HG-- extra : convert_revision : 51b3fd809a77e146b8370636b2cc60ddf1075195
Diffstat (limited to 'sim')
-rw-r--r--sim/eventq.hh9
-rw-r--r--sim/universe.cc2
2 files changed, 9 insertions, 2 deletions
diff --git a/sim/eventq.hh b/sim/eventq.hh
index 60a61fa29..ed37fd4f4 100644
--- a/sim/eventq.hh
+++ b/sim/eventq.hh
@@ -243,10 +243,13 @@ class EventWrapper : public Event
T *object;
public:
- EventWrapper(T *obj, EventQueue *q = &mainEventQueue,
+ EventWrapper(T *obj, bool del = false, EventQueue *q = &mainEventQueue,
Priority p = Default_Pri)
: Event(q, p), object(obj)
- {}
+ {
+ if (del)
+ setFlags(AutoDelete);
+ }
void process() { (object->*F)(); }
};
@@ -324,6 +327,8 @@ inline void
Event::schedule(Tick t)
{
assert(!scheduled());
+ assert(t >= curTick);
+
setFlags(Scheduled);
#if TRACING_ON
when_scheduled = curTick;
diff --git a/sim/universe.cc b/sim/universe.cc
index feede514e..d6c849ac7 100644
--- a/sim/universe.cc
+++ b/sim/universe.cc
@@ -47,6 +47,7 @@ Tick ticksPerSecond;
double __ticksPerMS;
double __ticksPerUS;
double __ticksPerNS;
+double __ticksPerPS;
string outputDirectory;
ostream *outputStream;
@@ -79,6 +80,7 @@ UniverseParamContext::checkParams()
__ticksPerMS = freq / 1.0e3;
__ticksPerUS = freq / 1.0e6;
__ticksPerNS = freq / 1.0e9;
+ __ticksPerPS = freq / 1.0e12;
if (universe_output_dir.isValid()) {
outputDirectory = universe_output_dir;