42#ifndef __CPU_CHECKER_THREAD_CONTEXT_HH__
43#define __CPU_CHECKER_THREAD_CONTEXT_HH__
49#include "debug/Checker.hh"
89 assert(actual_ret == check_ret);
98 assert(actual_ret == check_ret);
115 return actualTC->getCurrentInstCount();
278 return actualTC->readMiscRegNoEffect(misc_reg);
284 return actualTC->readMiscReg(misc_reg);
290 DPRINTF(
Checker,
"Setting misc reg with no effect: %d to both Checker"
291 " and O3..\n", misc_reg);
299 DPRINTF(
Checker,
"Setting misc reg with effect: %d to both Checker"
300 " and O3..\n", misc_reg);
308 return actualTC->readStCondFailures();
314 actualTC->setStCondFailures(sc_failures);
321 panic(
"function not implemented");
327 return actualTC->getHtmCheckpointPtr();
333 panic(
"function not implemented");
void recordPCChange(const PCStateBase &val)
Derived ThreadContext class for use with the Checker.
Tick readLastActivate() override
int cpuId() const override
void connectMemPorts(ThreadContext *tc)
uint32_t socketId() const override
BaseMMU * getMMUPtr() override
bool schedule(PCEvent *e) override
void setContextId(ContextID id) override
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
void takeOverFrom(ThreadContext *oldContext) override
CheckerThreadContext(TC *actual_tc, CheckerCPU *checker_cpu)
void setStCondFailures(unsigned sc_failures) override
void halt() override
Set the status to Halted.
void setThreadId(int id) override
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
void pcStateNoRecord(const PCStateBase &val) override
void pcState(const PCStateBase &val) override
Sets this thread's PC state.
System * getSystemPtr() override
Status status() const override
CheckerCPU * checkerCPU
Pointer to the checker CPU.
void regStats(const std::string &name) override
InstDecoder * getDecoderPtr() override
TC * actualTC
The main CPU's ThreadContext, or class that implements the ThreadContext interface.
void clearArchRegs() override
ContextID contextId() const override
bool remove(PCEvent *e) override
void setReg(const RegId ®, RegVal val) override
RegVal getReg(const RegId ®) const override
Process * getProcessPtr() override
void setMiscReg(RegIndex misc_reg, RegVal val) override
Tick readLastSuspend() override
SimpleThread * checkerTC
The checker's own SimpleThread.
BaseHTMCheckpointPtr & getHtmCheckpointPtr() override
BaseISA * getIsaPtr() const override
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
void copyArchRegs(ThreadContext *tc) override
const PCStateBase & pcState() const override
Reads this thread's PC state.
void * getWritableReg(const RegId ®) override
Tick getCurrentInstCount() override
void setReg(const RegId ®, const void *val) override
void activate() override
Set the status to Active.
RegVal readMiscReg(RegIndex misc_reg) override
void getReg(const RegId ®, void *val) const override
CheckerCPU * getCheckerCpuPtr() override
void scheduleInstCountEvent(Event *event, Tick count) override
void setStatus(Status new_status) override
void setProcessPtr(Process *p) override
unsigned readStCondFailures() const override
BaseCPU * getCpuPtr() override
void suspend() override
Set the status to Suspended.
void descheduleInstCountEvent(Event *event) override
int threadId() const override
Returns this thread's ID number.
Register ID: describe an architectural register with its class and index.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
void setContextId(ContextID id) override
bool remove(PCEvent *e) override
const PCStateBase & pcState() const override
void setMiscReg(RegIndex misc_reg, RegVal val) override
void copyState(ThreadContext *oldContext)
void copyArchRegs(ThreadContext *tc) override
void clearArchRegs() override
void setStatus(Status newStatus) override
void setThreadId(int id) override
void setReg(const RegId &arch_reg, RegVal val) override
bool schedule(PCEvent *e) override
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void regStats(const std::string &name)
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Tick
Tick count type.
int ContextID
Globally unique thread context ID.
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
const std::string & name()