264 Commits

Author SHA1 Message Date
b2f5575f9c Fix DRAMPower linkage issue with gem5 2025-03-25 13:25:53 +00:00
a5ba2bf60d Fix nlohmann_json include 2025-03-25 14:01:37 +01:00
705f1295c7 Use fetch content in DRAMSys 2025-03-25 12:45:34 +00:00
e89a9e22f5 ext,stdlib: Update integration of DRAMSys
The latest version of DRAMSys required several API changes which were
applied in this commit.

Also, the README for the usage of DRAMSys has been updated.

The updated version fixes a bug in DRAMSys that caused some full-system
simulations to loop endlessly.

GitHub Issue: https://github.com/gem5/gem5/issues/1452
2025-03-25 13:03:38 +01:00
51de880666 Update configuration 2025-03-21 18:17:12 +01:00
438d997ddb Increase HBM2 memory size to 2 GiB 2025-03-21 18:16:43 +01:00
e423da5256 Add support for shared pim units 2025-03-21 18:15:44 +01:00
e1c6318edb Integrate additional pim-vm library in DRAMSys linking 2025-03-21 18:15:44 +01:00
Erin Le
bcfa988a67 tests, scons: Fix Testlib test failures
This commit changes the fs/linux/arm and learning_gem5 tests as
they were previously failing with the Ruby change. The
fs/linux/arm long tests require the addition of a new gem5 build,
ARM_X86, which builds the ARM and X86 ISAs with the
MESI_Two_Level cache hierarchy.
2024-11-19 11:00:37 -08:00
Erin Le
8fe1228f3e scons, ext-testlib: rename NULL_All_Ruby to use all caps
This commit renames NULL_All_Ruby to NULL_ALL_RUBY and adds a
tag for this build for testlib. These changes were made so the
NULL_All_Ruby build could be used with testlib.
2024-11-19 11:00:37 -08:00
Kaustav Goswami
51b5279671 ext,util-docker: updated SST to v.14.0.0 (#1575)
This change updates SST from v.13.0.0 to v.14.0.0. It also adds an
updated docker file to test the new version.
2024-09-21 06:18:12 -07:00
Bobby R. Bruce
a1105cf234 misc,github,tests: Remove gerrit change ID requirement (#1486) 2024-09-13 20:22:04 -07:00
Bobby R. Bruce
5207b3be6d ext,tests,misc: Suppress incorrect GCC 12 error in Pybind
There is a compiler error with GCC 12 discussed here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824

This Pybind code triggers the bug and was causing our compiler tests to
fail.

To fix gem5 compilation for gcc 12 these warnings/errors have been
suppressed for this code.

This is a copy and paste of:
https://github.com/pybind/pybind11/pull/5355

Change-Id: I9344951ef00d121ea0b609f4faa13dfe09aabb3b
2024-09-08 00:38:02 -07:00
Bobby R. Bruce
3429da7787 python,tests,misc: Remove Gerrit-ID insertion from pre-commit
Change-Id: I4db06415c9d0bbba7a6db56d7e9febf6491003bf
2024-08-20 15:40:55 -07:00
Bobby R. Bruce
f600db4a98 gpu-compute,tests: Move GPU tests to testlib (#1270)
A new host tag `gcn_gpu` has been added. This allows for selection of
those GPU tests which depend upon the gcn-gpu docker image to run.

In addition to this, the square GPU tests has been moved to the CI
tests. This ensures some GPU code is compiled and run on every PR.
2024-08-19 10:58:06 -07:00
Lukas Zenick
96fbc2068a util, ext: Fix building TLM (#1105)
Fixed the issue that did not allow building TLM.

Build commands:
```bash
scons build/ARM/gem5.opt
scons setconfig build/ARM USE_SYSTEMC=n
scons --with-cxx-config --without-python --without-tcmalloc build/ARM/libgem5_opt.so
cd util/tlm
scons
```
Following this README, I tested it successfully with the simple examples:
https://gem5.googlesource.com/public/gem5/+/master/util/tlm/README

GitHub Issue: #591 
Change-Id: If07fae2eb20ad62627e733573f61bc42d594f970

---------

Co-authored-by: Ivana Mitrovic <ivanamit91@gmail.com>
2024-05-24 13:29:58 -07:00
Chong-Teng Wang
d48191d608 arch-riscv: Add RVV FP16 support (Zvfh & Zvfhmin) (#1123)
Add support for the following two extensions:

[Zvfh](https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#185-zvfh-vector-extension-for-half-precision-floating-point):
Vector Extension for Half-Precision Floating-Point

[Zvfhmin](https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#184-zvfhmin-vector-extension-for-minimal-half-precision-floating-point):
Vector Extension for Minimal Half-Precision Floating-Point

For instructions (`vfncvt[.rtz].x[u].f.w`) and (`vfwcvt.f.x[u].v`) which
will become defined when `SEW = 8`, a new template
`VectorFloatWideningAndNarrowingCvtDecodeBlock` is added and 8-bit
floating point type (`float8_t`) is defined.

The data type `float8_t` is introduced in the newer `3e` version of the
SoftFloat Package, however, the current version in use is `3d` which
does not include this definition. Despite this, `float8_t` is utilized
solely for constructing the `vfncvt[.rtz].x[u].f.w` and
`vfwcvt.f.x[u].v` instructions when `SEW = 8`. There are no operations
that directly manipulate data of the `float8_t` type.
2024-05-16 08:37:00 -07:00
Matthew Poremba
9b89149142 tests,ext: Remove GCN3 tags, update tests to Vega
Change-Id: I782b6e61cd43b51cfbe80161d4dc1cee125f7f64
2024-01-17 11:13:50 -06:00
Bobby R. Bruce
bfd25f5352 util-docker: Enforce cmake version >=3.24 for DRAMSys (#627)
DRAMSys requires cmake 3.24 or greater. By default neither Ubuntu 22.04
or 20.04 delevery this by APT.

In both cases wget is required. In 20.04 OpenSSL is required.

Then ext/dramsys README file has been updated to state this requirement.
2023-11-30 21:23:53 -08:00
Jason Lowe-Power
62a2b6eed2 ext: Update readme for DRAMSys
Specify the cmake version

Change-Id: I8bbdb128667df37724c38caef5572d8fb1641ef5
2023-11-30 15:09:28 -08:00
Bobby R. Bruce
d11c40dcac misc: Run pre-commit run --all-files
This ensures `isort` is applied to all files in the repo.

Change-Id: Ib7ced1c924ef1639542bf0d1a01c5737f6ba43e9
2023-11-29 22:06:41 -08:00
Bobby R. Bruce
575114b63b ext: Add .gitignore to ext/dramsys
Change-Id: Ifc1a3c77b56cbe5777d041a88b2c0d5cb77eaf89
2023-11-26 17:10:40 -08:00
Bobby R. Bruce
cb61d01ede ext: Add 'cmake' dep check to DRAMSys install
CMake is not required to build gem5. It is only required to build
and link the optional DRAMSysm library. Therefore, if the DRAMSys repo
has been cloned but CMake is not present this patch ensures no attempt
at building or linking DRAMSysm is made. A warning is thrown
inform the user of the missing CMake.

Change-Id: I4d22e3a16655fd90f6b109b4e75859628f7d532d
2023-11-26 17:10:40 -08:00
Derek Christ
e95cab429f configs,ext,stdlib: Update DRAMSys integration (#525)
Recent breaking changes in the DRAMSys API require user code to be
updated. These updates have been applied to the gem5 integration.

Furthermore, as DRAMSys started to use CMake dependency management,
it is no longer sensible to maintain two separate build systems for
DRAMSys. The use of the DRAMSys integration in gem5 will therefore
from now on require that CMake is installed on the target machine.

Additionally, support for snapshots have been implemented into DRAMSys
and coupled with gem5's checkpointing API.
2023-11-14 08:05:11 -08:00
Kaustav Goswami
e109076357 ext: removed SST deprecation notice from SimpleMem
SST SimpleMem will be deprecated in SST 14. PR 396 updated the
bridge to use StandardMem, which is the new memory interface in
SST. This change removes all references to SimpleMem.

Change-Id: I6e4d645317d95ebb610e3dfc93a30d53b91b6b5d
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
2023-11-06 11:54:35 -08:00
Kaustav Goswami
2c229aa2ff configs,ext: gem5 SST bridge calls m5.instantiate() in gem5
This change updates the gem5 SST bridge to call m5.instantiate()
in the gem5 config script instead of in the SST component. This
allows more flexibility for the gem5-SST setup, as we can now write
traffic generators using the bridge.

Change-Id: I510a8c15f8fb00bdbdd60dafa2d9f5ad011e48f2
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
2023-11-06 11:54:35 -08:00
Bobby R. Bruce
c855dbf7c5 configs,ext: Updated the gem5 SST Bridge to use SST 13.0.0 (#396)
This change updates the gem5 SST Bridge to use SST 13.0.0. Changes are
made to replace SimpleMem class to StandardMem class as SimpleMem will
be deprecated in SST 14 and above. In addition, the translator.hh is
updated to translate more types of gem5 packets. A new parameter `ports`
was added on SST's side when invoking the gem5 component which does not
require recompiling the gem5 component whenever a new outgoing bridge is
added in a gem5 config.
2023-10-11 13:34:48 -07:00
Bobby R. Bruce
298119e402 misc,python: Run pre-commit run --all-files
Applies the `pyupgrade` hook to all files in the repo.

Change-Id: I9879c634a65c5fcaa9567c63bc5977ff97d5d3bf
2023-10-10 21:47:07 -07:00
Kaustav Goswami
937b829e8f configs,ext: Updated the gem5 SST Bridge to use SST 13.0.0
This change updates the gem5 SST Bridge to use SST 13.0.0. Changes
are made to replace SimpleMem class to StandardMem class as
SimpleMem will be deprecated in SST 14 and above. In addition, the
translator.hh is updated to translate more types of gem5 packets.
A new parameter `ports` was added on SST's side when invoking the
gem5 component which does not require recompiling the gem5
component whenever a new outgoing bridge is added in a gem5 config.

Change-Id: I45f0013bc35d088df0aa5a71951422cabab4d7f7
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
2023-10-10 14:16:29 -07:00
Bobby R. Bruce
ddf6cb88e4 misc: Run pre-commit run --all-files
This is reflect the updates made to black when running `pre-commit
autoupdate`.

Change-Id: Ifb7fea117f354c7f02f26926a5afdf7d67bc5919
2023-10-10 14:01:58 -07:00
Bobby R. Bruce
06bbc43b46 ext: Remove std::binary_function from DramPower
`std::binary_function` was deprecated in C++11 and officially
removed in CPP-17.

This caused a compilation error on some systems. Fortunately it can be
safely removed. It was unecessary. The commandItemSorter was compliant
witih the `sort` regardless.

Change-Id: I0d910e50c51cce2545dd89f618c99aef0fe8ab79
2023-10-05 10:18:19 -07:00
Bobby R. Bruce
62d34ef374 misc: 'sim{out/err}' -> 'sim{out/err}.txt' (#250)
By default, the `--stderr-file` and `--stdout-file` arguments were
directing the simulator to output files named "simerr" and "simout"
respectively if an output redirect was requested.

A small annoyance is these files lack an extension meaning programs
refuse to open them, or don't do so withou additional effort. On many
systems they are assumed to scripts.

This patch adds the `.txt` extension to both, thus clearly indicating to
other programs these are text files and can be opened and read as such.
2023-09-27 17:36:03 -07:00
Bobby R. Bruce
391f62b213 misc: 'sim{out/err}' -> 'sim{out/err}.txt'
By default, the --stderr-file and --stdout-file arguments were
directing the simulator output to files named "simerr" and
"simout" respectively if an output redirect was requested.

A small annoyance is these files lack an extension meaning programs
refuse to open them, or to do so without some additional effort. On
many systems they are assumed to scripts.

This patch adds the .txt extension to both, thus clearly indicating
to other programs these are text files and can be opened to be read
as such.

Change-Id: Iff5af4a9e6966b4467d005a029dbf401099fbd35
2023-09-21 12:57:43 -07:00
Bobby R. Bruce
0337613afc ext,tests: Add --build-targets option to ./main.py list
This allows for build target information (i.e., the gem5 binary to be
built for the tests) to be returned.

Change-Id: I6638b54cbb1822555f58e74938d36043c11108ba
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
13b77b3e41 ext,tests: Allow passing of --uid to ./main.py list
This is useful for listing the fixtures of a Suite.

Change-Id: Id2f1294cc7dea03a6b26e8abc5083886fe0299d9
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
43226004a1 ext,tests: Fix --figures flag when using ./main.py list
Now the "tests/main.py" script will accept the `--fixtures` flag when
using the `list` command. This will only list the fixtures needed.

To have this implemented `__str__` for the `Fixture` class has been
implemented.

Change-Id: I4bba26e923c8b0001163726637f2e48c801e92b1
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
9e1afdecef ext: Run pre-commit run --files ext/testlib
Change-Id: Ic581132f6136dddb127e2a1c5a1ecc19876488c3
2023-09-05 00:00:25 -07:00
Bobby R. Bruce
6f7fc51a18 ext: Specialize GDBSignal MACRO to gem5
The goal is to fix this issue which appears to be affects some Apple
users: https://github.com/gem5/gem5/issues/94.

By specializing the `EXC_*` to gem5 we avoid the name conflicts plagiing
some users.

Change-Id: I031f7110b4b4ae82677b6586903cd57b22ca2137
2023-08-21 17:23:09 -07:00
Bobby R. Bruce
16752b7ca2 ext: Update DRAMSys README
This fixes:

1. Most importantly: The submodule recursive update was incorrect. This
adds the recursive obtaining of submodules as a seperate explicity step.
2. Changes the `git clone` to use https.

Change-Id: Iad69e44b927a5aa982b49dffa6929c52fcc7ee72
2023-08-18 15:43:14 -07:00
Melissa Jost
eb07d3fcf4 misc: Update documentation and links for GitHub
This changes mentions of googlesource and Gerrit to instead
link to the gem5 GitHub repository, and updates the documentation
to reflect the GitHub review process.

Change-Id: I5dc1d9fcf6b96f9e5116802f938b7e3bb5b09567
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71878
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-07-10 22:57:28 +00:00
Gabriel Busnot
223a2ce234 misc: Add the magic_enum.hh external header (v0.9.2)
Also increase maximum enum supported value to 0x100

This library is courtesy of Daniil Goncharov and hosted at
https://github.com/Neargye/magic_enum/tree/master. It enables
compile-time and runtime string to/from enum value conversion as well
as other fancy enum introspection-like things.

The MIT lincence should not conflict with gem5 in any way.

Copying the file for now but a submodule might be more suitable if
gem5 uses them in the future.

Change-Id: Ib0c8f943b79c703f1247c11c7291fb4fb1548b0f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67665
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-07-07 10:17:54 +00:00
Bobby R. Bruce
c4d61ca143 tests: Add '--duplicate-sources' to libgem5 SST build
Unfortunately the building of SST (in "ext/sst") depends on generated
header files. Therefore it adds the build directory to the include path.
For this to work the libgem5.so must be build with
"--duplicate-sources".

Change-Id: I5ed26a89c81402d421f5dfa110de7cf758f28694
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70497
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-05-17 17:49:48 +00:00
Alex Richardson
5e096f5b5d scons: allow building without duplicating source files
This adds a new scons flag --no-duplicate-sources to build without
linking source files to the build directory.

I find this very helpful when using CLion, since I can now generate a
compilation database using
`bear scons build/ALL/gem5.debug --no-duplicate-sources` and CLion will
now correctly semantically analyze all the files inside src/.
It also ensures that clicking on a build warning/error now opens the
real source file rather than a symlink.

This is not enabled by default since it's possible that certain use
cases are not working correctly, but the basic testing I've done so
far appears to work just fine.

It appears that with this change the `<root>/src` directory is no longer
added to `PYTHONPATH` when running `tests/main.py`, so this change
depends on https://gem5-review.git.corp.google.com/c/public/gem5/+/68757

Change-Id: Iddc9bf9c8211e68e5432c0a07f5c95f427c1ca16
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68518
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2023-04-05 22:00:07 +00:00
Melissa Jost
1ff3ea2a09 tests: Fix failing SST and SystemC nightly tests
There was a bug with the SST and SystemC tests where they wouldn't
compile due to a missing path for the gdbremote/signals.hh
header, and this change includes that so they run properly.

Change-Id: I9ff0404e327358fe2d1b77388bbcc1f807136ebe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67817
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-03-30 21:01:42 +00:00
bc6133e6a1 mem: Add DRAMSys wrapper as a memory object
Add a DRAMSys wrapper to the gem5 memory source that
instantiates the DRAMSys simulator.
Another DRAMSys SimObject implements the AbstractMemory
interface and exposes the tlm target socket.

Change-Id: I8a95e729905e0924453043e5e7744df7a7ce4548
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62912
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-03-29 08:19:08 +00:00
ddcf452b1b ext: Add DRAMSys integration instructions
Add instructions to add the DRAMSys memory simulator
to gem5 in the ext/ directory.
The provided SConscript file compiles DRAMSys.

Change-Id: If5c723db61a3151c9155190f968c66927d7bfaa3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62911
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2023-03-29 08:19:08 +00:00
Xuan Hu
461520d0ab ext: Update softfloat to 3d full version
* Add all softfloat source files without any change.
* Remove useless file softfloat.mk.in, since gem5 use Scons.
* Add `use_fast_int64` in SConscript to distinguish src of two strategies for data
  larger than 64 bits.
  * The SoftFloat library uses two strategies to handle data larger than 64bit. One is
    spliting data into `fast_int64`, and the other is using pointer. Two strategies
    are distinguished by macro `SOFTFLOAT_FAST_INT64`. But not all "*.c" files are
    guarded by this macro, which leads to including useless files in compiling progress
    and compiling error. `use_fast_int64` used in SConscript can exclude unnecessary
    files.

Change-Id: I7cec10412c00a35c247299cd92d83cdee9066410
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66552
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2023-03-28 10:47:18 +00:00
Bobby R. Bruce
07fca546e6 ext: Update Pybind to Version 2.10.3
Updating Pybind11 is necessary for gem5 to compile correctly with
Python 3.11. As of March 9th 2023, 2.10.3 is the latest version of
Pybind11.

Change-Id: I32c68c507770040d3fac2de442d88a8f46b48896
Issue-on: https://gem5.atlassian.net/browse/GEM5-1295
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68818
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2023-03-15 21:03:41 +00:00
Zhengrong Wang
39e813374c ext: Fix typo in DRAMSIM2 Sconscript
ClockDoenv should be ClockDomain.

Change-Id: Ibcf3d0dc969624a4e20d86924ef834781b5bbf21
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67759
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2023-02-09 20:56:55 +00:00
Gabriel Busnot
313f557b93 ext-testlib: Support str-convertible args in gem5_verify_config
gem5_verify_config dit not support string-convertible args due to log_call()
not trying to call str() on them. This patch maps str() on the command
paramters.

It is now possible to pass native integers or even string-like types like
pathlib.Path as arguments without manually converting them to string.

Change-Id: Ifa987f5f1a20f17c8710e1a36d99d424e4c9ce6c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66893
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2023-01-04 07:46:14 +00:00