gem5  v20.1.0.0
Namespaces | Functions
PseudoInst Namespace Reference

Namespaces

 InitParamKey
 Unique keys to retrieve various params by the initParam pseudo inst.
 

Functions

static void panicFsOnlyPseudoInst (const char *name)
 
void arm (ThreadContext *tc)
 
void quiesce (ThreadContext *tc)
 
void quiesceSkip (ThreadContext *tc)
 
void quiesceNs (ThreadContext *tc, uint64_t ns)
 
void quiesceCycles (ThreadContext *tc, uint64_t cycles)
 
uint64_t quiesceTime (ThreadContext *tc)
 
uint64_t rpns (ThreadContext *tc)
 
void wakeCPU (ThreadContext *tc, uint64_t cpuid)
 
void m5exit (ThreadContext *tc, Tick delay)
 
uint64_t m5sum (ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
 
void m5fail (ThreadContext *tc, Tick delay, uint64_t code)
 
void loadsymbol (ThreadContext *tc)
 
void addsymbol (ThreadContext *tc, Addr addr, Addr symbolAddr)
 
uint64_t initParam (ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
 
void resetstats (ThreadContext *tc, Tick delay, Tick period)
 
void dumpstats (ThreadContext *tc, Tick delay, Tick period)
 
void dumpresetstats (ThreadContext *tc, Tick delay, Tick period)
 
void m5checkpoint (ThreadContext *tc, Tick delay, Tick period)
 
uint64_t readfile (ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
 
uint64_t writefile (ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
 
void debugbreak (ThreadContext *tc)
 
void switchcpu (ThreadContext *tc)
 
void m5Syscall (ThreadContext *tc)
 
void togglesync (ThreadContext *tc)
 
void workbegin (ThreadContext *tc, uint64_t workid, uint64_t threadid)
 
void workend (ThreadContext *tc, uint64_t workid, uint64_t threadid)
 
static void decodeAddrOffset (Addr offset, uint8_t &func)
 
template<typename ABI , bool store_ret>
bool pseudoInstWork (ThreadContext *tc, uint8_t func, uint64_t &result)
 Execute a decoded M5 pseudo instruction. More...
 
template<typename ABI , bool store_ret = false>
bool pseudoInst (ThreadContext *tc, uint8_t func, uint64_t &result)
 
template<typename ABI , bool store_ret = true>
bool pseudoInst (ThreadContext *tc, uint8_t func)
 

Function Documentation

◆ addsymbol()

void PseudoInst::addsymbol ( ThreadContext tc,
Addr  addr,
Addr  symbolAddr 
)

◆ arm()

void PseudoInst::arm ( ThreadContext tc)

◆ debugbreak()

void PseudoInst::debugbreak ( ThreadContext tc)

Definition at line 461 of file pseudo_inst.cc.

References Debug::breakpoint(), and DPRINTF.

Referenced by pseudoInstWork().

◆ decodeAddrOffset()

static void PseudoInst::decodeAddrOffset ( Addr  offset,
uint8_t &  func 
)
inlinestatic

◆ dumpresetstats()

void PseudoInst::dumpresetstats ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ dumpstats()

void PseudoInst::dumpstats ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ initParam()

uint64_t PseudoInst::initParam ( ThreadContext tc,
uint64_t  key_str1,
uint64_t  key_str2 
)

◆ loadsymbol()

void PseudoInst::loadsymbol ( ThreadContext tc)

◆ m5checkpoint()

void PseudoInst::m5checkpoint ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ m5exit()

void PseudoInst::m5exit ( ThreadContext tc,
Tick  delay 
)

Definition at line 183 of file pseudo_inst.cc.

References curTick(), DPRINTF, exitSimLoop(), SimClock::Int::ns, and DistIface::readyToExit().

Referenced by pseudoInstWork().

◆ m5fail()

void PseudoInst::m5fail ( ThreadContext tc,
Tick  delay,
uint64_t  code 
)

Definition at line 203 of file pseudo_inst.cc.

References curTick(), DPRINTF, exitSimLoop(), and SimClock::Int::ns.

Referenced by pseudoInstWork().

◆ m5sum()

uint64_t PseudoInst::m5sum ( ThreadContext tc,
uint64_t  a,
uint64_t  b,
uint64_t  c,
uint64_t  d,
uint64_t  e,
uint64_t  f 
)

Definition at line 194 of file pseudo_inst.cc.

References ArmISA::a, ArmISA::b, ArmISA::c, ArmISA::d, DPRINTF, ArmISA::e, and ArmISA::f.

Referenced by pseudoInstWork().

◆ m5Syscall()

void PseudoInst::m5Syscall ( ThreadContext tc)

Definition at line 479 of file pseudo_inst.cc.

References DPRINTF, and ThreadContext::syscall().

Referenced by pseudoInstWork().

◆ panicFsOnlyPseudoInst()

static void PseudoInst::panicFsOnlyPseudoInst ( const char *  name)
inlinestatic

Definition at line 104 of file pseudo_inst.cc.

References panic.

Referenced by addsymbol(), arm(), initParam(), loadsymbol(), and readfile().

◆ pseudoInst() [1/2]

template<typename ABI , bool store_ret = true>
bool PseudoInst::pseudoInst ( ThreadContext tc,
uint8_t  func 
)

Definition at line 271 of file pseudo_inst.hh.

◆ pseudoInst() [2/2]

template<typename ABI , bool store_ret = false>
bool PseudoInst::pseudoInst ( ThreadContext tc,
uint8_t  func,
uint64_t &  result 
)

Definition at line 264 of file pseudo_inst.hh.

◆ pseudoInstWork()

template<typename ABI , bool store_ret>
bool PseudoInst::pseudoInstWork ( ThreadContext tc,
uint8_t  func,
uint64_t &  result 
)

Execute a decoded M5 pseudo instruction.

The ISA-specific code is responsible to decode the pseudo inst function number and subfunction number. After that has been done, the rest of the instruction can be implemented in an ISA-agnostic manner using the ISA-specific getArguments functions.

Parameters
funcM5 pseudo op major function number (see utility/m5/m5ops.h)
resultA reference to a uint64_t to store a result in.
Returns
Whether the pseudo instruction was recognized/handled.

Definition at line 131 of file pseudo_inst.hh.

References addsymbol(), arm(), debugbreak(), DPRINTF, dumpresetstats(), dumpstats(), initParam(), loadsymbol(), m5checkpoint(), m5exit(), m5fail(), GenericISA::m5PageFault(), m5sum(), m5Syscall(), panic, ThreadContext::pcState(), quiesce(), quiesceCycles(), quiesceNs(), quiesceTime(), readfile(), resetstats(), rpns(), switchcpu(), togglesync(), wakeCPU(), warn, workbegin(), workend(), and writefile().

◆ quiesce()

void PseudoInst::quiesce ( ThreadContext tc)

Definition at line 122 of file pseudo_inst.cc.

References DPRINTF, and ThreadContext::quiesce().

Referenced by DefaultFetch< Impl >::fetch(), and pseudoInstWork().

◆ quiesceCycles()

void PseudoInst::quiesceCycles ( ThreadContext tc,
uint64_t  cycles 
)

◆ quiesceNs()

void PseudoInst::quiesceNs ( ThreadContext tc,
uint64_t  ns 
)

Definition at line 136 of file pseudo_inst.cc.

References curTick(), DPRINTF, SimClock::Int::ns, ArmISA::ns, and ThreadContext::quiesceTick().

Referenced by pseudoInstWork().

◆ quiesceSkip()

void PseudoInst::quiesceSkip ( ThreadContext tc)

Definition at line 129 of file pseudo_inst.cc.

References DPRINTF, ThreadContext::getCpuPtr(), and ThreadContext::quiesceTick().

◆ quiesceTime()

uint64_t PseudoInst::quiesceTime ( ThreadContext tc)

◆ readfile()

uint64_t PseudoInst::readfile ( ThreadContext tc,
Addr  vaddr,
uint64_t  len,
uint64_t  offset 
)

◆ resetstats()

void PseudoInst::resetstats ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ rpns()

uint64_t PseudoInst::rpns ( ThreadContext tc)

Definition at line 159 of file pseudo_inst.cc.

References curTick(), DPRINTF, and SimClock::Int::ns.

Referenced by pseudoInstWork().

◆ switchcpu()

void PseudoInst::switchcpu ( ThreadContext tc)

Definition at line 468 of file pseudo_inst.cc.

References DPRINTF, and exitSimLoop().

Referenced by pseudoInstWork().

◆ togglesync()

void PseudoInst::togglesync ( ThreadContext tc)

Definition at line 486 of file pseudo_inst.cc.

References DPRINTF, and DistIface::toggleSync().

Referenced by pseudoInstWork().

◆ wakeCPU()

void PseudoInst::wakeCPU ( ThreadContext tc,
uint64_t  cpuid 
)

◆ workbegin()

void PseudoInst::workbegin ( ThreadContext tc,
uint64_t  workid,
uint64_t  threadid 
)

◆ workend()

void PseudoInst::workend ( ThreadContext tc,
uint64_t  workid,
uint64_t  threadid 
)

◆ writefile()

uint64_t PseudoInst::writefile ( ThreadContext tc,
Addr  vaddr,
uint64_t  len,
uint64_t  offset,
Addr  filename_addr 
)

Generated on Wed Sep 30 2020 14:03:08 for gem5 by doxygen 1.8.17