summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/testers/traffic_gen/generators.cc13
-rw-r--r--src/cpu/testers/traffic_gen/generators.hh7
2 files changed, 14 insertions, 6 deletions
diff --git a/src/cpu/testers/traffic_gen/generators.cc b/src/cpu/testers/traffic_gen/generators.cc
index 5cf40b2e6..7fec2a34a 100644
--- a/src/cpu/testers/traffic_gen/generators.cc
+++ b/src/cpu/testers/traffic_gen/generators.cc
@@ -50,10 +50,10 @@ BaseGen::BaseGen(QueuedMasterPort& _port, MasterID master_id, Tick _duration)
}
void
-BaseGen::send(Addr addr, unsigned size, const MemCmd& cmd)
+BaseGen::send(Addr addr, unsigned size, const MemCmd& cmd,
+ Request::FlagsType flags)
{
// Create new request
- Request::Flags flags;
Request *req = new Request(addr, size, flags, masterID);
// Embed it in a packet
@@ -215,6 +215,8 @@ TraceGen::InputStream::read(TraceElement& element)
element.addr = pkt_msg.addr();
element.blocksize = pkt_msg.size();
element.tick = pkt_msg.tick();
+ if (pkt_msg.has_flags())
+ element.flags = pkt_msg.flags();
return true;
}
@@ -280,14 +282,15 @@ TraceGen::execute()
// state graph from executing the state if it should not
assert(currElement.isValid());
- DPRINTF(TrafficGen, "TraceGen::execute: %c %d %d %d\n",
+ DPRINTF(TrafficGen, "TraceGen::execute: %c %d %d %d 0x%x\n",
currElement.cmd.isRead() ? 'r' : 'w',
currElement.addr,
currElement.blocksize,
- currElement.tick);
+ currElement.tick,
+ currElement.flags);
send(currElement.addr + addrOffset, currElement.blocksize,
- currElement.cmd);
+ currElement.cmd, currElement.flags);
}
void
diff --git a/src/cpu/testers/traffic_gen/generators.hh b/src/cpu/testers/traffic_gen/generators.hh
index 899a3c078..b6c70037a 100644
--- a/src/cpu/testers/traffic_gen/generators.hh
+++ b/src/cpu/testers/traffic_gen/generators.hh
@@ -75,8 +75,10 @@ class BaseGen
* @param addr Physical address to use
* @param size Size of the request
* @param cmd Memory command to send
+ * @param flags Optional request flags
*/
- void send(Addr addr, unsigned size, const MemCmd& cmd);
+ void send(Addr addr, unsigned size, const MemCmd& cmd,
+ Request::FlagsType flags = 0);
public:
@@ -328,6 +330,9 @@ class TraceGen : public BaseGen
/** The time at which the request should be sent */
Tick tick;
+ /** Potential request flags to use */
+ Request::FlagsType flags;
+
/**
* Check validity of this element.
*