gem5.git
4 years agoconfigs: Remove dangling reference to bus port in devices.py
Giacomo Travaglini [Wed, 7 Oct 2020 12:41:39 +0000 (13:41 +0100)]
configs: Remove dangling reference to bus port in devices.py

Change-Id: I3f7b65a9e6d4ae88acc474bb0e3a55f28c3cd09b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35755
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 agobase: Clean up some #ifs in _format_string.
Gabe Black [Wed, 14 Oct 2020 08:21:41 +0000 (01:21 -0700)]
base: Clean up some #ifs in _format_string.

These were checking for gcc version 3, well below the minimum version we
support, and were hard wired to be enabled anyway. This change gets rid
of the check and the dead code on the hard wired off branch.

Also, this change cleans up the style in the surviving code and
simplifies it slightly.

Change-Id: I8df73a378f478413c111a4dea962450a37fb4092
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35977
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Standardize the way create() constructs SimObjects.
Gabe Black [Wed, 7 Oct 2020 13:49:23 +0000 (06:49 -0700)]
misc: Standardize the way create() constructs SimObjects.

The create() method on Params structs usually instantiate SimObjects
using a constructor which takes the Params struct as a parameter
somehow. There has been a lot of needless variation in how that was
done, making it annoying to pass Params down to base classes. Some of
the different forms were:

const Params &
Params &
Params *
const Params *
Params const*

This change goes through and fixes up every constructor and every
create() method to use the const Params & form. We use a reference
because the Params struct should never be null. We use const because
neither the create method nor the consuming object should modify the
record of the parameters as they came in from the config. That would
make consuming them not idempotent, and make it impossible to tell what
the actual simulation configuration was since it would change from any
user visible form (config script, config.ini, dot pdf output).

Change-Id: I77453cba52fdcfd5f4eec92dfb0bddb5a9945f31
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35938
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoext: Add support for comma-separated inputs of testlib argparser
Hoa Nguyen [Tue, 8 Sep 2020 20:04:14 +0000 (13:04 -0700)]
ext: Add support for comma-separated inputs of testlib argparser

Currently, the --isa, --variant and --length options of testlib
do not support comma-separated inputs. This commit adds the
support for such an input for those options.

The argument parser now supports specifying the parameters multiple
times as well as specifying multiple options at a time.

JIRA: https://gem5.atlassian.net/jira/software/c/projects/GEM5/issues/GEM5-770

Change-Id: I3c276a9b9d9c6b0b802ecf8e7f1f9a3dfafe45d1
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34198
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
4 years agocpu: Remove automatic overriding of numThreads in SE on O3.
Gabe Black [Mon, 12 Oct 2020 00:26:10 +0000 (17:26 -0700)]
cpu: Remove automatic overriding of numThreads in SE on O3.

On the O3 CPU, when the number of threads on the CPU (SMT) is too low to
hold all the old style CPU workload items, then it would increase the
number of threads to match. There are three problems with this.

1. This behavior was only implemented on O3.
2. It could silently hide a bug in the config where the number of
   workload items was accidentally too big.
3. It makes the DerivO3CPUParams struct tamper with itself in the
   create() method, which means not even config.ini will accurately
   reflect the actual config of the system.

Change-Id: I0aab70d4b98093f7f14156ca437e763f031049ab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35937
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-arm: Implement Armv8.2-LPA
Jordi Vaquero [Fri, 3 Jul 2020 07:58:51 +0000 (09:58 +0200)]
arch-arm: Implement Armv8.2-LPA

This is enabled by setting the ArmSystem.phys_addr_range64 to 52.
This will automatically set the ID_AA64MMFR0_EL1.PARange to 0b0110
which encodes the presence of Armv8.2-LPA

Change-Id: If9b36e26cd2a72e55c8e929a632b7b50d909b282
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35956
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Implement Armv8.2-LVA
Jordi Vaquero [Thu, 25 Jun 2020 08:54:59 +0000 (10:54 +0200)]
arch-arm: Implement Armv8.2-LVA

Change-Id: I1b489a3629b2376e03e79b158631cb1d0cacc17e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35955
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Use the new M5_WEAK macro to hide [[gnu::weak]].
Gabe Black [Tue, 13 Oct 2020 11:01:00 +0000 (04:01 -0700)]
systemc: Use the new M5_WEAK macro to hide [[gnu::weak]].

Other compilers may need to support that macro in other ways.

Change-Id: If6ee05ce69c1bfd24108cf0785fac2d7bc259f0a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35940
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agobase: Add an M5_WEAK macro to compiler.hh.
Gabe Black [Tue, 13 Oct 2020 10:59:34 +0000 (03:59 -0700)]
base: Add an M5_WEAK macro to compiler.hh.

On gnu compatible systems, this will be implemented with the
[[gnu::weak]] attribute.

Change-Id: I1add373d648bbca24feab63420a9d87363646b6a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35939
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
4 years agofastmodel: Update to c++14, and add some missing consts.
Gabe Black [Sat, 10 Oct 2020 10:55:28 +0000 (03:55 -0700)]
fastmodel: Update to c++14, and add some missing consts.

During the review for the CortexR52 model, a comment pointed out where
two consts can be added. Also we switched gem5 over to c++14, but the
project files for these other wrappers were still set to c++11.

Change-Id: I5fecdc896b0290deadcd0f55ea1dfe3806a98177
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35857
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agopython: Remove a call to reduce() from code_formatter.py.
Gabe Black [Tue, 13 Oct 2020 12:00:37 +0000 (05:00 -0700)]
python: Remove a call to reduce() from code_formatter.py.

The built in reduce method is no longer available in python 3. Besides
that, this particular bit of code is simpler and easier to read if
reduce is replaced with the also built in sum() method.

Change-Id: I6daca42494ea0534721dfcfb1f6058517cd482d9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35941
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agocpu: Change how O3 handles requests for SMT in full system.
Gabe Black [Mon, 12 Oct 2020 00:19:51 +0000 (17:19 -0700)]
cpu: Change how O3 handles requests for SMT in full system.

Currently, when the numThreads parameter is set to something larger than
1 in full system mode, the O3 CPU will just silently change it back down
again to 1. This could be confusing to the user since it won't be
immediately apparent, even when looking at config.ini, that their config
isn't being respected.

This change moves that check into the CPU constructor, where CPU
behavior probably should be rather than the create() method which should
just build the object, and also turns it into an error.

Change-Id: I627ff8702b5e8aaad8839aa8d52524690be25619
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35936
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Remove the "SingleThreaded" fetch policy from the O3 CPU.
Gabe Black [Mon, 12 Oct 2020 00:03:50 +0000 (17:03 -0700)]
cpu: Remove the "SingleThreaded" fetch policy from the O3 CPU.

The fetch policy is only meaningful for SMT simulations. The
"SingleThreaded" value is a placeholder which is the default, and is
only supposed to be used in non-SMT simulations.

Rather than have this enum value and have special checks for it in
various places in O3, we can just eliminate it and set the default,
which is still only meaningful in SMT simulations, be an SMT fetch
policy.

The DerivO3CPUParams::create() function would forcefully change the
the fetch policy from "SingleThreaded" to "RoundRobin" anyway if there
were more than one thread, so that can be the actual default instead of
the shadow effective default.

Change-Id: I458fda00b5bcc246b0957e6c937eab0c5b4563c3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35935
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Remove an extra file in src/cpu
Hoa Nguyen [Tue, 13 Oct 2020 08:21:48 +0000 (01:21 -0700)]
misc: Remove an extra file in src/cpu

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: Iacbf202bc4c4e701b8c6d3a7eaae77d15ca5f397
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35895
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: allow qualifiers in SLICC functions
Tiago Mück [Tue, 10 Sep 2019 00:13:52 +0000 (19:13 -0500)]
mem-ruby: allow qualifiers in SLICC functions

All parameters in functions defined within SLICC are const& by default
(except for the implicit types, e.g. TBE). This allow us to specify
if we want to pass parameters as & or const&. Default behavior is
maintained.

A use case is to allow refactoring of common code in actions that
enqueue messages. Messages can be passed as a non-const ref. to
to functions with common initialization. E.g.:

void initRequestMsg(RequestMsg & out_msg) {
  // Common msg init code
}

action(sendRequest1, ...) {
  enqueue(...) {
    initRequestMsg(out_msg);
    // Request1 specific code
  }
}

action(sendRequest2, ...) {
  enqueue(...) {
    initRequestMsg(out_msg);
    // Request2 specific code
  }
}

Change-Id: Ic6a18169a661b3e36710b2a9f8a0e6bc5fce40f8
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31259
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: more specialized address to node mapping
Tiago Mück [Wed, 4 Sep 2019 17:26:02 +0000 (12:26 -0500)]
mem-ruby: more specialized address to node mapping

Added mapAddressToDownstreamMachine that may be used by the protocols
to map an address to different target donwstream controller of the same
type.

These functions do not use the global mapping provided by the network
and map addresses to one of the controllers specified in the
downstream_destinations parameter.

This change facilitates reusing the same cache state-machine/controllers
to model different levels of the cache hierarchy.

Change-Id: I9a202e9461e0d2f16ed232ff8b60bbde2d15570d
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31415
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: Expose MessageBuffer methods
Tiago Mück [Thu, 28 May 2020 17:31:03 +0000 (12:31 -0500)]
mem-ruby: Expose MessageBuffer methods

SLICC interface for checking the capacity of MessageBuffers

Change-Id: I28e2d22a405d33fcbe6a183dffc31bd936fa26c4
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31271
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 addressOffset util
Tiago Mück [Fri, 5 Jun 2020 17:55:42 +0000 (12:55 -0500)]
mem-ruby: add addressOffset util

Returns the offset of an address with respect to a base address.
Looks unnecessary, but SLICC doesn't support casting and the '-'
operator for Addr types, so the alternative to this would be to add
more some helpers like 'addrToUint64' and 'uint64ToInt'.

Change-Id: I90480cec4c8b2e6bb9706f8b94ed33abe3c93e78
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31270
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 agofastmodel: Add a wrapper for the CortexR52.
Gabe Black [Tue, 4 Aug 2020 07:46:52 +0000 (00:46 -0700)]
fastmodel: Add a wrapper for the CortexR52.

There has been some testing of this wrapper, but some components are
missing. It's not currently possible to read or set Misc registers,
64 bit integer registers, flattened integer registers, or vector
registers. In some cases that's because no mapping from gem5 indexes
to IRIS resource names has been set up, but in some cases, since R52
is 32 bit, no mapping *can* be set up, and we need to figure out what
to do with requests for 64 bit only state.

Change-Id: I2d650a7c1765b39f25058727502c96e6de5aa26b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35635
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Add a copyright to gem5img.py.
Gabe Black [Sat, 10 Oct 2020 11:08:10 +0000 (04:08 -0700)]
util: Add a copyright to gem5img.py.

This script was ported to python from a bash script by me back in 2011.
The original file didn't have a copyright, but since I made significant
modifications to it (porting it to python, improving its features), at
least those modifications should have become copyright Google.

Change-Id: Ia70bb1e6be5b188537bcf6899ba5884b359dbe18
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35875
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs,tests: Update configs to use compatible SE workloads.
Gabe Black [Tue, 1 Sep 2020 06:00:27 +0000 (23:00 -0700)]
configs,tests: Update configs to use compatible SE workloads.

If there's no more compatible workload than the base SEWorkload class it
will fall back to that for now.

Change-Id: Id27172c3074a7976823a891878ab9eecf6246c47
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33901
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Use finditer in the (Sub)OperandList classes.
Gabe Black [Wed, 30 Sep 2020 04:11:19 +0000 (21:11 -0700)]
arch: Use finditer in the (Sub)OperandList classes.

This method returns an iterator which goes through all the
non-overlapping matches for the given RE, without having to hand code
that same behavior with the more basic "search" method.

Change-Id: I4c4d95cfc8f72125566222aebb56604c3e9e2b03
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35817
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: Pull the (Sub)OperandList classes into their own file.
Gabe Black [Wed, 30 Sep 2020 04:04:30 +0000 (21:04 -0700)]
arch: Pull the (Sub)OperandList classes into their own file.

Another step in breaking down the isa parser into more manageable parts.

Change-Id: I0c5e70fe481bd17c0069b768129731e99a93ed0d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35816
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-cache: Create ReplacementPolicy namespace
Daniel R. Carvalho [Sat, 28 Dec 2019 22:38:21 +0000 (23:38 +0100)]
mem-cache: Create ReplacementPolicy namespace

Encapsulate the replacement policy classes in their own namespace.

As a side effect these classes have been renamed to drop the RP
suffix in the C++ code.

Change-Id: Ibb65dfb584a1413492fcf11833cf91a859cbff4e
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35795
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-ruby: detailed transaction latency profiling
Tiago Mück [Thu, 16 Jul 2020 16:37:22 +0000 (11:37 -0500)]
mem-ruby: detailed transaction latency profiling

Add incomingTransactionStart/End and outgoingTransactionStart/End
functions that can be called from the protocol to profile events
that initiate a transaction locally (e.g. an incoming request) and
remotely (e.g. outgoing requests). The generated stats will include
histograms of the latency for completing each type of transaction.

This assumes assumes the protocol uses different trigger events for
initiating incoming and outgoing transactions.

Change-Id: Ib528641b9676c68907b5989b6a09bfe91373f9c9
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31421
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: John Alsop <johnathan.alsop@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: expose transition info to actions
Tiago Mück [Thu, 16 Jul 2020 16:14:40 +0000 (11:14 -0500)]
mem-ruby: expose transition info to actions

SLICC compiler generates the curTransitionEvent and
curTransitionNextState functions, which allows actions to check which
event triggered the current transition and what's the next state.

Change-Id: I79c8c4f2839633b7fb3b23cbbdbb32f25db90eab
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31420
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: change MessageBuffer randomization param
Tiago Mück [Sat, 20 Jun 2020 02:16:45 +0000 (21:16 -0500)]
mem-ruby: change MessageBuffer randomization param

There are cases in which we need to prevent randomization for a
specific buffer when enabled at the RubySystem level (e.g. a internal
trigger queue that requires zero latency enqueue, while other buffers
can be randomized).

This changes the randomization parameter to support enabling and
disabling randomization regardless of the RubySystem setting.

Change-Id: If7520153cc5864897fa42e8911a6f8acbcf01db5
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31419
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: sequencer callback for unique writes
Tiago Mück [Tue, 9 Jun 2020 00:01:14 +0000 (19:01 -0500)]
mem-ruby: sequencer callback for unique writes

A controller may complete a write without obtaining a full copy of
the line. This patch adds a specific callback for this purpose that
prevents reads to be coalesced with a write on a potentially incomplete
line.

Change-Id: I3775f81699f38e406fee28f92c9c8e06deb3d528
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31269
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
4 years agomem-ruby: move AddrRange propagation to RubyPort
Tiago Mück [Mon, 1 Jun 2020 23:08:03 +0000 (18:08 -0500)]
mem-ruby: move AddrRange propagation to RubyPort

Doing the master address range notification from the RubyPort.
This allows us the DMASequencer to be replaced by Sequencer in future
protocols.

Change-Id: I95edb54b39a8adf0cac5caf2b58e4a2efb573f56
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31268
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: Sequencer can be used without cache
Tiago Mück [Thu, 28 May 2020 21:16:20 +0000 (16:16 -0500)]
mem-ruby: Sequencer can be used without cache

Moved the dcache check to the LLSC functions that use it.
This allows a Sequencer to be coupled with a gem5 object
that does not need a cache (as long as it doesn't issue
LLSC instructions).

Also, icache was not used at all so it was removed.

Change-Id: I04bd2711f8d0a7dfc952cff8e0020d2d1881cae1
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31267
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: int to Cycle converter
Tiago Mück [Wed, 27 May 2020 21:40:33 +0000 (16:40 -0500)]
mem-ruby: int to Cycle converter

Change-Id: I493b16a0bdd01a4cef4891e273a376ebe9509fe8
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31266
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: support for template types in structs
Tiago Mück [Wed, 29 Apr 2020 23:04:21 +0000 (18:04 -0500)]
mem-ruby: support for template types in structs

Templated types can now be used within structures defined in SLICC.
Usage is similar to the TBETable: the templated type must have all
possible methods in it's SLICC definition. Eg.:

structure(Map, desc="Template map definition") {
    MachineID lookup(Addr);
    MachineID lookup(int);
}

structure(SomeType, desc="Some other struct definition") {
    MachineID addrMap, template="<Addr,MachineID>";
    MachineID intMap, template="<int,MachineID>";
}

Change-Id: I02a621cea5e4a89302762334651c6534c6574e9d
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31264
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
Maintainer: Bradford Beckmann <bradford.beckmann@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: added function to check addr range
Tiago Mück [Tue, 25 Feb 2020 23:26:05 +0000 (17:26 -0600)]
mem-ruby: added function to check addr range

respondsTo checks if a controller address ranges includes a given
address.

Change-Id: I9a320011d93e7fd8df1ad3bda75c85d314261a99
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31263
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
4 years agomem-ruby: missing method in NetDest interface
Tiago Mück [Wed, 27 May 2020 23:41:23 +0000 (18:41 -0500)]
mem-ruby: missing method in NetDest interface

Change-Id: Ibf651c37c50174186daebebc06aa115e6bc2ed33
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31262
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Bradford Beckmann <bradford.beckmann@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: added %(mod) operator to SLICC
Tiago Mück [Fri, 13 Sep 2019 20:55:15 +0000 (15:55 -0500)]
mem-ruby: added %(mod) operator to SLICC

Change-Id: I9d1a10824ced3723d13e2843ad739ced72e476ce
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31260
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: John Alsop <johnathan.alsop@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Minor cleanup of imports in isa_parser.py.
Gabe Black [Tue, 29 Sep 2020 08:09:20 +0000 (01:09 -0700)]
arch: Minor cleanup of imports in isa_parser.py.

The with statement and print function are no longer in the future, and
the "inspect" module is not used. Also alphabetize the imports.

Change-Id: I35f2b7b0f7495cb9ca79d2cbe05f020560ec3593
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35280
Reviewed-by: Steve Reinhardt <stever@gmail.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 agoarch: Split utility methods/variables out of the ISA parser.
Gabe Black [Tue, 29 Sep 2020 07:58:36 +0000 (00:58 -0700)]
arch: Split utility methods/variables out of the ISA parser.

Change-Id: Ifbff4bc6633cd11f98b02ba1291a91c3ad189285
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35279
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Split the operand types out of the ISA parser.
Gabe Black [Tue, 29 Sep 2020 07:49:22 +0000 (00:49 -0700)]
arch: Split the operand types out of the ISA parser.

These conceptually go together and don't depend on any other parts of
the parser.

Change-Id: Ia8bff0d0ec210bdeeb080808968faf9528ee03dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35278
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Move the ISA parser into a package.
Gabe Black [Tue, 29 Sep 2020 07:24:26 +0000 (00:24 -0700)]
arch: Move the ISA parser into a package.

This will make splitting the parser into components easier, since it
will keep help keep everything together and organized.

Change-Id: I737641e124b6da8b1b18a49de9110c8424d8cc4f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35277
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agox86: Change how IO port devices are structured in the PC platform.
Gabe Black [Fri, 2 Oct 2020 09:50:18 +0000 (02:50 -0700)]
x86: Change how IO port devices are structured in the PC platform.

Before, for historical reasons, the PCI host device was the default
responder on the IO bus, meaning that when there was any type of
transaction which didn't have a device to go to, it would end up
looking like a PCI config transaction. It's very unlikely that this is
what it actually was, and what would happen would be arbitrary and
probably not helpful.

Also, there was no device in place to respond to accesses in x86's IO
port address space. On a real system, these accesses just return junk
and are otherwise legal. On systems where there would be physical bus
wires they would probably return whatever the last data on the bus was.

This would have been helpful when the platform was first being set up
because it would make it obvious when the OS tried to access a device
that wasn't implemented, but there were a few cases where it would
purposefully fiddle with ports with nothing on them. These had one off
backing devices in the config which would handle the accesses
harmlessly, but if the OS changed and tried to access other ports, the
configs would need to be updated.

Now, the PCI host is just another device on the bus. It claims all of
the PCI config space addresses, so any config access, even ones which
don't go with a device, will go to it, and it can respond with all 1s
like it's supposed to.

In it's place, the default responder is now a bus. On that bus is
a device which responds to the entire IO port address range with 0s.
The default on *that* bus is a device which will mark any accesses
as bad.

With this setup, accesses which don't go to a device, including a
device on the IO port address space, will go to the IO bus's default
port. There, if the access was an IO access, it will go to the device
which replies successfully with all 0s. If not, it's marked as an
error.

The device which backs the entire IO address space doesn't conflict
with the actual IO devices, since the access will only go towards it
if it's otherwise unclaimed, and the devices on the default bus don't
participate in routing on the higher level IO bus.

Change-Id: Ie02ad7165dfad3ee6f4a762e2f01f7f1b8225168
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35515
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agostats: Output new-world stats before legacy stats
Andreas Sandberg [Mon, 5 Oct 2020 14:27:55 +0000 (15:27 +0100)]
stats: Output new-world stats before legacy stats

Now that global stats have been converted to new-style stats, it's
desirable to output them before legacy stats. This ensures that global
statistics (e.g., host_seconds) show up first in the stat file.

Change-Id: Ib099d0152a6612ebbadd234c27f2f3448aef1260
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35617
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, stats: Move global stats to Root
Andreas Sandberg [Mon, 5 Oct 2020 14:21:59 +0000 (15:21 +0100)]
sim, stats: Move global stats to Root

Global stats are currently exposed using the legacy stat system (i.e.,
without a parent group). This change moves global stats from
stat_control.cc to a group that gets exported from the Root object.

The implementation adds the Root::Stats class which has a single
global instance. This instance is exposed to the rest of the simulator
using the global rootStats symbol. The intention is that objects that
need global statistics in formulas access them through the rootStats
object.

The global names simSeconds, simTicks, simFreq, and hostSeconds are
now references to their respective members in the rootStats object.

Change-Id: I267b5244a0bcca93dd2dcf03388e7085bdd79c9e
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35616
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: Simplify Ruby prefetcher's filter access functions
Daniel R. Carvalho [Sat, 21 Dec 2019 21:53:44 +0000 (22:53 +0100)]
mem-ruby: Simplify Ruby prefetcher's filter access functions

The signatures request many things that do not need to be passed
around.

Change-Id: If780e848b19056c9213092b6fc8673bd4f37b65f
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24534
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: Use CircularQueue for prefetcher's non unit filter
Daniel R. Carvalho [Sat, 21 Dec 2019 13:55:30 +0000 (14:55 +0100)]
mem-ruby: Use CircularQueue for prefetcher's non unit filter

Ruby prefetcher's non-unit filter is a circular queue, so use the class
created for this functionality.

This changes the behavior, since previously iterating through the
filter was completely arbitrary, and now it iterates from the
beginning of the queue to the end when accessing and updating
the filter's contents.

Change-Id: I3148efcbef00da0c8f6cf2dee7fb86f6c2ddb27d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24533
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: Use CircularQueue for prefetcher's unit filter
Daniel R. Carvalho [Sat, 21 Dec 2019 14:10:08 +0000 (15:10 +0100)]
mem-ruby: Use CircularQueue for prefetcher's unit filter

Ruby prefetcher's unit filter is a circular queue, so use the class
created for this functionality.

This changes the behavior, since previously iterating through the
filter was completely arbitrary, and now it iterates from the
beginning of the queue to the end when accessing and updating
the filter's contents.

Change-Id: I834be88a33580d5857c38e9bae8b289c5a6250b9
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24532
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: Build the operand REs in the isa_parser on demand.
Gabe Black [Mon, 28 Sep 2020 08:12:14 +0000 (01:12 -0700)]
arch: Build the operand REs in the isa_parser on demand.

These regular expressions search code snippets to find places where
operands are used. Rather than build them explicitly at the end of
processing the operands{{}} construct, wait until they're first going to
be used. That way, we'll be able to define operands in as many places as
we want, as long as we've done all we're going to do before the first
instructions are defined.

This will pave the way to defining operands in regular python in let
blocks, and then possibly outside of the parser altogether, perhaps into
scons where having lots of output files for individual instructions will
be easier to manage. For now, this just lets you define multiple
operands blocks which is not all that exciting on its own :)

Change-Id: I1179092316c1c0ac2613810bfd236a32235502fb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35237
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Steve Reinhardt <stever@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: fix include dependency
Tiago Mück [Wed, 17 Jun 2020 01:06:49 +0000 (20:06 -0500)]
mem-ruby: fix include dependency

Removed include dependency between WriteMask and RubySystem.

Change-Id: I3e81267341e3875b1bb0fc3cb39f1a308e383dfd
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31258
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: additional WriteMask methods
Tiago Mück [Thu, 28 May 2020 17:31:36 +0000 (12:31 -0500)]
mem-ruby: additional WriteMask methods

Change-Id: Ib5d5f892075b38f46d1d802c043853f56e19ea12
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31257
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: Network can use custom data msg size
Tiago Mück [Thu, 5 Sep 2019 22:53:40 +0000 (17:53 -0500)]
mem-ruby: Network can use custom data msg size

The size for network data messages can be set using a configuration
parameter. This is necessary so line transfers may be split in multiple
messages at the protocol level.

Change-Id: I86a272de597b04a898071db412b921cbe1651ef0
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31256
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Srikant Bharadwaj <srikant.bharadwaj@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Allow same-cycle enqueue
Tiago Muck [Fri, 7 Jun 2019 23:16:10 +0000 (18:16 -0500)]
mem-ruby: Allow same-cycle enqueue

Messages may be enqueued and be ready in the same cycle.

Using this feature may introduce nondeterminism in the protocol and
should be used in specific cases. A case study is to avoid needing an
additional cycle for internal protocol triggers (e.g. the All_Acks
event in src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm).
To mitigate modeling mistakes, the 'allow_zero_latency' parameter must
be set for a MessageBuffer where this behavior is acceptable.

This changes also updates the Consumer to schedule events according to
this new behavior. The original implementation would not schedule a new
wakeup event if the wakeup for the Consumer had already been executed
in that cycle.

Additional authors:
- Tuan Ta <tuan.ta2@arm.com>

Change-Id: Ib194e7b4b4ee4b06da1baea17c0eb743f650dfdd
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31255
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: MessageBuffer capacity check
Tiago Muck [Wed, 5 Jun 2019 20:34:13 +0000 (15:34 -0500)]
mem-ruby: MessageBuffer capacity check

Trip assert if call enqueue on a full message buffer.

Change-Id: I842183d8bf2c681787f1b6ac23c95825095ad05d
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31254
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
4 years agomem-cache: Encapsulate CacheBlk's status
Daniel R. Carvalho [Mon, 21 Sep 2020 16:26:30 +0000 (18:26 +0200)]
mem-cache: Encapsulate CacheBlk's status

Encapsulate this variable to facilitate polymorphism.

- The status enum was renamed to CoherenceBits, since it
  lists the coherence bits supported by the CacheBlk.
- status was made protected and renamed to coherence since
  it contains the coherence bits.
- Functions to set, clear and get the coherence bits were
  created.
- To set a status bit, the block must be validated first.
  This guarantees a constant flow and helps catching bugs.

As a side effect, some of the modified files contained long
lines, which had to be split.

Change-Id: I558cc51ac685d30b6bf298c78f86a6e24ff06973
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34960
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-cache: Isolate compression bit
Daniel R. Carvalho [Tue, 6 Oct 2020 10:52:03 +0000 (12:52 +0200)]
mem-cache: Isolate compression bit

The compression bit does not belong with the coherence bits.

Change-Id: I6e9f201a9961b8c6051ba599f051a444d585f0e4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35700
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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-cache: Isolate prefetching bit
Daniel R. Carvalho [Tue, 6 Oct 2020 10:45:45 +0000 (12:45 +0200)]
mem-cache: Isolate prefetching bit

Previously the prefetching bit was among the status bits;
yet, it has no correlation with the other bits. It has
been isolated as a single boolean, with a respective getter
and setter.

Change-Id: Ibe76e1196ca17a7c9ab9bda2216186707427cb64
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35699
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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-cache: Create a tagged entry class
Daniel R. Carvalho [Tue, 6 Oct 2020 10:25:06 +0000 (12:25 +0200)]
mem-cache: Create a tagged entry class

The TaggedEntry class inherits from the ReplaceableEntry
class. Its purpose is to define a replaceable entry with
tagging attributes.

It has been created as a separate class because both the
replacement policies and the AbstractCacheEntry use
ReplaceableEntry, and do not need the tagging information
to perform their operations.

Change-Id: I24e87c865fc21c79dea7e488507a8cafc5223b39
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35698
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-cache: Debug with blk's information instead of its state.
Daniel R. Carvalho [Tue, 6 Oct 2020 10:56:09 +0000 (12:56 +0200)]
mem-cache: Debug with blk's information instead of its state.

The print() function has been defined to facilitate debugging
regarding a block's metadata. Use it instead of accessing the
coherence bits directly.

Change-Id: Iba41f4ac067561970621a4bba809e1b315b0210d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35697
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-cache: Add missing StridePrefetcher invalidation
Daniel R. Carvalho [Tue, 6 Oct 2020 12:30:04 +0000 (14:30 +0200)]
mem-cache: Add missing StridePrefetcher invalidation

A call to the entry's parent's invalidate function was missing.
Since an entry was only invalidated right before being used,
previous behavior was not breaking anything.

Change-Id: Ibbf31a0099600a8f6be70b3426bac9fcd1e5c749
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35696
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agostats: Make Stats::Group::mergeStatGroup public
Andreas Sandberg [Mon, 5 Oct 2020 14:13:06 +0000 (15:13 +0100)]
stats: Make Stats::Group::mergeStatGroup public

The stat system currently assumes that the decision to merge groups is
done at construction time. This makes it hard to implement global
statistics that live in a single global group.

This change adds some error checking to mergeStatGroup and marks it as
a public method.

Change-Id: I6a42f48545c5ccfcd0672bae66a5bc86bb042f13
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35615
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-arm: Default ArmSystem to AArch64
Giacomo Travaglini [Tue, 6 Oct 2020 21:29:45 +0000 (22:29 +0100)]
arch-arm: Default ArmSystem to AArch64

Change-Id: I4dad29086c0b3e50bd2011363cb23625811b4b27
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35775
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosparc: Simplify the IntOp format slightly.
Gabe Black [Mon, 28 Sep 2020 06:59:18 +0000 (23:59 -0700)]
sparc: Simplify the IntOp format slightly.

Change-Id: I693e56a04827287712e001cf99620085ab09b8ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35236
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 agosparc: Clean up some code in base.isa.
Gabe Black [Mon, 28 Sep 2020 06:41:02 +0000 (23:41 -0700)]
sparc: Clean up some code in base.isa.

This includes the filterDoubles function which adds code to combine 32
bit values into doubles or 64 bit values for floating point, and the
splitOutImm function which detects if the code that implements an
instruction has a register and immediate variant, and generates code for
each.

Change-Id: I5524b9acd6e610b51fd91fe70276c34c23be9f85
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35235
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 agosim: Add a mechanism for finding an compatible SE workload.
Gabe Black [Wed, 26 Aug 2020 06:24:47 +0000 (23:24 -0700)]
sim: Add a mechanism for finding an compatible SE workload.

This makes it possible to pick an SEWorkload generically at the config
level and not in C++ after the structure of the simulation has already
been set.

Change-Id: I7e52beb5a4d45aa43192e1ba4de6c5aab8b43d84
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33900
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agofastmodel: Add IrisMMU model
Giacomo Travaglini [Wed, 30 Sep 2020 13:49:11 +0000 (14:49 +0100)]
fastmodel: Add IrisMMU model

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

Change-Id: Ida4ec76df5f6192e34a5b3fc6d002c473d48b387
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35415
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Add generic BaseMMU
Giacomo Travaglini [Fri, 13 Dec 2019 00:12:47 +0000 (00:12 +0000)]
arch: Add generic BaseMMU

This is an abstract class encapsulating the ITB and DTB
(Instruction and Data TLBs)

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

Change-Id: I7c8fa2ada319e631564182075da1aaff517ec212
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34975
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Replace call to `tmpnam()` by a deterministic one
Hoa Nguyen [Fri, 25 Sep 2020 22:26:40 +0000 (15:26 -0700)]
arch-arm: Replace call to `tmpnam()` by a deterministic one

According to the documentation, the use of tmpnam() should be
avoided.

This commit generates a temporary filename by concat-ing the
object name with an index that is internally tracked, the index
is increased until a filename that is not being used is found.

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

Change-Id: Ibfe604d741b6b7d7b02fc051add217f95f81d05e
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35195
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: Add recursion for DTB entry generation inside BaseCPU
Pierre Ayoub [Sat, 3 Oct 2020 14:42:22 +0000 (16:42 +0200)]
cpu: Add recursion for DTB entry generation inside BaseCPU

Change-Id: Ice93b67ee44a1228120f8a63ad5b9d952f813c70
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35556
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Add recursion for DTB entry generation inside ArmISA
Pierre Ayoub [Sat, 3 Oct 2020 14:34:26 +0000 (16:34 +0200)]
arch-arm: Add recursion for DTB entry generation inside ArmISA

In order to generate the ArmPMU's DTB entry, we have to enable recursion
from the ArmISA.

This commit follows this mailing list entry:
https://www.mail-archive.com/gem5-users@gem5.org/msg18401.html

Change-Id: I73012755f0f8c8d4d17278793cf16cb1e8b011df
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35555
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-cache: Encapsulate CacheBlk's srcRequestorId
Daniel R. Carvalho [Mon, 21 Sep 2020 15:51:04 +0000 (17:51 +0200)]
mem-cache: Encapsulate CacheBlk's srcRequestorId

Encapsulate this variable to facilitate polymorphism.

- requestorId was renamed to _requestorId and was privatized.
- The requestor ID should only be modified on insertion and
  invalidation; thus, its setter is not public.

Change-Id: I5bab21a6c21e9d912fb5194bb44ff785d44999f4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34959
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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-cache: Encapsulate CacheBlk's tickInserted
Daniel R. Carvalho [Mon, 21 Sep 2020 15:40:45 +0000 (17:40 +0200)]
mem-cache: Encapsulate CacheBlk's tickInserted

Encapsulate this variable to facilitate polymorphism.

- tickInserted was renamed to _tickInserted and was privatized.
- The insertion tick should always be set to the current tick,
  and only on insertion; thus, its setter is not public and
  does not take arguments.
- An additional function was created to get the age since of
  the block relative to its insertion tick.
- There is no current need for a getter.

Change-Id: I81d4009abec5e9633e10f1e851e3a524553c98a4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34958
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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-cache: Encapsulate CacheBlk's refCount
Daniel R. Carvalho [Mon, 21 Sep 2020 15:32:01 +0000 (17:32 +0200)]
mem-cache: Encapsulate CacheBlk's refCount

Encapsulate this variable to facilitate polymorphism.

- refCount was renamed to _refCount and was privatized.
- The reference count should only be reset at invalidation;
  thus, its setter is not public.
- An additional function was created to increment the number
  of references by 1.

Change-Id: Ibc8799a8dcb7c53c651de3eb1c9b86118a297b9d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34957
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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-cache: Encapsulate CacheBlk's task_id
Daniel R. Carvalho [Mon, 21 Sep 2020 15:15:40 +0000 (17:15 +0200)]
mem-cache: Encapsulate CacheBlk's task_id

Encapsulate this variable to facilitate polymorphism.

- task_id was renamed to _taskId and was privatized.
- The task id should only be modified at 2 specific moments:
  insertion and invalidation of the block; thus, its setter
  is not public.

Change-Id: If9c49c22117ef5d7f25163ec94bf8b174f221e39
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34956
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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-cache: Protect tag from being mishandled
Daniel R. Carvalho [Thu, 20 Feb 2020 15:23:16 +0000 (16:23 +0100)]
mem-cache: Protect tag from being mishandled

Make the tag variable private, so that every access to it must pass
through a getter and a setter. This protects it from being incorrectly
updated when there is no direct match between a tag and a data entry,
as is the case of sector, compressed, decoupled, and many other table
layouts.

As a side effect, a block matching function has been created, which
also depends directly on the mapping between tag and data entries.

Change-Id: I848a154404feb5cbcea8d0fd2509bf49e1d73bd0
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34955
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: only wrap message with positive value
Earl Ou [Mon, 5 Oct 2020 07:51:56 +0000 (15:51 +0800)]
scons: only wrap message with positive value

In case we have small TTY, scons failed with wrong testwrap value. Fix
the issue.

Change-Id: I8ec1d55c6856c1e592a57a68067091b796ac84ae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35596
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: avoid interactive access in non-tty
Earl Ou [Mon, 5 Oct 2020 07:29:51 +0000 (15:29 +0800)]
scons: avoid interactive access in non-tty

We saw some strange behavior when building scons without an interactive
TTY. This seems be caused by the control signal set from
curses.initscr() and endwin(). To avoid issues, we should avoid those
operation when running in non interactive situation.

Change-Id: I9cf8e48a786d47d567ba193f0b069f638e8db647
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35595
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Changed gem5 version info for gem5 20.2 dev
Bobby R. Bruce [Thu, 1 Oct 2020 03:56:50 +0000 (20:56 -0700)]
misc: Changed gem5 version info for gem5 20.2 dev

Change-Id: I34505c054f1ec83f5da169bfde90702f3da3917e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35439
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

4 years agobase: Add some error handling to compiler.hh.
Gabe Black [Tue, 29 Sep 2020 01:48:01 +0000 (18:48 -0700)]
base: Add some error handling to compiler.hh.

Rather than just leaving some macros undefined if none of the scenarios
we checked for match, we should report an error so it's clear what
happened. Otherwise the places the macros are used will just not compile
properly, or worse will silently not work correctly.

Change-Id: Ie010d6b6d1b6a1496a45d9ebc0d75d1c804df12f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35275
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Re-add -Werror for the gem5 20.2 development
Bobby R. Bruce [Thu, 1 Oct 2020 03:53:14 +0000 (20:53 -0700)]
misc: Re-add -Werror for the gem5 20.2 development

This reverts commit 2a4357bfd0c688a19cfd6b1c600bb2d2d6fa6151,
https://gem5-review.googlesource.com/c/public/gem5/+/35455

Change-Id: I10de506658bcad542abbb6d2b4f0c416d55bc121
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35495
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Merge branch 'release-staging-v20.1.0.0' into develop
Bobby R. Bruce [Thu, 1 Oct 2020 03:39:06 +0000 (20:39 -0700)]
misc: Merge branch 'release-staging-v20.1.0.0' into develop

Change-Id: I3694b251855b969c7bd3807f34e1b4241d47d586

4 years agomisc: Updated version to 20.1.0.0 v20.1.0.0
Bobby R. Bruce [Wed, 30 Sep 2020 18:14:02 +0000 (11:14 -0700)]
misc: Updated version to 20.1.0.0

Change-Id: Ic7a37581c58caa354eeecab051122116177d0721
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35456
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
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: Removed -Werror for the gem5 20.1 release
Bobby R. Bruce [Wed, 30 Sep 2020 17:55:03 +0000 (10:55 -0700)]
scons: Removed -Werror for the gem5 20.1 release

While gem5 compiles on all our supported compilers, removing the -Werror
flag on the stable branch ensures that, as new compilers are released
with stricter warnings, gem5 remains compilable.

Change-Id: I9a356472dc4d729a3fef9f1455814c900103bd66
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35455
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Updated CONTRIBUTING.md: 'master' -> 'stable'
Bobby R. Bruce [Wed, 30 Sep 2020 22:11:17 +0000 (15:11 -0700)]
misc: Updated CONTRIBUTING.md: 'master' -> 'stable'

The `master` branch is now the `stable` branch. This commit updates
CONTRIBUTING.md accordingly.

Change-Id: Ic5231eda336520e8a7260efac6474b4f0af08c37
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35457
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 agomisc: Add release notes for 20.1
Jason Lowe-Power [Wed, 30 Sep 2020 00:03:08 +0000 (17:03 -0700)]
misc: Add release notes for 20.1

Change-Id: I011ff987e222326dd7f0787c41043578b52b236a
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35375
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Adding missing argument of panic function
Sungkeun Kim [Thu, 24 Sep 2020 11:42:18 +0000 (06:42 -0500)]
sim: Adding missing argument of panic function

panic function call in panicFsOnlyPseudoInst (src/sim/pseudo_inst.cc) needs to be invoked with argument (name).

Jira Issue: https://gem5.atlassian.net/jira/software/c/projects/GEM5/issues/GEM5-786?filter=allissues

Change-Id: Iecacab7b9e0383373b69e9b790fa822d173d29c3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35040
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 agoext: Disable range-loop-analysis warnings for pybind11
Nikos Nikoleris [Tue, 29 Sep 2020 09:28:24 +0000 (10:28 +0100)]
ext: Disable range-loop-analysis warnings for pybind11

Change-Id: I9d9e118c1c70c2f6b11260fff31ecd763e491115
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35296
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-ruby: Fixing token port responses in GPUCoalescer
Matthew Poremba [Fri, 25 Sep 2020 20:50:31 +0000 (15:50 -0500)]
mem-ruby: Fixing token port responses in GPUCoalescer

The is a bug in the GPUCoalescer which occurs in the following
situation:

1) An instruction crosses a page boundary causing multiple TLB requests
to be sent.
2) The TLB responses arrive at different times, causing the vector
memory requests to be sent at different times.
3) The first vector memory request completes before the second vector
memory request arrives at the coalescer.

This caused the coalescer to consider the instruction sequence number
done and return its token. Then the second request would arrive and
complete sending back another token. Eventually this increases the token
count beyond the maximum tripping an assert.

This change keeps track of the number of per-lane requests which are
expected to be sent in the vector memory request by looking at the exec
mask of the instruction. The token is not returned until the expected
number of per-lane requests have been coalesced. This fixes "#7" in the
list of issues in JIRA-300. There are also style fixes for local
variables in code nearby the changes in this CL.

Change-Id: I152fd9397920ad82ba6079112908387e71ff3cce
JIRA: https://gem5.atlassian.net/browse/GEM5-300
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35176
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>
4 years agoconfigs,gpu-compute: Fixes to connect gmTokenPort
Matthew Poremba [Fri, 25 Sep 2020 17:04:38 +0000 (10:04 -0700)]
configs,gpu-compute: Fixes to connect gmTokenPort

When the TokenPort was moved from the GCN3 staging branch to develop the
TokenPort was changed from being the port connecting the ComputeUnit to
Ruby's vector memory port to a sideband port which inhibits requests to
Ruby's vector memory port. As such, it needs to be explicitly connected
as a new port. This changes the getPort method in ComputeUnit to be
aware of the port as well as modifying the example config to connect to
TCPs.

The iteration to connect in the config file was modified since it was
not properly connecting to TCPs each time and Ruby.py does not
explicitly return a list of each MachineType.

Change-Id: Ia70a6756b2af54d95e94d19bec5d8aadd3c2d5c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35096
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs: Fix typo in apu_se.py
Matthew Poremba [Fri, 25 Sep 2020 17:05:16 +0000 (10:05 -0700)]
configs: Fix typo in apu_se.py

Change parser.add_options to parser.add_option

Change-Id: I8b0235a1bf9e01e915dec71d85b9da02c477eb34
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35175
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Never use a empty byteEnable
Giacomo Travaglini [Wed, 27 Nov 2019 16:29:52 +0000 (16:29 +0000)]
cpu: Never use a empty byteEnable

The byteEnable variable is used for masking bytes in a memory request.
The default behaviour is to provide from the ExecContext to the CPU
(and then to the LSQ) an empty vector, which is the same as providing
a vector where every element is true.
Such vectors basically mean: do not mask any byte in the memory request.

This behaviour adds more complexity to the downstream LSQs, which now
have to distinguish between an empty and non-empty byteEnable.

This patch is simplifying things by transforming an empty vector into
a all true one, making sure the CPUs are always receiving a non empty
byteEnable.

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

Change-Id: I1d1cecd86ed64c53a314ed700f28810d76c195c3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23285
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-x86: Add byteEnable mask in x86 memhelpers
Giacomo Travaglini [Tue, 10 Dec 2019 10:55:26 +0000 (10:55 +0000)]
arch-x86: Add byteEnable mask in x86 memhelpers

Next patch will make the byteEnable mandatory in the ExecContext
interface so we need to amend the existing helpers to make them
use generate the boolean vector.

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

Change-Id: Ib24550aa1e22049487ef4ec2748b786be456d342
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23529
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
4 years agoarch-arm: Using new "raw" memhelpers
Giacomo Travaglini [Mon, 9 Dec 2019 14:02:18 +0000 (14:02 +0000)]
arch-arm: Using new "raw" memhelpers

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

Change-Id: Ie5ea0fc845a8f6d77a5723bacaff25ba04562f9c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23528
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Add raw read/writeMem helpers
Giacomo Travaglini [Mon, 9 Dec 2019 14:01:33 +0000 (14:01 +0000)]
arch: Add raw read/writeMem helpers

With some exceptions (in arm/x86) the standard memory read/write interface
for instructions relies upon the helper functions in

src/arch/generic/memhelpers.hh

which wrap the ExecContext interface.

(readMem, writeMem...)

Those helpers rely on the source/destination data to be provided (as
expected) but not on the size of the transaction. The latter gets
evaluated via the host size of the source/destination data
(sizeof(MemT)).
For this reason some instructions, which are instead using an
incompatible MemT data (as an example, a SIMD operation loading data in
an array of integers), make direct use of the ExecContext interface,
which is simply requesting for a pointer and a number of bytes.
Some other instructions are using the ExecContext interface since the
helpers do not accept a byteEnable argument.

This patch is adding some helpers to address these issues. The idea is
to deprecate direct usage of the ExecContext APIs.
These new wrappers do not work with the type detection mechanism
to evaluate the number of bytes we are accessing.

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

Change-Id: I5b822d278bdf325a68a01aa1861b6487c6628245
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23527
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agoarch: Do value-initialization for MemOperand
Giacomo Travaglini [Mon, 9 Dec 2019 14:00:47 +0000 (14:00 +0000)]
arch: Do value-initialization for MemOperand

With this patch we are properly initializing the MemOperand
variable, with value-initialization.
Prior to this patch, the variable was simply default-initialized.
For a native type, this means the variable is undefined.
With value initialization we are sure the variable is not undefined
and the compiler doesn't complain about it.

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

Change-Id: I55a5b8f047b8e691529807b61d38f0d47fcfe61e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23526
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agotests,misc: Updated TestLib and boot-tests for gzipped imgs
Bobby R. Bruce [Fri, 25 Sep 2020 17:25:43 +0000 (10:25 -0700)]
tests,misc: Updated TestLib and boot-tests for gzipped imgs

In efforts to reduce storage costs and download times, the images hosted
by us have been gzipped. The TestLib framework has therefore been
extended to decompress gzipped files after download.

The x86-boot-tests are, at present, the only tests which use the gem5
images. These tests have been updated to download the gzipped image.

Change-Id: I6b2dbe9472a604148834820db8ea70e91e94376f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35257
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: Wrap a docstring in isa_parser.py.
Gabe Black [Tue, 29 Sep 2020 07:39:01 +0000 (00:39 -0700)]
arch: Wrap a docstring in isa_parser.py.

This brings the ISA parser in line with the style guide. Note that the
docstring needs to be a single string literal for python to consider it
a docstring, and the parser itself needs each line of the docstring to
be a rule in its CFG. We can accomplish both by taking advantage of the
fact that two directly adjacent quoted strings are treated as a single
string literal by python, and by escaping the newline so that they're
actually considered adjacent.

Change-Id: I7f4d252998877808425aafb0159600ba4c3bf9ad
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35276
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase: Expose the ObjectFile class to python.
Gabe Black [Tue, 1 Sep 2020 04:13:06 +0000 (21:13 -0700)]
base: Expose the ObjectFile class to python.

This will make it possible to inspect a binary and determine, for
example, what architecture or operating system it was compiled for.

Change-Id: Ib40f1e1c02448dc5bf084bb0dd98d3767f463fef
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33899
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev-arm: SMMUv3, default CMDQ entries to 128
Adrian Herrera [Tue, 29 Sep 2020 09:31:49 +0000 (10:31 +0100)]
dev-arm: SMMUv3, default CMDQ entries to 128

From Linux 587e6c10a7ce89a5924fdbeff2ec524fbd6a124b, SMMUv3
implementations in 64-bit platforms must report a minimum of 128 CMDQ
entries via SMMU_IDR1. Otherwise, the SMMUv3 Linux driver returns -ENXIO.

Change-Id: I304aac1b734515b3077003e8d67cc19730afc67f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35297
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons,python: Add warning for when python3-config is not used
Bobby R. Bruce [Mon, 28 Sep 2020 18:56:19 +0000 (11:56 -0700)]
scons,python: Add warning for when python3-config is not used

We cannot say for certain whether 'python-config' is python2 or python3,
but this patch will produce a warning if 'python3-config' is not used,
stating that support for python2 will be dropped in future releases of
gem5.

Change-Id: I114da359c8768071bf7dd7f2701aae85e3459678
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35256
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Removing gem5/hello_se/ref/simerr
Bobby R. Bruce [Tue, 22 Sep 2020 20:05:02 +0000 (13:05 -0700)]
tests: Removing gem5/hello_se/ref/simerr

This is not needed in any comparison we make. It was probably added in
error.

Change-Id: Ie771654f73d101d0ef90ca6e2864a7cb684b3919
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34996
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: Add python2-config to PYTHON_CONFIG
Bobby R. Bruce [Mon, 28 Sep 2020 18:23:38 +0000 (11:23 -0700)]
scons,python: Add python2-config to PYTHON_CONFIG

PYTHON_CONFIG can be python2-config as well as python2.7-config.

Change-Id: I482cb922fcf26b37f67f2aca392e04968ca144bd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35255
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons,python: Prioritize Python3 for PYTHON_CONFIG
Bobby R. Bruce [Mon, 21 Sep 2020 20:51:19 +0000 (13:51 -0700)]
scons,python: Prioritize Python3 for PYTHON_CONFIG

Change-Id: I0ac4d90b93f2e0a9384216f759937f7b0aa23d41
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34899
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>