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/fetch.hh | |
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/fetch.hh')
-rw-r--r-- | src/cpu/o3/fetch.hh | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh index ce4f8b6b0..ee1932bec 100644 --- a/src/cpu/o3/fetch.hh +++ b/src/cpu/o3/fetch.hh @@ -52,6 +52,7 @@ #include "cpu/pred/bpred_unit.hh" #include "cpu/timebuf.hh" #include "cpu/translation.hh" +#include "enums/FetchPolicy.hh" #include "mem/packet.hh" #include "mem/port.hh" #include "sim/eventq.hh" @@ -172,15 +173,6 @@ class DefaultFetch NoGoodAddr }; - /** Fetching Policy, Add new policies here.*/ - enum FetchPriority { - SingleThread, - RoundRobin, - Branch, - IQ, - LSQ - }; - private: /** Fetch status. */ FetchStatus _status; @@ -189,7 +181,7 @@ class DefaultFetch ThreadStatus fetchStatus[Impl::MaxThreads]; /** Fetch policy. */ - FetchPriority fetchPolicy; + FetchPolicy fetchPolicy; /** List that has the threads organized by priority. */ std::list<ThreadID> priorityList; @@ -364,7 +356,7 @@ class DefaultFetch TheISA::PCState nextPC, bool trace); /** Returns the appropriate thread to fetch, given the fetch policy. */ - ThreadID getFetchingThread(FetchPriority &fetch_priority); + ThreadID getFetchingThread(); /** Returns the appropriate thread to fetch using a round robin policy. */ ThreadID roundRobin(); |