Deleted Added
sdiff udiff text old ( 2665:a124942bacb8 ) new ( 2667:fe64b8353b1c )
full compact
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

31#ifndef __SIM_SIM_EVENTS_HH__
32#define __SIM_SIM_EVENTS_HH__
33
34#include "sim/eventq.hh"
35
36//
37// Event to terminate simulation at a particular cycle/instruction
38//
39class SimExitEvent : public Event
40{
41 private:
42 // string explaining why we're terminating
43 std::string cause;
44 int code;
45
46 public:
47 SimExitEvent(const std::string &_cause, int c = 0)
48 : Event(&mainEventQueue, Sim_Exit_Pri), cause(_cause),
49 code(c)
50 { schedule(curTick); }
51
52 SimExitEvent(Tick _when, const std::string &_cause, int c = 0)
53 : Event(&mainEventQueue, Sim_Exit_Pri), cause(_cause),
54 code(c)
55 { schedule(_when); }
56
57 SimExitEvent(EventQueue *q, const std::string &_cause, int c = 0)
58 : Event(q, Sim_Exit_Pri), cause(_cause), code(c)
59 { schedule(curTick); }
60
61 SimExitEvent(EventQueue *q, Tick _when, const std::string &_cause,
62 int c = 0)
63 : Event(q, Sim_Exit_Pri), cause(_cause), code(c)
64 { schedule(_when); }
65
66 void process(); // process event
67
68 virtual const char *description();
69};
70
71//
72// Event class to terminate simulation after 'n' related events have

--- 56 unchanged lines hidden ---