Commit Graph

12520 Commits

Author SHA1 Message Date
Gabe Black
1a1ba692c3 sim: Move the MemPools object out of System and into SEWorkload.
This removes the need for all the FullSystem checks in the System class,
and simplifies that class in general.

Change-Id: Ie8a3bc67db9195027d2111009b15ca59221bdeb2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50348
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-30 00:30:49 +00:00
Gabe Black
473d3c72c8 scons: Clone the gem5py_env environment in src/SConscript.
This will avoid cross contamination between variants, where the gem5py
executable from one variant is used by another variant, potentially
crashing SCons on a clean build.

Change-Id: I6c1741d431892ff11c2e05a6beb5e87c2b0d67eb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51087
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-29 23:55:35 +00:00
Giacomo Travaglini
152760ee51 arch-arm: Define an ArmRelease class to handle ISA extensions
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I3240853bd2123a6f24b2bb64c90ad457696f0d93
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51010
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-29 22:16:03 +00:00
Gabe Black
663fa147e8 sim: Encapsulate MemPool related System stuff in a MemPools class.
Also add a const version of the getPhysMem accessor so it can be used
with a const System class.

Change-Id: Ieccd0bd4c2c8fe69820eb1a0b0c835722334630d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50343
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
2021-09-29 12:17:50 +00:00
Gabe Black
61a6ec7b71 sim: Move serialization logic for MemPools out of System.
And move it into the MemPools class itself. The MemPools class should be
self contained, and be able to manage its own state. That should not be
the responsibility of another containing class.

Change-Id: Ib0bf70b57e92698f15bea0cc217dd98ee816d57b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50340
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2021-09-29 12:17:35 +00:00
Gabe Black
0a2ba189d4 sim: Fix a faulty assumption in MemPool.
In the MemPool object, the idea of a limit of the pool (largest page)
and the total number of pages were conflated, as was the page number of
the next "free" page and the total number of pages allocated. Both of
those would only be equivalent if the memory pool starts at address
zero, which is not generally true and could be true for at most one pool
at a time even when it is occasionally true.

Instead, this change fixes up MemPool to keep tree values, a starting
page number, the page number of the next free page, and the total number
of pages in the pool, both allocated and unallocated.

With those three values, we can accurately report the number of
allocated pages (not just the number of pages of any kind below the next
free one), the total number of free pages, and the total number of pages
in general (not the largest numbered page in the pool).

The value serialized by the System class was adjusted so that it will
stay compatible with previous checkpoints. The value unserialized by the
system class is passed to the MemPool as a limit, which has not changed
and so doesn't need to be updated. It gets translated into the total
number of pages in the MemPool constructor.

Change-Id: I8268ef410b41bf757df9ee5585ec2f6b0d8499e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50687
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-29 12:17:21 +00:00
Tom Rollet
133399c91d cpu-o3: remove useless indirection from lsq to cpu
Change-Id: Idd2d4277b542da728f0740590ae7ef9ae9b76629
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50731
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-09-29 07:32:27 +00:00
Tom Rollet
d3df30c885 cpu-o3: replace 'stores' counter per storeQueue.size()
Change-Id: If816c1f03969665010a5bd7e993fe7f87ac4d0a3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50730
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-09-29 07:32:27 +00:00
Tom Rollet
c03ec6432e cpu-o3: replace 'loads' counter per loadQueue.size()
Change-Id: Id65776b385f571e4e325b0ffa022bfa765c224bf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50729
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-09-29 07:32:27 +00:00
Giacomo Travaglini
d1ddbdead8 arch-arm: Prefer haveEL over haveSecurity and haveVirtualization
The Arm architecture reference manual pseudocode checks for the presence
of an exception level (EL) over "security" and "virtualization"

Change-Id: Ia91a9d1848eddc40776627208386a13afdaafda3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51009
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-29 07:27:59 +00:00
Gabe Black
ede1ad4b8c arch,cpu,mem,sim: Fold arch/locked_mem.hh into the BaseISA class.
Turn the functions within it into virtual methods on the ISA classes.
Eliminate the implementation in MIPS, which was just copy pasted from
Alpha long ago. Fix some minor style issues in ARM. Remove templating.
Switch from using an "XC" type parameter to using the ThreadContext *
installed in all ISA classes.

The ARM version of these functions actually depend on the ExecContext
delaying writes to MiscRegs to work correctly. More insiduously than
that, they also depend on the conicidental ThreadContext like
availability of certain functions like contextId and getCpuPtr which
come from the class which happened to implement the type passed into XC.

To accomodate that, those functions need both a real ThreadContext, and
another object which is either an ExecContext or a ThreadContext
depending on how the method is called.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-1053

Change-Id: I68f95f7283f831776ba76bc5481bfffd18211bc4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50087
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-28 19:56:01 +00:00
Matthew Poremba
5a884fdab5 arch-vega: Fix VEGA_X86 build issues
The registerManager was not being dereferenced properly. Also remove
non-existant include file.

Change-Id: I5dac692abedc327ed83ee904e4c6ac5dac811e4c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47105
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-27 22:30:30 +00:00
Matthew Poremba
e51e698b74 arch-vega: Update instruction stats
These stats were moved to a Stats::Group but the instructions were not
updated to use the stats struct.

Change-Id: I49348e30bc0988a2a873f51bd7079c1f315649b4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47104
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-09-27 22:30:30 +00:00
Matthew Poremba
16de253c15 arch-vega: Add missing functions referenced by insts
Some instructions were referencing pc() and isExecMaskRegister() which
were not defined.

Change-Id: Ic5b3fa9057950ff85603fcb87447a81b6c7f274b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47103
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-09-27 22:30:30 +00:00
Matthew Poremba
dca86ddb8d arch-vega: Issue flat insts using on executedAs()
Similar to the flags issue in the previous patch, the FlatGlobal flag
does not exist. Change all of the flat instructions to use the same
issue logic as GCN3. A helper function is also added as loads and stores
use the same interface. The helper function can be more easily updated
to support global and scratch subtypes of flat instructions.

Change-Id: I394f1d4c59b029201fe2f6075c9dedb3a37dbe31
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50827
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Kyle Roarty <kyleroarty1716@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-27 22:30:30 +00:00
Matthew Poremba
753a2c8aac arch-vega: Update Vega instruction flags
The instructions file seems to be assuming a newer pipeline which is not
released. The flags are therefore not set in Vega as the newer pipeline
infers them. This adds back flags for MemoryRef instructions, fixes
waitcnt and removes CondBranch which was not checked and changed to
Branch.

This also removeds unused Cac flags and fixes the casing for ReadsEXEC
and WritesEXEC. The remaining flags are not used at all by the pipeline
and are removed to avoid confusion as to whether these are needed for
GCN3 or not.

Change-Id: I976cbd407a466e8ad77c84dbdc29082f49e28f3b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47102
Reviewed-by: Kyle Roarty <kyleroarty1716@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-27 22:30:30 +00:00
Gabe Black
84abf07777 scons: Pull the rest of the embedPyFile function into marshal.py.
This further unburdens src/SConscript, and makes marshal.py a mostly
self contained implementation of that build step.

Change-Id: I4eb9da40de56feec9ab32c384aa5730be70ae498
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49399
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 21:24:06 +00:00
Gabe Black
64c9e07498 scons: Pull bytesToCppArray into build_tools.
This mechanism will be used by various small scripts which perform steps
of the build.

Change-Id: I91d842c022d6f568715e8a10310894cb8afbab20
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49398
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 21:23:52 +00:00
Gabe Black
750a809169 python,scons: Break slicc's dependence on m5.util.
The only dependence remaining was a small utility function makeDir which
was only used by slicc. This change moves it to where it's used, and
cleans up the additions to sys.path a little.

Change-Id: I7415b53ea2e9c378b6dbf342b8b3a966f48e117c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49397
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-24 21:23:41 +00:00
Gabe Black
cc75a47b84 python,scons: Move grammar.py and code_formatter.py into build_tools.
These are only used in a build, and so don't need to be built into gem5.
grammar.py is used by slicc and the fast model project file parser, and
code_formatter.py is only used by SConscripts.

Change-Id: Id43e62459d69f07fdb2ed125548a83e38bbb7590
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49396
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 21:23:27 +00:00
Gabe Black
6cc3b4f6c1 scons,python: Move the marshal.py script into build_tools.
It's really a part of the build system and not part of gem5, and so it
should probably live outside of the main tree. It would be confusing to
have a bunch of python scripts which don't end up inside gem5 alongside
a bunch of ones that do in src/python.

The directory is called build_tools instead of build so it doesn't get
confused with an actual build output directory.

Change-Id: Ie12475a15517508dc2044f0ca4db71a601b7ab6d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49393
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 21:23:11 +00:00
Gabe Black
dfec508976 scons,python: Split the marshal binary into a c++ wrapper and script.
The new c++ wrapper is called gem5py, and will run any python script
using gem5's embedded python interpreter. The "marshal" functionality is
split out into a separate python script gem5py can run.

The command line for gem5py should look like this:

gem5py ${SCRIPT TO RUN} ${ARGS TO THE SCRIPT}

So, for instance, to marshal a file called foo.py, the command line
might look like this:

gem5py python/marshal.py foo.py

Also, this change reorders the sources for the python embedding action
and limits the max_sources for Transform() to 1, so that it just shows
the python file being embedded and not gem5py or the marshal.py script.
Those are still sources so dependency tracking works correctly, but they
are also implied and just add visual noise to the build output.

Change-Id: I7ae6bd114973ae44c3b634884b6dafc6577e0788
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49392
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 18:49:53 +00:00
Bobby R. Bruce
b0c2b278a9 misc: Merge branch v21.1.0.2 hotfix branch into develop
Change-Id: I225dddd6ec1399528f4759a3c5c5e306d8c7a38c
2021-09-22 11:43:57 -07:00
Bobby R. Bruce
ca921387ae misc: Update the version to v21.1.0.2
Change-Id: I4013ed678b367f95bb0f69e4a827ad04995cc3c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50750
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 18:37:48 +00:00
CHEN Meng
59c4fd07cb base-stats: fix storage initializing
Commit (70194795c3) introduced std::vector with resize() to initializing all storages. This method caused data duplication in statistics. Storage is now initialized using loops.

Change-Id: I4350863a83671fc10cc02b5cb7d3b38e6cf4f565
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50747
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 18:37:48 +00:00
Daniel R. Carvalho
96c9d03fa6 base,tests: Add unit test for SymbolTable
Add a unit test for base/loader/symtab.*.

Change-Id: I81c14826ab629439897235cbaaf79047e603ff8d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43250
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 15:47:37 +00:00
Giacomo Travaglini
ee95d0f04d arch-arm: SCTLR.WXN not used in S2AP
Change-Id: I141f7088fce0e7eed01491920f84774394143b4a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50667
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 13:22:58 +00:00
Giacomo Travaglini
17a5422bec arch-arm: Implement Armv8.2 FEAT_UAO
Change-Id: I87b25a65e706ed6486347806a540b1dbf25231cb
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50390
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 13:22:58 +00:00
Giacomo Travaglini
ee0e92a432 arch-arm: Remove SPSR write mask
We are currently masking out the PAN and UAO field when writing
to the SPSR_ELx register.
This is not needed and we should treat them as RES0 instead if
FEAT_PAN and FEAT_UAO are not implemented

Change-Id: Ib65e3744f365825d2414b8092b3a79324be461b4
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50389
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-09-22 13:22:58 +00:00
Daniel R. Carvalho
cbffe30e64 sim,tests: Add unit test for sim/serialize.hh
Add a unit test for sim/serialize.hh.

==Bugs==
arrayParamIn cannot parse strings with spaces. Since spaces
are used as delimiters, strings containing spaces are parsed
as multiple entries of the array. The test that checks for
this has been disabled.

==Unexpected Behavior==
Serialization has an unexpected behavior when returning to
previous scopes. For example,

  ...
  SCS scs(cpt, "S1")
  paramOut(cpt, "param1", integer1)
  {
    SCS scs_2(cpt, "S2")
    paramOut(cpt, "param2", integer2)
  }
  paramOut(cpt, "param3", integer3)

will generate the output:
  ...
  [S1]
    param1=1
  [S2]
    param2=2
    param3=3

But the user might expect:
  ...
  [S1]
    param1=1
  [S2]
    param2=2
  [S1]
    param3=3

==Incovenient Behavior==
arrayParamIn with a std::array parameter is slightly
incovenient, since the raw data pointer must be extracted.
It may be worth it to add a template specialization.

==Not Tested==
paramInImpl is not being directly tested because it should
not be used as an external API - paramIn and optParamIn
should be used instead.

arrayParamIn with an InsertIterator parameter is not being
directly tested because the other versions should be used
instead.

Change-Id: If0c8f045aa317790d5fcb32e48629b113b62efc5
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41337
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 05:31:01 +00:00
Daniel R. Carvalho
df928b36f8 sim,tests: Add unit test for sim/serialize_handlers
Add a GTest for the functionality of sim/serialize_handlers.hh.

Change-Id: I1128c7adb12a3c7d091e26db13733ba45e1e61fe
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38776
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 05:31:01 +00:00
Daniel R. Carvalho
7a144c5d59 arch-arm: Fix memory leak of PMU events
Memory of PMU events was never being released.

Change-Id: I3cd9583103333008799f0873af3a490f847a21b5
Issued-on: https://gem5.atlassian.net/browse/GEM5-857
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38703
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 05:31:01 +00:00
Gabe Black
6e23be0693 python: Get rid of ipython 0.10 and older support code.
Version 0.11 was actually the first version of ipython which even
supported python 3 at all, as far as I can tell. Because we have a
requirement to use at least python 3 (and not just 3.0 at that), we can
assume that the user must be using at least version 0.11 of ipython.
That means we can remove code which supported older versions.

Change-Id: I7f88aae9f64f6c6f027be52741cda0686f5ca5be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50709
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 20:45:07 +00:00
Gabe Black
95cee873ed python: Get rid of version arg in OptionParser constructor.
This will report that gem5 is version 2.0, which is WILDLY out of date.
There are other ways of reporting the version of gem5 which are actually
kept up to date.

Change-Id: Ie09cdc8f3ef59696fe197c3491db102bda41ade0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50708
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 20:45:07 +00:00
Gabe Black
011dc236d3 python: Get rid of some unused cruft in main.py.
There was some code at the end of main.py which would let you run it
directly. This would parse options passed to the script, and show you
what they equaled.

Also, the "main" function would optionally let you pass in options to
override whatever it would find with parse_arguments. This is no longer
used.

Change-Id: Ib0effa7ac2b4a51b68994372a7c7fcf1c9b4dc13
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50707
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 20:45:07 +00:00
Austin Harris
f42ce27065 sim: Fix hang while terminating threads with fork
It is possible that gem5 is forked multiple times before the threads are
re-created, so don't wait for the barrier if the threads were already
terminated.

Change-Id: Ia04db2f3b1341c4d432178a37812fd882e148ec2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50710
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 15:08:15 +00:00
Gabe Black
bec16fbc31 misc: Move MemPool based calls to the SEWorkload.
These currently proxy to the System object, but this is one step towards
moving the MemPool-s out of the System and into the SEWorkload where
they really should have been from the start.

Change-Id: Id27e7b874c283abf07bd892c8467a9cc52e2fdff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50342
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 02:05:32 +00:00
Gabe Black
9da405ce96 sim: Set up an SEWorkload pointer in the base Process class.
This will make it easier for the process object to access shared SE
level functionality and info.

Change-Id: I2cbddcabdf7264fde492b0566791d909ce2b10be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50341
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 02:04:57 +00:00
Gabe Black
a024c9f19e arch-arm: Modify the AAPCS32 ABI implementation to use VecElems.
Use the VecElem register file when using the 32 bit ARM ABI. This is not
only consistent with an upcoming change which will make the 64 bit
vector registers and the 32 bit vector elements no longer act as views
into the same data, it also simplifies the implementation a little.

Change-Id: Ie8f17b764402a6331012f13b7605520512c2d5c9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50207
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 01:33:34 +00:00
Gabe Black
4d398302c4 sim: Make the page shift a member of the MemPool class.
Pass it in through the constructor, rather than have the MemPool call
into the System object every time it needs the page shift. This is
simpler, more efficient, and removes a dependency between the MemPool
class and the System class.

Change-Id: I059bcb0db249251b32bff1beba3eadfe306d9081
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50339
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 01:07:26 +00:00
Gabe Black
6d9cbb9d6e sim: Exclude the m5opRange from the system mempools by construction.
Don't look for the m5opRange in the memory pools when allocating memory
so that it can be skipped, just exclude it from the memory pools
entirely when they are set up. This removes a dependence between the
memory pools and the system class.

Change-Id: I0d88c1bc2f889f32b234073cff8988319fb36ea5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50338
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 00:58:24 +00:00
Gabe Black
e7bf4db7bd sim: Squash a long standing warning from pybind11.
The module_ constructor which takes a module name and an optional
docstring is deprecated. This change replaces it with the
create_extension_module call that it would result in, which gets rid of
the warning.

Change-Id: I700b4afcf1e5e2548af18e2eb2a7b1214c989807
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50587
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 23:17:46 +00:00
Gabe Black
e9b7f08abb base,python: Expand AddrRange exclude and add subtraction operators.
Expand exclude to work with an AddrRange or AddrRangeList, define
versions to exclude both from an AddrRangeList, and make all available
through subtraction operators. Add -= operators for AddrRangeList with
another AddrRangeList or AddrRange.

Change-Id: Ic48f0c45a4809dbc51e1d3133e8319134aabe29e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50347
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-09-20 20:52:05 +00:00
Gabe Black
416939c5c2 misc: Use AddrRangeList more consistently in the AddrRange class.
We go through the trouble of defining an AddrRangeList typedef, but then
we don't use it consistently and use std::vector<AddrRange> instead.

This change converts the exclude method from using
std::vector<AddrRange> to AddrRangeList, and also adds a constructor
which takes an AddrRangeList.

Because there is a lot of code which uses the std::vector based
constructor, this change does not remove that method.

Change-Id: I1a03b25990025688aa760a67d3e7a2e8141384ce
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50344
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 20:50:30 +00:00
Gabe Black
0998e99131 python: Add a --silent-redirect option to gem5.
This complements the --redirect-stdout and --redirect-stderr options and
supresses the message about where those streams are being redirected
which print to the original stdout.

Usually this is very helpful since it lets you know where to look for
simulator output. If you're running gem5 in an automated environment
like our testing framework however, the file name is a random temp file
which will be deleted as soon as the test is finished running.

The --silent-redirect option can be used in these particular scenarios
to, for example, avoid lots and lots of useless lines in the test output
naming files that no longer exist.

Change-Id: If56b61567b3d98abd9cc9d9e9d661ea561be46f8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50588
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 19:19:59 +00:00
Bobby R. Bruce
b5ffa5418f python: Remove 'is_ruby' function
This function is not used and should not be used. It does not really
make any sense.

Change-Id: I79ee7283ddbc282b9b803df33ad266b7a88a9c67
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50168
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
958029328f python: Add has_dma_ports check to mesi_two_level
Previously the MesiTwoLevelCacheHierarchy assumed the board had dma
ports. This change adds a simple check and skips adding the
DMASequencers if the board does not have any.

Change-Id: I64ee68267d16c9d9a6096ba7fd660f04515b2b3c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49929
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
752394b243 python: Add connect_interrupt() to mesi_two_level for non-X86
The MESITwoLevelCacheHierarchy did not call `connect_interrupt()` on
CPUs if not ISA.X86. This patch fixes this.

Change-Id: I46ae19f588e2eadce60f145067e8a7cef0d44afd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49928
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
77b1338985 arch-riscv,configs,python: Update riscv_fs.py/riscv_board.py
This patch incoporates improvements to the riscv_fs.py and
riscv_board.py:

* Adds 'Resource' objects to download needed resources.
* Adds 'requires' function calls where necessary.

Change-Id: I2ae4f34221d781ed6d71c9f69d56833845f537c4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49867
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
e3d8af0f1a python: Rename 'components_library' to 'gem5.components'
The 'components_library' name was always a placeholder. A more accurate
name would be the 'gem5 library'. This is analogous to standard
libraries shipped as part of programming languages. Over time this will
begin to incorporate more commonly used code at the Python configuration
script level. Most of the former 'components_library' is now in
'gem5.components'.

Change-Id: I5927db7004c43b29c39e7767da3f779627081618
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49691
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 18:44:40 +00:00