timing.cc (3230:e86a03911728) timing.cc (3297:f0855ab36ff5)
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;

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

142 return 1;
143 }
144}
145
146void
147TimingSimpleCPU::resume()
148{
149 if (_status != SwitchedOut && _status != Idle) {
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;

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

142 return 1;
143 }
144}
145
146void
147TimingSimpleCPU::resume()
148{
149 if (_status != SwitchedOut && _status != Idle) {
150 assert(system->getMemoryMode() == System::Timing);
151
150 // Delete the old event if it existed.
151 if (fetchEvent) {
152 if (fetchEvent->scheduled())
153 fetchEvent->deschedule();
154
155 delete fetchEvent;
156 }
157
158 fetchEvent =
159 new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false);
160 fetchEvent->schedule(curTick);
161 }
162
152 // Delete the old event if it existed.
153 if (fetchEvent) {
154 if (fetchEvent->scheduled())
155 fetchEvent->deschedule();
156
157 delete fetchEvent;
158 }
159
160 fetchEvent =
161 new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false);
162 fetchEvent->schedule(curTick);
163 }
164
163 assert(system->getMemoryMode() == System::Timing);
164 changeState(SimObject::Running);
165 previousTick = curTick;
166}
167
168void
169TimingSimpleCPU::switchOut()
170{
171 assert(status() == Running || status() == Idle);

--- 563 unchanged lines hidden ---
165 changeState(SimObject::Running);
166 previousTick = curTick;
167}
168
169void
170TimingSimpleCPU::switchOut()
171{
172 assert(status() == Running || status() == Idle);

--- 563 unchanged lines hidden ---