base.hh (7897:d9e8b1fd1a9f) | base.hh (7914:eee5bb0fb8ea) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Regents of the University of California 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 90 unchanged lines hidden (view full) --- 99 /** Reads this CPU's ID. */ 100 int cpuId() { return _cpuId; } 101 102// Tick currentTick; 103 inline Tick frequency() const { return SimClock::Frequency / clock; } 104 inline Tick ticks(int numCycles) const { return clock * numCycles; } 105 inline Tick curCycle() const { return curTick() / clock; } 106 inline Tick tickToCycles(Tick val) const { return val / clock; } | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Regents of the University of California 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 90 unchanged lines hidden (view full) --- 99 /** Reads this CPU's ID. */ 100 int cpuId() { return _cpuId; } 101 102// Tick currentTick; 103 inline Tick frequency() const { return SimClock::Frequency / clock; } 104 inline Tick ticks(int numCycles) const { return clock * numCycles; } 105 inline Tick curCycle() const { return curTick() / clock; } 106 inline Tick tickToCycles(Tick val) const { return val / clock; } |
107 inline void workItemBegin() { numWorkItemsStarted++; } 108 inline void workItemEnd() { numWorkItemsCompleted++; } |
|
107 // @todo remove me after debugging with legion done 108 Tick instCount() { return instCnt; } 109 110 /** The next cycle the CPU should be scheduled, given a cache 111 * access or quiesce event returning on this cycle. This function 112 * may return curTick() if the CPU should run on the current cycle. 113 */ 114 Tick nextCycle(); --- 197 unchanged lines hidden (view full) --- 312 total += cpuList[i]->totalInstructions(); 313 314 return total; 315 } 316 317 public: 318 // Number of CPU cycles simulated 319 Stats::Scalar numCycles; | 109 // @todo remove me after debugging with legion done 110 Tick instCount() { return instCnt; } 111 112 /** The next cycle the CPU should be scheduled, given a cache 113 * access or quiesce event returning on this cycle. This function 114 * may return curTick() if the CPU should run on the current cycle. 115 */ 116 Tick nextCycle(); --- 197 unchanged lines hidden (view full) --- 314 total += cpuList[i]->totalInstructions(); 315 316 return total; 317 } 318 319 public: 320 // Number of CPU cycles simulated 321 Stats::Scalar numCycles; |
322 Stats::Scalar numWorkItemsStarted; 323 Stats::Scalar numWorkItemsCompleted; |
|
320}; 321 322#endif // __CPU_BASE_HH__ | 324}; 325 326#endif // __CPU_BASE_HH__ |