base.hh (2670:9107b8bd08cd) base.hh (2680:246e7104f744)
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;

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

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 BranchPred;
45class CheckerCPU;
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;

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

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 BranchPred;
45class CheckerCPU;
46class ExecContext;
46class ThreadContext;
47class System;
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

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

87 public:
88 ProfileEvent(BaseCPU *cpu, int interval);
89 void process();
90 };
91 ProfileEvent *profileEvent;
92#endif
93
94 protected:
47class System;
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

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

87 public:
88 ProfileEvent(BaseCPU *cpu, int interval);
89 void process();
90 };
91 ProfileEvent *profileEvent;
92#endif
93
94 protected:
95 std::vector<ExecContext *> execContexts;
95 std::vector<ThreadContext *> threadContexts;
96
97 public:
98
99 /// Notify the CPU that the indicated context is now active. The
100 /// delay parameter indicates the number of ticks to wait before
101 /// executing (typically 0 or 1).
102 virtual void activateContext(int thread_num, int delay) {}
103

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

139 virtual ~BaseCPU();
140
141 virtual void init();
142 virtual void startup();
143 virtual void regStats();
144
145 virtual void activateWhenReady(int tid) {};
146
96
97 public:
98
99 /// Notify the CPU that the indicated context is now active. The
100 /// delay parameter indicates the number of ticks to wait before
101 /// executing (typically 0 or 1).
102 virtual void activateContext(int thread_num, int delay) {}
103

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

139 virtual ~BaseCPU();
140
141 virtual void init();
142 virtual void startup();
143 virtual void regStats();
144
145 virtual void activateWhenReady(int tid) {};
146
147 void registerExecContexts();
147 void registerThreadContexts();
148
149 /// Prepare for another CPU to take over execution. When it is
150 /// is ready (drained pipe) it signals the sampler.
151 virtual void switchOut(Sampler *);
152
153 /// Take over execution from the given CPU. Used for warm-up and
154 /// sampling.
155 virtual void takeOverFrom(BaseCPU *);

--- 86 unchanged lines hidden ---
148
149 /// Prepare for another CPU to take over execution. When it is
150 /// is ready (drained pipe) it signals the sampler.
151 virtual void switchOut(Sampler *);
152
153 /// Take over execution from the given CPU. Used for warm-up and
154 /// sampling.
155 virtual void takeOverFrom(BaseCPU *);

--- 86 unchanged lines hidden ---