Commit Graph

19068 Commits

Author SHA1 Message Date
Gabe Black
caffb4e1ff arch: Detect and convert zero registers to InvalidRegClass.
Change-Id: Ic5e070d303bf05ed1640b441e498d879764b8778
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49745
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-07 18:26:22 +00:00
Gabe Black
8d11bc31b5 arch-arm: Fix dangling pointer to unnamed temporary in nativetrace.cc.
Name the temporary.

Change-Id: I51d0eaa4a6759c3f288b4215db880af6135e9107
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60409
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-07 06:37:04 +00:00
Kaustav Goswami
c64f296695 stdlib: AbstractCore calls ArmV8KvmCPU class for aarch64
This change calls the stdlib's correct ArmKvmCPU class (ArmKvmCPU or
ArmV8KVMCPU) depending upon the host machine's architecture when
using KVM cores with ARM ISA.

Change-Id: I2ba8070825503659cd93da15da8507528d7f12ad
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60329
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-06 18:56:06 +00:00
Bobby R. Bruce
f2a7a46db0 tests: Disable max_tick for asmtests
These tests are very short and do not need to be limited by a set number
of ticks. They should be ran to completion.

Change-Id: I0ea2193efe01e5ed01afd10d8e5934512a4027c6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60251
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 18:46:52 +00:00
ntampouratzis
f3e9484969 arch-riscv,dev: Add PCI Host to RISCV Board
Add GenericRiscvPciHost to RISCV Board. In addition, we connect the IGbE_e1000
ethernet card to PCI in order to verify the correct functionality.

To be noticed that we build a new Linux kernel v5.10 (with Bootloader) according to these steps (
https://github.com/gem5/gem5-resources/tree/stable/src/riscv-fs) adding the the PCI and e1000 drivers:

CONFIG_PCI_SYSCALL=y
CONFIG_PCI_STUB=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_NET_VENDOR_INTEL=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_IGB=y
CONFIG_NET_VENDOR_I825XX=y

Here you can find the kernel.config and our prebuild kernel to verify the correct behaviour:
https://www.dropbox.com/scl/fo/sz9s37vybpfecbfilxqzz/h?dl=0&rlkey=klkxh33anjqnzwj3sopucqqzx

You can verify it with the following command:
build/RISCV/gem5.fast configs/example/gem5_library/riscv-fs.py

Dear Jason Lowe-Power,

Thank you for your comments! We have addressed all of them.

Best regards,
Nikolaos Tampouratzis

Dear Jason,

I think that it is ok now! :)

Thanks!

Best regards,
Nikolaos Tampouratzis

Change-Id: Id27d84a5588648b82cbfd5c88471927157ae6759
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59969
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 18:42:12 +00:00
Ayaz Akram
c685cfcb7e mem: Add support for min reads per switch
Similar to minimum writes per switch, this change adds support
for minimum reads per switch. This helps to reduce the read to
write transitions, which helps mixed read/write traffic patterns.

Change-Id: I1f9619c984ba14d2cca09f43bc16863283ea64a5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59735
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Wendy Elsasser <welsasser@rambus.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-06 18:31:06 +00:00
Ayaz Akram
84949089a1 mem: Add HBM2 pseudo channel interface configuration
Change-Id: I5826e50a35ee9dda054a164cfda616ca0ffe82e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59734
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Wendy Elsasser <welsasser@rambus.com>
2022-06-06 18:31:06 +00:00
Ayaz Akram
feceff7723 mem: Support for separate tRCD and tCL for reads/writes
HBM2 has asynchronous read/write timings (tRCD, tCL). This change
updates dram interface in gem5 to allow using separate values of
tRCD and tCL for reads and writes.

Change-Id: I56bfa9519cedad89cc2d4c163efc7126f609f15a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59733
Reviewed-by: Wendy Elsasser <welsasser@rambus.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 18:31:06 +00:00
Ayaz Akram
60317f99fe mem: Add an HBM memory controller
This change adds an hbm memory controller in gem5,
which is capable of controlling two hbm memory interfaces
(two pseudo channels). HBMCtrl inherits from MemCtrl
and tries to reuse most of the MemCtrl functions for two
different dram interfaces. Morever, a notion of pseudo
channel is added in the memory interface itself, to make
sure that the scheduling decisions in any interface are
based on the pkts for that pseudo channel only. Also, the
command bandwidth checks are divided into row and column
commands, which are shared by both pseudo channels.

Change-Id: Ie2ee8183d0f7f744aff2ed05cabc75fec3ea2171
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59732
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Wendy Elsasser <welsasser@rambus.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 18:31:06 +00:00
Maryam Babaie
b0fd05dd3d mem: Split memory controller into base MemCtrl and HeteroMemCtrl
This change splits the default gem5 memory controller into two
memory controllers: MemCtrl (base memory controller which can be
used with only a single memory interface dram/nvm), and
HeteroMemCtrl (heterogeneous memory controller which inherits from
MemCtrl and requires a dram and an nvm memory interface).
New arguments are added to many of the base class (MemCtrl) functions
(for example memory inteface to use that function for) which helps
in easier use of these in the inherited class (HeteroMemCtrl).

Change-Id: Ifa4e9f9f1560c47063d1a8159a8c94add2e670bb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59731
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-06 18:31:06 +00:00
Maryam Babaie
c7c11c5661 mem: splitting dram and nvm interfaces into separate files
This change primarily splits the dram and nvm interfaces
into separate files. And also updates the interfaces so that
they can be handled in a more general way by the controller.
For example, both interfaces now override a virtual isBusy()
function defined in the mem_interface.

Change-Id: Id98bf0be3836a4b6245d5dea1b8fad0a60ce299a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59730
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-06 18:31:06 +00:00
Kyle Roarty
f876e60bc2 mem-ruby: Fix deadlock in GPU VIPER TCC
A deadlock occured where we got a RdBlk while in W,
which put us in WI while we wait for a writeback to complete.

This would cause the request to be stalled while the writeback
was occuring, but when the writeback completed (WBAck), we never
woke up the requests and thus never completed the RdBlk.

This commit adds a wakeup when we receive a WBAck while in WI.

Change-Id: I01edf1d7a47757b4f680baf9f33a1a6aa37e7e25
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59352
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 18:28:52 +00:00
Jason Lowe-Power
8e150924cb systemc: Add SimObject::regStats to systemc kernel
Without this call, not all stats are registered correctly.

Change-Id: I81ff5305fdb8491c717c1ac2d41434d101c6ed3b
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60252
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-06 18:18:10 +00:00
Hoa Nguyen
373cc39a92 arch-arm: Improve error message when KVM failed to be initialized
Change-Id: If7f87cbd6c4e01134b17875e7c69f6147a5ed1f6
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60312
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-06 18:17:37 +00:00
Hoa Nguyen
4524c1e330 mem-ruby: Replace the deprecated Stats namespace
Using the old namespace generates quite a few warnings during
compilation time.

Change-Id: Ibbb8f54f0bee974443dc5dfcc30e95100b8c24d6
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60289
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-06 18:17:22 +00:00
Bobby R. Bruce
8ad21f7039 tests: Fix downloader check
This test was failing due to references to a "downloader_dir" variable.
It should be "downloader_directory".

This is responsible for the Weekly test failing:
https://jenkins.gem5.org/job/weekly/55

Change-Id: Ia898726b75be1bfc2b6f49383be750a250c24af0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60349
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-06 16:41:19 +00:00
Gabe Black
b920772d78 cpu: Treat the InvalidRegClass like the zero register.
This is a transitional step towards the InvalidRegClass taking over for
the zero register.

Change-Id: I423e1f6b5138d8bb41493f9febb3b28f333f9f00
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49744
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 09:56:17 +00:00
Gabe Black
397e66d8b6 gpu-compute: Stop passing in a default value to resize().
A default constructed element of the container is the default value to
the second resize() parameter. Having that parameter explicitly causes a
warning/error in newer versions of gcc, and is unnecessary regardless.

Change-Id: I6aee2d23f0f4382b00caf552c8e38940614c5f9a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60311
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
2022-06-03 10:48:31 +00:00
Daecheol You
9bfffe0f34 mem-ruby: modify the TBE data state for ReadOnce_HitUpstream
When ReadOnce request hits upstream, set dataToBeInvalid to true
for R* states so that the line from the upstream is successfully dropped
at the end by Finalize_UpdateCacheFromTBE.
For UD_RU and UC_RU state, set dataValid to true to prevent it changing
to RU state when it doesn't get the snoop data response.

Change-Id: Ie83c511e8d158e18abc5c9c16bc6040ce73587bf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58411
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Tiago Muck <tiago.muck@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-03 09:31:21 +00:00
Gabe Black
cad8cf70ee proto: Add a missing std:: in protoio.cc.
Also include string which that file uses.

Change-Id: I79cd9c88652abdd1d16b3368dd37268509f4d3f0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60310
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-03 07:23:27 +00:00
Gabe Black
a2062c0e00 sim: Fix erasure ordering in the futex map.
Erase an element after one of its components are used to erase an
element of another map. This is an error and causes build breakage in
newer versions of gcc.

Change-Id: I83a00410cbf2ae5fc23b12080cd374965df1a5ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60309
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-03 07:23:18 +00:00
Bobby R. Bruce
6b92e8ddde tests,arch-riscv: Add rv64uzfh-ps tests to asmtests
These were added to gem5-resources via these commits:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/60249
https://gem5-review.googlesource.com/c/public/gem5-resources/+/60149

Change-Id: I3b6d75ab09960c9aa2e211288eaaf52d43d00368
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60250
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-02 05:07:11 +00:00
Bobby R. Bruce
0770c80fb9 tests: Wipe 'build/ARM' dir before running SystemC tests
It if the ARM code is changed, the building of the library for the
systemc tests can sometimes fail. This appears to have happened in
recent Nightly test failures: https://jenkins.gem5.org/job/nightly/237.

It's safer to just wipe the 'build/ARM' directory before running this
test.

Change-Id: I203c4e74c01215128b85bf69176921f8ecef4988
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60096
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-02 05:06:27 +00:00
Boris Shingarov
cb3c607f4b misc: Clarify commit message guidelines
This change in wording aims towards a more welcoming first review
atmosphere for new contributors. I was recently reading through a
chain of very-high-quality commits from a first-time contributor,
and the only problem was the conjugation of the commit message.
This is a totally minor issue but when I am scanning through a list
of a thousand commit messages in imperative mood and there is one
standing out in past indicative, it throws off my concentration.
Now I am left with a dilemma on my hands: I don't want the risk of
mistaken impression of undue nitpicking over undocumented style
preference, in a good commit from a new contributor. The present
change borrows additional explanatory language from Eclipse's Commit
Guidelines, to avoid this kind of tensions in the future.

Change-Id: If6aa8341871304ee7ff88a014048e4104aa9dcb5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60129
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-01 23:51:03 +00:00
Kaustav Goswami
c6299cbe8e stdlib: Removed SECURITY from the ArmBoard Script
The ARM Board does not support SECURITY extension at the moment.
This change removes the extension from the config script so that
the board functions properly.

Change-Id: I12a5bdf48803e86739967830204a9eef6057bd36
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60209
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 21:59:35 +00:00
Hoa Nguyen
bf71a17982 arch-arm: Add several 64-bit syscalls name to se_workload.cc
The names are gathered from [1].

This change also makes syscall 293 (rseq) does nothing
instead of raising an error.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/asm-generic/unistd.h?h=v5.15.44.

Change-Id: Ie0a7221db1cc308316fc0a500c454a23bf6029fd
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60229
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 18:31:14 +00:00
Hoa Nguyen
96870d4713 arch-riscv: Fix compilation error due to getdents* syscalls
In src/sim/syscall_emul.*, getdents and getdents64 are guarded
by #ifdefs. Similar #ifdefs should be in se_workload.cc for each
arch.

Change-Id: Ie636a739235711c3e6d8256fd7929b7d8b4ec953
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60189
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 18:31:14 +00:00
Bobby R. Bruce
424b946d16 stdlib: Fix LupvBoard to inherit from AbstractSystemBoard
In this patch:
https://gem5-review.googlesource.com/c/public/gem5/+/58909, the
AbstractBoard was refactored. While all otherboards were updated
correctly, the LupvBoard was not. This caused the nightly tests to
fail: https://jenkins.gem5.org/job/nightly/240

This patch corrects this issue.

Change-Id: Icac39d48358daf4acb2f7077f5d3e8871320812e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60095
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-01 17:41:36 +00:00
Bobby R. Bruce
d7f5b70576 tests: Replace multi-isa test GCN3 compilation with VEGA
As of this commit,
https://gem5-review.googlesource.com/c/public/gem5/+/59012, all GCN3
tests were replaced with VEGA. However, this commit,
https://gem5-review.googlesource.com/c/public/gem5/+/57510, was added
and used GCN3_X86 instead of Vega.

It is likely this is the root cause of recent Kokoro timeouts as
compiling both GCN3_X86 and VEGA_X86 is costly. This patch fixes this.

Change-Id: Iee2a08189a73283877f5d599191e9d1b105322ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60169
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:50:41 +00:00
Tiago Mück
e4274cabd9 mem-ruby: fix Evict request for CHI excl. caches
Assume core C1 with private L1/L2 and a shared exclusive L3.
C1 has a line in SC state, while the state in the L3 is
RUSC (L3 has exclusive accesses and upstream requester has line in SC).

When C1 evicts the line (Evict request), the L3 has to issue a
WriteEvictFull to the home node, however the L3 doesn't have a copy
of the line.

This fix handling Evict requests when the line state is RUSC. When
the last sharer issues an Evict request, the responder may issue
SnpOnce the obtain a copy the line if needed.

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

Change-Id: Ic8f4e10b38d95cd6d84f8d65b87b0c94fcf52eea
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59991
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
612f242359 mem-ruby: fix CHI snoops clearing WU data
When just forwarding a WU request, the controller waits until the WU is
acked from downstream before sending the ack upstream. This
prevents snoops clearing valid WU data.

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

This was more likely to happen with shared exclusive caches, e.g:
assume core C1 and C2 with private L1/L2 and a shared exclusive L3.
C1 has as dirty copy of the line while C2 issues a WriteUnique request
to that line. The line state is RU in the L3, so the L3 will just
forward the request to the HNF, so:
- C2 issues WU to L3 cache
- L3 acks the WU, allowing C2 to send the data, while concurrently
  forwarding the WU to the HNF.
- L3 receives data from C2
- HNF sends invalidating snoops upstream because line is RU
- The snoop hazards with the pending WU at the L3 and invalidates
  the data previously received. This causes an assertion to fail when
  we resume handling the WU.

Change-Id: I51e457e0bdb648c0fff3f702b7d2c95dcf431dc5
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59990
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
1dfd319d98 mem-ruby: fix data state for partial WU
When receiving data from a WriteUniquePtl we were wrongfully clearing
the data valid flag.

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

Change-Id: I5c17433f1cfb706e443a0169a9f0e99ff5c1fcc0
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59989
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
dc33a16993 mem-ruby: fix functionalRead on pending CU
Normally we don't check the TBE data if there are outstanding response
messages for the transaction because that means the latest valid data is
either in another cache or within an inflight message.
However this is not the case when we have either a pending CleanUnique
or we are handling CleanUnique. So bypass the pending message check in
this case.

Change-Id: I5f31039ca2a01a6a68fee8e0f3cf02c7e437b43e
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57395
Reviewed-by: Daecheol You <daecheol.you@samsung.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
23888df8a9 mem-ruby: fix MaintainCoherence typo
Change-Id: Iee3319e1d470898c727747894287029e1b0ab102
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57394
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
12641069de mem-ruby: reuse existing event on CleanUnique
Reuse the existing MaintainCoherence event to schedule
writebacks or cache fill after a CleanUnique.

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

Change-Id: I127ebf78736b8312ccf2b18cf7c586eb5a77f373
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57393
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
d1d6b4cb9e mem-ruby: fix inconsistent WBs for dirty data
Initiate_MaitainCoherence would not trigger a writeback if
tbe.dataMaybeDirtyUpstream is set due to the assumption that
the upstream cache would writeback any dirty data. However this
is not the case if we use this action finalize a CleanUnique, e.g.:

- L1-A has data in SC
- L1-B has data in SD
- L2 has data in RUSD (L2 is an exclusive cache)
- L1-A sends CleanUnique to L2
- L2 invalidates L1-B and receives dirty data.
- L2 acks the CleanUnique; L1-A is now UC
- L2 has the dirty data but drops it because dataMaybeDirtyUpstream
- L1-A doesn't modify the data and eventually evicts it with WriteEvict
- Data from WriteEvicts are dropped at the HNF and we lose the line

This patch removes the tbe.dataMaybeDirtyUpstream check.
Instead it only skips the WriteBack if an upstream cache is in
SD state, when it's guaranteed it will writeback the dirty data.

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

Change-Id: I6722bc25068b0c44afcf261abc8824f1d80c09f9
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57392
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daecheol You <daecheol.you@samsung.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
183e8e2b61 mem-ruby: fix state updates on WriteCleanFull
- fix wrong variable check at UpdateDirState_FromReqDataResp
- even after a WriteClean, dataMaybeDirtyUpstream still applies if
  there is an exclusive owner upstream.

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

Change-Id: If1fa3ee40e30226db3a66c34633316e751eb7c4d
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57391
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daecheol You <daecheol.you@samsung.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
5faa7aaffd mem-ruby: removed check for WriteCleanFull
Relaxed check on Send_WriteCleanFull. That data state may actually
happen if the writeback was triggered by a CleanUnique request.

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

Change-Id: I33ec5693df09efe39345f403c5b6d3388f1a5056
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57390
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daecheol You <daecheol.you@samsung.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 15:23:47 +00:00
Tiago Mück
ff5aafa1e9 mem-ruby: fix CHI wrong response to ReadShared
When an exclusive cache is responding to a ReadShared and the line is
unique, it send the data in unique state without checking if the line
already has other sharers in other upstream caches.

This patch fixes this issue and also cleans up Send_CompData.

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

Change-Id: Ica7c2afafb55750681b39ae7de99a665689ecb8a
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57389
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-01 15:23:47 +00:00
Bobby R. Bruce
041cc65899 tests: Increase Weekly Docker Container mem limit to 24GB
The following weekly tests were failing:
https://jenkins.gem5.org/job/weekly/53

This appears to be due to the "lulesh" tests failing with the docker
container running out of memory. This can be recreated with:

```
git clone -b develop https://gem5.googlesource.com/public/gem5

cd gem5

git clone -b develop https://gem5.googlesource.com/public/gem5-resources

docker pull gcr.io/gem5-test/gcn-gpu:latest
docker build -t hacc-test-weekly gem5-resources/src/gpu/halo-finder

docker run --rm -u $UID:$GID --volume $(pwd):$(pwd) -w \
    $(pwd) --memory="18g" hacc-test-weekly bash -c \
    "scons build/GCN3_X86/gem5.opt -j`nproc`"

docker run --rm --volume $(pwd):$(pwd) -w \
       "$(pwd)/gem5-resources/src/gpu/lulesh" \
       -u $UID:$GID --memory="18g" hacc-test-weekly make

docker run --rm -u $UID:$GID --volume "$(pwd)":"$(pwd)" -w \
    "$(pwd)" --memory="18g" \
    hacc-test-weekly build/GCN3_X86/gem5.opt configs/example/apu_se.py -n3 \
    --mem-size=8GB --reg-alloc-policy=dynamic \
    --benchmark-root="$(pwd)/gem5-resources/src/gpu/lulesh/bin" -c lulesh
```

It is currently unknown as to why this process consumes so much memory
or how it can be reduced, but increasing the docker container limit to
24GB for the Weekly tests does appear to fix the issue.

Change-Id: Ifcd65d4ab8bf6a12ddf7a45d61c779e691619072
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60009
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 00:59:49 +00:00
Luming Wang
c376ec2fde scons: support --linker="mold" for gcc < 12.
Now, to use mold linker for gcc prior to version 12.1.0, you need
to manually set the LINKFLAGS_EXTRA scons variable. This is because
older gcc doesn't support "-fuse-ld=mold" option.

To make it more convenient for users, this patch adds support for
'--linker="mold"' option for older versions of gcc. A -B option will
be passed to gcc automatically if '/usr/libexec/mold' or
'/usr/local/libexec/mold' exist.

[1] https://github.com/rui314/mold
[2] https://gem5-review.googlesource.com/c/public/gem5/+/57173

Change-Id: Id1cd780d98c39fc837066d826a9ff942579748fe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60109
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-31 02:27:57 +00:00
Daecheol You
073dc853f4 mem-ruby: fix the condition for stale WriteCleanFull
WriteCleanFull can be requested for the cache line in SD state (e.g.
Local eviction of a cache line in SD_RSC state). In this case, the
requestor is the owner of the cache line,
but it doesn't have it with exclusive right.
Thus, 'ownerIsExcl == false' should be removed from the stale condition.

Change-Id: I4d34021ac31b2e8600c24689a03a3b8fa18aa1f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58412
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-28 04:57:39 +00:00
Daecheol You
eaf23bcd9f mem-ruby: fix sharer update for stale WriteCleanFull
Initiate_CopyBack_Stale removes the requestor from the sharer list.
However, if CBWrData_SC is the data response of stale WriteCleanFull,
the requestor should remain in the sharer list.
Thus, whether to send a Evict or not can be decided after the data
response arrives. For this, FinishCopyBack_Stale event was added as the
last event to handle Evict.

Change-Id: Ic3e3a1e4d74b24b9aa328b2ddfa817db44f24e4e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58413
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Tiago Muck <tiago.muck@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-27 04:02:56 +00:00
ksco
53009f9e69 arch-riscv: Add Zfh extension
This commit adds RISC-V Zfh 1.0 (half-precision IEEE 754 binary16 floating
point) extension to gem5. Include the following commands:

* FLH / FSH
* FMADD.H / FMSUB.H / FNMSUB.H / FNMADD.H
* FADD.H / FSUB.H / FMUL.H / FDIV.H
* FSQRT.H
* FSGNJ.H / FSGNJN.H / FSGNJX.H
* FMIN.H / FMAX.H
* FCVT.S.H / FCVT.H.S
* FCVT.D.H / FCVT.H.D
* FCVT.W.H / FCVT.H.W
* FCVT.WU.H / FCVT.H.WU
* FMV.X.H / FMV.H.X
* FEQ.H / FLT.H / FLE.H
* FCLASS.H
* FCVT.L.H / FCVT.H.L
* FCVT.LU.H / FCVT.H.LU

Change-Id: Id7870fdfa1aa8b840706c3ba2cab8eeaf008880f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60029
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-27 01:22:31 +00:00
Daecheol You
8b648ac856 mem-ruby: add missing response for ReadOnce
When HNF snoops an RNF with SnpOnce to process
ReadOnce request (e.g. DMA read request),
the RNF can respond with SnpRespData_UC if the cache line is in UC.
Thus, SnpRespData_UC was added to the transition events.

Change-Id: Ife242e75feb9d2451eb99511e21833d9d190a6c3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58410
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Tiago Muck <tiago.muck@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-26 00:38:23 +00:00
Bobby R. Bruce
53500ac611 stdlib: Introduce an ARM Board
This changes adds a new board to the gem5 stdlib, which is capable
of simulating an ARM based full system. It also adds an example
config script to perform a boot-test using an Ubuntu 18.04 disk
image. A test has been added in the gem5-library-example for the
same.

Change-Id: Ic95ee56084a444c7f1cf21cdcbf40585dcf5274a
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58910
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-25 17:34:25 +00:00
Bobby R. Bruce
1d93e72f2b stdlib: Create the AbstractSystemBoard
In the prior design the AbstractBoard inherited from System. This was
fine for the X86Board and RISCVBoard, but was causing problems for the
design of the ARMBoard which must inherit from ArmSystem (which itself
inherits from System).

This new design removes the System inheritance from AbstractBoard, and
creates a new "AbstractSystemBoard" class which inherits from both
AbstractBoard and System. This allows for the creation of an ArmBoard
which inherits from both AbstractBoard and Arm System.

Change-Id: I3831f2ebe61e4adfb9dc10b7790b39403a99beaa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58909
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-25 17:34:25 +00:00
Bobby R. Bruce
2643f3c4ee tests,stdlib: Add test to check gem5-resources downloading
This test ensures all the resources in resources.json can be downloaded
and that their md5 values are valid. This has been set as a
very-long/weekly test as downloading all the resources is costly.

Change-Id: Ia574d0a9610849af3653fc742acb214ea7496767
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59771
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-25 17:27:39 +00:00
Yu-hsin Wang
95800dc659 mem: add clear modifiers for request flags
During the memory requests, it's possible some control attribute
changed by IPs. There are three ways to model the behavior.

1. Modify the flags of current request, but there's no way to unset
   the attribute now.
2. Clone the request with original flags, but there's no way to unset the
   attribute.
3. Clone the request with zero flags, but it will ask the model to review
   all the flags and set individually.

To preserve the original requests, we may pick the second approach. It's
still good to have clear modifiers to make the modeling more easier by
modifying the cloned request.

Change-Id: Ib216ca20c79b0f84be15ed4b0ec00354a428bac9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59809
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-24 00:50:00 +00:00
Giacomo Travaglini
934590521a tests: Don't enable EL2/EL3 in AArch32 for long regressions
This is fixing long regressions, caused by
automatically enabling EL2 and EL3 in Arm.
This is temporary: either fixing EL3 boot in AArch32 or
disabling EL3 in AArch32 should be chosen in the long term

Change-Id: If92b219ff89dcf13916a151fac9a2a3ac0e7d69b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59849
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-24 00:02:44 +00:00