timing.cc (4433:4722c6787f69) | timing.cc (4471:4d86c4d096ad) |
---|---|
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; --- 154 unchanged lines hidden (view full) --- 163 // Delete the old event if it existed. 164 if (fetchEvent) { 165 if (fetchEvent->scheduled()) 166 fetchEvent->deschedule(); 167 168 delete fetchEvent; 169 } 170 | 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; --- 154 unchanged lines hidden (view full) --- 163 // Delete the old event if it existed. 164 if (fetchEvent) { 165 if (fetchEvent->scheduled()) 166 fetchEvent->deschedule(); 167 168 delete fetchEvent; 169 } 170 |
171 fetchEvent = 172 new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false); 173 fetchEvent->schedule(nextCycle()); | 171 fetchEvent = new FetchEvent(this, nextCycle()); |
174 } 175 176 changeState(SimObject::Running); 177 previousTick = curTick; 178} 179 180void 181TimingSimpleCPU::switchOut() --- 37 unchanged lines hidden (view full) --- 219 assert(thread); 220 221 assert(_status == Idle); 222 223 notIdleFraction++; 224 _status = Running; 225 226 // kick things off by initiating the fetch of the next instruction | 172 } 173 174 changeState(SimObject::Running); 175 previousTick = curTick; 176} 177 178void 179TimingSimpleCPU::switchOut() --- 37 unchanged lines hidden (view full) --- 217 assert(thread); 218 219 assert(_status == Idle); 220 221 notIdleFraction++; 222 _status = Running; 223 224 // kick things off by initiating the fetch of the next instruction |
227 fetchEvent = 228 new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false); 229 fetchEvent->schedule(nextCycle(curTick + cycles(delay))); | 225 fetchEvent = new FetchEvent(this, nextCycle(curTick + cycles(delay))); |
230} 231 232 233void 234TimingSimpleCPU::suspendContext(int thread_num) 235{ 236 assert(thread_num == 0); 237 assert(thread); --- 576 unchanged lines hidden --- | 226} 227 228 229void 230TimingSimpleCPU::suspendContext(int thread_num) 231{ 232 assert(thread_num == 0); 233 assert(thread); --- 576 unchanged lines hidden --- |