base.hh (3661:efc80a01aeb6) base.hh (3814:33bd4ec9d66a)
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;

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

65 virtual const char *description();
66};
67
68class BaseCPU : public MemObject
69{
70 protected:
71 // CPU's clock period in terms of the number of ticks of curTime.
72 Tick clock;
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;

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

65 virtual const char *description();
66};
67
68class BaseCPU : public MemObject
69{
70 protected:
71 // CPU's clock period in terms of the number of ticks of curTime.
72 Tick clock;
73 // @todo remove me after debugging with legion done
74 Tick instCnt;
73
74 public:
75// Tick currentTick;
76 inline Tick frequency() const { return Clock::Frequency / clock; }
77 inline Tick cycles(int numCycles) const { return clock * numCycles; }
78 inline Tick curCycle() const { return curTick / clock; }
75
76 public:
77// Tick currentTick;
78 inline Tick frequency() const { return Clock::Frequency / clock; }
79 inline Tick cycles(int numCycles) const { return clock * numCycles; }
80 inline Tick curCycle() const { return curTick / clock; }
81 // @todo remove me after debugging with legion done
82 Tick instCount() { return instCnt; }
79
80 /** The next cycle the CPU should be scheduled, given a cache
81 * access or quiesce event returning on this cycle. This function
82 * may return curTick if the CPU should run on the current cycle.
83 */
84 Tick nextCycle();
85
86 /** The next cycle the CPU should be scheduled, given a cache

--- 191 unchanged lines hidden ---
83
84 /** The next cycle the CPU should be scheduled, given a cache
85 * access or quiesce event returning on this cycle. This function
86 * may return curTick if the CPU should run on the current cycle.
87 */
88 Tick nextCycle();
89
90 /** The next cycle the CPU should be scheduled, given a cache

--- 191 unchanged lines hidden ---