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; --- 10 unchanged lines hidden (view full) --- 19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 * 28 * Authors: Steve Reinhardt 29 * Nathan Binkert |
30 */ 31 32#ifndef __CPU_BASE_HH__ 33#define __CPU_BASE_HH__ 34 35#include <vector> 36 37#include "base/statistics.hh" 38#include "config/full_system.hh" 39#include "cpu/sampler/sampler.hh" 40#include "sim/eventq.hh" 41#include "sim/sim_object.hh" 42#include "arch/isa_traits.hh" 43 |
44class System; 45namespace Kernel { class Statistics; } |
46class BranchPred; |
47class ExecContext; |
48 49class BaseCPU : public SimObject 50{ 51 protected: 52 // CPU's clock period in terms of the number of ticks of curTime. 53 Tick clock; 54 55 public: --- 67 unchanged lines hidden (view full) --- 123 Tick clock; 124 bool functionTrace; 125 Tick functionTraceStart; 126 System *system; 127#if FULL_SYSTEM 128 int cpu_id; 129 Tick profile; 130#endif |
131 132 Params(); 133 }; 134 135 const Params *params; 136 137 BaseCPU(Params *params); 138 virtual ~BaseCPU(); --- 91 unchanged lines hidden (view full) --- 230 total += cpuList[i]->totalInstructions(); 231 232 return total; 233 } 234 235 public: 236 // Number of CPU cycles simulated 237 Stats::Scalar<> numCycles; |
238 239#if FULL_SYSTEM 240 Kernel::Statistics *kernelStats; 241#endif |
242}; 243 244#endif // __CPU_BASE_HH__ |