56#include "params/BaseCPU.hh"
82 predicate(
true), memAccPredicate(
true),
83 comInstEventQueue(
"instruction-based event queue"),
84 system(_sys), mmu(_mmu),
decoder(_decoder),
85 htmTransactionStarts(0), htmTransactionStops(0)
92 :
SimpleThread(_cpu, _thread_num, _sys, nullptr, _mmu, _isa, _decoder)
virtual void haltContext(ThreadID thread_num)
Notify the CPU that the indicated context is now halted.
virtual void suspendContext(ThreadID thread_num)
Notify the CPU that the indicated context is now suspended.
virtual void activateContext(ThreadID thread_num)
Notify the CPU that the indicated context is now active.
virtual void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid, HtmFailureFaultCause cause)
This function is used to instruct the memory subsystem that a transaction should be aborted and the s...
const RegClasses & regClasses() const
virtual void copyRegsFrom(ThreadContext *src)=0
virtual void takeOverFrom(ThreadContext *new_tc, ThreadContext *old_tc)
virtual void takeOverFrom(InstDecoder *old)
Take over the state from an old decoder when switching CPUs.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
int threadId() const override
void serialize(CheckpointOut &cp) const override
Serialize an object.
Status status() const override
int64_t htmTransactionStops
void suspend() override
Set the status to Suspended.
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
void activate() override
Set the status to Active.
void copyState(ThreadContext *oldContext)
void copyArchRegs(ThreadContext *tc) override
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void takeOverFrom(ThreadContext *oldContext) override
BaseHTMCheckpointPtr & getHtmCheckpointPtr() override
std::unique_ptr< BaseHTMCheckpoint > _htmCheckpoint
int64_t htmTransactionStarts
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
void halt() override
Set the status to Halted.
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system, BaseMMU *_mmu, BaseISA *_isa, InstDecoder *_decoder)
BaseISA * getIsaPtr() const override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
@ Halted
Permanently shut down.
@ Suspended
Temporarily inactive.
virtual InstDecoder * getDecoderPtr()=0
virtual int threadId() const =0
virtual Status status() const =0
virtual ContextID contextId() const =0
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
std::ostream CheckpointOut
void unserialize(ThreadContext &tc, CheckpointIn &cp)
void takeOverFrom(ThreadContext &ntc, ThreadContext &otc)
Copy state between thread contexts in preparation for CPU handover.
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
@ MatRegClass
Matrix Register.
@ FloatRegClass
Floating-point register.
@ CCRegClass
Condition-code register.
@ VecRegClass
Vector Register.
@ IntRegClass
Integer register.
@ VecElemClass
Vector Register Native Elem lane.
Struct for holding general thread state that is needed across CPU models.
void serialize(CheckpointOut &cp) const override
Serialize an object.
unsigned storeCondFailures
ThreadContext::Status _status
Tick lastSuspend
Last time suspend was called on this thread.
Tick lastActivate
Last time activate was called on this thread.
void unserialize(CheckpointIn &cp) override
Unserialize an object.