Commit Graph

22193 Commits

Author SHA1 Message Date
Nagendra-KJ
d0a9945d47 scons: Changed bits per set for VEGA_X86 to 128
Change-Id: I03fbb3000a13cf11fb751367677a7f1735f64ec9
2024-10-20 11:53:31 -05:00
Nagendra-KJ
a443b5cbb8 configs: Added command line arguments to gpufs config scripts
This commit adds command line arguments to the scripts that GPU-FS mode
uses.

Change-Id: I5514e77e699b9144461bbd2be6e267e7d44a6fb2
2024-10-20 11:53:21 -05:00
Bobby R. Bruce
644ad3cdb0 misc,tests: Fix incorrect date assignment in Actions 2024-10-18 14:59:16 -07:00
Mahesh Madhav
3e83f3ce4f scons,misc: Portable debug flag generation (#1666)
Modifies union construction in the debug directory so output is more
amenable to alternative compilers. Verified that this change produces
code that builds with clang, gcc, msvc, nvhpc, aocc, icc, openxl, and
cray hpc.

These were the kinds of errors seen in MSVC, which this patch fixes.
```
debug/Decoder.hh(24): error C2461: 'gem5::debug::unions::Decoder': constructor syntax missing formal parameters
debug/Decoder.hh(31): error C7624: Type name 'gem5::debug::unions::Decoder' cannot appear on the right side of a class member access expression
```
2024-10-18 14:39:09 -07:00
Bobby R. Bruce
b836a3f239 tests: update input sizes for pannotia tests (#1631)
This PR addresses comments from #1584 

- removed tests using the same binary multiple times. Each binary is
tested once with one graph
- Updated the input sizes as per the comments in the above mentioned PR
2024-10-18 13:42:30 -07:00
Bobby R. Bruce
ddaf70b64f Merge branch 'develop' into update-pannotia-tests 2024-10-18 13:40:59 -07:00
Giacomo Travaglini
2e271459d0 mem-cache: Implementation of SMS prefetcher (#1454)
This PR adds the SMS prefetcher described in [this
](https://web.eecs.umich.edu/~twenisch/papers/isca06.pdf) paper.
This work was done in collaboration with @Setu-Gupta, and @xmlizhao

On branch sms
Changes to be committed:
modified: src/mem/cache/prefetch/Prefetcher.py
modified: src/mem/cache/prefetch/SConscript
new file: src/mem/cache/prefetch/sms.cc
new file: src/mem/cache/prefetch/sms.hh

Change-Id: I68d3bb6cf07385177d0f776fb958f652cfc41489
2024-10-18 19:15:57 +02:00
Harshil Patel
ae56a31b21 tests: Download only the resources used in ponnotia tests 2024-10-18 17:12:43 +00:00
Giacomo Travaglini
c974bca123 arch-arm: Implement the L2 TLB as a 5-way set associative
Change-Id: I65d7a384f6d54989cec3c431090c35285011849f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:15 +01:00
Giacomo Travaglini
7f826ffbaa arch-arm: Use the AssociativeCache in the ArmTLB
With this commit we replace the TlbEntry storage within the TLB from an
array of entries with a custom hardcoded FA indexing policy and LRU
replacement, into the flexible SetAssociative cache.

Change-Id: Ia74ff6962ac8195802b51dcc0caa516965f0ce37
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
ab6354a9cc arch-arm: Rename TlbEntry::Lookup into TlbEntry::KeyType
KeyType definition is required if we want to store the TlbEntry
within an AssociativeCache. We could add an alias and keep the
Lookup name but this will just create extra confusion

Change-Id: Ib0b7c9529498f0f6f15ddd0e7cf3cec52966e8df
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
c83321b843 arch-arm: Define a SetAssociative indexing policy for the TLB
Change-Id: I8149ddc4ecf7ac3b8b7e8e1cf7eb4932fd99c34a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
376530ef72 arch-arm: Add isValid method to the TlbEntry
Change-Id: I93b183ad0768e8afc94bb3f21387c21cdc9cc78b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
3f18cada53 arch-arm: Add insert method to the TlbEntry
Change-Id: I664b03b61e4540025c6cebaa4a7298297565c76b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
c6cca14b74 arch-arm: Add invalidate method to the TlbEntry
This is needed for compliance with the AssociativeCache
container. It will call the invalidate method when
invalidating the TLB entry

Change-Id: Idb1bc40b5aea8c475146700c81ab79d9980f745d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
ce8a98d657 arch-arm: Generate Lookup from TlbEntry
Change-Id: I355d190acfeb3cd829647b962548c82dd0013f8d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
fda8eeace4 arch-arm: Keep track of observed page sizes in the TLB
With this commit we record the page sizes of all valid
TLB entries in a TLB.

We update the set conservatively, therefore allowing
false positives but not false negatives.

This information will be used when doing a page size based
lookup. At the moment we don't strictly need it as we
iterate over all TLB entries (the TLB implements a fully
associative cache) and if we find multiple matches, it means
we have stored some partial translations.

The existing logic is prioritizing complete translations
over partial translations and among the latter, late stage
translations over early stage (with the idea to minimize
the number of walks).

The "iterate once over the entire TLB and record all matches"
won't work well when we shift from a fully associative
TLB into a set associative. With the introduction of the
aforementioned set, we can do page size based lookups,
so we can explicitly lookup the TLB for a specific page size
therefore looking into the appropriate set for a match

Change-Id: If77853373792d6a5ec84cf1909ee5eb567f3d0e4
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
da3919a6f4 arch-arm: Add pagesize field to the Lookup data structure
Change-Id: Ibc2c80cbf3cfd98f24440e8e6ddf4dbb7e4e26d6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
1eed6e9769 arch-arm: Make TlbEntry a ReplaceableEntry
Change-Id: I3b8169bfb620ea36f6bbe63c38b71184285b55c2
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
94ffe5f233 arch-arm: Replace TLB,TLBVerbose usage in ArmMMU
Some ISAs (like Arm) have moved most of the translation logic into
the MMU and use the TLB simply as translation storage. It makes
sense to use the MMU debug flag for that logic and reduce the
scope of the TLB flag to TLB insertion/hits/misses

Change-Id: I2a164545c711d83d3e87075b0cb5c279eed274c9
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
58bc790a09 arch-arm: Do not include tlb.hh in mmu.hh
This commit is moving some MMU methods definition in the
source file from the header to avoid including tlb.hh

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I8fb1aeccd9c38c48b09583b4dc5d152acd09c3e6
2024-10-18 14:30:14 +01:00
Giacomo Travaglini
08c66a0b6a arch-arm: Avoid unnecessary include of faults.hh
Remove unused include from self_debug.hh

Change-Id: Ic675a277ebb2ff4a319e9a7cfe2bea4af850609e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-10-18 14:25:39 +01:00
Giacomo Travaglini
0f1436ba5f arch-arm: DomainType is not specific to the TlbEntry
Change-Id: I626c79973fcd60b1be36a965923999a1c9a9bc54
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-10-18 14:25:39 +01:00
Giacomo Travaglini
d3cdd2dc17 arch-arm: TranMethod is not specific to the ArmFault
It is a simple enum to distinguish between short and big
descriptors. By moving it away from the ArmFault we can
avoid including fault.hh from mmu.hh

Change-Id: Ib556b577c62f5ea3e4c8c9e0d4560a3e99c96778
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-10-18 14:25:39 +01:00
handsomeliu-google
3fc6cc7763 sim: Make SignalSinkPort::set virtual (#1679)
We are implementing derived classes of SignalSinkPort that does some
additional logic after it's triggered (set() invoked by SignalSourcePort
peer), and before executing the callback that a device provides (in
onChange_). The logic is like additional logging, or providing debugging
features. However, set() itself directly calls the onChange_ callback.

Making the set() virtual could provide the flexibility to achieve this
feature.
2024-10-18 05:41:05 -07:00
Pranith
ae0cee66ed systemc: Disable 'overloaded-virtual' warn for clang (#1662)
We need to extend the warning disable even for clang compiler.

Fixes #1658
2024-10-18 05:40:10 -07:00
Harshil Patel
946bf83b75 arch-arm: Add arm demo board (#1478)
This demo board is a preset arm board, that can be used to run example
gem5 simulations. This board doesnt simulate any known hardware.

The board will be used to run benchmarks such as gapbs and npb to
collect stats. The plan is to show these stats on the gem5 resources
website to provide more details about the resources.
2024-10-18 05:36:31 -07:00
Bobby R. Bruce
cb5d14f753 arch-riscv: Implement Zcmp instructions (#1432)
1. Implement Zcmp(cm.push, cm.pop, cm.popret, cm.popretz, cm.mva01s,
cm.mvsa01) instructions

2. The Zcd instructions overlap the Zcmp and Zcmt instruction. This
option is used to enable/disable Zcd extension, implies enable Zcmp/Zcmt
extension. If Zcd is enable, the Zcmp and Zcmt is disabled. Otherwise,
Zcmp and Zcmt is enabled.

Spec: https://github.com/riscv/riscv-isa-manual/blob/main/src/zc.adoc
2024-10-18 05:33:55 -07:00
Harshil Patel
7591f2a843 tests: Fix compiler tests (#1678)
- This change updates syntax of constructors of Template Classes from
`class<T>()` to `class()`

- Initializes coherence to 0 in `src/mem/cache_blk.hh`

The above changes are made to solve the errors when compiling gem5 in
gcc 14
2024-10-17 11:19:46 -07:00
Bobby R. Bruce
d454e421d2 stdlib,arch-x86: Update X86Demoboard (#1618)
This commit modifies X86DemoBoard so it has numbers more similar to that
of RiscvDemoBoard and ArmDemoBoard. It also adds SE mode to
X86DemoBoard. Note that the changes here depend on the changes in PR
1579.

**Note**: This PR was created so @BobbyRBruce could add his commits to
#1600

---------

Co-authored-by: Erin Le <ejle@ucdavis.edu>
2024-10-17 10:29:17 -07:00
Bobby R. Bruce
0341c5a502 SE script and tests for risc-v's vector extension (#1542)
This two commits add the SE config and test script, respectively, to run
the rvv tests mentioned in #1246.
2024-10-17 10:26:30 -07:00
Jason Lowe-Power
f55a4ce989 arch-x86,arch-arm: Remove static variables in decoders (#1643)
There were a number of variables in the arm and x86 decoders that are
static (e.g., the decode cache). It's a bit interesting that this
doesn't cause problems with multiple cores since each core has its own
decoder.

However, this causes segfaults if you run different cores on different
*host* threads. We are experimenting with running gem5 with multiple
host thread (i.e., in parallel), and removing these static variables
resolves the segfault.

This change also adds const to any other static variables to ensure that
they cannot be modified.

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-10-17 08:17:34 -07:00
Abhishek Shailendra Singh
cf3427f87b mem-cache: refactored the code 2024-10-17 17:13:37 +02:00
pre-commit-ci[bot]
bd939821c8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-17 17:13:37 +02:00
Abhishek Shailendra Singh
3eabd02801 mem-cache: This commit adds sms prefetcher
Change-Id: I68d3bb6cf07385177d0f776fb958f652cfc41489
2024-10-17 17:13:37 +02:00
Roger Chang
a6421e4404 arch-riscv: Add IsDelayedCommit for each zcmp micro instructions 2024-10-17 13:29:38 +08:00
Roger Chang
28b112e2a6 arch-riscv: Implement Zcmp
Implement instructions:
cm.push
cm.pop
cm.popret
cm.popretz
cm.mva01s
cm.mvsa01

Spec: https://github.com/riscv/riscv-isa-manual/blob/main/src/zc.adoc#zcmp

Change-Id: I2921c4bdb0c654858a237386056ebb2aed643a5a
2024-10-17 13:29:38 +08:00
Roger Chang
aa782cffee arch-riscv: Add enable_Zcd options to RiscvISA
The Zcd instructions overlap the Zcmp and Zcmt instruction

This option is used to enable/disable Zcd extension, implies enable
Zcmp/Zcmt extension. If Zcd is enable, the Zcmp and Zcmt is disabled.
Otherwise, Zcmp and Zcmt is enabled.

Spec: https://github.com/riscv/riscv-isa-manual/blob/main/src/zc.adoc#zc-overview

Change-Id: I3788eb6539e13a210c9946efc43ca1fef4639560
2024-10-17 13:29:38 +08:00
Matthew Poremba
deb8f983a1 arch-vega: Fix multi-dword setElem in PackedReg (#1664)
There are two issues related to setting an element in PackedReg where
the element spans multiple dwords. First, the mask value is wrong and is
clobbering both dwords. Second, a portion of the value is shifted out of
the narrower input type.

Fix this by using the correct mask to clear the bits where the value
will be placed and use a larger data type to shift the value into place.
2024-10-14 10:19:52 -07:00
Ivana Mitrovic
20965f571b stdlib: Extend AbstractBoard pre_instantiation functionality (#1497)
* Deprecates the setting of FS/SE mode via the `Simulator` module.
* Moved the creation of the `Root` object from the `Simulator` to the
board.
* Moved the setting of `sim_quantum` from the `Simulator` to the
processor.
* Allows for easier development of boards which support both SE and FS
mode simulation by moving board setup function calls to occur after the
set_workload function is call which sets a boards stats `is_fs` status.
2024-10-14 10:12:41 -07:00
Leon
652a72d122 arch-riscv: Add support for riscv hardware probing syscall (#1525)
This PR adds the support for riscv hardware probing syscall described in
[this](https://docs.kernel.org/arch/riscv/hwprobe.html). The
implementation logic refers to [linux
kernel](https://github.com/torvalds/linux/blob/master/arch/riscv/kernel/sys_hwprobe.c)
and
[qemu](https://github.com/qemu/qemu/blob/master/linux-user/syscall.c).
And passed the [RISC-V hwprobe
exmaple](https://github.com/cyyself/hwprobe) test.

Hope to be merged. Thanks.

Change-Id: Iab714974f0551fc451e0d6846c75a7153809a308

Co-authored-by: Zhibo Hong <hongzhibo@bytedance.com>
2024-10-14 10:00:48 -07:00
Matthew Poremba
1edeeda881 dev: Make unknown PCI device writes a warning (#1657)
This pops up in kernel 6.8.0. The device it is trying to write is
currently unknown but does not cause problems ignoring the device,
therefore change the panic to a warning and responding to the request
with the default PCI latency.

Change-Id: I4c1229753a75a94a255d8cfd411ac7311283366b
2024-10-14 08:51:05 -07:00
Saúl Adserias
f4ffe5f815 tests: add rvv-intrinsic-tests script and config
Change-Id: Ia3fa67bb2a2603dd5cbf665504f85a8b969c2a5e
2024-10-11 17:42:51 +02:00
Saúl Adserias
a35f146ba2 configs: add example RVV SE parametrized config
Change-Id: I0776c5751da8b80340166ab518593686d141a4dd
2024-10-11 17:32:09 +02:00
Bobby R. Bruce
a8f88abfb1 misc: Add 'ext' & 'tests' to vscode pythin extraPaths (#1652)
'ext' is set as a Python source path for gem5, like 'src/python'. It
helps vscode users to have vscode aware of this to better analytics and
reduce warnings (most comminly "unable to resolve import).

'tests' isn't in the Python source path when compiling gem5 but it is
when running `tests/main.py`. Though somewhat unideal as is lets vscode
think files in 'src' can import from files in 'test', adding this helps
vscode Python analytics parse the test files which reduces warnings and
aids in betters navigation of the testing code. This is particularly
helpful given the complexity of the testlib testing infrastructure.
2024-10-10 10:18:14 -07:00
Bobby R. Bruce
65ba2dcae5 tests: Refactor downloading of pannotia tests (#1653)
With this patch the pannotia tests now:

1. Download the resources to 'gpu-pannotia' in the
'tests/gem5/resources' directory. This is where other test resources are
store.
2. Download thr USA-road-d.NY.gr dataset from Google cloud bucket in a
decompressed state.
2. Avoid re-download the resources if they are already present on the
host machine.
2024-10-10 10:17:32 -07:00
Erin (Jianghua) Le
6195b33960 util-docker,tests: Add compiler tests & Dockerfiles for GCC 14 (#1646)
This commit adds gcc 14 to the compiler tests and Dockerfiles.
2024-10-10 10:17:03 -07:00
Bobby R. Bruce
c1c5147e53 tests,misc: Remove edited from PR Action trigger list (#1654)
`edited` is what forces a re-run of our tests when the PR title is
updated and other minor metadata stuff. I believe all changes to the
code are covered by the remainder. `synchronize` is means the PR is
triggered with the when the this PR is from (in this case my forked gem5
repo) is synced with the PR branch here. This covers the vast majority
of cases we care about. `opended` covers for the case where the PR is
created and `ready_for_review` for when something moves out of a draft.
2024-10-10 10:13:56 -07:00
Jason Lowe-Power
3f42ab4ca9 stdlib,ruby: Enable resetting version numbers (#1649)
Ruby requires each machine type to have a continuous set of version
numbers starting at 0. We were hiding this from users/developers by
using a Python class variable in the stdlib. Unfortunately, with
multiple ruby systems this doesn't work anymore.

As a stop-gap this change adds "resetting" these versions to the
beginning of `incorporate_caches`. It would be better to fix this in the
C++ code (and assign these numbers in C++ probably via the RubySystem),
but that's a bigger change than is needed right now.

---------

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-10 09:53:40 -07:00
Pranith
50f652a2ee Implement BTB using the cache library (#1537)
This enables the BTB to be associative and use various replacement
policies.
2024-10-10 17:05:22 +01:00