43 #ifndef __CPU_O3_THREAD_STATE_HH__ 44 #define __CPU_O3_THREAD_STATE_HH__ 55 class FunctionalMemory;
70 typedef typename Impl::O3CPU
O3CPU;
100 :
ThreadState(_cpu, _thread_num, _process), cpu(_cpu),
101 comInstEventQueue(
"instruction-based event queue"),
102 noSquashFromTC(false), trapPending(false),
tc(nullptr)
107 if (cpu->params()->profile) {
109 cpu->params()->system->kernelSymtab);
136 noSquashFromTC =
true;
141 noSquashFromTC =
false;
165 #endif // __CPU_O3_THREAD_STATE_HH__ bool trapPending
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated with...
Struct for holding general thread state that is needed across CPU models.
ProfileNode * profileNode
FunctionProfile * profile
Class that has various thread state, such as the status, the current instruction being processed...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
ThreadContext::Status Status
ThreadContext * tc
Pointer to the ThreadContext of this thread.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
EventQueue comInstEventQueue
An instruction-based event queue.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Event for timing out quiesce instruction.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::string csprintf(const char *format, const Args &...args)
Queue of events sorted in time order.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void dump(ThreadContext *tc, std::ostream &out) const
void close(OutputStream *file)
Closes an output file and free the corresponding OutputFile.
void registerExitCallback(Callback *callback)
Register an exit callback.
PCEventQueue pcEventQueue
void serialize(CheckpointOut &cp) const override
Serialize an object.
O3CPU * cpu
Pointer to the CPU.
virtual void syscall(ThreadContext *tc, Fault *fault)=0
std::ostream CheckpointOut
void syscall(Fault *fault)
Handles the syscall.
Helper template class to turn a simple class member function into a callback.
ThreadContext * getTC()
Returns a pointer to the TC of this thread.
std::shared_ptr< FaultBase > Fault
O3ThreadState(O3CPU *_cpu, int _thread_num, Process *_process)