Commit Graph

17306 Commits

Author SHA1 Message Date
Daniel R. Carvalho
3016478068 base-stats: Rename Units namespace as units
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

Stats::Units became Stats::units.

Change-Id: I9ce855b291db122d952098a090a2984b42152850
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45415
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-05-26 22:30:33 +00:00
Daniel R. Carvalho
7592230550 base-stats: Rename units variable as enableUnits
Pave the way for a units namespace.

Change-Id: Idd8516f0297be7ba4a76b69315c4a4935e57d937
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45414
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-05-26 22:30:33 +00:00
Daniel R. Carvalho
51029f2727 base-stats: Create base struct for print structs
Reduce code duplication.

Change-Id: I4d31b80ef946d9c1d964910e861088cdd2472f7c
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45413
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-05-26 22:30:33 +00:00
Bobby R. Bruce
6f1c1bccc0 arch-riscv: Fix struct causing compilation errors in clang-11
Clang 11 threw the following error: `anonymous non-C-compatible type
given name for linkage purposes by typedef declaration; add a tag name
here`.

Clang 11 enforces a restriction on giving non-C-compatible anonymous
structs a typedef name for linking purposes. This change to the C++
standard is discussed here http://wg21.link/p1766r1 and has been
retroactively applied to all C++ standard versions.

Change-Id: I87d84b9a3a842066cd4f61968ceee3fcad267b6f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45800
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-26 21:06:55 +00:00
Bobby R. Bruce
a4c3e511ef tests: Add sleep and debug to the jenkins presubmit.sh
This is patch is in regard to issues discussed here:
https://www.mail-archive.com/gem5-dev@gem5.org/msg39122.html
The aim of this patch is to set a potential fix, and to give more
valuable debugging information.

It is not known why Kokoro sometimes fails, but it may be due to the
Docker service not starting fully prior to execution of the tests
within a Docker container. As such a 2 second sleep has been added
between starting the Docker service and running the tests.

The pulling of the docker images has been separated out to run at the
start of testing. This should help us determine whether the issue lays
with the pulling of an image or the running of a container.

The bash debug flag `-x` has been set so the expansion of each line can
be determined upon the event of a failure.

This patch will be reverted if it is found to not solve the issue.

Change-Id: I0d2dd8a080f64296e55f4b6de9a036d94d19c8ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45999
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-26 16:59:51 +00:00
Gabe Black
213c9186de arch,cpu: Make the decoder width a property of the decoder.
In this context, the decoder width is the number of bytes that are fed
into the decoder at once. This is frequently the same as the size of an
instruction, but in instructions with occasionally variable instruction
sizes (ARM, RISCV), or extremely variable instruction sizes (x86) there
may be no relation.

Rather than determining the amount of data to feed to the decoder based
on a MachInst type defined by each ISA, this new interface adds some new
properties to the base InstDecoder class each arch specific decoder
inherits from. These are the size of the incoming buffer, a pointer to
wherever that data should end up, and a mask for masking a PC value so
it aligns with the instruction size.

These values are filled in by a templated InstDecoder constructor which
is templated based on what would have historically been the MachInst
type.

Because the "moreBytes" method would historically accept a parameter of
type MachInst, this parameter has also been eliminated. Now, the
decoder's parent object should use the pointer and size values to fill
in the buffer moreBytes reads. Then when moreBytes is called, it just
uses the buffer without having to show what its type is externally.

Change-Id: I0642cdb6a61e152441ca4ce47d748639175cda90
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40175
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-26 00:31:54 +00:00
Gabe Black
ed0a56c185 base: Apply the stl_helpers helper judiciously.
The existing template would apply the helper operator to *any* template
which took two types, regardless of what that template was. The
assumption was that those types *must* be STL containers, because no
other template takes two types, right?

Instead, this new version uses type traits to explicitly whitelist types
which the helper applies to. Currently the only type it seems to be used
with is std::vector, but by defining more specializations of
IsHelpedContainer, other types/templates can be enabled as well.

This is particularly important when moving to c++17, since the
std::string class would then apparently match the old overload. That
makes the << operator ambiguous and breaks the build.

Change-Id: Id283746a2ccced8882fa23e6f9e69fe22e206b70
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45901
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-25 21:59:49 +00:00
Gabe Black
b783a62fb8 arch-arm: De-macrofy arch/arm/kvm/arm_cpu.cc.
Replace macros with inline functions.

Change-Id: I26571959152aed5f62c543e62750e564fe27bf28
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45879
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-25 20:08:17 +00:00
Gabe Black
8fee59a9af cpu: Delete the cpu/o3/isa_specific.hh header.
This header has no contents and serves no purpose.

Change-Id: I574a4bb248f09ab94c38eebe18a9285dae6604db
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42221
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-25 19:29:26 +00:00
Gabe Black
9909ea8a40 cpu: Create an O3 namespace and simplify O3 names.
DefaultFoo => Foo
O3Foo => Foo
FullO3CPU => CPU

DerivO3CPU => O3CPU (python)

DerivO3 => o3::CPU

Change-Id: I04551214442633c79c33e9d86b067ff3ec0d1a8d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42120
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-25 19:29:14 +00:00
Gabe Black
c76fa4d39e arch-sparc: Create a local port proxy for functional accesses.
Don't retrieve one from the thread context since it's just as easy to
make one from scratch.

Change-Id: I46a812df656a553cc0bd94f61a371b595412a9b3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45904
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-25 16:57:45 +00:00
Daniel R. Carvalho
8bb0dd3ab9 arch-x86: Rename RomLabels namespace as rom_labels
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

RomLabels became rom_labels.

Change-Id: I972409ab33c595baaf845bf11f2f450ab5938d54
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45396
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-25 09:22:17 +00:00
Daniel R. Carvalho
fd660886c7 dev: Put PS2 classes in the ps2 namespace
These classes belong in the ps2 namespace. Use this
opportunity to rename PS2Device as ps2::Device, and
PS2TouchKit as ps2::TouchKit.

Unfortunately, since the ps2::Mouse and ps2::Keyboard
namespaces are being deprecated, these names cannot be
used as of now to rename PS2Mouse and PS2Keyboard.

Change-Id: I9a57b87053a6a0acb380a919e09ab427fdb8eca4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45395
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-05-25 09:22:17 +00:00
Gabe Black
62610709df cpu,fastmodel: Get rid of the getSendFunctional method.
Change-Id: Ib901f6a37220357fe9f1863f12ee18daed31a538
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45865
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-25 08:24:30 +00:00
Gabe Black
41e2511259 misc: Stop using BaseCPU::getSendFunctional.
This method is no longer used, and has been replaced by the
ThreadContext::sendFunctional method.

Change-Id: I5a37f44d922245f681b6185c27232150a4eea4f0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45864
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-05-25 08:23:49 +00:00
Gabe Black
31952c32f7 mem: Add a ThreadContext helper constructor for PortProxy.
This creates a sendFunctionalFunc which calls the tc->sendFunctional.

Change-Id: I97ac2fb52d4f61420a09b37d70d4745c779234c1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45863
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-25 04:12:02 +00:00
Jui-min Lee
73a84aafc6 base: Construct debug flags on the heap
Debug flags were directly declared as global objects; however, the
destruction order of global objects in different translation units are
not defined in c++, so the destructor of other objects cannot safely
utilize debug flags to output extra information.

We now define those flags as references to objects allocated on the heap
so our flags will never get destructed. Note that this won't really
introduce any memory leak, as the program is getting terminated anyway.

Change-Id: I21f84ae17ac20653636ca67d1111c0c7855c0149
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45582
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-05-25 00:26:28 +00:00
Gabe Black
5e2f1a08b7 scons: Increase the minimum version of clang to 6.
Change-Id: I41f7e96922c273827c72df06145f0fe433936b59
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45621
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-24 23:13:48 +00:00
Gabe Black
c32ec6f21e fastmodel: Implement ThreadContext::sendFunctional.
This change provides a custom implementation for the
ThreadContext::sendFunctional method.

Change-Id: Idffb4efc509dd63c852ada0768435bf653bd1854
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45862
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-24 22:45:28 +00:00
Gabe Black
3c84bb7a77 cpu: Add a sendFunctional function to the ThreadContext.
This can be used to send a functional packet from the perspective of a
thread context. Currently this will not consider targets within the CPU
like the local APIC on x86. The default implementation sends a packet
using the port on the way out of the CPU.

Change-Id: Idb311e156a416ad51b585794c1e9fa75711d61f1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45861
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-05-24 22:45:14 +00:00
Gabe Black
85d1e1f803 base: Use a lambda to simplify the stl_helpers template.
Use a lambda to power the std::for_each instead of a functor class. This
takes *much* less code to implement.

Change-Id: Icc5d5a943630e7e19cd2e0fa6f2cef2c9b766e24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45900
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-24 21:29:24 +00:00
Gabe Black
f511aa977e cpu: Fix syntax in cpu/simple_thread.hh.
Change-Id: Id23de4651eb6b03b569ab48fd1dcf186e7b192dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45860
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-05-24 16:58:58 +00:00
Gabe Black
1e99a99c90 cpu: Fix style in cpu/simple/base.hh.
Change-Id: Ie5ef296ef82bf974c6bf2448c493242dad40c760
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45859
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-05-24 16:58:48 +00:00
Gabe Black
1a33023815 arch-x86: Work around a bug in g++ 6 and 7.
These versions of g++ don't handle parameter pack expansion correctly
when there is a parameter pack defined at the class level and then one
which is defined by the constructor itself. Even though it knows what
the outter parameter pack contains, it still re-assigns it to be empty
and puts all arguments into the later parameter pack.

To work around this problem, we will explicitly put the class level
parameters into a tuple, which we then have to go through extra
acrobatics to explode and pass into base class constructors.

That also means that in all subclasses, the arguments which go into the
tuple need to be wrapped in {}s to group them into constructor arguments
for the tuple.

Change-Id: I3139eebd7042b02f50862d88be5c940583a2a809
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45820
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-21 23:48:31 +00:00
Gabe Black
8949521ae3 base: Initialize some variables in the wide multiply helpers.
Not initializing them seems to upset older versions of g++.

Change-Id: Ib3de0460463f2fe514175484c49e1df68dacb4d3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45819
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-21 23:48:23 +00:00
Daniel R. Carvalho
85b8c5b0a3 gpu-compute: Rename prefetch variable as isPrefetch
Pave the way for a prefetch namespace.

Change-Id: I4372abb5603eb6a920f7ff127cde54cb24e31377
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45409
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-05-21 23:10:39 +00:00
Daniel R. Carvalho
17580efbd7 arch: Rename freebsd loader variables as freebsdLoader
Pave the way for a loader namespace.

Change-Id: Ief6f54cc49840fb6c156d56ba3da52dc0a995ac8
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45423
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 23:10:39 +00:00
Daniel R. Carvalho
10c0fb84ad arch: Rename some linux loader variables as linuxLoader
Pave the way for a loader namespace.

Change-Id: Ie7c811e74424063ff773569e7ad9df9dde166d4f
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45422
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 23:10:39 +00:00
Daniel R. Carvalho
78915f1895 dev-arm: Rename SCMI namespace as scmi
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::SCMI became ::scmi.

Change-Id: I68f729124079ecce02120577d2b89b25f10bde4a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45392
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
b571b17626 dev: Rename iGbReg namespace as igbreg
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::iGbReg became ::igbreg.

Change-Id: I4b19503c8cda37248667464be0ac4fd9a7bb42d8
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45391
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
debb13905b dev: Rename Ps2 namespace as ps2
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::Ps2 became ::ps2.

Change-Id: I6630a0817ee4aa724ce4e76edac164c28a583d61
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45390
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
fef8e578bf dev: Rename ps2 variables as ps2Device
Pave the way for a ps2 namespace.

Change-Id: I61fa33c57aee3e7c6df02a364420e4f83901f60b
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45389
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
faad68d224 dev: Rename sinic::Regs namespace as sinic::registers
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

sinic::Regs became sinic::registers.

"registers" was chosen over "regs" to reduce conflict
resolution (there is already a variable called regs).

Change-Id: I329d40884906bb55d1b1d749610b9f0dee243418
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45388
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
fd4f65a294 dev: Rename CopyEngineReg namespace as copy_engine_reg
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::CopyEngineReg became ::copy_engine_reg.

Change-Id: I8ac5ff272ab6a663a25f245c48827c7ff1b6abc5
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45387
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
f317fbdb75 dev: Rename TxdOp namespace as txd_op
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

iGbReg::TxdOp became iGbReg::txd_op.

Change-Id: I737205a3d29ffc0d96da72ba9fc6829939970957
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45386
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
a498fb3551 dev: Rename Sinic namespace as sinic
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::Sinic became ::sinic.

Change-Id: I0a28089cc9f8f65b33101b4791d67c2f82b85059
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45385
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-05-21 10:05:09 +00:00
Daniel R. Carvalho
43b026f3f9 base: Add macros to deprecate namespaces and classes
The GEM5_DEPRECATED_NAMESPACE macro temporarily declares
a namespace with the deprecated name that prints a
warning message when used. It also make sure that when
the old namespace name is used the new name is referenced.

The GEM5_DEPRECATED_CLASS macro deprecates classes that
were renamed, or moved to different namespaces.

Attributes in namespaces are an issue, though.
- Clang only allows from version 6 on, and only when
  using C++17.
- GCC has a bug before version 10 where the deprecated
  attribute was not properly recognized in namespaces:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79817

Possible solutions for GCC < 10:
1)
    \#define GEM5_DEPRECATED_NAMESPACE() \
    namespace gem5 { namespace deprecated { \
        auto namespace_##old_namespace = [](){ \
            GEM5_DEPRECATED("Please use the new namespace: '" \
                          \#new_namespace "'") \
            int old_namespace; \
            return old_namespace; \
        }; \
    }} \
    namespace new_namespace {} \
    namespace old_namespace { \
        using namespace new_namespace; \
    }

    Add the above macro to all headers that previously
    declared the deprecated namespace to trigger a
    warning. This is extremely inconvenient because
    every file that includes that header will trigger
    the deprecation warning, so the compilation output
    gets VERY clogged.
2)  Similar to 1), but do not use the temporary variable
    on declaration. This would require using the variable
    somewhere else, like a respective .c file. This is
    not always possible, so we could resort to adding a
    special file (e.g., base/deprecated_elements.cc)
    containing all uses of the deprecated temporary
    variables.
3)
    \#define GEM5_DEPRECATED_NAMESPACE(old_ns, new_ns) \
        namespace old_ns = new_ns;
    Similar to 3), but simply declare an alias in the
    header files (see above macro) to maintain backwards
    compatibility. Then use the special file to declare
    all deprecation messages.
4)
    Rely on release notes / e-mail to the mailing list
    to inform that those are deprecated.

We have selected option 4 for these problematic instances.

Checking if namespace deprecation is possible is done
through scons.

Jira issues:
https://gem5.atlassian.net/browse/GEM5-975
https://gem5.atlassian.net/browse/GEM5-991

Change-Id: Ide234f6a8707d88a869fa843bf8c61ca7714e4f3
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45246
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-21 10:05:09 +00:00
Giacomo Travaglini
14b616d440 arch: Make MMU::flushAll virtual
This is enabling ISA specific MMUs to reimplement the flushing
according to their TLB structure

Change-Id: Ic407ab95137b299206cb94926fb69d8898ed33f8
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45779
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-21 08:32:25 +00:00
Giacomo Travaglini
da01b59a1c arch-arm: Stop using the DmaPort in the TableWalker
Using a custom TableWalker port instead

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I9e77324569ef0f74f6c8a3941f90bc988abf3c57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45599
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-21 08:32:25 +00:00
Gabe Black
f30d15a29e cpu: Delete the now unused cpu/o3/impl.hh.
Change-Id: I99b6ec745066c154079c3f44086d2e8721c0ed82
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42119
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
f7902540e0 cpu: De-templatize the O3ThreadState.
Change-Id: Ifa6342abe396e131ae8edcb8111453852cdbefd7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42118
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
fda2e46a9e cpu: De-templatize the FullO3CPU class.
Change-Id: Ib7f1e40447a2f5a49e0c9a3af8579d075d5d3625
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42117
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
4ba06c8f25 cpu: Delete the unnecessary BaseO3CPU class.
This class has no content, and is not used for anything except as an
extra layer between FullO3CPU and BaseCPU.

Change-Id: Idb6258a655b0fb614e94b0fc0e281696d5081ab0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42116
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
157f9757c2 cpu: De-templatize the O3ThreadContext.
Change-Id: I1559760949031bd63bd3a48e62c37448c1f6f5b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42115
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
2021-05-21 01:19:37 +00:00
Gabe Black
e164d08287 cpu: De-templatize the O3 DefaultCommit.
Change-Id: I054cb344a5e3829caf6cbd26e931514b877c1577
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42114
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
fe65f1e864 cpu: De-templatize the O3 DefaultRename.
Change-Id: I28fbf5f3727c94ddf64a0e047784663508c6bda2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42113
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
03a843cf77 cpu: De-templatize the O3 DefaultIEW.
Change-Id: Ieb7b23250573a3bc7e7ff296ff6bf8811a865802
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42112
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
9722ce0075 cpu: De-templatize the O3 LSQ.
Change-Id: I7821fe971c0c38b77e730b4c40fb9fb204c6e7fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42111
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
da4c0590ee cpu: De-templatize the O3 DefaultDecode.
Change-Id: If2cef59654db4f5ff8e7cb73d1951895e5e12c9d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42110
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00
Gabe Black
f4a3380167 cpu: De-templatize the O3 DefaultFetch.
Change-Id: I5d4ce7a269c9f1df497003404872a977e7edb575
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42109
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-05-21 01:19:37 +00:00