100 return "Unsupported";
111 _pc, _macroStaticInst),
129 instSize = (arm_inst->instSize() << 3);
134 opcode = arm_inst->encoding();
143 uint8_t _size,
Addr _addr, uint64_t _data)
154 regClass(reg.classValue()),
259 std::string reg_suffix;
292 m5::make_unique<TraceInstEntry>(tarmCtx,
predicate)
305 m5::make_unique<TraceMemEntry>(tarmCtx,
306 static_cast<uint8_t>(
getSize()),
323 auto single_reg = genRegister<TraceRegEntry>(tarmCtx, reg_id);
328 m5::make_unique<TraceRegEntry>(single_reg)
335 mergeCCEntry<TraceRegEntry>(queue, tarmCtx);
385 template<
typename Queue>
391 for (
const auto &single_entry : queue) {
392 single_entry->print(outs);
398 template<
typename Queue,
typename... Args>
410 const std::string &prefix)
const 417 ccprintf(outs,
"%s clk %s (%u) %08x %s %s %s_%s : %s\n",
425 secureMode?
"s" :
"ns",
433 const std::string &prefix)
const 437 ccprintf(outs,
"%s clk M%s%d %08x %0*x\n",
439 loadAccess?
"R" :
"W",
450 const std::string &prefix)
const 455 ccprintf(outs,
"%s clk R %s %08x\n",
void ccprintf(cp::Print &print)
TraceMemEntry(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
TarmacTracer & tracer
Reference to tracer.
TraceInstEntry(const TarmacContext &tarmCtx, bool predicate)
std::string regName
Register name to be printed.
ISetState
ARM instruction set state.
Tarmac Tracer: this tracer generates a new Tarmac Record for every instruction being executed in gem5...
bool predicate
is the predicate for execution this inst true or false (not execed)?
uint64_t getIntData() const
std::vector< InstPtr > instQueue
Collection of heterogeneous printable entries: could be representing either instructions, register or memory entries.
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
std::vector< uint64_t > values
virtual RegVal readIntReg(RegIndex reg_idx) const =0
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
union Trace::InstRecord::@115 data
virtual void updateMisc(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Register update functions.
TarmacTracerRecord(Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, ArmISA::PCState _pc, TarmacTracer &_tracer, const StaticInstPtr _macroStaticInst=NULL)
int8_t numDestRegs() const
Number of destination registers.
bool secureMode
True if instruction is executed in secure mode.
Addr size
The size of the memory request.
static uint64_t instCount
Number of instructions being traced.
uint8_t instSize
Instruction size: 16 for 16-bit Thumb Instruction 32 otherwise (ARM and BigThumb) ...
static float bitsToFloat32(uint32_t val)
virtual void updateFloat(const TarmacContext &tarmCtx, RegIndex regRelIdx)
const char *const miscRegName[]
virtual void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every triggered memory access.
void flushQueues(Queue &queue)
Flush queues to the trace output.
virtual RegVal readCCReg(RegIndex reg_idx) const =0
ThreadContext is the external interface to all thread state for anything outside of the CPU...
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
RegClass regClass
Register class.
std::vector< RegPtr > regQueue
RegIndex regRel
Register arch number.
TARMAC instruction trace record.
virtual void updateVec(const TarmacContext &tarmCtx, RegIndex regRelIdx)
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
std::vector< MemPtr > memQueue
Tick curTick()
The current simulated tick.
std::string csprintf(const char *format, const Args &...args)
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
const int ReturnAddressReg
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
uint64_t Tick
Tick count type.
const char *const ccRegName[NUM_CCREGS]
bool regValid(Addr daddr)
const int StackPointerReg
const int FramePointerReg
virtual void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate an Entry for every register being written.
StaticInstPtr macroStaticInst
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
std::ostream & output()
Get the ostream from the current global logger.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void update(const TarmacContext &tarmCtx)
This updates the register entry using the update table.
bool isFirstMicroop() const
TraceRegEntry(const TarmacContext &tarmCtx, const RegId ®)
bool regValid
True if register entry is valid.
TARMAC register trace record.
const StaticInstPtr staticInst
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
TARMAC memory access trace record (stores only).
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
Bitfield< 24, 21 > opcode
virtual void updateInt(const TarmacContext &tarmCtx, RegIndex regRelIdx)
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
Register ID: describe an architectural register with its class and index.
virtual void updateCC(const TarmacContext &tarmCtx, RegIndex regRelIdx)
virtual void updatePred(const TarmacContext &tarmCtx, RegIndex regRelIdx)
bool inSecureState(ThreadContext *tc)
virtual void dump() override
virtual void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
GenericISA::DelaySlotPCState< MachInst > PCState
T * get() const
Directly access the pointer itself without taking a reference.
Addr addr
The address that was accessed.
const std::string to_string(sc_enc enc)
bool isLastMicroop() const