diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2019-01-03 17:45:56 +0000 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2019-01-17 11:09:08 +0000 |
commit | 38339e0a7f7ce119feefc95591703df2f851ee4d (patch) | |
tree | 3f99ddbd0e1b9073c23becf8aba1c28417e5a436 /src/cpu/o3/O3CPU.py | |
parent | 8ddec57062bdde7935bb0472f2d993fb0c38c680 (diff) | |
download | gem5-38339e0a7f7ce119feefc95591703df2f851ee4d.tar.xz |
cpu-o3: Make the smtFetchPolicy a Param.ScopedEnum
The smtFetchPolicy is a parameter in the o3 cpu that can have 5
different values. Previously this setting was done through a string
and a parser function would turn it into a c++ enum value. This
changeset turns the string into a python Param.ScopedEnum.
Change-Id: Iafb4b4b27587541185ea912e5ed581bce09695f5
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15396
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/cpu/o3/O3CPU.py')
-rw-r--r-- | src/cpu/o3/O3CPU.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpu/o3/O3CPU.py b/src/cpu/o3/O3CPU.py index b8152f663..f6c395aed 100644 --- a/src/cpu/o3/O3CPU.py +++ b/src/cpu/o3/O3CPU.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 ARM Limited +# Copyright (c) 2016, 2019 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -48,6 +48,9 @@ from FUPool import * from O3Checker import O3Checker from BranchPredictor import * +class FetchPolicy(ScopedEnum): + vals = [ 'SingleThread', 'RoundRobin', 'Branch', 'IQCount', 'LSQCount' ] + class DerivO3CPU(BaseCPU): type = 'DerivO3CPU' cxx_header = 'cpu/o3/deriv.hh' @@ -147,7 +150,7 @@ class DerivO3CPU(BaseCPU): numROBEntries = Param.Unsigned(192, "Number of reorder buffer entries") smtNumFetchingThreads = Param.Unsigned(1, "SMT Number of Fetching Threads") - smtFetchPolicy = Param.String('SingleThread', "SMT Fetch policy") + smtFetchPolicy = Param.FetchPolicy('SingleThread', "SMT Fetch policy") smtLSQPolicy = Param.String('Partitioned', "SMT LSQ Sharing Policy") smtLSQThreshold = Param.Int(100, "SMT LSQ Threshold Sharing Parameter") smtIQPolicy = Param.String('Partitioned', "SMT IQ Sharing Policy") |