sim_events.hh (11169:44b5c183c3cd) sim_events.hh (11294:a368064a2ab5)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

61
62 public:
63 // non-scheduling version for createForUnserialize()
64 GlobalSimLoopExitEvent();
65 GlobalSimLoopExitEvent(Tick when, const std::string &_cause, int c,
66 Tick repeat = 0);
67
68 const std::string getCause() const { return cause; }
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

61
62 public:
63 // non-scheduling version for createForUnserialize()
64 GlobalSimLoopExitEvent();
65 GlobalSimLoopExitEvent(Tick when, const std::string &_cause, int c,
66 Tick repeat = 0);
67
68 const std::string getCause() const { return cause; }
69 const int getCode() const { return code; }
69 int getCode() const { return code; }
70
71 void process(); // process event
72
73 virtual const char *description() const;
74};
75
76class LocalSimLoopExitEvent : public Event
77{
78 protected:
79 // string explaining why we're terminating
80 std::string cause;
81 int code;
82 Tick repeat;
83
84 public:
85 LocalSimLoopExitEvent();
86 LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0);
87
88 const std::string getCause() const { return cause; }
70
71 void process(); // process event
72
73 virtual const char *description() const;
74};
75
76class LocalSimLoopExitEvent : public Event
77{
78 protected:
79 // string explaining why we're terminating
80 std::string cause;
81 int code;
82 Tick repeat;
83
84 public:
85 LocalSimLoopExitEvent();
86 LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0);
87
88 const std::string getCause() const { return cause; }
89 const int getCode() const { return code; }
89 int getCode() const { return code; }
90
91 void process() override; // process event
92
93 const char *description() const override;
94
95 void serialize(CheckpointOut &cp) const override;
96 void unserialize(CheckpointIn &cp) override;
97 static Serializable *createForUnserialize(CheckpointIn &cp,

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

106
107 public:
108 CountedDrainEvent();
109
110 void process() override;
111
112 void setCount(int _count) { count = _count; }
113
90
91 void process() override; // process event
92
93 const char *description() const override;
94
95 void serialize(CheckpointOut &cp) const override;
96 void unserialize(CheckpointIn &cp) override;
97 static Serializable *createForUnserialize(CheckpointIn &cp,

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

106
107 public:
108 CountedDrainEvent();
109
110 void process() override;
111
112 void setCount(int _count) { count = _count; }
113
114 const int getCount() const { return count; }
114 int getCount() const { return count; }
115};
116
117//
118// Event class to terminate simulation after 'n' related events have
119// occurred using a shared counter: used to terminate when *all*
120// threads have reached a particular instruction count
121//
122class CountedExitEvent : public Event

--- 15 unchanged lines hidden ---
115};
116
117//
118// Event class to terminate simulation after 'n' related events have
119// occurred using a shared counter: used to terminate when *all*
120// threads have reached a particular instruction count
121//
122class CountedExitEvent : public Event

--- 15 unchanged lines hidden ---