Go to the documentation of this file.
41 #ifndef __SIM_PSEUDO_INST_HH__
42 #define __SIM_PSEUDO_INST_HH__
44 #include <gem5/asm/generic/m5ops.h>
52 #include "debug/PseudoInst.hh"
85 uint64_t
d, uint64_t
e, uint64_t
f);
111 template <
typename ABI,
bool store_ret>
115 DPRINTF(PseudoInst,
"pseudo_inst::pseudoInst(%i)\n", func);
121 invokeSimcall<ABI>(tc,
arm);
125 invokeSimcall<ABI>(tc,
quiesce);
128 case M5OP_QUIESCE_NS:
132 case M5OP_QUIESCE_CYCLE:
136 case M5OP_QUIESCE_TIME:
137 result = invokeSimcall<ABI, store_ret>(tc,
quiesceTime);
141 result = invokeSimcall<ABI, store_ret>(tc,
rpns);
145 invokeSimcall<ABI>(tc,
wakeCPU);
149 invokeSimcall<ABI>(tc,
m5exit);
153 invokeSimcall<ABI>(tc,
m5fail);
158 result = invokeSimcall<ABI, store_ret>(tc,
m5sum);
161 case M5OP_INIT_PARAM:
162 result = invokeSimcall<ABI, store_ret>(tc,
initParam);
165 case M5OP_LOAD_SYMBOL:
169 case M5OP_RESET_STATS:
173 case M5OP_DUMP_STATS:
177 case M5OP_DUMP_RESET_STATS:
181 case M5OP_CHECKPOINT:
185 case M5OP_WRITE_FILE:
186 result = invokeSimcall<ABI, store_ret>(tc,
writefile);
190 result = invokeSimcall<ABI, store_ret>(tc,
readfile);
193 case M5OP_DEBUG_BREAK:
197 case M5OP_SWITCH_CPU:
201 case M5OP_ADD_SYMBOL:
206 panic(
"M5 panic instruction called at %s\n", tc->
pcState());
208 case M5OP_WORK_BEGIN:
213 invokeSimcall<ABI>(tc,
workend);
221 warn(
"Unimplemented m5 op (%#x)\n", func);
225 case M5OP_DIST_TOGGLE_SYNC:
234 warn(
"Unhandled m5 op: %#x\n", func);
239 template <
typename ABI,
bool store_ret=false>
243 return pseudoInstWork<ABI, store_ret>(tc, func, result);
246 template <
typename ABI,
bool store_ret=true>
251 return pseudoInstWork<ABI, store_ret>(tc, func, result);
257 #endif // __SIM_PSEUDO_INST_HH__
bool pseudoInst(ThreadContext *tc, uint8_t func, uint64_t &result)
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void quiesceNs(ThreadContext *tc, uint64_t ns)
uint64_t quiesceTime(ThreadContext *tc)
void debugbreak(ThreadContext *tc)
void switchcpu(ThreadContext *tc)
virtual const PCStateBase & pcState() const =0
void quiesce(ThreadContext *tc)
uint64_t rpns(ThreadContext *tc)
void triggerWorkloadEvent(ThreadContext *tc)
void m5Syscall(ThreadContext *tc)
void loadsymbol(ThreadContext *tc)
uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
uint64_t Tick
Tick count type.
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
static void decodeAddrOffset(Addr offset, uint8_t &func)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void quiesceSkip(ThreadContext *tc)
void resetstats(ThreadContext *tc, Tick delay, Tick period)
void arm(ThreadContext *tc)
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
void m5exit(ThreadContext *tc, Tick delay)
bool pseudoInstWork(ThreadContext *tc, uint8_t func, uint64_t &result)
Execute a decoded M5 pseudo instruction.
uint64_t m5sum(ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
void togglesync(ThreadContext *tc)
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:59 for gem5 by doxygen 1.8.17