Go to the documentation of this file.
44 #include "debug/TrafficGen.hh"
45 #include "proto/packet.pb.h"
57 ProtoMessage::PacketHeader header_msg;
59 panic(
"Failed to read packet header from trace\n");
61 panic(
"Trace was recorded with a different tick frequency %d\n",
62 header_msg.tick_freq());
78 element.
cmd = pkt_msg.
cmd();
79 element.
addr = pkt_msg.addr();
81 element.
tick = pkt_msg.tick();
82 element.
flags = pkt_msg.has_flags() ? pkt_msg.flags() : 0;
169 warn(
"Trace player %s was unable to replay the entire trace!\n",
Tick tick
The time at which the request should be sent.
const FlagsType init
This Stat is Initialized.
Tick tickOffset
Stores the time when the state was entered.
uint64_t Tick
Tick count type.
std::string name() const
Get the name, useful for DPRINTFs.
This struct stores a line in the trace file.
MemCmd cmd
Specifies if the request is to be a read or a write.
Addr blocksize
The size of the access for the request.
Addr addrOffset
Offset for memory requests.
PacketPtr getNextPacket()
Get the next generated packet.
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
Addr addr
The address for the request.
void clear()
Make this element invalid.
ProbePointArg< PacketInfo > Packet
Packet probe point.
void enter()
Enter this generator state.
TraceElement currElement
Store the current and next element in the trace.
Tick nextPacketTick(bool elastic, Tick delay) const
Returns the tick when the next request should be generated.
PacketPtr getPacket(Addr addr, unsigned size, const MemCmd &cmd, Request::FlagsType flags=0)
Generate a new request and associated packet.
bool traceComplete
Set to true when the trace replay for one instance of state is complete.
bool isValid() const
Check validity of this element.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void exit()
Exit this generator state.
InputStream trace
Input stream used for reading the input trace file.
Request::FlagsType flags
Potential request flags to use.
The traffic generator is a module that generates stimuli for the memory system, based on a collection...
#define panic(...)
This implements a cprintf based panic() function.
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17