diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-05-30 12:54:05 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-05-30 12:54:05 -0400 |
commit | 4931414ca79b97ee64a958c4dd4ed1cafc44b4bd (patch) | |
tree | d906914433751bd435e53888e7a8a9aa63b43b5f /src/cpu/testers/traffic_gen/generators.hh | |
parent | c9c35da9343a763385f8c4680ff9b667be224e1d (diff) | |
download | gem5-4931414ca79b97ee64a958c4dd4ed1cafc44b4bd.tar.xz |
cpu: Block traffic generator when requests have to retry
This patch changes the queued port for a conventional master port and
stalls the traffic generator when requests are not immediately
accepted. This is a first step to allowing elasticity in the injection
of requests.
The patch also adds stats for the sent packets and retries, and
slightly changes how the nextPacketTick and getNextPacket
interact. The advancing of the trace is now moved to getNextPacket and
nextPacketTick is only responsible for answering the question when the
next packet should be sent.
Diffstat (limited to 'src/cpu/testers/traffic_gen/generators.hh')
-rw-r--r-- | src/cpu/testers/traffic_gen/generators.hh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cpu/testers/traffic_gen/generators.hh b/src/cpu/testers/traffic_gen/generators.hh index 5bcfc8e80..2b86afa22 100644 --- a/src/cpu/testers/traffic_gen/generators.hh +++ b/src/cpu/testers/traffic_gen/generators.hh @@ -126,7 +126,7 @@ class BaseGen * * @return next tick when a packet is available */ - virtual Tick nextPacketTick() = 0; + virtual Tick nextPacketTick() const = 0; }; @@ -146,7 +146,7 @@ class IdleGen : public BaseGen PacketPtr getNextPacket() { return NULL; } - Tick nextPacketTick() { return MaxTick; } + Tick nextPacketTick() const { return MaxTick; } }; /** @@ -192,7 +192,7 @@ class LinearGen : public BaseGen PacketPtr getNextPacket(); - Tick nextPacketTick(); + Tick nextPacketTick() const; private: @@ -269,7 +269,7 @@ class RandomGen : public BaseGen PacketPtr getNextPacket(); - Tick nextPacketTick(); + Tick nextPacketTick() const; private: @@ -415,12 +415,11 @@ class TraceGen : public BaseGen void exit(); /** - * Read a line of the trace file. Returns the raw tick - * when the next request should be generated. If the end - * of the file has been reached, it returns MaxTick to + * Returns the tick when the next request should be generated. If + * the end of the file has been reached, it returns MaxTick to * indicate that there will be no more requests. */ - Tick nextPacketTick(); + Tick nextPacketTick() const; private: |