Go to the documentation of this file.
48 using namespace ArmISA;
53 uint64_t TarmacTracerRecord::TraceInstEntry::instCount = 0;
59 case TarmacBaseRecord::ISET_ARM:
61 case TarmacBaseRecord::ISET_THUMB:
63 case TarmacBaseRecord::ISET_A64:
107 return "Unsupported";
118 _pc, _macroStaticInst),
126 :
InstEntry(tarmCtx.thread, *tarmCtx.
pc, tarmCtx.staticInst, predicate)
136 instSize = (arm_inst->instSize() << 3);
141 opcode = arm_inst->encoding();
150 uint8_t _size,
Addr _addr, uint64_t _data)
170 switch (regId.classValue()) {
175 updateFloat(tarmCtx);
235 panic(
"ARM doesn't support float registers.");
249 std::string reg_suffix;
255 switch (regId.index()) {
260 regName =
"sp" + reg_suffix ;
263 regName =
"fp" + reg_suffix;
266 regName =
"lr" + reg_suffix;
282 std::make_unique<TraceInstEntry>(tarmCtx,
predicate)
295 std::make_unique<TraceMemEntry>(tarmCtx,
296 static_cast<uint8_t
>(
getSize()),
313 auto single_reg = genRegister<TraceRegEntry>(tarmCtx, reg_id);
317 queue.push_back(std::make_unique<TraceRegEntry>(single_reg));
323 mergeCCEntry<TraceRegEntry>(queue, tarmCtx);
373 template<
typename Queue>
379 for (
const auto &single_entry : queue) {
380 single_entry->print(outs);
386 template<
typename Queue,
typename... Args>
398 const std::string &prefix)
const
405 ccprintf(outs,
"%s clk %s (%u) %08x %s %s %s_%s : %s\n",
413 secureMode?
"s" :
"ns",
421 const std::string &prefix)
const
425 ccprintf(outs,
"%s clk M%s%d %08x %0*x\n",
427 loadAccess?
"R" :
"W",
438 const std::string &prefix)
const
443 ccprintf(outs,
"%s clk R %s %08x\n",
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
Tick curTick()
The universal simulation clock.
uint8_t instSize
Instruction size: 16 for 16-bit Thumb Instruction 32 otherwise (ARM and BigThumb)
TraceMemEntry(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
Addr size
The size of the memory request.
TARMAC register trace record.
uint64_t getIntData() const
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
virtual RegVal getReg(const RegId ®) const
constexpr auto & FramePointerReg
virtual void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate an Entry for every register being written.
bool predicate
is the predicate for execution this inst true or false (not execed)?
@ CCRegClass
Condition-code register.
const std::string to_string(sc_enc enc)
virtual void updateMisc(const TarmacContext &tarmCtx)
Register update functions.
const char *const miscRegName[]
std::vector< MemPtr > memQueue
const char *const RegName[NumRegs]
std::string csprintf(const char *format, const Args &...args)
TARMAC memory access trace record (stores only).
T * get() const
Directly access the pointer itself without taking a reference.
bool regValid(Addr daddr)
bool isFirstMicroop() const
void update(const TarmacContext &tarmCtx)
This updates the register entry using the update table.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
void ccprintf(cp::Print &print)
constexpr auto & ReturnAddressReg
TraceRegEntry(const TarmacContext &tarmCtx, const RegId ®)
virtual void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every triggered memory access.
@ FloatRegClass
Floating-point register.
virtual void updateCC(const TarmacContext &tarmCtx)
Bitfield< 24, 21 > opcode
TARMAC instruction trace record.
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
virtual void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
uint64_t Tick
Tick count type.
virtual void dump() override
std::vector< RegPtr > regQueue
StaticInstPtr macroStaticInst
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual void updateFloat(const TarmacContext &tarmCtx)
bool secureMode
True if instruction is executed in secure mode.
bool isLastMicroop() const
bool isSecure(ThreadContext *tc)
const StaticInstPtr staticInst
std::vector< InstPtr > instQueue
Collection of heterogeneous printable entries: could be representing either instructions,...
union gem5::trace::InstRecord::Data data
@ IntRegClass
Integer register.
virtual void updateInt(const TarmacContext &tarmCtx)
@ MiscRegClass
Control (misc) register.
Tarmac Tracer: this tracer generates a new Tarmac Record for every instruction being executed in gem5...
std::unique_ptr< PCStateBase > pc
TarmacTracer & tracer
Reference to tracer.
uint8_t numDestRegs() const
Number of destination registers.
constexpr auto & StackPointerReg
Addr addr
The address that was accessed.
void flushQueues(Queue &queue)
Flush queues to the trace output.
@ VecRegClass
Vector Register.
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
ISetState
ARM instruction set state.
Register ID: describe an architectural register with its class and index.
#define panic(...)
This implements a cprintf based panic() function.
static uint64_t instCount
Number of instructions being traced.
TraceInstEntry(const TarmacContext &tarmCtx, bool predicate)
Generated on Sun Jul 30 2023 01:56:50 for gem5 by doxygen 1.8.17