base.hh (2654:9559cfa91b9d) base.hh (2665:a124942bacb8)
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.
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
27 */
28
29#ifndef __CPU_BASE_HH__
30#define __CPU_BASE_HH__
31
32#include <vector>
33
34#include "base/statistics.hh"
35#include "config/full_system.hh"
36#include "cpu/sampler/sampler.hh"
37#include "sim/eventq.hh"
38#include "sim/sim_object.hh"
39#include "arch/isa_traits.hh"
40
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; }
41class BranchPred;
46class BranchPred;
42class CheckerCPU;
43class ExecContext;
47class ExecContext;
44class System;
45
46class BaseCPU : public SimObject
47{
48 protected:
49 // CPU's clock period in terms of the number of ticks of curTime.
50 Tick clock;
51
52 public:

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

120 Tick clock;
121 bool functionTrace;
122 Tick functionTraceStart;
123 System *system;
124#if FULL_SYSTEM
125 int cpu_id;
126 Tick profile;
127#endif
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
128 BaseCPU *checker;
129
130 Params();
131 };
132
133 const Params *params;
134
135 BaseCPU(Params *params);
136 virtual ~BaseCPU();

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

228 total += cpuList[i]->totalInstructions();
229
230 return total;
231 }
232
233 public:
234 // Number of CPU cycles simulated
235 Stats::Scalar<> numCycles;
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
236};
237
238#endif // __CPU_BASE_HH__
242};
243
244#endif // __CPU_BASE_HH__