base.hh (2856:89691405ec9c) base.hh (3125:febd811bccc6)
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;

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

41#include "arch/isa_traits.hh"
42
43class BranchPred;
44class CheckerCPU;
45class ThreadContext;
46class System;
47class Port;
48
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;

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

41#include "arch/isa_traits.hh"
42
43class BranchPred;
44class CheckerCPU;
45class ThreadContext;
46class System;
47class Port;
48
49class CPUProgressEvent : public Event
50{
51 protected:
52 Tick interval;
53 Counter lastNumInst;
54 BaseCPU *cpu;
55
56 public:
57 CPUProgressEvent(EventQueue *q, Tick ival, BaseCPU *_cpu)
58 : Event(q, Event::Stat_Event_Pri), interval(ival), lastNumInst(0), cpu(_cpu)
59 { schedule(curTick + interval); }
60
61 void process();
62
63 virtual const char *description();
64};
65
49class BaseCPU : public MemObject
50{
51 protected:
52 // CPU's clock period in terms of the number of ticks of curTime.
53 Tick clock;
54
55 public:
66class BaseCPU : public MemObject
67{
68 protected:
69 // CPU's clock period in terms of the number of ticks of curTime.
70 Tick clock;
71
72 public:
73// Tick currentTick;
56 inline Tick frequency() const { return Clock::Frequency / clock; }
57 inline Tick cycles(int numCycles) const { return clock * numCycles; }
58 inline Tick curCycle() const { return curTick / clock; }
59
60#if FULL_SYSTEM
61 protected:
62 uint64_t interrupts[TheISA::NumInterruptLevels];
63 uint64_t intstatus;

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

115 {
116 std::string name;
117 int numberOfThreads;
118 bool deferRegistration;
119 Counter max_insts_any_thread;
120 Counter max_insts_all_threads;
121 Counter max_loads_any_thread;
122 Counter max_loads_all_threads;
74 inline Tick frequency() const { return Clock::Frequency / clock; }
75 inline Tick cycles(int numCycles) const { return clock * numCycles; }
76 inline Tick curCycle() const { return curTick / clock; }
77
78#if FULL_SYSTEM
79 protected:
80 uint64_t interrupts[TheISA::NumInterruptLevels];
81 uint64_t intstatus;

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

133 {
134 std::string name;
135 int numberOfThreads;
136 bool deferRegistration;
137 Counter max_insts_any_thread;
138 Counter max_insts_all_threads;
139 Counter max_loads_any_thread;
140 Counter max_loads_all_threads;
141 Counter stats_reset_inst;
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
142 Tick clock;
143 bool functionTrace;
144 Tick functionTraceStart;
145 System *system;
146#if FULL_SYSTEM
147 int cpu_id;
148 Tick profile;
149#endif
150 Tick progress_interval;
131 BaseCPU *checker;
132
133 Params();
134 };
135
136 const Params *params;
137
138 BaseCPU(Params *params);

--- 103 unchanged lines hidden ---
151 BaseCPU *checker;
152
153 Params();
154 };
155
156 const Params *params;
157
158 BaseCPU(Params *params);

--- 103 unchanged lines hidden ---