cpu.hh (4030:4046b2213995) | cpu.hh (4192:7accc6365bb9) |
---|---|
1/* 2 * Copyright (c) 2004-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; --- 132 unchanged lines hidden (view full) --- 141 142 /** The tick event used for scheduling CPU ticks. */ 143 TickEvent tickEvent; 144 145 /** Schedule tick event, regardless of its current state. */ 146 void scheduleTickEvent(int delay) 147 { 148 if (tickEvent.squashed()) | 1/* 2 * Copyright (c) 2004-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; --- 132 unchanged lines hidden (view full) --- 141 142 /** The tick event used for scheduling CPU ticks. */ 143 TickEvent tickEvent; 144 145 /** Schedule tick event, regardless of its current state. */ 146 void scheduleTickEvent(int delay) 147 { 148 if (tickEvent.squashed()) |
149 tickEvent.reschedule(nextCycle(curTick + cycles(delay))); | 149 tickEvent.reschedule(curTick + cycles(delay)); |
150 else if (!tickEvent.scheduled()) | 150 else if (!tickEvent.scheduled()) |
151 tickEvent.schedule(nextCycle(curTick + cycles(delay))); | 151 tickEvent.schedule(curTick + cycles(delay)); |
152 } 153 154 /** Unschedule tick event, regardless of its current state. */ 155 void unscheduleTickEvent() 156 { 157 if (tickEvent.scheduled()) 158 tickEvent.squash(); 159 } --- 21 unchanged lines hidden (view full) --- 181 const char *description(); 182 }; 183 184 /** Schedule thread to activate , regardless of its current state. */ 185 void scheduleActivateThreadEvent(int tid, int delay) 186 { 187 // Schedule thread to activate, regardless of its current state. 188 if (activateThreadEvent[tid].squashed()) | 152 } 153 154 /** Unschedule tick event, regardless of its current state. */ 155 void unscheduleTickEvent() 156 { 157 if (tickEvent.scheduled()) 158 tickEvent.squash(); 159 } --- 21 unchanged lines hidden (view full) --- 181 const char *description(); 182 }; 183 184 /** Schedule thread to activate , regardless of its current state. */ 185 void scheduleActivateThreadEvent(int tid, int delay) 186 { 187 // Schedule thread to activate, regardless of its current state. 188 if (activateThreadEvent[tid].squashed()) |
189 activateThreadEvent[tid]. 190 reschedule(nextCycle(curTick + cycles(delay))); | 189 activateThreadEvent[tid].reschedule(curTick + cycles(delay)); |
191 else if (!activateThreadEvent[tid].scheduled()) | 190 else if (!activateThreadEvent[tid].scheduled()) |
192 activateThreadEvent[tid]. 193 schedule(nextCycle(curTick + cycles(delay))); | 191 activateThreadEvent[tid].schedule(curTick + cycles(delay)); |
194 } 195 196 /** Unschedule actiavte thread event, regardless of its current state. */ 197 void unscheduleActivateThreadEvent(int tid) 198 { 199 if (activateThreadEvent[tid].scheduled()) 200 activateThreadEvent[tid].squash(); 201 } --- 30 unchanged lines hidden (view full) --- 232 const char *description(); 233 }; 234 235 /** Schedule cpu to deallocate thread context.*/ 236 void scheduleDeallocateContextEvent(int tid, bool remove, int delay) 237 { 238 // Schedule thread to activate, regardless of its current state. 239 if (deallocateContextEvent[tid].squashed()) | 192 } 193 194 /** Unschedule actiavte thread event, regardless of its current state. */ 195 void unscheduleActivateThreadEvent(int tid) 196 { 197 if (activateThreadEvent[tid].scheduled()) 198 activateThreadEvent[tid].squash(); 199 } --- 30 unchanged lines hidden (view full) --- 230 const char *description(); 231 }; 232 233 /** Schedule cpu to deallocate thread context.*/ 234 void scheduleDeallocateContextEvent(int tid, bool remove, int delay) 235 { 236 // Schedule thread to activate, regardless of its current state. 237 if (deallocateContextEvent[tid].squashed()) |
240 deallocateContextEvent[tid]. 241 reschedule(nextCycle(curTick + cycles(delay))); | 238 deallocateContextEvent[tid].reschedule(curTick + cycles(delay)); |
242 else if (!deallocateContextEvent[tid].scheduled()) | 239 else if (!deallocateContextEvent[tid].scheduled()) |
243 deallocateContextEvent[tid]. 244 schedule(nextCycle(curTick + cycles(delay))); | 240 deallocateContextEvent[tid].schedule(curTick + cycles(delay)); |
245 } 246 247 /** Unschedule thread deallocation in CPU */ 248 void unscheduleDeallocateContextEvent(int tid) 249 { 250 if (deallocateContextEvent[tid].scheduled()) 251 deallocateContextEvent[tid].squash(); 252 } --- 103 unchanged lines hidden (view full) --- 356 /** Takes over from another CPU. */ 357 virtual void takeOverFrom(BaseCPU *oldCPU); 358 359 /** Get the current instruction sequence number, and increment it. */ 360 InstSeqNum getAndIncrementInstSeq() 361 { return globalSeqNum++; } 362 363#if FULL_SYSTEM | 241 } 242 243 /** Unschedule thread deallocation in CPU */ 244 void unscheduleDeallocateContextEvent(int tid) 245 { 246 if (deallocateContextEvent[tid].scheduled()) 247 deallocateContextEvent[tid].squash(); 248 } --- 103 unchanged lines hidden (view full) --- 352 /** Takes over from another CPU. */ 353 virtual void takeOverFrom(BaseCPU *oldCPU); 354 355 /** Get the current instruction sequence number, and increment it. */ 356 InstSeqNum getAndIncrementInstSeq() 357 { return globalSeqNum++; } 358 359#if FULL_SYSTEM |
360 /** Update the Virt and Phys ports of all ThreadContexts to 361 * reflect change in memory connections. */ 362 void updateMemPorts(); 363 |
|
364 /** Check if this address is a valid instruction address. */ 365 bool validInstAddr(Addr addr) { return true; } 366 367 /** Check if this address is a valid data address. */ 368 bool validDataAddr(Addr addr) { return true; } 369 370 /** Get instruction asid. */ 371 int getInstAsid(unsigned tid) --- 309 unchanged lines hidden --- | 364 /** Check if this address is a valid instruction address. */ 365 bool validInstAddr(Addr addr) { return true; } 366 367 /** Check if this address is a valid data address. */ 368 bool validDataAddr(Addr addr) { return true; } 369 370 /** Get instruction asid. */ 371 int getInstAsid(unsigned tid) --- 309 unchanged lines hidden --- |