gem5.git
4 years agoarch-gcn3, gpu-compute: Fix issue when reading const operands
Tony Gutierrez [Thu, 26 Jul 2018 21:28:39 +0000 (17:28 -0400)]
arch-gcn3, gpu-compute: Fix issue when reading const operands

Currently, when an instruction has an operand that reads a const
value, it goes thru the same readMiscReg() api call as other
misc registers (real HW registers, not constant values). There
is an issue, however, when casting from the const values (which are
32b) to higher precision values, like 64b.

This change creates a separate, templated function call to the GPU's
ISA state that will return the correct type.

Change-Id: I41965ebeeed20bb70e919fce5ad94d957b3af802
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29927
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: Updating implementation of atomics
Alexandru Dutu [Wed, 10 Apr 2019 15:34:37 +0000 (11:34 -0400)]
arch-gcn3: Updating implementation of atomics

This changeset is moving the access of the data operand
from initiateAcc to the execute method of atomic instructions.

Change-Id: I1debae302f0b13f79ed2b7a9ed2f6b07fcec5128
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29926
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev: add support for HSA's barrier bit kernel synchronization
Matt Sinclair [Thu, 24 May 2018 18:02:13 +0000 (14:02 -0400)]
dev: add support for HSA's barrier bit kernel synchronization

This commit adds support for the HSA's barrier bit version of
synchronization.  This method of synchronization is used for all
HIP benchmarks, and thus is necessary to ensure that multiple
kernels from the same queue are synchronizing properly.

Change-Id: I64f2d311a3970b71194e0555e2b932800df65e98
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29925
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase: Fix build errors with gcc 10.x
Sandipan Das [Fri, 12 Jun 2020 13:41:27 +0000 (19:11 +0530)]
base: Fix build errors with gcc 10.x

This fixes conditions that perform a redundant check to
see if an unsigned value is greater than or equal to
zero. With gcc 10.x, this generates the following error
because of implicit usage of the "-Werror=type-limits"
flag.

"comparison of unsigned expression in '>= 0' is always true"

Change-Id: Ib1a88035ef5fba410d18de0adf614db4bc634faf
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30474
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Use new InstRecord faulting flag in cpu models
Michiel W. van Tol [Wed, 10 Jun 2020 12:30:42 +0000 (13:30 +0100)]
cpu: Use new InstRecord faulting flag in cpu models

This patch sets the faulting flag in atomic, timing, minor and o3 CPU
models.

It also fixes the minor/timing CPU models which were not respecting the
ExecFaulting flag. This is now checked before calling dump() on the
tracing object, to bring it in line with the other CPU models.

Change-Id: I9c7b64cc5605596eb7fcf25fdecaeac5c4b5e3d7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30135
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Add faulting flag to instruction tracing interface
Michiel W. van Tol [Tue, 19 May 2020 17:41:11 +0000 (18:41 +0100)]
sim: Add faulting flag to instruction tracing interface

This patch adds a faulting flag to InstRecord.
This allows tracers to identify that the traced instruction has
faulted, when ExecFaulting is enabled. It can be set with
InstRecord::setFaulting() and read with Instrecord::getFaulting().

Change-Id: I390392d59de930533eab101e96dc4d3c76500748
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30134
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Add MARSHAL_XXFLAGS_EXTRA for the marshal object
Giacomo Travaglini [Thu, 4 Jun 2020 11:45:52 +0000 (12:45 +0100)]
scons: Add MARSHAL_XXFLAGS_EXTRA for the marshal object

We already provide to the user the CCFLAGS_EXTRA, LDFLAGS_EXTRA
variables to pass flags to scons when compiling/linking gem5.
Those variables are not passed to the marshal object.
We add an extra pair:

MARSHAL_CCFLAGS_EXTRA, MARSHAL_LDFLAGS_EXTRA

to add flag injection capabilities to the marshal object.

The patch is also renaming base_py_env to marshal_env.
This happens for 2 reasons:

1) At the moment the marshal compilation is the only task
making use of the base python environment.

2) Consistency with the EXTRA variable names added with this patch.
I could have named them as BASE_XXFLAGS_EXTRA, but it seems too much
generic and users might be confused by that, as they might think
the BASE_XXFLAGS_EXTRA is a subset of the XXFLAGS_EXTRA so that
setting it will affect gem5 compilation as well.

Change-Id: I3e420caa897059455ff8f35462db2b38da050e93
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30016
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarm: Teach gem5 to recognize the gem5 semihosting immediate values.
Gabe Black [Sat, 28 Mar 2020 00:28:26 +0000 (17:28 -0700)]
arm: Teach gem5 to recognize the gem5 semihosting immediate values.

These give access to the gem5 extension calls, currently only the pseudo
ops.

Change-Id: I60ece82f1f084791971a2de0b54be2f0d9da243e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27246
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
4 years agoutil: Add a semihosting implementation to the aarch64 m5 utility.
Gabe Black [Sat, 28 Mar 2020 00:27:30 +0000 (17:27 -0700)]
util: Add a semihosting implementation to the aarch64 m5 utility.

This will allow it to work on CPUs that only support semihosting like
ARM's fastmodels.

Change-Id: I74e536d79d0f77b864e1e4b9d73e265b6d0b1fcb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27245
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Allow overriding the magic address in the m5 utility.
Gabe Black [Fri, 27 Mar 2020 10:05:19 +0000 (03:05 -0700)]
util: Allow overriding the magic address in the m5 utility.

This is useful in situations where the address is hard to know ahead of
time, for instance on ARM systems where the address map is hard to
predict.

The default address is now M5OP_ADDR, or 0 if that's not defined.

Change-Id: I3140e05b04365c1a76e52f8c3dc85f472c230ae4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27244
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
4 years agomem-ruby: add cache hit/miss statistics for TCP and TCC
Kyle Roarty [Wed, 10 Jun 2020 22:20:44 +0000 (17:20 -0500)]
mem-ruby: add cache hit/miss statistics for TCP and TCC

Change-Id: Ifa6fdbb9dd062a3684b9620eac6683c57e651a72
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30174
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Maintainer: Bradford Beckmann <brad.beckmann@amd.com>

4 years agoarch-gcn3: Implement instruction v_div_fixup_f32
Xianwei Zhang [Thu, 24 May 2018 21:50:47 +0000 (17:50 -0400)]
arch-gcn3: Implement instruction v_div_fixup_f32

Instruction v_div_fixup_f32 was unimplemented. The
implementation was added by mimicking v_div_fixup_f64.

Change-Id: I9306b198f327e9fde3414aa1bb2bec20503b1efd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29924
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Xianwei Zhang <xianwei.zhang@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: Implement instruction v_div_fmas_f32
Xianwei Zhang [Thu, 24 May 2018 17:49:43 +0000 (13:49 -0400)]
arch-gcn3: Implement instruction v_div_fmas_f32

Instruction v_div_fmas_f32 was unimplemented. The
implementation was added by mimicking v_div_fmas_f64.

Change-Id: I262820a7a66877d140eb99b538715c3cae4d1860
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29923
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Xianwei Zhang <xianwei.zhang@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: fix bug with SDWA support
Matt Sinclair [Fri, 22 Jun 2018 06:42:39 +0000 (02:42 -0400)]
arch-gcn3: fix bug with SDWA support

Instructions that use the SDWA field need to use the extra SRC0
register associated with the SDWA instruction instead of the
"default" SRC0 register, since the default SRC0 register contains
the SDWA information when SDWA is being used.  This commit fixes
15de044c to take this into account.  Additionally, this commit
removes reads of the registers from the SDWA helper functions,
since they overwrite any changes made to the destination register.
Finally, this change modifies the instructions that use SDWA to
simplify the flow through the execute() functions.

Change-Id: I3bad83133808dfffc6a4c40bbd49c3d76599e669
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29922
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: remove deprecated hsail gpu_hello
Xianwei Zhang [Thu, 12 Jul 2018 20:50:37 +0000 (16:50 -0400)]
tests: remove deprecated hsail gpu_hello

Change-Id: I7e15075e7805af732e89c3269fdff9d65a144219
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29921
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Xianwei Zhang <xianwei.zhang@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: add support for unaligned accesses
Matt Sinclair [Wed, 7 Mar 2018 22:54:19 +0000 (17:54 -0500)]
arch-gcn3: add support for unaligned accesses

Previously, with HSAIL, we were guaranteed by the HSA specification
that the GPU will never issue unaligned accesses.  However, now
that we are directly running GCN this is no longer true.
Accordingly, this commit adds support for unaligned accesses.
Moreover, to reduce the replication of nearly identical
code for the different request types, I also added new helper
functions that are called by all the different memory request
producing instruction types in op_encodings.hh.

Adding support for unaligned instructions requires changing
the statusBitVector used to track the status of the memory
requests for each lane from a bit per lane to an int per lane.
This is necessary because an unaligned access may span multiple
cache lines.  In the worst case, each lane may span multiple
cache lines.  There are corresponding changes in the files that
use the statusBitVector.

Change-Id: I319bf2f0f644083e98ca546d2bfe68cf87a5f967
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29920
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: Implement instruction v_div_scale_f32
Xianwei Zhang [Fri, 4 May 2018 21:44:30 +0000 (17:44 -0400)]
arch-gcn3: Implement instruction v_div_scale_f32

Instruction v_div_scale_f32 was unimplemented, the
implementation was added by mimicking v_div_scale_f64.

Change-Id: I89cdfd02ab01b5936de0e9f6c41e7f3fc4f10ae1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29919
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Xianwei Zhang <xianwei.zhang@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfig: fix settings of kernel boundary sync flags
Xianwei Zhang [Thu, 28 Jun 2018 06:13:29 +0000 (02:13 -0400)]
config: fix settings of kernel boundary sync flags

Change-Id: I58a8edc5d324bdcaa84e3d715e2712a43e8ede0d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29918
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Xianwei Zhang <xianwei.zhang@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute: enable flexible control of kernel boundary syncs
Xianwei Zhang [Mon, 18 Jun 2018 17:50:11 +0000 (13:50 -0400)]
gpu-compute: enable flexible control of kernel boundary syncs

Kernel end release was turned on for VIPER protocol, which
is in fact write-through based and thus no need to have
release operation. This changeset splits the option
'impl_kern_boundary_sync' into 'impl_kern_launch_acq'
and 'impl_kern_end_rel', and turns off release on VIPER.

Change-Id: I5490019b6765a25bd801cc78fb7445b90eb02a3d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29917
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Xianwei Zhang <xianwei.zhang@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute: remove recvToken from GM pipe exec
Matthew Poremba [Thu, 14 Jun 2018 22:12:28 +0000 (15:12 -0700)]
gpu-compute: remove recvToken from GM pipe exec

Tokens were previously acquired in GM pipe exec but has been moved to
acqCoalescerToken. This removes the extraneous code which was acquiring
tokens twice, causing them to be depleted and triggering an assertion.

Change-Id: Ic92de8f06cc85828b29c69790bdadde057ef1777
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29916
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Add DMA support to MOESI_AMD_Base-dir.sm
Tony Gutierrez [Thu, 7 Jun 2018 18:06:22 +0000 (14:06 -0400)]
mem-ruby: Add DMA support to MOESI_AMD_Base-dir.sm

This change adds DMA support to the MOESI_AMD_Base-dir.sm,
which is needed to support ROCm apps/GCN3 ISA in the VIPER
ptl. The DMA controller is copied from the MOESI_hammer-dma.sm
with few modifications.

Change-Id: I56141436eee1c8f62c2a0915fa3b63b83bbcbc9a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29914
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: GCN3 and VIPER integration
Tuan Ta [Fri, 4 May 2018 16:14:13 +0000 (12:14 -0400)]
mem-ruby: GCN3 and VIPER integration

This patch modifies the Coalescer and VIPER protocol to support memory
synchronization requests and write-completion responses that are
required by upcoming GCN3 implementation.

VIPER protocol is simplified to be a solely write-through protocol.

Change-Id: Iccfa3d749a0301172a1cc567c59609bb548dace6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29913
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Bradford Beckmann <brad.beckmann@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Initialize stackSize and stackMin in MemState
Matthew Poremba [Wed, 17 Jun 2020 23:06:23 +0000 (18:06 -0500)]
sim: Initialize stackSize and stackMin in MemState

Initialize _stackSize and _stackMin to the maximum stack size values.
The are setup in each arch's Process::initState and may be uninitialized
until then. If a stack fixup occurs before these are setup, addresses
which are not in the stack might be allocated on the stack. This
prevents that until they are initialized in Process::initState. If an
access occurs before that with these initial values, the stack fixup
will simply allocate a page of memory in the stack space. However, it
will not print the typical info messages about growing the stack during
this time.

Change-Id: I9f9316734f4bf1f773fc538922e83b867731c684
JIRA: https://gem5.atlassian.net/browse/GEM5-629
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30394
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Add missing isFirstMicroop flags on uop sequences
Michiel W. van Tol [Thu, 4 Jun 2020 15:05:16 +0000 (16:05 +0100)]
arch-arm: Add missing isFirstMicroop flags on uop sequences

Certain micro-op sequences were only setting isLastMicroop flags,
and did not set the isFirstMicroop flag. This adds the missing
setFirstMicroop() calls. This fixes tracing issues (e.g. Tarmac)
of certain micro-opped instruction sequences such as LD1.

Change-Id: I7de3ee2759e2b4e1065a7cbac4186f11227d84be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30034
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Remove default argument values for the update() method in bpreds.
Gabe Black [Wed, 17 Jun 2020 00:47:23 +0000 (17:47 -0700)]
cpu: Remove default argument values for the update() method in bpreds.

These defaults are never used. There was an assert in the predictors
until recently which was asserting that one of the arguments didn't
have the default value, I think to verify that the default wasn't used
by accident(?), but it could be used purposefully. That would cause
gem5 to crash and has been removed.

Beyond that, there's no reason to have default values for those
arguments in the first place, so this change removes them. That makes
the code slightly simpler, and avoids them being used by accident.

Additionally, the defalt values of the arguments made the function
signatures inconsistent, even though they were supposed to override
each other.

JIRA: https://gem5.atlassian.net/browse/GEM5-483

Change-Id: I28f8d2048985c12ec9cac018a868a32bfa20dc6c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30375
Reviewed-by: Hsuan Hsu <hsuan.hsu@mediatek.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoext: Remove dead code from runner.py
Giacomo Travaglini [Thu, 11 Jun 2020 12:57:35 +0000 (13:57 +0100)]
ext: Remove dead code from runner.py

This has been tested with vulture:
https://pypi.org/project/vulture

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: Ic851c3681a40b7e61ee53b81b17df52dc1289e9f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30240
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Remove dead code from handlers.py
Giacomo Travaglini [Thu, 11 Jun 2020 12:54:15 +0000 (13:54 +0100)]
ext: Remove dead code from handlers.py

This has been tested with vulture:
https://pypi.org/project/vulture

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: If878ea1900e2bcd76646b9860f2cc3f808bc5082
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30239
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Remove dead code from fixture.py
Giacomo Travaglini [Thu, 11 Jun 2020 12:51:11 +0000 (13:51 +0100)]
ext: Remove dead code from fixture.py

This has been tested with vulture:
https://pypi.org/project/vulture

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: Ifa55a846ba22a84a0f684ffbf870506af7c1045c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30238
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Remove dead code from loader.py
Giacomo Travaglini [Thu, 11 Jun 2020 12:43:43 +0000 (13:43 +0100)]
ext: Remove dead code from loader.py

This has been tested with vulture:
https://pypi.org/project/vulture

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: I4193eff3ea4194f793547767a47c3ac5a64813fd
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30236
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Remove dead code from helper.py
Giacomo Travaglini [Thu, 11 Jun 2020 12:33:11 +0000 (13:33 +0100)]
ext: Remove dead code from helper.py

This has been tested with vulture:
https://pypi.org/project/vulture/

Change-Id: I32aad410145dd142bba8e0b9ab912e9c2bad6001
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30235
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoext: Remove dead code from test_util.py
Giacomo Travaglini [Thu, 11 Jun 2020 12:21:22 +0000 (13:21 +0100)]
ext: Remove dead code from test_util.py

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: I722185e890e25ad04271b476c4d1ffa722cade62
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30216
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Remove LogWrapper/TestLogWrapper from log.py
Giacomo Travaglini [Thu, 11 Jun 2020 11:45:27 +0000 (12:45 +0100)]
ext: Remove LogWrapper/TestLogWrapper from log.py

This patch is removing:

* LogWrapper (wrapping Log)
* TestLogWrapper (wrapping LogWrapper)

There is now a single Log class to be used for logging

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: I038298565e2ccbe448664a538f888c96fdce8f4a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30234
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Fix the MakeFixture setup
Giacomo Travaglini [Thu, 11 Jun 2020 10:26:32 +0000 (11:26 +0100)]
ext: Fix the MakeFixture setup

It was simply using an invalid log_call helper

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: I644b1c902a81a27beb6385690d2e43baf4c0919b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30218
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Avoid specifying empty interfaces and embrace duck typing
Giacomo Travaglini [Wed, 10 Jun 2020 17:52:04 +0000 (18:52 +0100)]
ext: Avoid specifying empty interfaces and embrace duck typing

It turns out no handler is implementing

prehandle()
posthandle()

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: Ie8d92027f29fc33192fcf0d495fd3c4f6e4075aa
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30217
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agoext: Remove sandbox module from testlib
Giacomo Travaglini [Fri, 15 May 2020 08:38:03 +0000 (09:38 +0100)]
ext: Remove sandbox module from testlib

The sandbox module is providing a sandbox environment for
a specific TestCase via the multiprocessing package.

This isolation/complexity is not strictly needed as testlib is already
forking a new process via subprocess. As it is now, a TestRunner will
generate:

TestRunner -> multiprocessing.Process -> subprocess.Popen
(2 generated procs)

With this patch we are removing the intermediate layer

TestRunner -> subprocess.Popen
(1 generated proc)

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: Icd5cadbe316653a9269ab098ec4c07f21b864ad3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30215
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agotests: log_call is not returning any value
Giacomo Travaglini [Fri, 15 May 2020 09:31:51 +0000 (10:31 +0100)]
tests: log_call is not returning any value

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: I2713ddacc762d614e3992718ea234287d06c179a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30214
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agomem: fixupAddr should not panic if it fails.
Gabe Black [Wed, 17 Jun 2020 01:42:48 +0000 (18:42 -0700)]
mem: fixupAddr should not panic if it fails.

This function should just return false in that case, and its callers
should figure out what to do. Otherwise, when calling tryReadBlob in SE
mode, a failure to read the blob makes gem5 panic instead of just
returning false.

Change-Id: I74b9cb98f595c52300d683842ece68c6031d9b85
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30376
Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,cpu,sim: Eliminate the now empty kernel statistics classes.
Gabe Black [Fri, 7 Feb 2020 01:34:41 +0000 (17:34 -0800)]
arch,cpu,sim: Eliminate the now empty kernel statistics classes.

This includes the base and ISA specific Kernel::Statistics classes, the
plumbing through ThreadContext to access them, and the switching
header file associated with them.

Change-Id: Ia511a59325b629aa9ccc0e695ddd47ff11916499
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25149
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,kern,sim: Move the stats in Kernel::Statistics to Workload.
Gabe Black [Fri, 7 Feb 2020 00:22:30 +0000 (16:22 -0800)]
arch,kern,sim: Move the stats in Kernel::Statistics to Workload.

These are the stats in the base class, not in any derived classes. Only
Alpha has an additional stats. These were not really "kernel"
statistics, they were just applicable primarily in FS. They are
potentially applicable to any simulation, but will probably not be
incremented in SE simulations.

Also this merges these stats from being per thread to being per
workload, ie operating system instance. This is probably more relevant
since exactly what thread within a workload runs which particular
instruction is not very important/predictable, but the aggregate
behavior is. If necessary, this could be adjusted in the future to
split things back out again into stats per thread while keeping them
inside the single workload object.

Change-Id: I130e11a9022bdfcadcfb02c7995871503114cd53
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25147
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch, gpu-compute: Remove HSAIL related files
Tony Gutierrez [Tue, 1 May 2018 21:34:29 +0000 (17:34 -0400)]
arch, gpu-compute: Remove HSAIL related files

Change-Id: Iefba0a38d62da7598bbfe3fe6ff46454d35144b1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28410
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Use the new unbound port reporting mechanism in the mem ports.
Gabe Black [Sat, 13 Jun 2020 04:33:51 +0000 (21:33 -0700)]
mem: Use the new unbound port reporting mechanism in the mem ports.

There was an add-hoc check added to getAddrRanges, but the other methods
would just segfault if they tried to talk to their peers. This change
wraps all the calls in try blocks and catches the exception which the
peer will throw if it's the default and the port is not actually
connected to anything.

Change-Id: Ie46be0230f33f74305c599b251ca319a65ba008d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30296
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Fix latency handling in MemDelay
Nikos Nikoleris [Wed, 13 May 2020 14:44:35 +0000 (15:44 +0100)]
mem: Fix latency handling in MemDelay

MemDelay wouldn't consume pre-existing delays in the packet and
therefore the latency it adds would overlap with them. This patch
fixes the MemDelay to properly account for them.

Change-Id: I7330fbf1c8161a21523a0b4aab31c72e34bce650
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30055
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Add some helpers to catch and reporting using unbound ports.
Gabe Black [Sat, 13 Jun 2020 04:28:12 +0000 (21:28 -0700)]
sim: Add some helpers to catch and reporting using unbound ports.

If a port is unbound, trying to call its peer will likely cause a
segfault. Rather than check if a port is bound every time you go to use
it, we can instead bind to a default peer which just throws an exception
back to the caller. The caller can catch the exception and report the
error.

This change adds a common new class to throw as the exception, and also
a small utility function which reports the error and dies.

Change-Id: Ia58a2030922c73e2fd7d139822bce38d9b0f2171
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30295
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarm: Add missing overrides to the ARM interrupt object.
Gabe Black [Sat, 13 Jun 2020 04:09:46 +0000 (21:09 -0700)]
arm: Add missing overrides to the ARM interrupt object.

Change-Id: Idddc5267d5eb287a0895a1a2e1631ca9a2e789f3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30294
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute, mem-ruby, configs: Add GCN3 ISA support to GPU model
Tony Gutierrez [Tue, 1 May 2018 20:59:35 +0000 (16:59 -0400)]
gpu-compute, mem-ruby, configs: Add GCN3 ISA support to GPU model

Change-Id: Ibe46970f3ba25d62ca2ade5cbc2054ad746b2254
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29912
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase: Delete deletePointer helpers
Daniel R. Carvalho [Wed, 8 Jan 2020 22:31:06 +0000 (23:31 +0100)]
base: Delete deletePointer helpers

Now that the calls to deletePointer have been replaced by the use
of smart pointers, they can be safely removed.

Change-Id: I91d8b97f7ba3f64dd9948fd343cf0af969886598
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24251
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Add a header latency parameter to the XBar
Nikos Nikoleris [Thu, 14 May 2020 10:10:07 +0000 (11:10 +0100)]
mem: Add a header latency parameter to the XBar

The XBar uses the concept of Layers to model throughput and
instantiates one Layer per master. As it forwards a packet to and from
master, the corresponding Layer is marked as occupied for a number of
cycles. Requests/responses to/from a master are blocked while the
corresponding Layer is occupied. Previously the delay would be
calculated based on the formula 1 + size / width, which assumes that
the Layer is always occupied for 1 cycle while processing the packet
header. This changes makes the header latency a parameter which
defaults to 1.

Change-Id: I12752ab4415617a94fbd8379bcd2ae8982f91fd8
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30054
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Use default None argument in makeArmSystem
Giacomo Travaglini [Fri, 12 Jun 2020 14:48:38 +0000 (15:48 +0100)]
tests: Use default None argument in makeArmSystem

JIRA: https://gem5.atlassian.net/browse/GEM5-387

Change-Id: I18b1ed360b2d285e4df19b896e692356ef6f8819
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30219
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
4 years agoscons: Fix how partial linking is disabled.
Gabe Black [Tue, 19 May 2020 00:20:14 +0000 (17:20 -0700)]
scons: Fix how partial linking is disabled.

Setting disable_partial part way through the checks for various build
targets is incorrect and will affect targets based on the order they're
checked.

This change moves the check earlier, makes it consistent across all
builds whether fast is included or not, and stops passing it in as an
option to makeEnv since it now applies universally.

By disabling partial linking consistently, we avoid missing bugs where
only the "fast" version of gem5 doesn't build correctly because of the
multitude of g++ bugs having to do with combining LTO and partial
linking.

This also simplifies the logic in the SConscript by having fewer
independently moving parts.

Change-Id: Iff69f39868e948d3b9a5b11ea80bbfed19419b59
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29303
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
4 years agomem-ruby: Add a missing override.
Gabe Black [Fri, 12 Jun 2020 00:41:51 +0000 (17:41 -0700)]
mem-ruby: Add a missing override.

Change-Id: I7651ca0f4658ddd49cfd13d9d5f7e430f416f41f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30254
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,cpu: Add a setThreadContext method to the ISA class.
Gabe Black [Mon, 18 May 2020 08:59:40 +0000 (01:59 -0700)]
arch,cpu: Add a setThreadContext method to the ISA class.

Also remove ThreadContext pointer parameters to some of the methods in
the ISA classes.

Change-Id: I8e502b1857d299cb2e759a9734a1df4f65f31efe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29233
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,cpu: Change setCPU to setThreadContext in Interrupts.
Gabe Black [Tue, 12 May 2020 20:09:23 +0000 (13:09 -0700)]
arch,cpu: Change setCPU to setThreadContext in Interrupts.

The ThreadContext can be used to access the cpu if needed, and is a
more representative interface to various pieces of state than the CPU
itself. Also convert some of the methods in Interupts to use the
locally stored ThreadContext pointer instead of taking one as an
argument. This makes calling those methods simpler and less error
prone.

Change-Id: I740bd99f92e54e052a618a4ae2927ea1c4ece193
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28988
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim-se: Ignore unimplemented system call
Kyle Roarty [Fri, 24 May 2019 18:34:17 +0000 (13:34 -0500)]
sim-se: Ignore unimplemented system call

System call sched_setaffinity causes crashes when running programs
that use ROCm. Ignoring the system call allows for the programs
to run to completion.

Change-Id: I27c767ef81091789e228d47f2bb5f6fa18f11539
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30154
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Delete an unused member in the System class.
Gabe Black [Thu, 6 Feb 2020 03:40:26 +0000 (19:40 -0800)]
sim: Delete an unused member in the System class.

This was supposed to be deleted as part of the change titled:
arch,cpu,dev,sim,mem: Collect System thread elements into a subclass.

but it was left out of the checked in version somehow.

Change-Id: I0dbb0b4fa6ae29649a80d1cb883e48ad50116c31
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30194
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Reverted version information to "develop"
Bobby R. Bruce [Tue, 2 Jun 2020 09:17:29 +0000 (02:17 -0700)]
misc: Reverted version information to "develop"

Change-Id: I6ee1bae48f2dd0d868dfbb428e93deeb9ee93083
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29833
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,cpu,dev,sim,mem: Collect System thread elements into a subclass.
Gabe Black [Thu, 6 Feb 2020 03:40:26 +0000 (19:40 -0800)]
arch,cpu,dev,sim,mem: Collect System thread elements into a subclass.

The System class has a few different arrays of values which each
correspond to a thread of execution based on their position. This
change collects them together into a single class to make managing them
easier and less error prone. It also collects methods for manipulating
those threads as an API for that class.

This class acts as a collection point for thread based state which the
System class can look into to get at all its state. It also acts as an
interface for interacting with threads for other classes. This forces
external consumers to use the API instead of accessing the individual
arrays which improves consistency.

Change-Id: Idc4575c5a0b56fe75f5c497809ad91c22bfe26cc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25144
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,base,cpu,kerm,sim: Build a symbol table for object files.
Gabe Black [Wed, 22 Jan 2020 03:30:43 +0000 (19:30 -0800)]
arch,base,cpu,kerm,sim: Build a symbol table for object files.

Instead of calling into object files after the fact and asking them to
put symbols into a target symbol table, this change makes object files
fill in a symbol table themselves at construction. Then, that table can
be retrieved and used to fill in aggregate tables, masked, moved,
and/or filtered to have only one type of symbol binding.

This simplifies the symbol management API of the object file types
significantly, and makes it easier to deal with symbol tables alongside
binaries in the FS workload classes.

Change-Id: Ic9006ca432033d72589867c93d9c5f8a1d87f73c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24787
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Add codes for pure virtual functions for compilation
Xianwei Zhang [Tue, 1 May 2018 19:55:52 +0000 (15:55 -0400)]
mem-ruby: Add codes for pure virtual functions for compilation

Change-Id: Ic34f9ccf10ec28d68eed236dc6246e2ae2ef1b89
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28409
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

4 years agomem-ruby: update memory interfaces to support GPU ISA
Tuan Ta [Tue, 1 May 2018 15:43:16 +0000 (11:43 -0400)]
mem-ruby: update memory interfaces to support GPU ISA

This patch deprecates HSA-based memory request types and adds new
types that can be used by real ISA instructions.

Change-Id: Ie107a69d8a35e9de0853f1407392ad01a8b3e930
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28408
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Default the SE translating port proxy alloc method to NextPage.
Gabe Black [Mon, 11 May 2020 14:24:25 +0000 (07:24 -0700)]
mem: Default the SE translating port proxy alloc method to NextPage.

This is what's used in 99% of cases, so it makes sense to make it the
default.

Change-Id: I51535b3387d1c1a0d1d89e77cfca10363388b472
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29399
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Merge hotfix v20.0.0.2 into develop
Bobby R. Bruce [Mon, 8 Jun 2020 22:27:51 +0000 (15:27 -0700)]
misc: Merge hotfix v20.0.0.2 into develop

Change-Id: Ia0ed6bfb70e2ebcb22274569556d690e315702bd

4 years agomisc: Updated release notes and version number v20.0.0.2
Bobby R. Bruce [Mon, 8 Jun 2020 22:21:35 +0000 (15:21 -0700)]
misc: Updated release notes and version number

Change-Id: Ib8583c23f47010222c08ff5aa9cffb842235c784

4 years agomem-ruby: Allow MachineID to be unordered key
Matthew Poremba [Tue, 28 Apr 2020 23:12:23 +0000 (16:12 -0700)]
mem-ruby: Allow MachineID to be unordered key

Define an std::hash function so that MachineID may be used as a key
type for unordered STL containers.

Change-Id: Ibc3bc78149c69683207d8967542fa6e8d545f75c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29652
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Remove any reference to the ALPHA ISA
Giacomo Travaglini [Thu, 4 Jun 2020 09:34:41 +0000 (10:34 +0100)]
misc: Remove any reference to the ALPHA ISA

Change-Id: Ie761cd69ae0e8e632ca2b92e63a404e8804f0e6f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30015
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Fix Prefetcher to RubyPrefetcher in StateMachine.
seanzw [Thu, 4 Jun 2020 02:59:50 +0000 (19:59 -0700)]
mem-ruby: Fix Prefetcher to RubyPrefetcher in StateMachine.

After renaming Prefetcher to RubyPrefetcher, the slicc generator
should be updated to correctly initialize the prefetcher with
the controller.

Change-Id: Ia12a4640c35aaedd70a4a14e5a10793b060ba924
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29974
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-cache: prevent prefetcher from saturating the write buffer
Tommaso Marinelli [Sat, 30 May 2020 04:45:15 +0000 (06:45 +0200)]
mem-cache: prevent prefetcher from saturating the write buffer

When the write buffer is full, it still has space to store an additional
number of entries (reserve) equal to the number of MSHRs so that if any
of them requires a writeback this can be handled. Even if the slave port
is blocked, a prefetcher can generate new MSHR entries that may lead to
additional writebacks and eventually saturate the reserve space. This is
solved by checking if the cache is blocked for accesses before
prefetching data.

Change-Id: Iaad04dd6786a09eab7afae4a53d1b1299c341f33
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29615
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Replace include of eventq_impl.hh with eventq.hh.
Gabe Black [Thu, 4 Jun 2020 14:53:45 +0000 (07:53 -0700)]
systemc: Replace include of eventq_impl.hh with eventq.hh.

eventq_impl.hh has been merged back into eventq.hh, but that change
passed another change which started using eventq_impl.hh in systemc.

Change-Id: I2e9be5f993fe6a6712a121cd955b0c56a33c87e3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30014
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim,mem,dev: Merge eventq_impl.hh into eventq.hh.
Gabe Black [Mon, 25 May 2020 12:18:10 +0000 (05:18 -0700)]
sim,mem,dev: Merge eventq_impl.hh into eventq.hh.

Having some methods (which are supposed to be inline) defined in another
file which is only included sometimes creates a lot of opportunities for
errors. They no longer need to be separate, so merge them together.

Change-Id: I5846e55f53f59b9c2081680a6441659265a765f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29409
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase,sim: Move DTRACE into base/debug.hh.
Gabe Black [Mon, 25 May 2020 23:24:42 +0000 (16:24 -0700)]
base,sim: Move DTRACE into base/debug.hh.

All other considerations aside, DTRACE probably fits best in trace.hh
where it is now, but unfortunately that creates an awkward dependence
between that file and eventq.hh and eventq_impl.hh. DTRACE only depends
on flags in the Debug namespace and a universal macro TRACING_ON, so
even though it won't be alongside the things it's most logically
associated with, it will be alongside all of its dependencies.

An alternative would be to re-implement DTRACE in eventq_impl.hh which
wouldn't be too big of a problem because it's so simple, but it's
cleaner and less error prone to still keep a single definition.

Because base/trace.hh includes base/debug.hh, any consumers expecting to
find DTRACE in base/trace.hh will still get that definition, even though
it's no longer direct.

Change-Id: I0dac83295891630686c3a8038eb54138cf40ab44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29411
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
4 years agomisc: Make many includes explicit.
Gabe Black [Mon, 25 May 2020 11:35:10 +0000 (04:35 -0700)]
misc: Make many includes explicit.

A future change will adjust how some includes can be included
transitively. This change fixes up those files so that they include the
headers they need directly, instead of expecting to have them by
accident through other files.

Change-Id: I1f79aa11df2b46bb7018f39c964294c41db4fdac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29407
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@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>
4 years agocpu-o3: fix IQ missing mem barriers
Tiago Mück [Fri, 29 May 2020 02:36:40 +0000 (21:36 -0500)]
cpu-o3: fix IQ missing mem barriers

After commit e2a5063e5f18f902833c84894b0ff103e3371493 some
memory references now tracked as barriers were not having
their completion properly notified to the MemDepUnit.

This patch fixes InstructionQueue and changes MemDepUnit's
completeBarrier to completeInst, which now should be called
for both memory references and barrier instructions.

Change-Id: I28b5f112b45778f6272e71bb3766b364c3d2e7db
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29654
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Merge branch version update into develop
Bobby R. Bruce [Tue, 2 Jun 2020 07:20:23 +0000 (00:20 -0700)]
misc: Merge branch version update into develop

4 years agomisc: Updated release notes and version to v20.0.0.1 v20.0.0.1
Bobby R. Bruce [Tue, 2 Jun 2020 07:16:28 +0000 (00:16 -0700)]
misc: Updated release notes and version to v20.0.0.1

4 years agomisc: Merge in 'hotfix-m5-tick-rounding-error'
Bobby R. Bruce [Tue, 2 Jun 2020 05:46:51 +0000 (22:46 -0700)]
misc: Merge in 'hotfix-m5-tick-rounding-error'

4 years agopython: Fix m5's tick rounding mechanism
Hoa Nguyen [Fri, 29 May 2020 00:20:06 +0000 (17:20 -0700)]
python: Fix m5's tick rounding mechanism

Partially reverts:
https://gem5-review.googlesource.com/c/public/gem5/+/29372 where the
`math.ceil` function was used to fix an issue where 0.5 was rounded to
zero in python3. This has the side effect of giving incorrect clock
frequences due to rounding errors. To demonstrate:

```
>>> import math
>>> 1e-9*1000000000000
1000.0000000000001
>>> int(math.ceil(1e-9*1000000000000))
1001
```

The solution to this problem is to use Python's `decimal` module to
round values.

Issue-on: https://gem5.atlassian.net/browse/GEM5-616
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: Ic76736ccb4b6b8c037103a34493aff7d9731d314
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29577
Reviewed-by: Tiago Mück <tiago.muck@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Fix for Invalid transition in MOESI_CMP_directory
adarshpatil [Wed, 27 May 2020 20:43:08 +0000 (21:43 +0100)]
mem-ruby: Fix for Invalid transition in MOESI_CMP_directory

Send the correct sharer count from the memory directory to the requesting
L2 cache in data message reply.

Jira issue: https://gem5.atlassian.net/browse/GEM5-613

Change-Id: If76de630fd0001816e8836d9bf77961a94faaa7c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29552
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
Reviewed-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Generate address with masking cacheline bits
Onur Kayiran [Mon, 30 Apr 2018 21:56:27 +0000 (17:56 -0400)]
mem-ruby: Generate address with masking cacheline bits

makeLineAddress function uses m_block_size_bits to create
masked addresses. m_block_size_bits is used to specify
cache, directory, and memory controller interleaving,
and it can be larger than the cache line size.
To generate addresses that can align with the cache line
rather than the interleaving granularity, a version of
makeLineAddress is created to specify bits that need to
be masked.

Change-Id: I06deec4949da7fa46f1d6f7575334f18ee61c786
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28135
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Onur Kayıran <onur.kayiran@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

4 years agoconfigs: Specify cache, dir, and mem cntrl interleaving
Onur Kayiran [Mon, 30 Apr 2018 21:45:16 +0000 (17:45 -0400)]
configs: Specify cache, dir, and mem cntrl interleaving

This changeset allows setting a variable for interleaving.
That value is used together with the number of directories to
calculate numa_high_bit, which is in turn used to set up
cache, directory, and memory controller interleaving.
A similar approach is used to set xor_low_bit, and calculate
xor_high_bit for address hashing.

Change-Id: Ia342c77c59ca2e3438db218b5c399c3373618320
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28134
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: add function to check for stalled msgs of addr
Tuan Ta [Mon, 30 Apr 2018 19:42:47 +0000 (15:42 -0400)]
mem-ruby: add function to check for stalled msgs of addr

This patch allows a cache controller to check if there
is any stalled message of a specific address in the
stall_map of an input message buffer.

Change-Id: Id2f9bb98a9201a562f2a8cc371e9bb896ac836af
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28133
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: add slicc stm to defer enqueueing a message
Tuan Ta [Mon, 30 Apr 2018 18:35:39 +0000 (14:35 -0400)]
mem-ruby: add slicc stm to defer enqueueing a message

This patch enables cache controllers to make response
messages in advance, store them in a per-address saved
map in an output message buffer and enqueue them altogether
in the future. This patch introduces new slicc statement
called defer_enqueueing. This patch would help simplify
the logic of state machines that deal with coalesing
multiple requests from different requestors.

Change-Id: I566d4004498b367764238bb251260483c5a1a5e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28132
Reviewed-by: Tuan Ta <qtt2@cornell.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoMerge branch 'release-staging-v20.0.0.0' into develop
Bobby R. Bruce [Thu, 28 May 2020 22:52:09 +0000 (15:52 -0700)]
Merge branch 'release-staging-v20.0.0.0' into develop

4 years agosystem: Remove CNTFRQ_EL0 write from arm64 boot v20.0.0.0
Giacomo Travaglini [Tue, 26 May 2020 09:17:19 +0000 (10:17 +0100)]
system: Remove CNTFRQ_EL0 write from arm64 boot

We don't need this anymore since this is initialized at gem5
construction.

JIRA: https://gem5.atlassian.net/browse/GEM5-611

Change-Id: I42a3d53a4defba498a23d9a7c192dfff5852c1c7
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29613
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: Bobby R. Bruce <bbruce@ucdavis.edu>
4 years agodev-arm: Make CNTFRQ a GenericTimer parameter
Giacomo Travaglini [Tue, 26 May 2020 09:45:36 +0000 (10:45 +0100)]
dev-arm: Make CNTFRQ a GenericTimer parameter

This register should be in theory initialized by the highest
priviledged software. We do this in gem5 to avoid KVM
complications (the gem5 firmware won't run at highest EL)

JIRA: https://gem5.atlassian.net/browse/GEM5-611

Change-Id: I62d368105af48584f2fe9671de7c70b484b40c12
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29612
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: Bobby R. Bruce <bbruce@ucdavis.edu>
4 years agomisc: Merge branch 'release-staging-v20.0.0.0' into develop
Bobby R. Bruce [Thu, 28 May 2020 08:04:16 +0000 (01:04 -0700)]
misc: Merge branch 'release-staging-v20.0.0.0' into develop

4 years agomisc: Update release notes
Jason Lowe-Power [Thu, 14 May 2020 00:32:34 +0000 (17:32 -0700)]
misc: Update release notes

Change-Id: I3851a3780aae283d4dba5ab5afa20a4a02bc8e6d
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29067
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Fixed null-pointer arithmetic error
Bobby R. Bruce [Wed, 27 May 2020 10:46:07 +0000 (03:46 -0700)]
misc: Fixed null-pointer arithmetic error

Doing arithmetic on a null pointer is undefined behavior in C/C++. Clang
compilers complain when this occurs. As this MACRO is used twice, and
does nothing important, it has been removed in favor of a more simple
solution. A comment has been added explaining the MACRO's removal.

Change-Id: I42d9356179ee0fa5cb20f827af34bb11780ad1a9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29534
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute,misc: Removed unused 'vaddr' capture
Bobby R. Bruce [Wed, 27 May 2020 10:36:31 +0000 (03:36 -0700)]
gpu-compute,misc: Removed unused 'vaddr' capture

Clang compilers return a `error: lambda capture 'vaddr' is not used`
error when compiling HSAIL_X86/gem5.opt. This unused lambda capture has
therefore been removed.

Change-Id: I2a7c58174a9ef83435099ab4daf84c762f017dd4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29533
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

4 years agomem-ruby,misc: Fixed clang template def error
Bobby R. Bruce [Wed, 27 May 2020 10:16:06 +0000 (03:16 -0700)]
mem-ruby,misc: Fixed clang template def error

Without this fix `error: call to function 'operator<<' that is neither
visible in the template definition nor found by argument-dependent
loopup` is thrown  when compiling HSAIL_X86 using a clang compiler (at
`base/cprintf_formats.hhi:139`).

This error is due to a "<<" operator in a template declared prior to its
definition in the code. The operator is used in
`base/cprintf_formats.hh`, included in `base/cprintf.hh`, and defined in
`mem/ruby/common/BoolVec.hh`. Therefore, for clang to compile without
error, `mem/ruby/common/BoolVec.hh` must be included before
`base/cprintf.hh` when generating the
`mem/ruby/protocol/RegionBuffer_Controller.cc` in
`mem/slicc/symbols/StateMachine.py`.

Due to the gem5 style-checker, an overly-verbose solution was required
to permit this patch to be committed to the codebase.

Change-Id: Ie0ae4053e4adc8c4e918e4a714035637925ca104
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29532
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

4 years agopython,test: Fixed boot test in python3 by removing map
Bobby R. Bruce [Tue, 26 May 2020 22:42:37 +0000 (15:42 -0700)]
python,test: Fixed boot test in python3 by removing map

In Python3 `map(lambda c: c.createThreads(), self.cpu)` does not
execute `c.createThreads()`. This has been replaced with a for-loop
which does work. Without this fix, the boot tests do not run in python3.

Change-Id: I50d6c85ec4435ee04e248ea8bc4a3b4cc17c88fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29456
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

4 years agoscons: "no-defautled-function-deleted" flag moved to only clang8+
Bobby R. Bruce [Tue, 26 May 2020 22:11:59 +0000 (15:11 -0700)]
scons: "no-defautled-function-deleted" flag moved to only clang8+

It has been onserved that clang does not function with the
"-Wno-defaulted-function-deleted" for versions below clang8.

Change-Id: I6e6d1476350ae2b46b4de971fe3456697b39e43c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29454
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm,misc: Add M5_CLASS_VAR_USED to faultTick
Bobby R. Bruce [Mon, 25 May 2020 21:28:55 +0000 (14:28 -0700)]
arch-arm,misc: Add M5_CLASS_VAR_USED to faultTick

Clang compilers returned an error that faultTick was unused. Adding
M5_CLASS_VAR_USED resolves this.

Change-Id: I97657b45997d2f1c7416b973cd9c02ae2d92b725
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29453
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby,mem-garnet: Multiple networks per RubySystem
Matthew Poremba [Fri, 17 Apr 2020 14:41:06 +0000 (09:41 -0500)]
mem-ruby,mem-garnet: Multiple networks per RubySystem

Add support for multiple networks per RubySystem. This is done by
introducing local IDs to each network and translating from a global ID
passed around through Ruby and SLICC code. The local IDs represents the
NodeID of a MachineType in the network and are ordered the same way
that NodeIDs are ordered using MachineType_base_number. If there are
not multiple networks in a RubySystem the local and global IDs are the
same value.

This is useful in cases where multiple isolated networks are needed to
support devices with Ruby caches which do not interact with other
networks. For example, a dGPU device will have a cache hierarchy that
will not interact with the CPU cache hierachy.

Change-Id: I33a917b3a394eec84b16fbf001c3c2c44c047f66
JIRA: https://gem5.atlassian.net/browse/GEM5-445
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27927
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Maintainer: Bradford Beckmann <brad.beckmann@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Fix util/gem5img.py for new versions of sfdisk
Richard Cooper [Mon, 27 Apr 2020 10:16:24 +0000 (11:16 +0100)]
misc: Fix util/gem5img.py for new versions of sfdisk

Newer versions of sfdisk have changed the format of the dump output,
as well as the options for partitioning a disk.

Updated the gem5img.py script to work with the new version of sfdisk.
The script should still work with older versions of sfdisk, but this
has not been tested (see https://askubuntu.com/a/819614).

Tested on Ubuntu 18.04.2 LTS with sfdisk from util-linux 2.31.1.

Change-Id: I1197ecacabdd7caaab00327977fb9ab6eae06654
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29472
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-riscv,misc: Added M5_VAR_USED to MiscRegNames
Bobby R. Bruce [Mon, 25 May 2020 21:24:34 +0000 (14:24 -0700)]
arch-riscv,misc: Added M5_VAR_USED to MiscRegNames

Clang compilers return an error about MiscRegNames being unused.
M5_VAR_USED fixes this.

Change-Id: I515c5d1e8837020b674de49039c0525f896b7e37
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29452
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons,python: Update makeTheGPUISA to Python3
Bobby R. Bruce [Mon, 25 May 2020 23:32:56 +0000 (16:32 -0700)]
scons,python: Update makeTheGPUISA to Python3

This function was causing an error to occur when trying to compile HSAIL
and GCN in a Python3 environment. It has now been upgraded to work in
both Python2 and Python3.

Change-Id: If8d6ee1e08c47d5a36182afc10cf86a8e905bda0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29410
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Disable some warnings generating false positives.
Gabe Black [Mon, 25 May 2020 09:02:22 +0000 (02:02 -0700)]
systemc: Disable some warnings generating false positives.

These false positives break the build. The error is below, and is bogus
as best I can tell. The constructor for the sc_unsigned and sc_signed
types, defined with some macro goop in sc_nbcommon.inc, have a call to
vec_copy_and_zero to copy over some data and zero the data that isn't
copied. That only happens if the source is smaller than the destination.
Then in vec_copy_and_zero, it calls vec_zero to set the last elements to
zero. Because of the check back at the constructor, only values that
exist should ever be set.

Also, in gem5, SC_MAX_NBITS is not set, so the definition of the array
it's bounds checking is declared right near where it's used and is sized
based on the variable being passed into vec_copy_and_zero.

In file included from build/ARM/systemc/ext/dt/bit/../int/../fx/sc_fxdefs.hh:52,
                 from build/ARM/systemc/ext/dt/bit/../int/sc_length_param.hh:63,
                 from build/ARM/systemc/ext/dt/bit/sc_bv_base.hh:56,
                 from build/ARM/systemc/dt/int/sc_unsigned.cc:83:
In function 'void sc_dt::vec_zero(int, int, sc_dt::sc_digit*)',
    inlined from 'void sc_dt::vec_copy_and_zero(int, sc_dt::sc_digit*, int, const sc_digit*)' at build/ARM/systemc/ext/dt/bit/../int/../fx/../int/sc_nbutils.hh:407:13,
    inlined from 'sc_dt::sc_unsigned::sc_unsigned(sc_dt::small_type, int, int, sc_dt::sc_digit*, bool)' at build/ARM/systemc/dt/int/sc_nbcommon.inc:2285:26:
build/ARM/systemc/ext/dt/bit/../int/../fx/../int/sc_nbutils.hh:379:14: error: 'void* __builtin_memset(void*, int, long unsigned int)' offset [12, 15] is out of the bounds [0, 12] [-Werror=array-bounds]
  379 |         u[i] = 0;
      |

Change-Id: Ica721178b24de56dbeabf4af7d3422dea6336a23
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29432
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Fix a possible memory error in copyOutStatfsBuf.
Gabe Black [Mon, 25 May 2020 11:24:11 +0000 (04:24 -0700)]
sim: Fix a possible memory error in copyOutStatfsBuf.

When memcpy-ing, we need to be sure not to read beyond the end of the
source, or write beyond the end of the target.

Change-Id: I3cf259bedce4c6e88aef47ef5379aab198338cb7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29404
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Include eventq_impl.hh in scheduler.hh.
Gabe Black [Sat, 23 May 2020 08:05:25 +0000 (01:05 -0700)]
systemc: Include eventq_impl.hh in scheduler.hh.

This ensures that we also get the inline definitions of some of the
methods defined in the EventQueue class. In certain circumstances gem5
won't link properly otherwise.

Change-Id: Ie0dfef207a165095bdfe1199cd1f690cebc4cbbf
Issue-on: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-597
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29397
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Disable some warnings in clang.
Gabe Black [Mon, 10 Feb 2020 04:03:58 +0000 (20:03 -0800)]
scons: Disable some warnings in clang.

The defaulted-function-deleted warning triggers in generated code which
would be very tricky to address.

The c99-designator refers to using an array index to specify which
element of an array is being initialized. This makes the code more
clear and is supported by both g++ and clang++. Designated initializers
for structures are being introduced in C++20, but there is no word I
could find on arrays. This warning option seems to only exist in clang
versions 10 and up, so we can only use it on those versions.

Change-Id: I8fb858e643814638c552a49336db2672be8e43c8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29396
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoRevert "systemc: Fix clang9 linker error"
Gabe Black [Sat, 23 May 2020 07:07:03 +0000 (00:07 -0700)]
Revert "systemc: Fix clang9 linker error"

This reverts commit 80a263698323852b1951d8d71ca0d599dff7ef3c.

Change-Id: I24c69d1a5a54ac8b8d5713314f6e91e5a6263c26
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29395
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>