49using namespace ArmISA;
71 uint8_t _size,
Addr _addr, uint64_t _data)
102 TraceRegEntry::updateInt(tarmCtx);
111 regWidth = (arm_inst->getIntWidth());
112 if (regWidth == 32) {
113 regName =
"W" + std::to_string(regId.index());
115 regName =
"X" + std::to_string(regId.index());
123 TraceRegEntry::updateMisc(tarmCtx);
137 auto num_elements = regWidth / (
sizeof(
VecElem) * 8);
140 values.resize(num_elements);
142 for (
auto i = 0;
i < num_elements;
i++) {
147 regName =
"Z" + std::to_string(regId.index());
160 auto num_elements = regWidth / 16;
163 values.resize(num_elements);
166 auto vv = pred_container.as<uint16_t>();
167 for (
auto i = 0;
i < num_elements;
i++) {
172 regName =
"P" + std::to_string(regId.index());
182 std::make_unique<TraceInstEntryV8>(tarmCtx,
predicate)
195 std::make_unique<TraceMemEntryV8>(tarmCtx,
196 static_cast<uint8_t
>(
getSize()),
217 queue.push_back(std::make_unique<TraceRegEntryV8>(single_reg));
230 const std::string &prefix)
const
234 std::string paddr_str = paddrValid?
csprintf(
":%012x",paddr) :
242 ccprintf(outs,
"%s clk %s %s (%u) %08x%s %s %s %s_%s : %s\n",
252 secureMode?
"s" :
"ns",
260 const std::string &prefix)
const
264 ccprintf(outs,
"%s clk %s M%s%d %08x:%012x %0*x\n",
267 loadAccess?
"R" :
"W",
279 const std::string &prefix)
const
284 ccprintf(outs,
"%s clk %s R %s %s\n",
295 if (regWidth <= 64) {
297 const auto regValue = values[Lo] &
mask(regWidth);
298 return csprintf(
"%0*x", regWidth / 4, regValue);
305 for (
auto it = values.rbegin(); it != values.rend(); it++) {
307 static_cast<int>(
sizeof(
VecElem) * 2), *it);
static unsigned getCurSveVecLenInBits(ThreadContext *tc)
TranslationGenPtr translateFunctional(Addr start, Addr size, ThreadContext *tc, Mode mode, Request::Flags flags) override
Returns a translation generator for a region of virtual addresses, instead of directly translating a ...
T * get() const
Directly access the pointer itself without taking a reference.
Register ID: describe an architectural register with its class and index.
uint8_t numDestRegs() const
Number of destination registers.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
virtual RegVal getReg(const RegId ®) const
virtual BaseMMU * getMMUPtr()=0
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
VecElem * as()
View interposers.
Addr addr
The address that was accessed.
uint64_t getIntData() const
bool predicate
is the predicate for execution this inst true or false (not execed)?
union gem5::trace::InstRecord::Data data
Addr size
The size of the memory request.
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
const StaticInstPtr staticInst
void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate a Record for every register being written.
void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every memory access triggered.
void mergeCCEntry(std::vector< RegPtr > &queue, const TarmacContext &tarmCtx)
RegEntry genRegister(const TarmacContext &tarmCtx, const RegId ®)
Generate and update a register entry.
constexpr auto & StackPointerReg
constexpr auto & ReturnAddressReg
VecPredReg::Container VecPredRegContainer
Bitfield< 24, 21 > opcode
constexpr auto & FramePointerReg
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::string csprintf(const char *format, const Args &...args)
void ccprintf(cp::Print &print)
General data shared by all v8 entries.
TraceInstEntryV8(const TarmacContext &tarmCtx, bool predicate)
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TraceMemEntryV8(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
void updateInt(const TarmacContext &tarmCtx) override
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TraceRegEntryV8(const TarmacContext &tarmCtx, const RegId ®)
void updateMisc(const TarmacContext &tarmCtx) override
Register update functions.
std::string formatReg() const
Returning a string which contains the formatted register value: transformed in hex,...
void updateVec(const TarmacContext &tarmCtx) override
void updatePred(const TarmacContext &tarmCtx) override