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)
161 regClass(
reg.classValue()),
175 updateCC(tarmCtx, regRel);
178 updateFloat(tarmCtx, regRel);
181 updateInt(tarmCtx, regRel);
184 updateMisc(tarmCtx, regRel);
187 updateVec(tarmCtx, regRel);
190 updatePred(tarmCtx, regRel);
266 std::string reg_suffix;
277 regName =
"sp" + reg_suffix ;
280 regName =
"fp" + reg_suffix;
283 regName =
"lr" + reg_suffix;
299 std::make_unique<TraceInstEntry>(tarmCtx,
predicate)
312 std::make_unique<TraceMemEntry>(tarmCtx,
313 static_cast<uint8_t
>(
getSize()),
330 auto single_reg = genRegister<TraceRegEntry>(tarmCtx, reg_id);
334 queue.push_back(std::make_unique<TraceRegEntry>(single_reg));
340 mergeCCEntry<TraceRegEntry>(queue, tarmCtx);
390 template<
typename Queue>
396 for (
const auto &single_entry : queue) {
397 single_entry->print(outs);
403 template<
typename Queue,
typename... Args>
415 const std::string &prefix)
const
422 ccprintf(outs,
"%s clk %s (%u) %08x %s %s %s_%s : %s\n",
430 secureMode?
"s" :
"ns",
438 const std::string &prefix)
const
442 ccprintf(outs,
"%s clk M%s%d %08x %0*x\n",
444 loadAccess?
"R" :
"W",
455 const std::string &prefix)
const
460 ccprintf(outs,
"%s clk R %s %08x\n",
Tick curTick()
The universal simulation clock.
const int FramePointerReg
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
static float bitsToFloat32(uint32_t val)
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
TraceInstEntry(const TarmacContext &tarmCtx, bool predicate)
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
@ CCRegClass
Condition-code register.
virtual void updateCC(const TarmacContext &tarmCtx, RegIndex regRelIdx)
const std::string to_string(sc_enc enc)
bool secureMode
True if instruction is executed in secure mode.
const char *const ccRegName[NUM_CCREGS]
uint64_t getIntData() const
const char *const miscRegName[]
const int ReturnAddressReg
std::string csprintf(const char *format, const Args &...args)
T * get() const
Directly access the pointer itself without taking a reference.
bool regValid(Addr daddr)
bool isFirstMicroop() const
Tarmac Tracer: this tracer generates a new Tarmac Record for every instruction being executed in gem5...
virtual void updateMisc(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Register update functions.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
void ccprintf(cp::Print &print)
virtual RegVal readCCReg(RegIndex reg_idx) const =0
@ FloatRegClass
Floating-point register.
union gem5::Trace::InstRecord::@119 data
Bitfield< 24, 21 > opcode
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
ISetState
ARM instruction set state.
const StaticInstPtr staticInst
TarmacTracer & tracer
Reference to tracer.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
TARMAC instruction trace record.
TraceRegEntry(const TarmacContext &tarmCtx, const RegId ®)
std::vector< RegPtr > regQueue
std::vector< MemPtr > memQueue
virtual void dump() override
uint64_t Tick
Tick count type.
TARMAC register trace record.
virtual void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
std::ostream & output()
Get the ostream from the current global logger.
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
virtual void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every triggered memory access.
virtual void updateInt(const TarmacContext &tarmCtx, RegIndex regRelIdx)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
bool isLastMicroop() const
bool isSecure(ThreadContext *tc)
std::unique_ptr< PCStateBase > pc
const int StackPointerReg
@ IntRegClass
Integer register.
TraceMemEntry(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
Addr size
The size of the memory request.
virtual void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate an Entry for every register being written.
@ MiscRegClass
Control (misc) register.
bool predicate
is the predicate for execution this inst true or false (not execed)?
static uint64_t instCount
Number of instructions being traced.
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TARMAC memory access trace record (stores only).
Addr addr
The address that was accessed.
int8_t numDestRegs() const
Number of destination registers.
void flushQueues(Queue &queue)
Flush queues to the trace output.
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
@ VecRegClass
Vector Register.
virtual void updateFloat(const TarmacContext &tarmCtx, RegIndex regRelIdx)
void update(const TarmacContext &tarmCtx)
This updates the register entry using the update table.
StaticInstPtr macroStaticInst
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint8_t instSize
Instruction size: 16 for 16-bit Thumb Instruction 32 otherwise (ARM and BigThumb)
std::vector< InstPtr > instQueue
Collection of heterogeneous printable entries: could be representing either instructions,...
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
Register ID: describe an architectural register with its class and index.
Generated on Tue Dec 21 2021 11:34:22 for gem5 by doxygen 1.8.17