42#include "debug/MatRegs.hh"
43#include "debug/Timer.hh"
44#include "params/SparcISA.hh"
242 for (
int y = 1; y < 8; y++) {
251 for (
int y = 16; y < 32; y++) {
332 memset(
tpc, 0,
sizeof(
tpc));
335 memset(
tt, 0,
sizeof(
tt));
375 panic(
"Tick comparison event active when clearing the ISA object.\n");
400 return (uint64_t)
hpstate.hpriv |
402 (uint64_t)
pstate.priv << 2 |
403 (uint64_t)
pstate.am << 3 |
406 bits((uint64_t)
tl,2,0) << 16 |
425 panic(
"PCR not implemented\n");
427 panic(
"PIC not implemented\n");
449 panic(
"Priviliged access to tick registers not implemented\n");
535 panic(
"Miscellaneous register %d not implemented\n", idx);
551 DPRINTF(Timer,
"Instruction Count when TICK read: %#X stick=%#X\n",
560 panic(
"Performance Instrumentation not impl\n");
563 panic(
"Can read from softint clr/set\n");
607 panic(
"PCR not implemented\n");
609 panic(
"PIC not implemented\n");
640 panic(
"Priviliged access to tick regesiters not implemented\n");
699 DPRINTF(MiscRegs,
"FSR written with: %#x\n",
fsr);
764 panic(
"Miscellaneous register %d not implemented\n", idx);
888 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
952 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
void postInterrupt(ThreadID tid, int int_num, int index)
void clearInterrupt(ThreadID tid, int int_num, int index)
void serialize(CheckpointOut &cp) const override
Serialize an object.
Register ID: describe an architectural register with its class and index.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void installWindow(int cwp, int offset)
static const int RegsPerWindow
STickCompareEvent * sTickCompare
uint16_t priContext
MMU Internal Registers.
void copyRegsFrom(ThreadContext *src) override
static const int NumWindowedRegs
MemberEventWrapper<&ISA::processSTickCompare > STickCompareEvent
uint64_t fsr
Floating point misc registers.
static const int TotalGlobals
void setMiscReg(RegIndex idx, RegVal val) override
TickCompareEvent * tickCompare
RegVal readMiscReg(RegIndex idx) override
RegIndex intRegMap[TotalInstIntRegs]
void serialize(CheckpointOut &cp) const override
Serialize an object.
HSTickCompareEvent * hSTickCompare
static const int TotalWindowed
HPSTATE hpstate
Hyperprivileged Registers.
static const int NumGlobalRegs
MemberEventWrapper<&ISA::processHSTickCompare > HSTickCompareEvent
void setFSReg(int miscReg, RegVal val)
MemberEventWrapper<&ISA::processTickCompare > TickCompareEvent
RegVal readMiscRegNoEffect(RegIndex idx) const override
void installGlobals(int gl, int offset)
RegVal readFSReg(int miscReg)
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual RegVal getReg(const RegId ®) const
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
virtual BaseCPU * getCpuPtr()=0
virtual void setReg(const RegId ®, RegVal val)
virtual InstDecoder * getDecoderPtr()=0
virtual const PCStateBase & pcState() const =0
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
bool scheduled() const
Determine if the current event is scheduled.
void schedule(Event &event, Tick when)
Tick when() const
Get the time that the event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_ARRAY(member, size)
constexpr RegClass matRegClass
constexpr RegClass vecElemClass
constexpr RegClass vecPredRegClass
constexpr RegClass ccRegClass
constexpr RegClass miscRegClass
constexpr RegClass vecRegClass
static PSTATE buildPstateMask()
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
@ MISCREG_QUEUE_RES_ERROR_HEAD
@ MISCREG_HPSTATE
Hyper privileged registers.
@ MISCREG_SCRATCHPAD_R0
Scratchpad regiscers.
@ MISCREG_MMU_P_CONTEXT
MMU Internal Registers.
@ MISCREG_QUEUE_DEV_MONDO_TAIL
@ MISCREG_QUEUE_CPU_MONDO_HEAD
@ MISCREG_QUEUE_NRES_ERROR_TAIL
@ MISCREG_ASI
Ancillary State Registers.
@ MISCREG_QUEUE_CPU_MONDO_TAIL
@ MISCREG_QUEUE_DEV_MONDO_HEAD
@ MISCREG_FSR
Floating Point Status Register.
@ MISCREG_TPC
Privilged Registers.
@ MISCREG_QUEUE_RES_ERROR_TAIL
@ MISCREG_QUEUE_NRES_ERROR_HEAD
constexpr RegClass flatIntRegClass
constexpr RegClass intRegClass
static const PSTATE PstateMask
constexpr RegClass floatRegClass
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
constexpr char CCRegClassName[]
constexpr char VecPredRegClassName[]
std::ostream CheckpointOut
constexpr char VecRegClassName[]
uint64_t Tick
Tick count type.
constexpr char MatRegClassName[]
@ MatRegClass
Matrix Register.
@ CCRegClass
Condition-code register.
@ VecRegClass
Vector Register.
@ VecElemClass
Vector Register Native Elem lane.
constexpr char VecElemClassName[]
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)