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 <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/11515
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user