Go to the documentation of this file.
48 uint64_t TarmacTracerRecord::TraceInstEntry::instCount = 0;
54 case TarmacBaseRecord::ISET_ARM:
56 case TarmacBaseRecord::ISET_THUMB:
58 case TarmacBaseRecord::ISET_A64:
102 return "Unsupported";
113 _pc, _macroStaticInst),
121 :
InstEntry(tarmCtx.thread, tarmCtx.
pc, tarmCtx.staticInst, predicate)
131 instSize = (arm_inst->instSize() << 3);
136 opcode = arm_inst->encoding();
145 uint8_t _size,
Addr _addr, uint64_t _data)
156 regClass(
reg.classValue()),
170 updateCC(tarmCtx, regRel);
173 updateFloat(tarmCtx, regRel);
176 updateInt(tarmCtx, regRel);
179 updateMisc(tarmCtx, regRel);
182 updateVec(tarmCtx, regRel);
185 updatePred(tarmCtx, regRel);
261 std::string reg_suffix;
272 regName =
"sp" + reg_suffix ;
275 regName =
"fp" + reg_suffix;
278 regName =
"lr" + reg_suffix;
294 m5::make_unique<TraceInstEntry>(tarmCtx,
predicate)
307 m5::make_unique<TraceMemEntry>(tarmCtx,
308 static_cast<uint8_t
>(
getSize()),
325 auto single_reg = genRegister<TraceRegEntry>(tarmCtx, reg_id);
330 m5::make_unique<TraceRegEntry>(single_reg)
337 mergeCCEntry<TraceRegEntry>(queue, tarmCtx);
387 template<
typename Queue>
393 for (
const auto &single_entry : queue) {
394 single_entry->print(outs);
400 template<
typename Queue,
typename... Args>
412 const std::string &prefix)
const
419 ccprintf(outs,
"%s clk %s (%u) %08x %s %s %s_%s : %s\n",
427 secureMode?
"s" :
"ns",
435 const std::string &prefix)
const
439 ccprintf(outs,
"%s clk M%s%d %08x %0*x\n",
441 loadAccess?
"R" :
"W",
452 const std::string &prefix)
const
457 ccprintf(outs,
"%s clk R %s %08x\n",
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
virtual void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
Addr addr
The address that was accessed.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
union Trace::InstRecord::@115 data
TraceRegEntry(const TarmacContext &tarmCtx, const RegId ®)
static float bitsToFloat32(uint32_t val)
void flushQueues(Queue &queue)
Flush queues to the trace output.
const std::string to_string(sc_enc enc)
virtual void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate an Entry for every register being written.
uint64_t getIntData() const
uint64_t Tick
Tick count type.
StaticInstPtr macroStaticInst
void update(const TarmacContext &tarmCtx)
This updates the register entry using the update table.
TraceMemEntry(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
const char *const miscRegName[]
TARMAC instruction trace record.
virtual void updateMisc(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Register update functions.
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
Register ID: describe an architectural register with its class and index.
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
bool isFirstMicroop() const
virtual void updateFloat(const TarmacContext &tarmCtx, RegIndex regRelIdx)
std::vector< MemPtr > memQueue
@ FloatRegClass
Floating-point register.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
virtual void updateCC(const TarmacContext &tarmCtx, RegIndex regRelIdx)
int8_t numDestRegs() const
Number of destination registers.
TraceInstEntry(const TarmacContext &tarmCtx, bool predicate)
const char *const ccRegName[NUM_CCREGS]
const int FramePointerReg
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TARMAC register trace record.
virtual void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every triggered memory access.
ISetState
ARM instruction set state.
virtual void dump() 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.
@ IntRegClass
Integer register.
const StaticInstPtr staticInst
Bitfield< 24, 21 > opcode
std::vector< InstPtr > instQueue
Collection of heterogeneous printable entries: could be representing either instructions,...
bool regValid(Addr daddr)
@ CCRegClass
Condition-code register.
bool secureMode
True if instruction is executed in secure mode.
virtual RegVal readCCReg(RegIndex reg_idx) const =0
bool isLastMicroop() const
@ MiscRegClass
Control (misc) register.
@ VecRegClass
Vector Register.
TarmacTracer & tracer
Reference to tracer.
Addr size
The size of the memory request.
uint8_t instSize
Instruction size: 16 for 16-bit Thumb Instruction 32 otherwise (ARM and BigThumb)
static uint64_t instCount
Number of instructions being traced.
const int StackPointerReg
GenericISA::DelaySlotPCState< MachInst > PCState
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
void ccprintf(cp::Print &print)
const int ReturnAddressReg
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TARMAC memory access trace record (stores only).
virtual RegVal readIntReg(RegIndex reg_idx) const =0
Tarmac Tracer: this tracer generates a new Tarmac Record for every instruction being executed in gem5...
std::string csprintf(const char *format, const Args &...args)
std::vector< RegPtr > regQueue
virtual void updateInt(const TarmacContext &tarmCtx, RegIndex regRelIdx)
bool isSecure(ThreadContext *tc)
Tick curTick()
The current simulated tick.
bool predicate
is the predicate for execution this inst true or false (not execed)?
T * get() const
Directly access the pointer itself without taking a reference.
Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17