37#include "debug/AMDGPUDevice.hh"
46 std::ifstream tracefile(trace_file);
47 std::string line,
token;
57 while (std::getline(tracefile, line)) {
58 std::stringstream
l(line);
59 std::vector <std::string> tokens;
61 while (std::getline(
l,
token,
' '))
62 tokens.push_back(
token);
87 ". Progress is: %#f\n",
offset, barnum,
98 pkt->
setUintX(value, ByteOrder::little);
110 "BAR %#x. Progress is: %#f\n",
offset, barnum,
Device model for an AMD GPU.
void readMMIOTrace(std::string trace_file)
Read an MMIO trace gathered from a real system and place the MMIO values read and written into the MM...
void writeFromTrace(PacketPtr pkt, int barnum, Addr offset)
Get the next MMIO write from the trace file to an offset in a BAR and compare the value with the data...
void readFromTrace(PacketPtr pkt, int barnum, Addr offset)
Get the next MMIO read from the trace file to an offset in a BAR and write the value to the packet pr...
trace_BAR_t trace_BARs[6]
bool isRelevant(std::vector< std::string > tokens)
bool traceIsRead(std::vector< std::string > tokens) const
void traceParseTokens(std::vector< std::string > tokens)
uint64_t trace_final_index
struct gem5::AMDMMIOReader::MmioTrace mtrace
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.