Go to the documentation of this file.
41 #include "debug/FloatRegs.hh"
42 #include "debug/IntRegs.hh"
43 #include "debug/MipsPRA.hh"
44 #include "debug/MiscRegs.hh"
45 #include "params/MipsISA.hh"
56 "Index",
"MVPControl",
"MVPConf0",
"MVPConf1",
"",
"",
"",
"",
57 "Random",
"VPEControl",
"VPEConf0",
"VPEConf1",
58 "YQMask",
"VPESchedule",
"VPEScheFBack",
"VPEOpt",
59 "EntryLo0",
"TCStatus",
"TCBind",
"TCRestart",
60 "TCHalt",
"TCContext",
"TCSchedule",
"TCScheFBack",
61 "EntryLo1",
"",
"",
"",
"",
"",
"",
"",
62 "Context",
"ContextConfig",
"",
"",
"",
"",
"",
"",
63 "PageMask",
"PageGrain",
"",
"",
"",
"",
"",
"",
64 "Wired",
"SRSConf0",
"SRCConf1",
"SRSConf2",
65 "SRSConf3",
"SRSConf4",
"",
"",
66 "HWREna",
"",
"",
"",
"",
"",
"",
"",
67 "BadVAddr",
"",
"",
"",
"",
"",
"",
"",
68 "Count",
"",
"",
"",
"",
"",
"",
"",
69 "EntryHi",
"",
"",
"",
"",
"",
"",
"",
70 "Compare",
"",
"",
"",
"",
"",
"",
"",
71 "Status",
"IntCtl",
"SRSCtl",
"SRSMap",
"",
"",
"",
"",
72 "Cause",
"",
"",
"",
"",
"",
"",
"",
73 "EPC",
"",
"",
"",
"",
"",
"",
"",
74 "PRId",
"EBase",
"",
"",
"",
"",
"",
"",
75 "Config",
"Config1",
"Config2",
"Config3",
"",
"",
"",
"",
76 "LLAddr",
"",
"",
"",
"",
"",
"",
"",
77 "WatchLo0",
"WatchLo1",
"WatchLo2",
"WatchLo3",
78 "WatchLo4",
"WatchLo5",
"WatchLo6",
"WatchLo7",
79 "WatchHi0",
"WatchHi1",
"WatchHi2",
"WatchHi3",
80 "WatchHi4",
"WatchHi5",
"WatchHi6",
"WatchHi7",
81 "XCContext64",
"",
"",
"",
"",
"",
"",
"",
82 "",
"",
"",
"",
"",
"",
"",
"",
83 "",
"",
"",
"",
"",
"",
"",
"",
84 "Debug",
"TraceControl1",
"TraceControl2",
"UserTraceData",
85 "TraceBPC",
"",
"",
"",
86 "DEPC",
"",
"",
"",
"",
"",
"",
"",
87 "PerfCnt0",
"PerfCnt1",
"PerfCnt2",
"PerfCnt3",
88 "PerfCnt4",
"PerfCnt5",
"PerfCnt6",
"PerfCnt7",
89 "ErrCtl",
"",
"",
"",
"",
"",
"",
"",
90 "CacheErr0",
"CacheErr1",
"CacheErr2",
"CacheErr3",
"",
"",
"",
"",
91 "TagLo0",
"DataLo1",
"TagLo2",
"DataLo3",
92 "TagLo4",
"DataLo5",
"TagLo6",
"DataLo7",
93 "TagHi0",
"DataHi1",
"TagHi2",
"DataHi3",
94 "TagHi4",
"DataHi5",
"TagHi6",
"DataHi7",
95 "ErrorEPC",
"",
"",
"",
"",
"",
"",
"",
96 "DESAVE",
"",
"",
"",
"",
"",
"",
"",
135 uint32_t num_vpe_regs =
sizeof(per_vpe_regs) / 4;
136 for (
int i = 0;
i < num_vpe_regs;
i++) {
151 uint32_t num_tc_regs =
sizeof(per_tc_regs) / 4;
153 for (
int i = 0;
i < num_tc_regs;
i++) {
196 DPRINTF(MipsPRA,
"Resetting CP0 State with %i TCs and %i VPEs\n",
200 panic(
"CP state must be set before the following code is used");
207 DPRINTF(MipsPRA,
"Initializing CP0 State.... ");
231 RegVal cfg_Mask = 0x7FFF0007;
270 RegVal cfg2_Mask = 0x7000F000;
296 RegVal EB_Mask = 0x3FFFF000;
306 RegVal SC_Mask = 0x0000F3C0;
316 RegVal IC_Mask = 0x000003E0;
325 RegVal wh_Mask = 0x7FFF0FFF;
335 RegVal pc_Mask = 0x00007FF;
351 RegVal pg_Mask = 0x10000000;
370 RegVal stat_Mask = 0xFF78FF17;
446 return tcBind.curVPE;
454 DPRINTF(MipsPRA,
"Reading CP0 Register:%u Select:%u (%s) (%lx).\n",
469 "Reading CP0 Register:%u Select:%u (%s) with effect (%lx).\n",
482 "[tid:%i] Setting (direct set) CP0 Register:%u "
483 "Select:%u (%s) to %#x.\n",
495 "[tid:%i] Setting CP0 Register: %u Select: %u (%s) to %#x\n",
511 "[tid:%i] Setting CP0 Register:%u "
512 "Select:%u (%s) to %#x, with effect.\n",
539 "filterCP0Write: Mask: %lx, Inverse Mask: %lx, write Val: %x, "
540 "current val: %lx, written val: %x\n",
557 cpu->schedule(cp0_event, cpu->clockEdge(delay));
570 ThreadID num_threads = mvpConf0.ptc + 1;
572 for (
ThreadID tid = 0; tid < num_threads; tid++) {
577 if (tcHalt.h == 1 || tcStatus.a == 0) {
579 }
else if (tcHalt.h == 0 && tcStatus.a == 1) {
584 num_threads = mvpConf0.ptc + 1;
593 switch (cp0EventType)
std::vector< BankType > bankType
void setIntRegFlat(RegIndex idx, RegVal val)
void restoreThread(TC *tc)
void processCP0Event(BaseCPU *cpu, CP0EventType)
Process a CP0 event.
void scheduleCP0Update(BaseCPU *cpu, Cycles delay=Cycles(0))
RegVal readIntRegFlat(RegIndex idx) const
virtual const PCStateBase & pcState() const =0
constexpr void replaceBits(T &val, unsigned first, unsigned last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
unsigned CP0_IntCtl_IPPCI
std::vector< std::vector< RegVal > > miscRegFile
Cycles is a wrapper class for representing cycle counts, i.e.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void setRegMask(int misc_reg, RegVal val, ThreadID tid=0)
RegVal filterCP0Write(int misc_reg, int reg_sel, RegVal val)
This method doesn't need to adjust the Control Register Offset since it has already been done in the ...
void setMiscReg(int misc_reg, RegVal val, ThreadID tid=0)
void copyRegsFrom(ThreadContext *src) override
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
RegVal readMiscRegNoEffect(int misc_reg, ThreadID tid=0) const
RegVal readFloatRegFlat(RegIndex idx) const
static std::string miscRegNames[MISCREG_NUMREGS]
unsigned CP0_PRId_ProcessorID
unsigned CP0_PRId_Revision
unsigned CP0_PRId_CompanyOptions
RegVal readMiscReg(int misc_reg, ThreadID tid=0)
unsigned getVPENum(ThreadID tid) const
unsigned CP0_EBase_CPUNum
void updateCPU(BaseCPU *cpu)
virtual BaseCPU * getCpuPtr()=0
static const Priority CPU_Tick_Pri
CPU ticks must come after other associated CPU events (such as writebacks).
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
unsigned CP0_PRId_CompanyID
int16_t ThreadID
Thread index/ID type.
std::vector< std::vector< RegVal > > miscRegFile_WriteMask
#define panic(...)
This implements a cprintf based panic() function.
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
void setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid=0)
void setFloatRegFlat(RegIndex idx, RegVal val)
Generated on Thu Jun 16 2022 10:41:35 for gem5 by doxygen 1.8.17