diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-05-30 12:54:04 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-05-30 12:54:04 -0400 |
commit | c9c35da9343a763385f8c4680ff9b667be224e1d (patch) | |
tree | 73a1faa28f6ac3afef1e9cb2d919102ba2d87fb0 /src/cpu/testers/traffic_gen/traffic_gen.hh | |
parent | ba11a02cf2e6259d091017f7d44ca1551736ccd3 (diff) | |
download | gem5-c9c35da9343a763385f8c4680ff9b667be224e1d.tar.xz |
cpu: Move traffic generator sending out of generator states
This patch moves the responsibility for sending packets out of the
generator states and leaves it with the top-level traffic
generator. The main aim of this patch is to enable a transition to
non-queued ports, i.e. with send/retry flow control, and to do so it
is much more convenient to not wrap the port interactions and instead
leave it all local to the traffic generator.
The generator states now only govern when they are ready to send
something new, and the generation of the packets to send. They thus
have no knowledge of the port that is used.
Diffstat (limited to 'src/cpu/testers/traffic_gen/traffic_gen.hh')
-rw-r--r-- | src/cpu/testers/traffic_gen/traffic_gen.hh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cpu/testers/traffic_gen/traffic_gen.hh b/src/cpu/testers/traffic_gen/traffic_gen.hh index a2fcd3bc0..c013109b7 100644 --- a/src/cpu/testers/traffic_gen/traffic_gen.hh +++ b/src/cpu/testers/traffic_gen/traffic_gen.hh @@ -74,25 +74,22 @@ class TrafficGen : public MemObject void enterState(uint32_t newState); /** - * Get the tick of the next event, either an execution or a + * Get the tick of the next event, either a new packet or a * transition. * * @return tick of the next update event */ Tick nextEventTick() { - return std::min(states[currState]->nextExecuteTick(), + return std::min(states[currState]->nextPacketTick(), nextTransitionTick); } /** * Parse the config file and build the state map and * transition matrix. - * - * @param file_name Config file name to parse - * @param master_id MasterID to use for generated requests */ - void parseConfig(const std::string& file_name, MasterID master_id); + void parseConfig(); /** * Schedules event for next update and executes an update on the @@ -119,6 +116,11 @@ class TrafficGen : public MemObject */ MasterID masterID; + /** + * The config file to parse. + */ + const std::string configFile; + /** Time of next transition */ Tick nextTransitionTick; |