22333 Commits

Author SHA1 Message Date
Jason Lowe-Power
6ff3821c9d arch-riscv: Enable clone3 syscall in riscv64 (#1620)
The clone3 syscall, implemented in commit 87e774c, is currently only
handled for x86-64 in gem5 SE mode. Clone3 is employed by modern glibc
versions instead of clone for processes/threads generation (e.g. issue
#1204). This commit enables the clone3 syscall in riscv64 by adding the
corresponding handler call, as well as its arguments struct.
2024-10-07 13:45:34 -07:00
Erin (Jianghua) Le
1ee924a067 python: clarify SimObject error message (#1625)
This adds more detail to the error message that is thrown when an orphan
node is instantiated.
2024-10-07 13:45:03 -07:00
Matthew Poremba
f5858fe81f dev-amdgpu: Deprecate rom and mmio trace params (#1633)
The ROM field was originally intended as a future alternate way to load
VBIOS without the ROM being on the disk image. This code path is never
taken for the devices gem5 supports and there is no gem5 implementation.
Deprecate the rom_binary field for this reason.

Similarly, MMIO traces were only used for Vega10. Deprecate this as
Vega10 is now deprecated. The MMIO trace reader is kept as it may still
be useful in the future. It is still the primary way to handle devies
which have graphics capability. None of the devices supported by gem5
have graphics now that Vega10 is deprecated.
2024-10-07 07:12:07 -07:00
Bobby R. Bruce
5db68114df misc,tests: Change Github Action caches to just be date-based
Hashing the `src` directory is too costly, with some runners reaching
timeout. Also, as we only have 10GB of cache it makes sense to have
more course grained caching
2024-10-07 00:53:08 -07:00
Bobby R. Bruce
7c83e3379b stdlib: Add _pre_instantiate funcs for caches and memory
Note: At present this is not used but these functions can be filled
or overriden in subclasses as required.
2024-10-04 14:03:46 -07:00
Harshil Patel
a12bef131b tests: update input sizes for pannotia tests 2024-10-04 11:51:58 -07:00
Bobby R. Bruce
b358471eb9 stdlib: Move 'sim_quantum' set from Simulator to Processor
The setting of the `sim_quantum` parameter makes considerably more sense
to occur in the Processor. Through the `_pre_instnatiate` functions this
is now possible.
2024-10-04 11:40:18 -07:00
Bobby R. Bruce
4bdcb040d0 stdlib: Move Root obj creation from Simulator to Board
It makes much more sense for the Root Object to be create within the
board and passed where required. Creating it in the Simulator class is
not required.

For this to work the signuature of the `_pre_instantiate` function in
`AbstractBoard` has been updated to return the Root object.
2024-10-04 11:40:13 -07:00
Bobby R. Bruce
4b3ba1daa6 stdlib: Deprecate Simulator 'full_system' param
THis is deprecated in favor of the board determining whether the
simulation is FS or SE. Usually this will be contingent on which
`set_workload` funciton has been called. Regardless, it is the board's
responsibility. The user should not need to explicitly declare this any
longer.
2024-10-04 11:33:23 -07:00
Bobby R. Bruce
6a24b69a97 misc,tests: Increase Weekly and Daily GPU test timeout (#1628)
The Weekly GPU tests are failing due to a timeout, but I found the
testing timeout was set to 5 hours, and we have been frequently close to
reaching this but have recently changed the test enough to consistently
go over.

 The main two things that appear to have caused this are:

~~1. Moving the X86_VEGA compilation into the same step as the running
of the tests.~~ (I take this back, the timeout is per-job, it shouldn't
matter how stuff is deivided among steps in the job. However, keeping it
separate does no harm and merging the two steps did coincide with
failures occurring. I'll play it safe for now_.
2. Reducing the number of threads per GitHub Actions runner, thus
slowing job execution.

In addition, we've added more tests to this weekly GPU suite, though I
don't believe we have got to running these tests yet. The timeout
appears to always have been triggered before this.

This PR increases the timeout to 3 days and moves the compilation into a
separate step.

**Update: Same changes done for Daily tests too as it appears to be the
same problem.
2024-10-04 07:41:17 -07:00
Bobby R. Bruce
d49d0272ff misc,tests: Create Daily GPU Test timeout 2024-10-04 07:36:46 -07:00
Bobby R. Bruce
866b51a1cc misc,tests: Increase Weekly GPU test timeout
The Weekly GPU tests are failing due to a timeout but I found the testing
timeout was set to 5 hours and  we have been frequently close to reaching this
but have recently changes the test enought o consistently go over.

 The main two things that appear to have caused this are:

1. Moving the X86_VEGA compilation into the the same step as the running of
   the tests.
2. Reducing the number of threads per GitHub Actions runner, thus slowing
   job execution.

In addition we've added more tests to this weekly GPU suite though I don't
believe have got to running these tests yet. The timeout appears to
always been triggered before this.

This PR increases the timout to 3 days and moves the compilation into a
seperate step.
2024-10-04 06:12:13 -07:00
Bobby R. Bruce
7117b1399b util-docker: Fix gpu dpcker images (#1627)
Two faults:

1. You can't give description the docker-bake file for single platform
builds. They must be in the Dockerfile..
2. The gpu docker image def in docker-bake.hcl was not overriding the
"common" setttings as previously thought. This was causing builds to
something build the wrong platform and vairous other weird bugs. This
has been fixed in this patch.
2024-10-04 02:37:16 -07:00
Yu-Cheng Chang
5b5f7afc1b arch-riscv: Implement CLINT reset feature (#1617)
When reset, registers are change
msip: cleared to zero
mtimecmp: unknown state, cloud be origin values or change to any values
mtime: cleared to zero

Spec:
https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc
https://sifive.cdn.prismic.io/sifive/1a82e600-1f93-4f41-b2d8-86ed8b16acba_fu740-c000-manual-v1p6.pdf

Change-Id: I3c50b41eb765ad9cd7a8a03c427bd0011195de5c
2024-10-03 13:22:27 -07:00
Matthew Poremba
24504c9a3e dev-amdgpu: Use GPU specific cache line size (#1621)
Invalidate requests align to system cache line size. This causes
problems if the GPU cache hierarchy's cache line size is different than
the system as the unlaigned requests never return, leading to deadlock
on deferred dispatch.

This commit uses the cache line size from the GPU memory manager and
makes the cache line size there non-optional.

Tested with multiple RubySystems where CPU side was 64B and GPU side was
128B cache lines.
2024-10-03 08:47:08 -07:00
Tommaso Marinelli
242c0e9693 arch-riscv: Add more syscall placeholders 2024-10-03 03:25:39 +02:00
Matthew Poremba
c8c75959ad configs: Deprecate Vega10 (#1619)
Vega10 is no longer officially supported by ROCm and ROCm is starting to
use some packet types not supported. These were originally kept to allow
users to use older disk images with newer gem5. Going forward the gem5
version and gem5-resources releases will be required to be the same to
prevent lingering old configs.

As a replacement for vega10*.py, mi300.py or mi200.py should be used.
HIP examples, cookbook, and rodinia configs can be replaced with the
standard flow of building / obtaining the GPU application and running
using mi300.py or mi200.py as they do not require any input options and
therefore do not require changes to the disk image.
2024-10-02 14:18:41 -07:00
Tommaso Marinelli (imec)
be49bf89c0 arch-riscv: Enable clone3 syscall in riscv64
The clone3 syscall, implemented in commit 87e774c, is currently only
handled for x86-64 in gem5. Clone3 is employed by modern glibc versions
instead of clone for processes/threads generation (e.g. issue #1204).
This commit enables the clone3 syscall in riscv64 by adding the
corresponding handler call, as well as its arguments struct.
2024-10-02 18:23:27 +02:00
Giacomo Travaglini
bdd10069b1 arch-arm: Add recursive reduce in Neon instruction. (#1616)
FMAXV, FMINV, FMAXNMV, FMINNMV and ADDV instructions perform recursive
reduction. Different reduction methods lie to different result when
handle NaN values.

Reuse the template of `twoRegAcrossInstX`. Add one more option
`recursive` for recursive reduction.

Change-Id: I69e690ce7668baee818542d3ea463f7a5f269a69
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-10-02 12:41:53 +02:00
Bobby R. Bruce
c9408828a1 misc,tests: Revert "Test docker runners vs self-hosted"
This reverts commit 0792d94b6f.
2024-10-01 16:03:57 -07:00
LYC
93313b3daa arch-riscv: fix viota (#1559)
This commit fixs a bug in the viota instuction.

The two different instructions can be referenced to the same
StaticInstPtr because the decoder behaves as shown in [the section of
the
code](https://github.com/gem5/gem5/blob/stable/src/arch/riscv/decoder.cc#L98-L100).

So every first micro-op should reset the cnt variable in the macro-op.

Change-Id: Id311a05cfed41b01e16fd7256d9baa166aee49da

Co-authored-by: Jack Yung-Chen Lin <jack622@andestech.com>
2024-10-01 11:23:27 -07:00
Erin (Jianghua) Le
d5dfe03eb1 stdlib: Add warning message for set_workload being called twice (#1571)
This commit adds a warning message for when set_workload is called
twice, as users typically do not mean to do this.
2024-10-01 11:22:07 -07:00
Erin (Jianghua) Le
c10feed524 tests, configs, util, mem, python, systemc: Change base 10 units to base 2 (#1605)
This commit changes metric units (e.g. kB, MB, and GB) to binary units
(KiB, MiB, GiB) in various files. This PR covers files that were missed
by a previous PR that also made these changes.
2024-10-01 11:18:05 -07:00
Kaustav Goswami
d57208c615 arch-x86,stdlib: added MADT entries on the X86Board (#1574)
This change adds MADT entries to the X86Board. Previously, the kernel in
full-system mode was complaining about a `ACPI BIOS Error (bug): Invalid
table length 0x24 in RSDT/XSDT (20190816/tbutils-291)`. This patch fixes
the invalid length and initializes all the tables correctly.

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
2024-10-01 11:14:09 -07:00
Bobby R. Bruce
0792d94b6f misc,tests: Test docker runners vs self-hosted 2024-10-01 08:53:31 -07:00
Bobby R. Bruce
34f6bc4501 misc,tests: Fix caching in daily tests 2024-10-01 08:18:55 -07:00
Junshi Wang
a25d9a126f arch-arm: Add recursive reduce in Neon instruction.
FMAXV, FMINV, FMAXNMV, FMINNMV and ADDV instructions perform recursive
reduction. Different reduction methods lie to different result when
handle NaN values.

Reuse the template of `twoRegAcrossInstX`. Add one more option
`recursive` for recursive reduction.

Change-Id: I69e690ce7668baee818542d3ea463f7a5f269a69
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-09-30 16:31:35 +01:00
Giacomo Travaglini
8381e1c5d3 mem-cache: Helper functions to allow dynamic configuration of partitioning policies (#1609)
This PR is doing a simple refactoring of some partitioning policies. It
moves existing functionalities
within PP methods so that they can be called multiple times throughout
the simulation.
Therefore allowing a dynamic adjustment of the partitioning scheme
2024-09-27 00:01:18 +02:00
Bobby R. Bruce
277b5be4dd arch-arm: Add a method to determine External Abort (#1610)
- Add `isExternalAbort()` in `AbortFault<T>` to determine external
abort.
- Add `virtual isExternalAbort()` in `ArmFault` so the method can be
used in base class.
- Set iss.ea by `isExternalAbort()`
2024-09-26 14:41:33 -07:00
Erin (Jianghua) Le
e987c60a4c tests: Add Pannotia GPU Tests (#1584)
This PR adds the Pannotia GPU tests.
2024-09-26 14:39:39 -07:00
Bobby R. Bruce
054790ad47 ext: Fix GCC v13+ comp of systemc due to problematic overloaded-virtual warn (#1576)
Fixes #1121 in line with the following suggesting:

https://github.com/gem5/gem5/issues/1121#issuecomment-2352743409
2024-09-26 14:32:20 -07:00
Bobby R. Bruce
a240ff8d32 misc,tests: Fix caching in daily tests 2024-09-26 11:12:52 -07:00
Bobby R. Bruce
e3fd7dcaec misc,tests: Remove cache store from dramsys test 2024-09-26 11:10:32 -07:00
Ivana Mitrovic
6bb1c9638c util: Update gem5-resources-manager (#1604)
Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.4
to 43.0.1.
2024-09-26 10:09:38 -07:00
Junshi Wang
a4bacb9823 arch-arm: Add a method to determine External Abort.
- Add `isExternalAbort()` in `AbortFault<T>` to determine external abort.
- Add `virtual isExternalAbort()` in `ArmFault` so the method can be
used in base class.
- Set iss.ea by `isExternalAbort()`.

Change-Id: I01c22dc46958ab424b389af96d3c3b6243cbc671
2024-09-26 14:05:09 +01:00
Junshi Wang
9a7a661c66 arch-arm: Set tranMethod for external Data Abort.
The External Data Abort may not set TranMethod, and it leads to assert
error.

- Make `ArmFault::update` virtual.
- Implement override `update` in `AbortFault<T>` to set TranMethod.

Change-Id: I49e18799df8420b214b6059ffa756a13edf343d5
2024-09-26 14:04:17 +01:00
Giacomo Travaglini
b232204b49 mem-cache: Allow dynamic configuration of the Way pp
Change-Id: I1ba9266b24ebc9563f9380fcf155cdc436b2e376
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-09-26 10:21:46 +01:00
Giacomo Travaglini
fdcfc28cf4 mem-cache: Allow dynamic configuration of MaxCapacity pp
This will allow gem5 to configure the maximum capacity of a
partition dynamically during simulation, rather than
having it statically defined at construction time

Change-Id: Ib55c9990a6bc2930abaf2438c13337acc643520f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-09-26 10:21:21 +01:00
Giacomo Travaglini
3100418fb1 mem-cache: Store totalBlockCount directly in MaxCapacity pp
In this way we actually need to store one unsigned integer instead of
two. We also won't need to recompute the total number of cache blocks
whenever we will adapt this policy to be dynamically modified

Change-Id: Ia8cf906539d1891b6cdb821f2a74628127dc68c6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-09-26 10:20:57 +01:00
Junshi Wang
bf61bd127f arch-arm: Add support of AArch32 VCVTA/P/N/M instructions.
Add decoder and function of AArch32 VCVTA, VCVTP, VCVTN and VCVTM
instructions. Support both 16-bit and 32-bit variants.

Only support A32 encoding.

Change-Id: I6ece0e1b779f9a7cc9d709894a49a7fdcda28373
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-09-26 10:02:23 +02:00
Ronchi1997
e17875b7c7 misc: Correctly display build information (#1603)
See: #1591

Co-authored-by: Ronchi <ronchi@qq.com>
2024-09-25 14:23:51 -07:00
aperais
36264938db misc: Make random gen portable across compilers. (#1580)
Replace std::uniform_*_distribution by custom code
to make random number generation in gem5 portable across
compilers.

Of note, FP random number generation was not uniformly
distributed, and this PR does not fix that issue.

Thanks to Chandana S. Deshpande (deshpande.s.chandana@gmail.com)
for uncovering the issue.

Co-authored-by: Arthur Perais <arthur.perais@univ-grenoble-alpes.fr>
2024-09-25 07:31:00 -07:00
Saúl
d1ce4fb6c7 arch-riscv: add VLEN/ELEN as class attributes for all vec insts (#1538)
This refactor attempts to homogenize all riscv's vector (macro/micro)
instruction classes so that ELEN and VLEN are guaranteed to be a class
attribute. Since both are constant, all instructions will get it on the
decoding process passed through to their vector base class.

This allows the removal of VLEN in the PC state and also in some
constructor default parameters (solves issue #1207).

Change-Id: I6f0471004335f49b00b015c37e95dc7f9569e303
2024-09-24 14:32:37 -07:00
Yu-Cheng Chang
e9ea18000d arch-riscv: Move static GDB methods to RemoteGDB virtual methods (#1590)
Move getRvType & getPrivilegeModeSet static methods into
RiscvISA::RemoteGDB virtual methods allows the derived
RiscvISA::RemoteGDB to override it without change a lot of methods in
base methods

Change-Id: I3cbb9cf1fdee4a298e903bb4a0a5683c042b749d
2024-09-24 07:46:56 -07:00
Bobby R. Bruce
2fc44a50f8 gpu-compute: Fix '64kB' to '64KiB' in gpu-compute (#1594)
64kB, in these cases, will cast to 64KiB regardless. To improve
readability and understanding of these objects, this patch changes there
SI Prefix (kB -> KiB).
2024-09-23 15:25:43 -07:00
Bobby R. Bruce
d74d550af4 misc,tests: Improve daily cache handling. 2024-09-23 14:20:29 -07:00
Bobby R. Bruce
6af68bcf81 tests,misc: Update weekly/daily caches 2024-09-23 13:16:01 -07:00
Bobby R. Bruce
5214c8b0cb misc, tests: Add missing build/ALL cache in daily-tests.yaml 2024-09-23 12:05:42 -07:00
Bobby R. Bruce
162ea1fa74 tests,misc: Add caching to daily and weekly test workflows 2024-09-23 12:01:57 -07:00
Bobby R. Bruce
1a637e6d94 tests: test_requires.py moved to very-long and drop risv
This test required a lot of compilation for what it does. It is now moed
to very-long/weekly and riscv has been dropped as arm and x86 are
sufficient.
2024-09-23 11:34:14 -07:00