gem5.git
5 years agodev-arm: fix --generate-dtb for ARM
Ciro Santilli [Thu, 24 Jan 2019 09:04:34 +0000 (09:04 +0000)]
dev-arm: fix --generate-dtb for ARM

Was failing with:

NameError: global name 'FdtNode' is not defined

The problem was introduced at: 75831ce5b7880b67c1aa2e0871ce16d5c01cadc7

Change-Id: I7e2ce0e5311e7814229945b9f4e7318a8652dc1f
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15875
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agocpu-o3: O3 LSQ Generalisation
Rekai Gonzalez-Alberquilla [Mon, 13 Feb 2017 09:41:44 +0000 (09:41 +0000)]
cpu-o3: O3 LSQ Generalisation

This patch does a large modification of the LSQ in the O3 model. The
main goal of the patch is to remove the 'an operation can be served with
one or two memory requests' assumption that is present in the LSQ
and the instruction with the req, reqLow, reqHigh triplet, and
generalising it to operations that can be addressed with one request,
and operations that require many requests, embodied in the
SingleDataRequest and the SplitDataRequest.

This modification has been done mimicking the minor model to an extent,
shifting the responsibilities of dealing with VtoP translation and
tracking the status and resources from the DynInst to the LSQ via the
LSQRequest. The LSQRequest models the information concerning the
operation, handles the creation of fragments for translation and request
as well as assembling/splitting the data accordingly.

With this modifications, the implementation of vector ISAs, particularly
on the memory side, become more rich, as the new model permits a
dissociation of the ISA characteristics as vector length, from the
microarchitectural characteristics that govern how contiguous loads are
executing, allowing exploration of different LSQ to DL1 bus widths to
understand the tradeoffs in complexity and performance.

Part of the complexities introduced stem from the fact that gem5 keeps a
large amount of metadata regarding, in particular, memory operations,
thus, when an instruction is squashed while some operation as TLB lookup
or cache access is ongoing, when the relevant structure communicates to
the LSQ that the operation is over, it tries to access some pieces of
data that should have died when the instruction is squashed, leading to
asserts, panics, or memory corruption. To ensure the correct behaviour,
the LSQRequest rely on assesing who is their owner, and self-destroying
if they detect their owner is done with the request, and there will be
no subsequent action. For example, in the case of an instruction
squashed whal the TLB is doing a walk to serve the translation, when the
translation is served by the TLB, the LSQRequest detects that the
instruction was squashed, and as the translation is done, no one else
expect to access its information, and therefore, it self-destructs.
Having destroyed the LSQRequest earlier, would lead to wrong behaviour
as the TLB walk may access some fields of it.

Additional authors:
- Gabor Dozsa <gabor.dozsa@arm.com>

Change-Id: I9578a1a3f6b899c390cdd886856a24db68ff7d0c
Signed-off-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/13516
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agoarch-arm: Implement LoadAcquire/StoreRelease in AArch32
Giacomo Travaglini [Fri, 18 Jan 2019 11:42:59 +0000 (11:42 +0000)]
arch-arm: Implement LoadAcquire/StoreRelease in AArch32

This patch is implementing LoadAcquire/StoreRelease instructions in
AArch32, which were added in ARMv8-A only and where not present in
ARMv7.

Change-Id: I5e26459971d0b183a955cd7b0c9c7eaffef453be
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/15817
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-arm: IsStoreConditional flag set depending on flavor
Giacomo Travaglini [Mon, 21 Jan 2019 14:43:11 +0000 (14:43 +0000)]
arch-arm: IsStoreConditional flag set depending on flavor

This patch is aligning A32 with A64 where the IsStoreConditional flag
doesn't have to be specified manually in the instruction implementation,
but will be automatically added to any exclusive store.

Change-Id: Id02ed6fc2beeca6d125017393714a7c6eb3d8a33
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15816
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-arm: Remove SWP and SWPB instructions
Giacomo Travaglini [Fri, 18 Jan 2019 17:14:56 +0000 (17:14 +0000)]
arch-arm: Remove SWP and SWPB instructions

The SWP and SWPB instructions have been removed from AArch32.  It was
previously (ARMv7) possible to enable them with the ID_ISAR0.Swap bits,
which are now hardcoded to 0b0000 (SWP and SWPB not implemented)

Change-Id: Ic32b534454a7e0f7494a6f0b5e11182c65b3fe24
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/15815
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agosystemc: Fix TLM related includes.
Gabe Black [Wed, 23 Jan 2019 01:48:12 +0000 (17:48 -0800)]
systemc: Fix TLM related includes.

There are a couple things this CL fixes related to the TLM #includes.

1. Removes #includes of <systemc> and <tlm>. These bring in a header
file from boost which shouldn't be necessary but which some of the
tests (and likely some external code) depends on. We avoid including
those in files built into gem5 itself so that gem5 isn't dependent on
boost.

2. All includes in ext should be relative. That way those headers can
be removed from gem5 and still build, allowing them to be moved over
to or referenced from a foreign codebase which isn't part of gem5.

Change-Id: I76e267385b48cb4fe93aea89ec8319c76465a0a4
Reviewed-on: https://gem5-review.googlesource.com/c/15796
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agoarm: Replace MiscReg with RegVal in utility.(hh|cc).
Gabe Black [Wed, 23 Jan 2019 00:31:58 +0000 (16:31 -0800)]
arm: Replace MiscReg with RegVal in utility.(hh|cc).

These uses snuck in after the previous pass which made this switch in
the rest of these files.

Change-Id: Ie891c6ec393a65f1c57c54301f0a2bb920d38bb0
Reviewed-on: https://gem5-review.googlesource.com/c/15795
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agomem-ruby: Fix missing TBE allocation and deallocation
Zicong Wang [Sun, 13 Jan 2019 09:46:29 +0000 (17:46 +0800)]
mem-ruby: Fix missing TBE allocation and deallocation

The TBE allocation and deallcation are currently missing during
the directory state transition from I to M in protocol MI_example.

Change-Id: If7569c02faf56ea84c34ee1345f1a33d318cdfff
Signed-off-by: Zicong Wang <wangzicong@nudt.edu.cn>
Reviewed-on: https://gem5-review.googlesource.com/c/15535
Reviewed-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agosparc: Get rid of some register type definitions.
Gabe Black [Fri, 19 Oct 2018 00:50:42 +0000 (17:50 -0700)]
sparc: Get rid of some register type definitions.

These are IntReg, FloatReg, FloatRegBits, and MiscReg. These have been
supplanted by the global types RegVal and FloatRegVal.

Change-Id: I956abfc7b439b083403e1a0d01e0bb35020bde44
Reviewed-on: https://gem5-review.googlesource.com/c/13627
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
5 years agoarch: cpu: Stop passing around misc registers by reference.
Gabe Black [Fri, 19 Oct 2018 00:34:08 +0000 (17:34 -0700)]
arch: cpu: Stop passing around misc registers by reference.

These values are all basic integers (specifically uint64_t now), and
so passing them by const & is actually less efficient since there's a
extra level of indirection and an extra value, and the same sized value
(a 64 bit pointer vs. a 64 bit int) is being passed around.

Change-Id: Ie9956b8dc4c225068ab1afaba233ec2b42b76da3
Reviewed-on: https://gem5-review.googlesource.com/c/13626
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
5 years agoarm: Get rid of some register type definitions.
Gabe Black [Sat, 13 Oct 2018 08:25:30 +0000 (01:25 -0700)]
arm: Get rid of some register type definitions.

These are IntReg, FloatReg, FloatRegBits, and MiscReg. These have been
supplanted by the global types RegVal and FloatRegVal.

Change-Id: Ief1cd85d0eff7156282ddb1ce168a2a5677f7435
Reviewed-on: https://gem5-review.googlesource.com/c/13625
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>

5 years agoarm: dev: Replace ArmISA::MiscReg with RegVal in the GIC v3 model.
Gabe Black [Mon, 21 Jan 2019 21:14:55 +0000 (13:14 -0800)]
arm: dev: Replace ArmISA::MiscReg with RegVal in the GIC v3 model.

Other dev code was already switched over. This code was written before
the switch over (or unaware of it), and checked in after.

Change-Id: Ibb9e9e4300d01cc46e4dae668274debc2a4989ba
Reviewed-on: https://gem5-review.googlesource.com/c/15755
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-arm: implement the GDB XML target description for ARM
Ciro Santilli [Fri, 21 Dec 2018 14:25:24 +0000 (14:25 +0000)]
arch-arm: implement the GDB XML target description for ARM

The supported registers are essentially the same as before this patch,
but it is now trivial to make new registers visible in future commits.

Change-Id: Id15b7aeccca824c342e49a626d2877179474f3d4
Reviewed-on: https://gem5-review.googlesource.com/c/15138
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoext: import GDB XML target description files for arm
Ciro Santilli [Fri, 21 Dec 2018 14:24:36 +0000 (14:24 +0000)]
ext: import GDB XML target description files for arm

The XML files were copied from the binutils-gdb source tree under
gdb/features at tag gdb-8.2-release Those XML files have a different
copyright header than the rest of binutils-gdb which allows them to be
copied into non-GPL projects.

Change-Id: I49bdeaad91ceb284c73cc0b861906ce09e44ca1d
Reviewed-on: https://gem5-review.googlesource.com/c/15256
Maintainer: Gabe Black <gabeblack@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
5 years agoscons: add helpers to access GDB XML description files
Ciro Santilli [Fri, 21 Dec 2018 14:22:30 +0000 (14:22 +0000)]
scons: add helpers to access GDB XML description files

Change-Id: Ic3b18887544b7710ed07a86d28dc62d8441b3476
Reviewed-on: https://gem5-review.googlesource.com/c/15255
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agoscons: allow embedding arbitrary blobs into the gem5 executable
Ciro Santilli [Mon, 19 Nov 2018 15:25:43 +0000 (15:25 +0000)]
scons: allow embedding arbitrary blobs into the gem5 executable

The initial motivation for this is to embed the GDB XML target
description files into the executable.

Change-Id: I721e8dd37119d8e6eb376d7e9050b1094282bacc
Reviewed-on: https://gem5-review.googlesource.com/c/15136
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agobase: add support for GDB's XML architecture definition
Ciro Santilli [Mon, 19 Nov 2018 15:25:44 +0000 (15:25 +0000)]
base: add support for GDB's XML architecture definition

This is done by implementing the Xfer:features:read packet of the GDB
remote protocol.

Before this commit, gem5 used the defaults of the GDB client.

With this commit, gem5 can inform the client which registers it knows
about. This allows in particular to support new registers which an older
GDB client does not yet know about.

The XML is not implemented in this commit for any arch, and falls back
almost exactly to previous behaviour. The only change is that now gem5
replies to the Supported: request which the GDB clients sends at the
beginning of the transaction with an empty feature list containing only
the mandatory PacketSize= argument.

Since the feature list does not contain qXfer:features:read, the GDB
client knows that the gem5 server does support the XML format and uses
its default registers as before.

Change-Id: I5185f28b00e9b9cc8245f4b4262cc324c3d298c1
Reviewed-on: https://gem5-review.googlesource.com/c/15137
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-arm: Move AArch32 IMPLEMENTATION DEFINED registers
Giacomo Travaglini [Thu, 25 Oct 2018 10:14:47 +0000 (11:14 +0100)]
arch-arm: Move AArch32 IMPLEMENTATION DEFINED registers

Moving AArch32 instruction accessing IMPLEMENTATION DEFINED registers
from pseudo.[cc/hh] to misc.[cc/hh] in order to symmetrically match
with AArch64 implementation.

Change-Id: I27b0d65925d7965589b765269ae54129426e4c88
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/15735
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agomem: Add tryTiming suppport to CommMonitor
Sascha Bischoff [Wed, 14 Nov 2018 16:31:53 +0000 (16:31 +0000)]
mem: Add tryTiming suppport to CommMonitor

The CommMonitor did not support tryTiming, which resulted in gem5
panicing if the CommMonitor was used.

With this change, we update the CommMonitor pass through the
tryTiming() calls.

Change-Id: I86810170e5e10a0c5d63af76fc4a6ab70710d2fb
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15736
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agosim-se add readv and modifies writev
Brandon Potter [Wed, 18 Apr 2018 19:02:34 +0000 (15:02 -0400)]
sim-se add readv and modifies writev

Change-Id: I6cbce4389d5697da34058dc910306394e48c6582
Reviewed-on: https://gem5-review.googlesource.com/c/12117
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosim-se: add ability to get/set sock metadata
Brandon Potter [Wed, 18 Apr 2018 19:00:14 +0000 (15:00 -0400)]
sim-se: add ability to get/set sock metadata

Add getsockopt, getsockname, setsockname, and getpeername
system calls.

Change-Id: Ifa1d9a95f15b4fb12859dbfd3c4bd248de2e3d32
Reviewed-on: https://gem5-review.googlesource.com/c/12116
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosim-se: add syscalls related to polling
Brandon Potter [Wed, 18 Apr 2018 18:57:57 +0000 (14:57 -0400)]
sim-se: add syscalls related to polling

Fix poll so that it will use the syscall retry capability
instead of causing a blocking call.

Add the accept and wait4 system calls.

Add polling to read to remove deadlocks that occur in the
event queue that are caused by blocking system calls.

Modify the write system call to return an error number in
case of error.

Change-Id: I0b4091a2e41e4187ebf69d63e0088f988f37d5da
Reviewed-on: https://gem5-review.googlesource.com/c/12115
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosim-se: add calls for network transmissions
Brandon Potter [Wed, 18 Apr 2018 18:55:30 +0000 (14:55 -0400)]
sim-se: add calls for network transmissions

Add recvfrom, sendto, recvmsg, and sendmsg system calls.

Change-Id: I2eb50ea7823c8af57d99b3b8d443d2099418c06c
Reviewed-on: https://gem5-review.googlesource.com/c/12114
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosim-se: add socket-based functionality
Brandon Potter [Wed, 18 Apr 2018 18:48:19 +0000 (14:48 -0400)]
sim-se: add socket-based functionality

Add socket, socketpair, bind, list, connect and shutdown
system calls.

Change-Id: I635af3fca410f96fe28f8fe497e3d457a9dbc470
Reviewed-on: https://gem5-review.googlesource.com/c/12113
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agobase: Fix unitialized storage
Daniel R. Carvalho [Tue, 15 Jan 2019 10:51:46 +0000 (11:51 +0100)]
base: Fix unitialized storage

The bitunion is not being initialized on constructor to avoid
performance overhead, and that generated a maybe-unitialized
error when a sub-class was being copied before assigned in
serialize's parseParam() in some compilers.

This patch adds zero-initialization to the problematic variable
to appease the compiler.

Change-Id: I90fa6aa356b3e14ec25e3294b17ed10f429a9a38
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/15635
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agotests: Fix tests/main.py so it can be run from anywhere.
Gabe Black [Wed, 16 Jan 2019 22:58:11 +0000 (14:58 -0800)]
tests: Fix tests/main.py so it can be run from anywhere.

tests/main.py was trying to find paths relative to itself using the
string __name__ (which was __main__) when it should have been using the
string __file__ which holds the name of the file being executed.

Change-Id: I5ff4c42fc7d8b75ff6b96c3cde61baf731d84738
Reviewed-on: https://gem5-review.googlesource.com/c/15675
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agomem: Allow inserts in the begining of a packet queue
Nikos Nikoleris [Tue, 4 Dec 2018 15:52:17 +0000 (15:52 +0000)]
mem: Allow inserts in the begining of a packet queue

A packet queue keeps track of packets that are scheduled to be sent at
a specified time. Packets are sorted such that the packet with the
earliest scheduled time is at the front of the list (unless there are
other ordering requirements). Previouly, the implemented algorithm
didn't allow packets to be placed at the front of the queue resulting
in uneccessary delays. This change fixes the implementation of
schedSendTiming.

Change-Id: Ic74abec7c3f4c12dbf67b5ab26a8d4232e18e19e
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15556
Reviewed-by: Bradley Wang <radwang@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agomem: Determine if a packet queue forces ordering at construction
Nikos Nikoleris [Tue, 27 Nov 2018 16:55:50 +0000 (16:55 +0000)]
mem: Determine if a packet queue forces ordering at construction

A packet queue is typically used to hold on to packets that are
schedules to be sent in the future or when they need to queue behind
younger packets that have been sent out yet. Due to memory order
requirements, some MemObjects need to maintain the order for packet
(mostly responses) that reference the same cache block.

Prior to this patch the ordering requirements where determined when
the packet was scheduled to be sent. This patch moves the parameter to
the constructor.

Change-Id: Ieb4d94e86bc7514f5036b313ec23ea47dd653164
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15555
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu-o3: Make the smtCommitPolicy a Param.ScopedEnum
Nikos Nikoleris [Thu, 3 Jan 2019 19:01:04 +0000 (19:01 +0000)]
cpu-o3: Make the smtCommitPolicy a Param.ScopedEnum

The smtCommitPolicy is a parameter in the o3 cpu that can have 3
different values. Previously this setting was done through a string
and a parser function would turn it into a c++ enum value. This
changeset turns the string into a python Param.ScopedEnum.

Change-Id: I3625f2c08a1ae0c3b0dce7a641c6ae1ce3fd79a5
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15400
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu-o3: Make the smtROBPolicy a Param.ScopedEnum
Nikos Nikoleris [Thu, 3 Jan 2019 18:48:51 +0000 (18:48 +0000)]
cpu-o3: Make the smtROBPolicy a Param.ScopedEnum

The smtROBPolicy is a parameter in the o3 cpu that can have 3
different values. Previously this setting was done through a string
and a parser function would turn it into a c++ enum value. This
changeset turns the string into a python Param.ScopedEnum.

Change-Id: Ie104d055dbbc6e44997ae0c1470de714239be5a3
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15399
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu-o3: Make the smtIQPolicy a Param.ScopedEnum
Nikos Nikoleris [Thu, 3 Jan 2019 17:54:09 +0000 (17:54 +0000)]
cpu-o3: Make the smtIQPolicy a Param.ScopedEnum

The smtIQPolicy is a parameter in the o3 cpu that can have 3
different values. Previously this setting was done through a string
and a parser function would turn it into a c++ enum value. This
changeset turns the string into a python Param.ScopedEnum.

Change-Id: Ieecf0a19427dd250b0d5ae3d531ab46a37326ae5
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15398
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu-o3: Make the smtLSQPolicy a Param.ScopedEnum
Nikos Nikoleris [Mon, 24 Dec 2018 09:04:16 +0000 (09:04 +0000)]
cpu-o3: Make the smtLSQPolicy a Param.ScopedEnum

The smtLSQPolicy is a parameter in the o3 cpu that can have 3
different values. Previously this setting was done through a string
and a parser function would turn it into a c++ enum value. This
changeset turns the string into a python Param.ScopedEnum.

Change-Id: I82041b88bd914c5dc660058d9e3998e3114e7c35
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15397
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu-o3: Make the smtFetchPolicy a Param.ScopedEnum
Nikos Nikoleris [Thu, 3 Jan 2019 17:45:56 +0000 (17:45 +0000)]
cpu-o3: Make the smtFetchPolicy a Param.ScopedEnum

The smtFetchPolicy is a parameter in the o3 cpu that can have 5
different values. Previously this setting was done through a string
and a parser function would turn it into a c++ enum value. This
changeset turns the string into a python Param.ScopedEnum.

Change-Id: Iafb4b4b27587541185ea912e5ed581bce09695f5
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15396
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agopython: Add support for scoped enums
Nikos Nikoleris [Mon, 24 Dec 2018 08:59:53 +0000 (08:59 +0000)]
python: Add support for scoped enums

At the moment gem5 has support for enum params that either generate a
unscoped within the Enums namespace or a struct encapsulated enum. The
Enums namespace is getting quite big and some params have the same
names which results in collisions. This change adds support for the
scoped enums.

Change-Id: I930e1cc3b814081627b653939e75d6c43956a334
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15395
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu: dev: sim: gpu-compute: Banish some ISA specific register types.
Gabe Black [Sat, 13 Oct 2018 07:54:32 +0000 (00:54 -0700)]
cpu: dev: sim: gpu-compute: Banish some ISA specific register types.

These types are IntReg, FloatReg, FloatRegBits, and MiscReg. There are
some remaining types, specifically the vector registers and the CCReg.
I'm less familiar with these new types of registers, and so will look
at getting rid of them at some later time.

Change-Id: Ide8f76b15c531286f61427330053b44074b8ac9b
Reviewed-on: https://gem5-review.googlesource.com/c/13624
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agoarch: Make the ISA register types aliases for the global types.
Gabe Black [Sat, 13 Oct 2018 06:39:36 +0000 (23:39 -0700)]
arch: Make the ISA register types aliases for the global types.

The ISA specific types can thus be phased out.

Change-Id: I8ea531a099fad140a4ec9c91cd972fe044111d60
Reviewed-on: https://gem5-review.googlesource.com/c/13623
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agoarm: Make the fp register types 64 bits.
Gabe Black [Sat, 13 Oct 2018 06:33:34 +0000 (23:33 -0700)]
arm: Make the fp register types 64 bits.

This matches the other ISAs.

Change-Id: I84de91efde2529f4aecc7b26b84266d97459738c
Reviewed-on: https://gem5-review.googlesource.com/c/13622
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>

5 years agomem-cache: Access Map Pattern Matching Prefetcher
Javier Bueno [Thu, 13 Dec 2018 11:08:35 +0000 (12:08 +0100)]
mem-cache: Access Map Pattern Matching Prefetcher

Implementation of the Access Map Pattern Matching prefetcher
Based in the description of the following paper:
  Access map pattern matching for high performance data cache prefetch.
  Ishii, Y., Inaba, M., & Hiraki, K. (2011).
  Journal of Instruction-Level Parallelism, 13, 1-24.

Change-Id: I0d4b7f7afc2ab4938bdd8755bfed26e26a28530c
Reviewed-on: https://gem5-review.googlesource.com/c/15096
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

5 years agomem-cache: Signature Path Prefetcher
Javier Bueno [Thu, 29 Nov 2018 15:59:16 +0000 (16:59 +0100)]
mem-cache: Signature Path Prefetcher

Related paper:
  Lookahead Prefetching with Signature Path
  J Kim, PV Gratz, ALN Reddy
  The 2nd Data Prefetching Championship (DPC2), 2015

Change-Id: I2319be2fa409f955f65e1bf1e1bb2d6d9a4fea11
Reviewed-on: https://gem5-review.googlesource.com/c/14737
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

5 years agomem-cache: allow prefetchers to emit page crossing references
Javier Bueno [Thu, 29 Nov 2018 15:35:16 +0000 (16:35 +0100)]
mem-cache: allow prefetchers to emit page crossing references

QueuedPrefetcher takes the responsability to check for page
crossing references.

Change-Id: I0ae6bf8be465118990d9ea1cac0da8f70e69aeb1
Reviewed-on: https://gem5-review.googlesource.com/c/14735
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

5 years agomem-cache: virtual address support for prefetchers
Javier Bueno [Sat, 17 Nov 2018 23:50:08 +0000 (00:50 +0100)]
mem-cache: virtual address support for prefetchers

Prefetchers can be configured to operate with virtual or physical addreses.
The option can be configured through the "use_virtual_addresses" parameter
of the Prefetcher object.

Change-Id: I4f8c3687988afecc8a91c3c5b2d44cc0580f72aa
Reviewed-on: https://gem5-review.googlesource.com/c/14416
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
5 years agoarch-arm: Read VMPIDR instead of MPIDR when EL2 is Enabled
Giacomo Travaglini [Tue, 18 Dec 2018 14:20:44 +0000 (14:20 +0000)]
arch-arm: Read VMPIDR instead of MPIDR when EL2 is Enabled

Trying to read MPIDR(_EL1) from EL1, should return the value of
VMPIDR_EL2 if EL2 is enabled. This patch is modifying the utility
function for reading MPIDR in order to match this behaviour for both
AArch32 and AArch64.

Change-Id: I32c2d4d5052f509e6e0542a5314844164221c6a3
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/15617
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-arm: Added TLBI_ALL EL2 instruction
Anouk Van Laer [Mon, 3 Sep 2018 11:17:27 +0000 (12:17 +0100)]
arch-arm: Added TLBI_ALL EL2 instruction

This patch is adding TLBI_ALLE2(IS) operations to the arm ISA.

Change-Id: I8e35cff9a2cc414f4c5fbbc5aa0cfe5023a3f011
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15616
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-riscv: Add interrupt handling
Alec Roelke [Fri, 13 Jul 2018 14:48:01 +0000 (10:48 -0400)]
arch-riscv: Add interrupt handling

Implement the Interrupts SimObject for RISC-V. This basically just
handles setting and getting the values of the interrupt-pending and
interrupt-enable CSRs according to the privileged ISA reference chapter
3.1.14. Note that it does NOT implement the PLIC as defined in chapter
7, as that is used for handling external interrupts which are defined
based on peripherals that are available.

Change-Id: Ia1321430f870ff5a3950217266fde0511332485b
Reviewed-on: https://gem5-review.googlesource.com/c/14377
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agoarch-riscv: Fix reset function and style
Alec Roelke [Mon, 19 Feb 2018 03:28:44 +0000 (22:28 -0500)]
arch-riscv: Fix reset function and style

In addition to fixing some style issues with resetting, this patch fixes
what happens on reset. The RISC-V privileged ISA reference manual says
that,
on reset:
 1. Privilege mode is set to M
 2. mstatus.mie <- 0; mstatus.mprv <- 0
 3. PC <- reset vector
 4. mcause <- reset cause (0 if there is no distinguishing causes)
 5. Everything else is undefined
Because of 5, everything else will be left alone

Change-Id: I81bdf7a88b08874e3c3d5fc6c7f3ca2d796496b8
Reviewed-on: https://gem5-review.googlesource.com/c/14376
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agocpu: Fix usage of setArchVecElem
Giacomo Travaglini [Wed, 12 Dec 2018 16:56:28 +0000 (16:56 +0000)]
cpu: Fix usage of setArchVecElem

setArchVecElem should create a VecElemClass RegId, and not a VecRegClass.
Initializing a VecRegClass with three arguments makes it panic

Change-Id: I6c398d67305bfe7bea12cb02edd4f4c3a202e69a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15655
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarch-arm: Fix usage of RegId constructor for VecElem
Giacomo Travaglini [Wed, 12 Dec 2018 16:56:28 +0000 (16:56 +0000)]
arch-arm: Fix usage of RegId constructor for VecElem

RegId() constructor requires three arguments in case of a VecElem
register: the class, the vector index and the element index inside the
vector, otherwise it panics.

Change-Id: Ic842df4dcddaffa83b211aa6e1dd1953cafa4951
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15615
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarm: Stop using the FloatReg and FloatRegBits types.
Gabe Black [Sat, 13 Oct 2018 06:32:43 +0000 (23:32 -0700)]
arm: Stop using the FloatReg and FloatRegBits types.

This will let us make those types 64 bits to be in line with the other
architectures.

Change-Id: I5aef5199f4d2d5bb1558afedac5c6c92bf95c021
Reviewed-on: https://gem5-review.googlesource.com/c/13621
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>

5 years agoconfig: De-nest the code in Port.splice().
Gabe Black [Sat, 12 Jan 2019 01:04:44 +0000 (17:04 -0800)]
config: De-nest the code in Port.splice().

The error checking in that function used an if/else structure where
one of the two branches would be the error condition which would cause
the function to exit. Because the function would exit if an error was
detected, there's no reason to have the non-error condition guarded in
the other half of the if.

This change de-nests the non-error cases to make the function simpler
and easier to read.

Change-Id: Idedf54e84a178fa5a2a47f96373374152e420cf3
Reviewed-on: https://gem5-review.googlesource.com/c/15516
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoconfig: Fix an error message in Port.splice().
Gabe Black [Sat, 12 Jan 2019 01:00:38 +0000 (17:00 -0800)]
config: Fix an error message in Port.splice().

That error message referenced non-existent variables which were likely
renamed without updating the error message.

Change-Id: I6878802ef4b83e3fdf75a860d848b8c5e2e8d6c0
Reviewed-on: https://gem5-review.googlesource.com/c/15515
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoscons: added support of default Python installation on MacOS
Andrea Mondelli [Thu, 10 Jan 2019 15:33:13 +0000 (10:33 -0500)]
scons: added support of default Python installation on MacOS

Recent MacOS versions are distributed with python 2.7.
This version of python is sufficient to compile and run gem5.

This patch allows to use the default python instead of the version provided
by third-party tools (e.g., brew)

The default MacOS LLDB debugger is linked against the default python
installation, which conflicts with Python framework provided by third-party
package systems.

This patch removes the need of gem5 to have multiple python installations
on MacOS, if not explicitly installed.

Change-Id: I98f24804149cb2e04ca432c66d2f57e0296af7b2
Reviewed-on: https://gem5-review.googlesource.com/c/15475
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

5 years agomisc: updated shabang for python script
Andrea Mondelli [Thu, 10 Jan 2019 15:12:41 +0000 (10:12 -0500)]
misc: updated shabang for python script

The default python on MacOS doesn’t have an alias to python2.
The official python version supported in gem5 is Python2.7.

This patch updates the shabang according to the version required in gem5.

Change-Id: I9533c0f7858b5b3cab0ef101be1ee5cd718105b0
Reviewed-on: https://gem5-review.googlesource.com/c/15375
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
5 years agosim-se, arch-arm: Add support for getdents64
Javier Setoain [Wed, 9 Jan 2019 14:24:31 +0000 (14:24 +0000)]
sim-se, arch-arm: Add support for getdents64

Change-Id: Ib27950144d4c9802ffb842db98aec9e433ccbfc5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15438
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
5 years agoarch-arm, sim-se: Add support for TLS in clone
Andreas Sandberg [Wed, 9 Jan 2019 16:20:20 +0000 (16:20 +0000)]
arch-arm, sim-se: Add support for TLS in clone

Change-Id: I1f78dce05a48a2e3adfaf027cd38ab55507b9611
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15437
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

5 years agoarch-arm, sim-se: Fix incorrect SP handling in clone
Andreas Sandberg [Wed, 9 Jan 2019 15:52:51 +0000 (15:52 +0000)]
arch-arm, sim-se: Fix incorrect SP handling in clone

The clone syscall is currently broken on aarch64 since the aarch64
code uses an incorrect SP register. Fix this by storing the new stack
pointer in SP_EL0 instead of R13.

Change-Id: Ie17990b4f359608e3b53e5bf625eca53769a6653
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15436
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

5 years agosim-se: Refactor clone to avoid most ifdefs
Andreas Sandberg [Wed, 9 Jan 2019 14:50:27 +0000 (14:50 +0000)]
sim-se: Refactor clone to avoid most ifdefs

Some parts of clone are architecture dependent. In some cases, we are
able to use architecture-specific helper functions or register
aliases. However, there is still some architecture-specific that is
protected by ifdefs in the common clone implementation.

Move these architecture-specific bits to the architecture-specific OS
class instead to avoid these ifdefs and make the code a bit more
readable.

Change-Id: Ia0903d738d0ba890863bddfa77e3b717db7f45de
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15435
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

5 years agosim-se: Correctly calculate next PC in clone
Andreas Sandberg [Wed, 9 Jan 2019 14:51:33 +0000 (14:51 +0000)]
sim-se: Correctly calculate next PC in clone

The clone syscall doesn't propagate all state in the PCState object
when calculating the return PC of a newly created process. Instead of
creating a new PCState object from the next PC address, copy the old
PC and advance it.

Change-Id: Ice53831920bcb5d198865169ed2cca8d06e37cfe
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15417
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

5 years agosim-se: Use CONFIG_CLONE_BACKWARDS for Arm
Andreas Sandberg [Wed, 9 Jan 2019 14:31:52 +0000 (14:31 +0000)]
sim-se: Use CONFIG_CLONE_BACKWARDS for Arm

Linxu on Arm users the CLONE_BACKWARDS argument order for the clone
syscall.

Change-Id: I48deb4f03140c9d4ef7a89e3e33813e76777f999
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15416
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

5 years agoarch-arm, sim-se: Wire up syscalls needed for pthreads
Javier Setoain [Wed, 9 Jan 2019 12:52:20 +0000 (12:52 +0000)]
arch-arm, sim-se: Wire up syscalls needed for pthreads

Change-Id: I8da5e3e0d7dc5d31ac82ed2045109d6d73cbf99d
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Cc: Giacomo Travaglini <giacomo.travaglini@arm.com>
Cc: Javier Setoain <javier.setoain@arm.com>
Cc: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15415
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

5 years agodev-arm: Add a VExpress_GEM5_V2 platform with GICv3 support
Jairo Balart [Tue, 13 Nov 2018 09:58:31 +0000 (10:58 +0100)]
dev-arm: Add a VExpress_GEM5_V2 platform with GICv3 support

Change-Id: I6fd14138d94654e8e60cde08239ea9a50fc19eb7
Reviewed-on: https://gem5-review.googlesource.com/c/14255
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
5 years agodev-arm: Add a GICv3 model
Jairo Balart [Thu, 11 Oct 2018 14:05:12 +0000 (16:05 +0200)]
dev-arm: Add a GICv3 model

Change-Id: Ib0067fc743f84ff7be9f12d2fc33ddf63736bdd1
Reviewed-on: https://gem5-review.googlesource.com/c/13436
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>

5 years agobase: Make it possible to convert strings to enums
Giacomo Travaglini [Tue, 8 Jan 2019 10:17:39 +0000 (10:17 +0000)]
base: Make it possible to convert strings to enums

The __to_number helper function defined in base/str.hh is used by
unserializing code. Its purpose is to convert a string into an
integral/floating point number.  Since enums underlying type can only be
an integer type, it makes sense to extend the helper function for enums
as well. In this way it will be possible to unserialize Enums and
containers of Enums without the need of casting.

Change-Id: I74069cc4c04ec8b5eb80939acea7ab18fb366dd4
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15336
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agosystemc: Fix a function which was broken during style fixes.
Gabe Black [Thu, 10 Jan 2019 03:04:53 +0000 (19:04 -0800)]
systemc: Fix a function which was broken during style fixes.

Some brackets were misapplied while correcting the style of the TLM
header files.

Change-Id: I4e26d0316ca2545a5f26ad5fef0e986e42a1895b
Reviewed-on: https://gem5-review.googlesource.com/c/15455
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agoarch-arm: Additional bits in misc ARM registers to use with the TLB and page walker
Ivan Pizarro [Thu, 20 Dec 2018 14:25:15 +0000 (15:25 +0100)]
arch-arm: Additional bits in misc ARM registers to use with the TLB and page walker

Change-Id: I71a6360709b35ad788d8c88fba1a7a2761233dbd
Reviewed-on: https://gem5-review.googlesource.com/c/14555
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agosystemc: Make input.txt a dependency for the tlm/endian_conv test.
Gabe Black [Wed, 12 Dec 2018 08:17:00 +0000 (00:17 -0800)]
systemc: Make input.txt a dependency for the tlm/endian_conv test.

This input file is consumed by the test and needs to be in the build
directory.

Change-Id: I3420dec9e41a1981c7d4e6df47f03273e378ab66
Reviewed-on: https://gem5-review.googlesource.com/c/15064
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Exclude some failing systemc TLM tests in working.filt.
Gabe Black [Wed, 12 Dec 2018 23:47:07 +0000 (15:47 -0800)]
systemc: Exclude some failing systemc TLM tests in working.filt.

These are known to fail and are undiagnosed, and so are not "working"
and shouldn't be in included when using the working.filt filter file.

Change-Id: I46e9f880bd4095085e4217ac6bec950cb2af9536
Reviewed-on: https://gem5-review.googlesource.com/c/15066
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Remove the TLM dependence on a non-standard method.
Gabe Black [Tue, 11 Dec 2018 07:37:24 +0000 (23:37 -0800)]
systemc: Remove the TLM dependence on a non-standard method.

The sc_event_finder class in Accellera's implementation has a
non-standard report_error function that it uses internally. The TLM
headers were calling that function in their own event finder subclass.
This change replaces that call with what should be an equivalent bit of
code which is based on the report_error implementation.

Change-Id: Id57d26791df01403a77e70d5f4a00f650dc33599
Reviewed-on: https://gem5-review.googlesource.com/c/15063
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Stop using the sc_string_view type.
Gabe Black [Thu, 3 Jan 2019 22:30:14 +0000 (14:30 -0800)]
systemc: Stop using the sc_string_view type.

It doesn't seem to provide anything more that std::string, and comes
with extra dependencies/baggage.

Change-Id: I2c599bcc93fa4a944ff249410d24e8f8be981afe
Reviewed-on: https://gem5-review.googlesource.com/c/15298
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Replace sc_core::sc_type_index with std::type_index.
Gabe Black [Thu, 3 Jan 2019 21:57:27 +0000 (13:57 -0800)]
systemc: Replace sc_core::sc_type_index with std::type_index.

The former is either the same as the later, or a custom wrapper if
C++11 isn't supported. Since we generally expect C++11 support, we can
skip the indirection.

Change-Id: I9a45e3854bb7cc56d094e3fe2773fe4b5c94403b
Reviewed-on: https://gem5-review.googlesource.com/c/15297
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Stop using the Accellera specific "none" global event object.
Gabe Black [Thu, 3 Jan 2019 06:14:23 +0000 (22:14 -0800)]
systemc: Stop using the Accellera specific "none" global event object.

That event being available is nonstandard. Define our own static event
for use in that case.

Change-Id: I5e8892bd83cc1984d63949ef3e249755dca0c702
Reviewed-on: https://gem5-review.googlesource.com/c/15296
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Rename tlm_core header files to have a .hh extentension.
Gabe Black [Thu, 13 Dec 2018 00:43:18 +0000 (16:43 -0800)]
systemc: Rename tlm_core header files to have a .hh extentension.

This makes those files more consistent with other headers in gem5. The
top level headers (tlm and tlm.h) and the tlm_utils headers were left
alone since the user might reasonably expect those to have a well known
name. The tlm_core headers by comparison are an implementation detail,
and users shouldn't include them directly by name.

Change-Id: Ibc82e8159e47717c79d76f50ed96fdd619294a06
Reviewed-on: https://gem5-review.googlesource.com/c/15067
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Add a dummy argv[0] when running the tests.
Gabe Black [Wed, 12 Dec 2018 08:17:46 +0000 (00:17 -0800)]
systemc: Add a dummy argv[0] when running the tests.

One TLM test will complain if argc isn't 1 or 2, assuming that that
must mean that argc > 2. If it's 0 then the test will also complain and
fail. We therefore need to pass it at least a dummy value in argv/argc.

Change-Id: I5c64856f46d1459d7238e88ad8ba06933c7c38b8
Reviewed-on: https://gem5-review.googlesource.com/c/15065
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Stop using the non-standard sc_time % in TLM.
Gabe Black [Tue, 11 Dec 2018 07:21:39 +0000 (23:21 -0800)]
systemc: Stop using the non-standard sc_time % in TLM.

The TLM headers were using the non-standard % operator on sc_time.
This change replaces that with % applied to the result of
sc_time::value().

Change-Id: Ic381eb1ada2c994d04e65896db178f58446944ae
Reviewed-on: https://gem5-review.googlesource.com/c/15062
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Add an elaboration_done method to sc_simcontext.
Gabe Black [Tue, 11 Dec 2018 07:19:56 +0000 (23:19 -0800)]
systemc: Add an elaboration_done method to sc_simcontext.

The TLM headers rely on this non-standard function.

Change-Id: Iaedec35f1f363dcf3e1fcdb58a74eb2cdc05ddc0
Reviewed-on: https://gem5-review.googlesource.com/c/15061
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Include cstring in the tlm header file.
Gabe Black [Tue, 11 Dec 2018 07:16:19 +0000 (23:16 -0800)]
systemc: Include cstring in the tlm header file.

A lot of TLM implementation assumes the string functions (memcpy,
memset, etc) are available, but don't include cstring. Lets do that
for them to avoid having to fix up a lot of places.

Change-Id: I1f26d3a227fe2cefc2613e24cbb0333216e46ee9
Reviewed-on: https://gem5-review.googlesource.com/c/15060
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Remove redundant tlm_ prefixes from file names.
Gabe Black [Tue, 11 Dec 2018 07:02:13 +0000 (23:02 -0800)]
systemc: Remove redundant tlm_ prefixes from file names.

We already know those files belong to tlm because of the directory
they're in. Removing the prefix makes the paths of the headers less
enormously long.

Change-Id: I869e58fae904162f353bb31f4c0919fba08dffa6
Reviewed-on: https://gem5-review.googlesource.com/c/15059
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Replace some calls to some Accellera specific functions in TLM.
Gabe Black [Thu, 13 Dec 2018 00:07:58 +0000 (16:07 -0800)]
systemc: Replace some calls to some Accellera specific functions in TLM.

The TLM event finder class was calling implementation specific
functions from the Accellera version of systemc. This change replaces those
calls with equivalent calls which match the gem5 implementation.

Change-Id: I0ecdb0a4bf09aeb1aad823a01105fbd88edb4601
Reviewed-on: https://gem5-review.googlesource.com/c/15075
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Rename tlm .cpp files to .cc and add SConscripts.
Gabe Black [Thu, 3 Jan 2019 05:16:38 +0000 (21:16 -0800)]
systemc: Rename tlm .cpp files to .cc and add SConscripts.

Change-Id: Ia30192b441dd34bc7165c6335386c88c0015fdf6
Reviewed-on: https://gem5-review.googlesource.com/c/15295
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Fix style issues in the TLM header files.
Gabe Black [Sat, 8 Dec 2018 10:05:34 +0000 (02:05 -0800)]
systemc: Fix style issues in the TLM header files.

Change-Id: Id12ffb9b56b3887afcf30120f81ce5eb75a5987b
Reviewed-on: https://gem5-review.googlesource.com/c/15057
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Also look for tests in the tlm test directory.
Gabe Black [Sat, 8 Dec 2018 09:59:34 +0000 (01:59 -0800)]
systemc: Also look for tests in the tlm test directory.

Both basic systemc and tlm tests were present, but scons only looked
in the systemc directory when populating the test json. This change
makes it also look in the tlm directory so that those tests can be run.

Change-Id: Id65b744664350f6105fb3a4f28cbc7ab91d8c82e
Reviewed-on: https://gem5-review.googlesource.com/c/15056
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystemc: Initial import of TLM headers from Accellera.
Gabe Black [Sat, 8 Dec 2018 09:58:26 +0000 (01:58 -0800)]
systemc: Initial import of TLM headers from Accellera.

These headers will need to be cleaned up and have some Accellera
specific quirks ironed out of them, but I'll do that in a later change
to make it clear what those changes are.

Change-Id: Ia4e08633ab552b4c616c66c9b7e2bbd78ebfe7b9
Reviewed-on: https://gem5-review.googlesource.com/c/15055
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

5 years agosystem-arm: Add device tree for new VExpress GEM5_V2 platform
Jairo Balart [Tue, 13 Nov 2018 10:02:46 +0000 (11:02 +0100)]
system-arm: Add device tree for new VExpress GEM5_V2 platform

Change-Id: Ifc2b91afe5b88a656b4ed1c64ab6cca97f082034
Reviewed-on: https://gem5-review.googlesource.com/c/14275
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agosystem-arm: Add aarch64 bootloader support for GICv3
Jairo Balart [Thu, 11 Oct 2018 14:03:24 +0000 (16:03 +0200)]
system-arm: Add aarch64 bootloader support for GICv3

Change-Id: If75262709868cc59d320f60273a32397339f1dd5
Signed-off-by: Jairo Balart <jairo.balart@metempsy.com>
Reviewed-on: https://gem5-review.googlesource.com/c/13435
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoscons: Disable partial linking on Mac OS
Nikos Nikoleris [Sun, 23 Dec 2018 11:16:27 +0000 (11:16 +0000)]
scons: Disable partial linking on Mac OS

Up until Apple LLVM version 10.0.0 (clang-1000.11.45.5), partial
linked objects do not expose symbols that are marked with the hidden
visibility and consequently building gem5 on Mac OS fails. As a
workaround, we disable partial linking, however, we may want to
revisit in the future.

Change-Id: I0a26dae082bf723c2bd49d90e4497e44ecab9c41
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15235
Reviewed-by: Andrea Mondelli <andrea.mondelli@ucf.edu>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

5 years agodev, arm: Warn on PL011 DMA disable
Jan-Peter Larsson [Thu, 20 Dec 2018 15:55:56 +0000 (15:55 +0000)]
dev, arm: Warn on PL011 DMA disable

The PL011 spec specifies a DMACR register at offset 0x48, which isn't
implemented in the model. Currently any attempt to access the register
results in a panic.

This change swaps the panic for a warning only when software writes into
DMACR to disable DMA, keeping the panic otherwise.

Change-Id: I04586b52df8d5d174536276fd7ae19e77ff4681a
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15279
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agodev-arm: Added VGIC GICV_IIDR response
Anouk Van Laer [Wed, 7 Nov 2018 14:04:47 +0000 (14:04 +0000)]
dev-arm: Added VGIC GICV_IIDR response

Change-Id: I60e8eadbbbf07c0f8b726213fd580aeb0dd0e00b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15278
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agodev-arm: Implement GIC-400 model from GicV2
Giacomo Travaglini [Fri, 21 Dec 2018 10:26:55 +0000 (10:26 +0000)]
dev-arm: Implement GIC-400 model from GicV2

Implementation registers for the GICv2 model currently hold values
referring to a GIC-400 implementation. This patch is making them
parametrizable so that it is possible to instantiate a GIC-400 model.
The patch is also modifying Realview platform to use new GIC-400 model
in lieau of GICv2.

Change-Id: I446db8c796ee3c2708af91e9139f0a6e7947321b
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/15277
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agodev-arm: Move VGic from Realview.py to Gic.py
Giacomo Travaglini [Thu, 20 Dec 2018 17:31:42 +0000 (17:31 +0000)]
dev-arm: Move VGic from Realview.py to Gic.py

Change-Id: I17f2fb6be2435d4601263e7f68a0582e0cc70838
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/15276
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agodev-arm: Added unimplemented GICv2 GICC_DIR
Anouk Van Laer [Thu, 27 Sep 2018 15:49:30 +0000 (16:49 +0100)]
dev-arm: Added unimplemented GICv2 GICC_DIR

This GICC CPU register is not implemented but just gives a warning.

Change-Id: I7630aa1df78dde5cf84a87e26cd580b00b283673
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15275
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

5 years agoarm: properly handle RES0/1 for SCTLRs
Curtis Dunham [Mon, 7 May 2018 23:06:08 +0000 (18:06 -0500)]
arm: properly handle RES0/1 for SCTLRs

They were being treated as RAZ/RAO, which is incorrect.
Put the access masks in the register metadatabase now that we have one.

Also fix this for HVBAR.

Change-Id: I097c847e35be2d59fb8235fc621bb061ef514cfb
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/10401
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agocpu: Stop using unions to store FP registers.
Gabe Black [Tue, 20 Nov 2018 01:30:06 +0000 (17:30 -0800)]
cpu: Stop using unions to store FP registers.

These are now accessed only as integer values.

Change-Id: I21ae6537ebbcbaa02890384194ee1ce001c092bb
Reviewed-on: https://gem5-review.googlesource.com/c/14458
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarch, cpu: Remove float type accessors.
Gabe Black [Tue, 20 Nov 2018 01:20:31 +0000 (17:20 -0800)]
arch, cpu: Remove float type accessors.

Use the binary accessors instead.

Change-Id: Iff1877e92c79df02b3d13635391a8c2f025776a2
Reviewed-on: https://gem5-review.googlesource.com/c/14457
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarch-arm: Add Crypto in SE mode
Giacomo Travaglini [Thu, 20 Sep 2018 13:13:11 +0000 (14:13 +0100)]
arch-arm: Add Crypto in SE mode

This patch is also enabling AArch32 crypto instructions by setting the
ID_ISAR5 register accordingly.

Change-Id: Id412585b39b78570a65bd3047199c84e9db76cda
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15155
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agosystemc: Allow specific functions to shadow the base class method
Nikos Nikoleris [Mon, 17 Dec 2018 15:50:04 +0000 (15:50 +0000)]
systemc: Allow specific functions to shadow the base class method

sc_in::bind and sc_core::sc_object::print shadow their respective base
class method. This change adds the necessary declarations to inform
the compiler that this is intentional.

Change-Id: I8c6bc0f05aa568630783db63d52be90f4ea4748c
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15135
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoscons: Disable systemc on Mac OS
Nikos Nikoleris [Sun, 2 Dec 2018 18:39:32 +0000 (18:39 +0000)]
scons: Disable systemc on Mac OS

LLVM on Mac OS up until version 10.0.0 doesn't seem to support the
attribute for weak linking and fails to compile. Additionally, even
the basic example tests fail. Therefore, this change disables systemc
by default on Mac OS until we address these issues.

Change-Id: Iaa6360ec61317e01f4e645af8b509961b3144282
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14818
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarch: Make the ISA parser always use binary floating point accessors.
Gabe Black [Tue, 20 Nov 2018 00:50:41 +0000 (16:50 -0800)]
arch: Make the ISA parser always use binary floating point accessors.

Any operands which use read_code or write_code would need to start
using the floatToBits and bitsToFloat, but only ARM is using that
mechanism, and not on float operands.

Also I notice that the "predicate" mechanism for operands ignores the
read_code and write_code mechanism, and using both will not work
correctly. This change makes no attempt to fix that problem, but
shouldn't contribute to it either.

Change-Id: I0e3a7f78ed28f40cb66958ef12c32e862950fde0
Reviewed-on: https://gem5-review.googlesource.com/c/14456
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosystemc: Ensure resets and edges are notified when signaling a change.
Gabe Black [Wed, 5 Dec 2018 00:17:30 +0000 (16:17 -0800)]
systemc: Ensure resets and edges are notified when signaling a change.

Boolean sc_buffers (either pure bool or sc_dt::sc_logic) should signal
positive and negative edges and resets even when their value doesn't
change, unlike sc_signals. The spec doesn't actually say that and just
mentions the value changed event, but it may have been implied that the
other types of events also happen, they just made special mention of
the value change event.

This change moves some code around a bit so that when _signalChange()
is called, if the underlying type is a boolean signal, it will
automatically notify the appropriate edge event and signal any reset.
Putting the functionality in _signalChange instead of delegating it to
the sc_buffer lets us have a single template for sc_buffer and makes
the base class template specialization handle whether the edge events
exist, and if so which should be notified.

Change-Id: Ic4ca86afc3fde6a9df5c15a0a7386e24ac89a9e2
Reviewed-on: https://gem5-review.googlesource.com/c/14916
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agocpu: Fixed typos in parameter/stats descriptions
Pau Cabre [Sat, 1 Dec 2018 23:20:13 +0000 (00:20 +0100)]
cpu: Fixed typos in parameter/stats descriptions

Change-Id: I7b3274a3e37128da35f497da150af08343e97ee6
Signed-off-by: Pau Cabre <pau.cabre@metempsy.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14795
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Ilias Vougioukas <ilias.vougioukas@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agocpu: Added parameters to enable/disable features in LTAGE
Pau Cabre [Fri, 23 Nov 2018 22:29:35 +0000 (23:29 +0100)]
cpu: Added parameters to enable/disable features in LTAGE

They are for the following features in the LTAGE loop predictor:
 - Hashing for calculating the loop table entry
 - Add direction information
 - Add speculative iteration number information

Change-Id: I395f4526163ee0d0229d1e87cde2bb046f1dd43a
Signed-off-by: Pau Cabre <pau.cabre@metempsy.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14597
Reviewed-by: Ilias Vougioukas <ilias.vougioukas@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Louis Delhez <ldelhez@ucla.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agocpu-o3: Fix bug in LSQUnit(uint32_t, uint32_t) ctor
Tony Gutierrez [Tue, 11 Dec 2018 00:20:06 +0000 (19:20 -0500)]
cpu-o3: Fix bug in LSQUnit(uint32_t, uint32_t) ctor

Change 9af1214 added a new ctor to the LSQUnit, however
there is a typo/bug because it sizes the SQEntries
member variable to lqEntries + 1, as opposed to
sqEntries + 1. This change corrects the issue by
using sqEntries.

Change-Id: I19dfaa5c0e335bd7b84343a92034147d7c5d914e
Reviewed-on: https://gem5-review.googlesource.com/c/15015
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>