diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-07-18 14:28:21 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-07-25 16:47:15 +0000 |
commit | a327a6763a356dc386c0f273fe091784a20b495a (patch) | |
tree | ac7f4ef68fee25df16f5019f84f43d843f4105a6 /src/cpu/testers/traffic_gen/trace_gen.hh | |
parent | 2fe3d660260e7b546b5860ac4459014ed9bee907 (diff) | |
download | gem5-a327a6763a356dc386c0f273fe091784a20b495a.tar.xz |
cpu: Allow creation of traffic gen from generic SimObjects
This patch allows to instantiate a Traffic generator starting from a
generic SimObject, so that linking to a BaseTrafficGen only is no longer
mandatory. This permits SimObjects different than a BaseTrafficGen to
instantiate generators and to manually specify the MasterID they
will be using when generating memory requests.
Change-Id: Ic286cfa49fd9c9707e6f12a4ea19993dd3006b2b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/11789
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu/testers/traffic_gen/trace_gen.hh')
-rw-r--r-- | src/cpu/testers/traffic_gen/trace_gen.hh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cpu/testers/traffic_gen/trace_gen.hh b/src/cpu/testers/traffic_gen/trace_gen.hh index 05d366e97..3f6a58138 100644 --- a/src/cpu/testers/traffic_gen/trace_gen.hh +++ b/src/cpu/testers/traffic_gen/trace_gen.hh @@ -152,14 +152,15 @@ class TraceGen : public BaseGen /** * Create a trace generator. * - * @param gen Traffic generator owning this sequence generator + * @param obj SimObject owning this sequence generator + * @param master_id MasterID related to the memory requests * @param _duration duration of this state before transitioning * @param trace_file File to read the transactions from * @param addr_offset Positive offset to add to trace address */ - TraceGen(BaseTrafficGen &gen, Tick _duration, + TraceGen(SimObject &obj, MasterID master_id, Tick _duration, const std::string& trace_file, Addr addr_offset) - : BaseGen(gen, _duration), + : BaseGen(obj, master_id, _duration), trace(trace_file), tickOffset(0), addrOffset(addr_offset), |