base.hh (5704:98224505352a) base.hh (5712:199d31b47f7b)
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;

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

75
76class BaseCPU : public MemObject
77{
78 protected:
79 // CPU's clock period in terms of the number of ticks of curTime.
80 Tick clock;
81 // @todo remove me after debugging with legion done
82 Tick instCnt;
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;

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

75
76class BaseCPU : public MemObject
77{
78 protected:
79 // CPU's clock period in terms of the number of ticks of curTime.
80 Tick clock;
81 // @todo remove me after debugging with legion done
82 Tick instCnt;
83 // every cpu has an id, put it in the base cpu
84 // Set at initialization, only time a cpuId might change is during a
85 // takeover (which should be done from within the BaseCPU anyway,
86 // therefore no setCpuId() method is provided
87 int _cpuId;
83
84 public:
88
89 public:
90 /** Reads this CPU's ID. */
91 int cpuId() { return _cpuId; }
92
85// Tick currentTick;
86 inline Tick frequency() const { return Clock::Frequency / clock; }
87 inline Tick ticks(int numCycles) const { return clock * numCycles; }
88 inline Tick curCycle() const { return curTick / clock; }
89 inline Tick tickToCycles(Tick val) const { return val / clock; }
90 // @todo remove me after debugging with legion done
91 Tick instCount() { return instCnt; }
92

--- 193 unchanged lines hidden ---
93// Tick currentTick;
94 inline Tick frequency() const { return Clock::Frequency / clock; }
95 inline Tick ticks(int numCycles) const { return clock * numCycles; }
96 inline Tick curCycle() const { return curTick / clock; }
97 inline Tick tickToCycles(Tick val) const { return val / clock; }
98 // @todo remove me after debugging with legion done
99 Tick instCount() { return instCnt; }
100

--- 193 unchanged lines hidden ---