Go to the documentation of this file.
47 #include "config/the_isa.hh"
49 #include "debug/Context.hh"
50 #include "debug/Quiesce.hh"
51 #include "params/BaseCPU.hh"
57 DPRINTF(Context,
"Comparing thread contexts\n");
64 panic(
"Int reg idx %d doesn't match, one: %#x, two: %#x",
73 panic(
"Float reg idx %d doesn't match, one: %#x, two: %#x",
83 panic(
"Vec reg idx %d doesn't match, one: %#x, two: %#x",
93 panic(
"Pred reg idx %d doesn't match, one: %#x, two: %#x",
101 panic(
"Misc reg idx %d doesn't match, one: %#x, two: %#x",
110 panic(
"CC reg idx %d doesn't match, one: %#x, two: %#x",
114 panic(
"PC state doesn't match.");
115 int id1 =
one->cpuId();
116 int id2 = two->
cpuId();
118 panic(
"CPU ids don't match, one: %d, two: %d", id1, id2);
123 panic(
"Context ids don't match, one: %d, two: %d", id1, id2);
219 pcState.unserialize(
cp);
virtual const VecPredRegContainer & readVecPredReg(const RegId ®) const =0
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
virtual RegVal readIntRegFlat(RegIndex idx) const =0
Flat register interfaces.
virtual void setVecPredRegFlat(RegIndex idx, const VecPredRegContainer &val)=0
virtual void setContextId(ContextID id)=0
virtual const VecRegContainer & readVecRegFlat(RegIndex idx) const =0
VecReg::Container VecRegContainer
void quiesce()
Quiesce thread context.
#define UNSERIALIZE_CONTAINER(member)
int ContextID
Globally unique thread context ID.
uint64_t Tick
Tick count type.
VecPredReg::Container VecPredRegContainer
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual Process * getProcessPtr()=0
virtual void setFloatRegFlat(RegIndex idx, RegVal val)=0
virtual int threadId() const =0
void unserialize(ThreadContext &tc, CheckpointIn &cp)
Register ID: describe an architectural register with its class and index.
virtual const VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const =0
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
virtual RegVal readCCRegFlat(RegIndex idx) const =0
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void setIntRegFlat(RegIndex idx, RegVal val)=0
@ Halted
Permanently shut down.
void quiesceTick(ContextID id, Tick when)
void quiesce(ContextID id)
virtual const VecRegContainer & readVecReg(const RegId ®) const =0
virtual int cpuId() const =0
virtual ContextID contextId() const =0
#define SERIALIZE_ARRAY(member, size)
virtual RegVal readFloatRegFlat(RegIndex idx) const =0
virtual Status status() const =0
void arrayParamOut(CheckpointOut &cp, const std::string &name, const CircleBuf< T > ¶m)
virtual void setStatus(Status new_status)=0
void quiesceTick(Tick resume)
Quiesce, suspend, and schedule activate at resume.
virtual TheISA::PCState pcState() const =0
virtual RegVal readCCReg(RegIndex reg_idx) const =0
@ VecRegClass
Vector Register.
static void compare(ThreadContext *one, ThreadContext *two)
function to compare two thread contexts (for debugging)
virtual void setCCRegFlat(RegIndex idx, RegVal val)=0
#define UNSERIALIZE_ARRAY(member, size)
GenericISA::DelaySlotPCState< MachInst > PCState
#define SERIALIZE_CONTAINER(member)
std::ostream CheckpointOut
void arrayParamIn(CheckpointIn &cp, const std::string &name, CircleBuf< T > ¶m)
void takeOverFrom(ThreadContext &ntc, ThreadContext &otc)
Copy state between thread contexts in preparation for CPU handover.
virtual void copyArchRegs(ThreadContext *tc)=0
virtual void setThreadId(int id)=0
virtual void setVecRegFlat(RegIndex idx, const VecRegContainer &val)=0
virtual RegVal readIntReg(RegIndex reg_idx) const =0
virtual System * getSystemPtr()=0
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17