Go to the documentation of this file.
44 #include "arch/vecregs.hh"
45 #include "config/the_isa.hh"
46 #include "debug/O3CPU.hh"
69 newDecoder->takeOverFrom(oldDecoder);
78 DPRINTF(O3CPU,
"Calling activate on Thread Context %d\n",
94 DPRINTF(O3CPU,
"Calling suspend on Thread Context %d\n",
101 DPRINTF(O3CPU,
"Ignoring suspend on TC due to pending drain\n");
TheISA::Decoder * getDecoderPtr() override
Tick curTick()
The universal simulation clock.
void setArchIntReg(int reg_idx, RegVal val, ThreadID tid)
Architectural register accessors.
const TheISA::VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIndex) const override
void addThreadToExitingList(ThreadID tid)
Insert tid to the list of threads trying to exit.
ThreadState * thread
Pointer to the thread state that this TC corrseponds to.
PortProxy & getVirtProxy() override
void setArchVecElem(const RegIndex ®_idx, const ElemIndex &ldx, const TheISA::VecElem &val, ThreadID tid)
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
void activate() override
Set the status to Active.
void takeOverFrom(gem5::ThreadContext *old_context) override
Takes over execution of a thread from another CPU.
BaseHTMCheckpointPtr & getHtmCheckpointPtr() override
VecPredReg::Container VecPredRegContainer
virtual void copyRegsFrom(ThreadContext *src)=0
@ Halted
Permanently shut down.
TheISA::VecRegContainer & getWritableVecRegFlat(RegIndex idx) override
Read vector register operand for modification, flat indexing.
int threadId() const override
Returns this thread's ID number.
RegVal readArchFloatReg(int reg_idx, ThreadID tid)
RegVal readArchCCReg(int reg_idx, ThreadID tid)
void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid, HtmFailureFaultCause cause)
void setCCRegFlat(RegIndex idx, RegVal val) override
void setMiscReg(int misc_reg, RegVal val, ThreadID tid)
Sets a misc.
virtual void takeOverFrom(ThreadContext *new_tc, ThreadContext *old_tc)
const TheISA::VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const override
virtual TheISA::Decoder * getDecoderPtr()=0
void conditionalSquash()
check if the cpu is currently in state update mode and squash if not.
PortProxy & getVirtProxy()
void takeOverFrom(ThreadContext &ntc, ThreadContext &otc)
Copy state between thread contexts in preparation for CPU handover.
void setFloatRegFlat(RegIndex idx, RegVal val) override
std::unique_ptr< BaseHTMCheckpoint > htmCheckpoint
Pointer to the hardware transactional memory checkpoint.
RegVal readFloatRegFlat(RegIndex idx) const override
void setArchFloatReg(int reg_idx, RegVal val, ThreadID tid)
void setArchCCReg(int reg_idx, RegVal val, ThreadID tid)
Tick lastSuspend
Last time suspend was called on this thread.
void setArchVecReg(int reg_idx, const TheISA::VecRegContainer &val, ThreadID tid)
const TheISA::VecPredRegContainer & readArchVecPredReg(int reg_idx, ThreadID tid) const
virtual BaseISA * getIsaPtr()=0
void pcStateNoRecord(const TheISA::PCState &val) override
void suspend() override
Set the status to Suspended.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
RegId flattenRegId(const RegId ®Id) const override
void suspendContext(ThreadID tid) override
Remove Thread from Active Threads List.
const TheISA::VecElem & readArchVecElem(const RegIndex ®_idx, const ElemIndex &ldx, ThreadID tid) const
@ Suspended
Temporarily inactive.
GenericISA::DelaySlotPCState< 4 > PCState
void setVecRegFlat(RegIndex idx, const TheISA::VecRegContainer &val) override
enums::VecRegRenameMode vecRenameMode() const
Returns current vector renaming mode.
uint64_t Tick
Tick count type.
TheISA::VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx) override
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Sets a misc.
void setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const TheISA::VecElem &val) override
TheISA::PCState pcState() const override
Reads this thread's PC state.
void setArchVecPredReg(int reg_idx, const TheISA::VecPredRegContainer &val, ThreadID tid)
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
gem5::VecRegContainer< NumVecElemPerVecReg *sizeof(VecElem)> VecRegContainer
void setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid)
Sets a miscellaneous register.
ThreadID threadId() const
virtual enums::VecRegRenameMode vecRegRenameMode(ThreadContext *_tc) const
uint16_t ElemIndex
Logical vector register elem index type.
const TheISA::VecRegContainer & readVecRegFlat(RegIndex idx) const override
void setStatus(Status new_status)
Sets the status of this thread.
TheISA::VecRegContainer & getWritableArchVecReg(int reg_idx, ThreadID tid)
Read architectural vector register for modification.
Tick lastActivate
Last time activate was called on this thread.
TheISA::VecPredRegContainer & getWritableArchVecPredReg(int reg_idx, ThreadID tid)
void halt() override
Set the status to Halted.
void clearArchRegs() override
Resets all architectural registers to 0.
RegVal readCCRegFlat(RegIndex idx) const override
void copyArchRegs(gem5::ThreadContext *tc) override
Copies the architectural registers from another TC into this TC.
BaseISA * getIsaPtr() override
Tick readLastSuspend() override
Reads the last tick that this thread was suspended on.
Status status() const
Returns the status of this thread.
@ Halting
Trying to exit and waiting for an event to completely exit.
bool isDraining() const
Is the CPU draining?
RegVal readArchIntReg(int reg_idx, ThreadID tid)
CPU * cpu
Pointer to the CPU.
void setIntRegFlat(RegIndex idx, RegVal val) override
void pcState(const TheISA::PCState &newPCState, ThreadID tid)
Sets the commit PC state of a specific thread.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void setVecPredRegFlat(RegIndex idx, const TheISA::VecPredRegContainer &val) override
void activateContext(ThreadID tid) override
Add Thread to Active Threads List.
Tick readLastActivate() override
Reads the last tick that this thread was activated on.
bool trapPending
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated with...
void setMiscReg(RegIndex misc_reg, RegVal val) override
Sets a misc.
std::vector< TheISA::ISA * > isa
RegVal readIntRegFlat(RegIndex idx) const override
Flat register interfaces.
Register ID: describe an architectural register with its class and index.
const TheISA::VecRegContainer & readArchVecReg(int reg_idx, ThreadID tid) const
Generated on Tue Sep 21 2021 12:24:23 for gem5 by doxygen 1.8.17