From 0793a1bbdc190a7bd41b7ed81ef8291ceaeb722e Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 26 Apr 2018 18:16:53 +0100 Subject: cpu: Split the traffic generator into two classes The traffic generator currently assumes that it is always driven from a configuration file. Split it into a base class (BaseTrafficGen) that handles basic packet generation and a derived class that implements the config handling (TrafficGen). Change-Id: I9407f04c40ad7e40a263c8d1ef29d37ff8e6f1b4 Signed-off-by: Andreas Sandberg Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/11515 --- src/cpu/testers/traffic_gen/SConscript | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/cpu/testers/traffic_gen/SConscript') diff --git a/src/cpu/testers/traffic_gen/SConscript b/src/cpu/testers/traffic_gen/SConscript index 74d027970..f851b7925 100644 --- a/src/cpu/testers/traffic_gen/SConscript +++ b/src/cpu/testers/traffic_gen/SConscript @@ -1,6 +1,6 @@ # -*- mode:python -*- -# Copyright (c) 2012, 2017 ARM Limited +# Copyright (c) 2012, 2017-2018 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -39,19 +39,23 @@ Import('*') + +Source('base.cc') +Source('base_gen.cc') +Source('dram_gen.cc') +Source('dram_rot_gen.cc') +Source('exit_gen.cc') +Source('idle_gen.cc') +Source('linear_gen.cc') +Source('random_gen.cc') + +DebugFlag('TrafficGen') +SimObject('BaseTrafficGen.py') + # Only build the traffic generator if we have support for protobuf as the # tracing relies on it if env['HAVE_PROTOBUF']: SimObject('TrafficGen.py') - - Source('base_gen.cc') - Source('dram_gen.cc') - Source('dram_rot_gen.cc') - Source('exit_gen.cc') - Source('idle_gen.cc') - Source('linear_gen.cc') - Source('random_gen.cc') Source('trace_gen.cc') Source('traffic_gen.cc') - DebugFlag('TrafficGen') -- cgit v1.2.3