diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-07-20 11:23:49 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-08-24 13:47:35 +0000 |
commit | f741bb7cdbdd6c2526be40fe1e03a705364ddf8d (patch) | |
tree | 601725878dea62a50c2769f27d6cd5eb46b1b829 /src/cpu/testers/traffic_gen/BaseTrafficGen.py | |
parent | 2b3168021cb0ceed8e90045435181bb82eed0c12 (diff) | |
download | gem5-f741bb7cdbdd6c2526be40fe1e03a705364ddf8d.tar.xz |
cpu: Stream/SubstreamID support in TrafficGen
This patch is adding support for generating memory requests which set
the StreamID/SubstreamID field, so that is possible to emulate devices
attached to an external IOMMU/SMMU with a Traffic generator.
Change-Id: Iea068de581ae7125a9d49314124a08c045c75b49
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/12188
Diffstat (limited to 'src/cpu/testers/traffic_gen/BaseTrafficGen.py')
-rw-r--r-- | src/cpu/testers/traffic_gen/BaseTrafficGen.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cpu/testers/traffic_gen/BaseTrafficGen.py b/src/cpu/testers/traffic_gen/BaseTrafficGen.py index 2569c1ece..dbe0c848b 100644 --- a/src/cpu/testers/traffic_gen/BaseTrafficGen.py +++ b/src/cpu/testers/traffic_gen/BaseTrafficGen.py @@ -41,6 +41,13 @@ from m5.params import * from m5.proxy import * from MemObject import MemObject +# Types of Stream Generators. +# Those are orthogonal to the other generators in the TrafficGen +# and are meant to initialize the stream and substream IDs for +# every memory request, regardless of how the packet has been +# generated (Random, Linear, Trace etc) +class StreamGenType(Enum): vals = [ 'none', 'fixed', 'random' ] + # The traffic generator is a master module that generates stimuli for # the memory system, based on a collection of simple behaviours that # are either probabilistic or based on traces. It can be used stand @@ -70,3 +77,11 @@ class BaseTrafficGen(MemObject): # somewhat arbitrary and may well have to be tuned. progress_check = Param.Latency('1ms', "Time before exiting " \ "due to lack of progress") + + # Generator type used for applying Stream and/or Substream IDs to requests + stream_gen = Param.StreamGenType('none', + "Generator for adding Stream and/or Substream ID's to requests") + + # Sources for Stream/Substream IDs to apply to requests + sids = VectorParam.Unsigned([], "StreamIDs to use") + ssids = VectorParam.Unsigned([], "SubstreamIDs to use") |