Commit Graph

20817 Commits

Author SHA1 Message Date
Roger Chang
1a7014c653 scons: Explicit the config option HAVE_PKG_CONFIG type boolean
The scons function Detect will return the program name if the program
is exists in the system. However, the HAVE_PKG_CONFIG is used to
check the pkg-config program is exists and it should be the boolean
type.

Change-Id: I18c4813d36eea68b8851a41db41777bdb2a80b7b
2023-10-20 11:42:20 +08:00
Roger Chang
fe20f4ada6 scons: Explicit the config option HAVE_DEPRECATED_NAMESPACE type bool
Currently the type of HAVE_DEPRECATED_NAMESPACE is used to detect
if the compiler support gnu::deprecated feature. The return type
of conf.TryCompile is int, but HAVE_DEPRECATED_NAMESPACE is used
as boolean type. The CL is add bool type caster to ensure the type
of it is boolean.

Change-Id: Ife7d9716e485a8be8722d58776f064e7c2268a30
2023-10-20 11:41:53 +08:00
Bobby R. Bruce
531067fffa mem,tests: Set Ruby Mem Test atomic percent to 0 (#489)
Fixes https://github.com/gem5/gem5/issues/450
(https://github.com/gem5/gem5/pull/477 fixes non-ruby memtests, so only
a partial fix).
2023-10-19 15:38:38 -07:00
Jason Lowe-Power
73c48a4828 arch-riscv: Add dynamic VLEN and ELEN configuration support to RVV path (#171)
At this moment, VLEN and ELEN RVV parameters are set as constants that
need to be modified at compile time if you want to experiment with
different values. With this patch, I want to set a first point to
discuss how to configure these parameters dynamically.

Also, I have modified some data types that were provoking wrong
behaviour in particular instructions when using a large enough VLEN
value in the considered range inside the specification.
2023-10-19 07:41:39 -07:00
Melissa Jost
34314b3f92 misc: Add LULESH GPU tests (#256)
Adds the LULESH GPU Tests to our GitHub Actions infrastructure

Co-authored-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Co-authored-by: Harshil Patel <harshilp2107@gmail.com>
2023-10-18 22:14:39 -07:00
Bobby R. Bruce
62e5198796 docker-images: Use GitHub Container Registry (#418)
This PR aims to enhance our Docker image build and registry management
by implementing multi-platform support and migrating from the Google
Docker registry to the GitHub Container Registry. Issue:
[#336](https://github.com/gem5/gem5/issues/336)
2023-10-18 22:08:01 -07:00
Alvaro Moreno
edf1d69257 arch-riscv: Define vlwhole/vswhole mem acceses using vlen.
This patch fixes the size of the memory acceses in vswhole and
vlwhole instructions to the maximum vector length.

Change-Id: Ib86b5356d9f1dfa277cb4b367893e3b08242f93e
2023-10-19 00:27:58 +02:00
Adrià Armejach
bfb295ac3f util: cpt_upgrader fix vregs size for #PR171
* Make cpt_upgrader set vregs of size MaxVecLenInBytes

Change-Id: Ie7e00d9bf42b705a0fb30c9d203933fc2e9bdcd9
2023-10-19 00:27:58 +02:00
Alvaro Moreno
52219e5e6f arch-riscv: Add elen configuration to vector config instructions
This patch adds elen as a member of vector configuration instructions so it can be used with the especulative execution

Change-Id: Iaf79015717a006374c5198aaa36e050edde40cee
2023-10-19 00:27:58 +02:00
Alvaro Moreno
2c9fca7b60 arch-riscv: Add vlen configuration to vector instructions
In first place, vlen is added as a member of Vector Macro Instructions
where it is needed to split the instruction in Micro Instructions.

Then, new PCState methods are used to get dynamic vlen and vlenb
values at execution.

Finally, vector length data types are fixed to 32 bits so every vlen value
is considered.

Change-Id: I5b8ceb0d291f456a30a4b0ae2f58601231d33a7a
2023-10-19 00:27:58 +02:00
Alvaro Moreno
8a20f20f79 arch-riscv: Add vlen component to decoder state
This patch add vlen definition to the riscv decoder so it can be used in Vector Instruction Constructors

Change-Id: I52292bc261c43562b690062b16d2b323675c2fe0
2023-10-19 00:27:58 +02:00
Alvaro Moreno
5d97cb8b0b arch-riscv: Define VLEN and ELEN through the ISA object
This commit define VLEN and ELEN values as parameters of the RiscvISA class.

Change-Id: Ic5b80397d316522d729e4db4f906aa189f27a491
2023-10-19 00:27:58 +02:00
Alvaro Moreno
57e0ba7765 arch-riscv: Define VecRegContainer with maximum expected length
This path redefine VecRegContainer for RISCV so it can hold every VLEN + ELEN possible configuration used at execution time

Change-Id: Ie6abd01a1c4ebe9aae3d93f4e835fcfdc4a82dcd
2023-10-19 00:27:58 +02:00
Bobby R. Bruce
be89758f0e misc: Add additional pre-commit hook checks (#420)
Adds the following hooks:

1. `check-ast`: Verifies all Python files have a AST indicating they are
valid Python.
2. `check-merge-conflict`: Checks to see if files have merge conflict
strings and blocks commits if so.
3. `check-symlinks`: Checks that symlinks in the repo still point to a
valid location.
4. `destroyed-symlinks`: Checks if symlink is replaced with a file and
if that file is identical to the file it was previously pointing too.

None of these commits change any code. They are all checks to ensure bad
code is not committed.
2023-10-18 12:21:22 -07:00
Hoa Nguyen
c3acfdc9b8 arch-riscv: Copy Misc Regs when swiching cpus (#479)
Misc Regs might contain rather important information about the state of
a core, e.g., information in CSR registers.

This patch enforces copying the CSR registers when switching cpus. The
bug and the proposed fix are reported here [1].

[1] https://github.com/gem5/gem5/issues/451

Change-Id: I611782e6e3bcd5530ddac346342a9e0e44b0f757

Signed-off-by: Hoa Nguyen <hn@hnpl.org>
2023-10-18 10:51:37 -07:00
Harshil Patel
7bd0b99635 tests: Changed percent atomics to 0 in memtest to fix daily test (#477) 2023-10-18 10:09:45 -07:00
Bobby R. Bruce
334df18dce arch-riscv: Add bootloader+kernel workload (#390)
Aims to boot OpenSBI + Linux kernel.
2023-10-18 09:17:12 -07:00
Bobby R. Bruce
e9fe9cb001 util: Improve GitHub Action runners: Enable KVM; Better Cleanup; Better Tooling (#470)
This PR adds the following the GitHub Actions runners:

1. Enables KVM to be run within docker containers within the VMs, if
permitted. Now, any Docker containers wanting to use KVM must create
containers with the `--device /dev/kvm` argument. This may make it hard
or impossible to utilize with GitHub Actions. Nonetheless it is enabled.
2. Improves the docker prune step (a cleanup step carried out after each
job) so it now removes all the Docker images in the VM.
3. Adds the "halt-helper.sh" script which automatically, and safely,
halts (shutsdown) all the VMs so maintenance tasks can be undertaken.
2023-10-17 11:38:40 -07:00
Andreas Sandberg
42d1c8b3c3 cpu: Restructure RAS (#428) 2023-10-17 19:14:13 +01:00
David Schall
5387e67114 cpu: Restructure RAS
The return address stack (RAS) is restructured to be a separate SimObject.
This enables disabling the RAS and better separation of the functionality.
Furthermore, easier statistics and debugging.

Change-Id: I8aacf7d4c8e308165d0e7e15bc5a5d0df77f8192
Signed-off-by: David Schall <david.schall@ed.ac.uk>
2023-10-17 15:30:56 +00:00
Bobby R. Bruce
3783afff5d util: Enable KVM on VMs and ensure working in Runners
This patch:

1. Adds setup scripting to "provision_root.sh" to setup and enable KVM,
   for the 'vagrant' user, for VMs which are capable of this.
2. Runs a check on each VM to see if KVM can be run sucessfully within a
   docker container. If so, the GitHub Actions runner is given a 'kvm'
   label. It is unknown at this time if GitHub Runners can utlized KVM
   but it is open to their processes.

Change-Id: Idfcbb7bfa3e5b7cc47d29aea50fb1ebcafdb7acc
2023-10-16 21:21:31 -07:00
Bobby R. Bruce
d18087af96 util: Add halt-helper.sh
This script helps use safely halt vagrant VMs.

Change-Id: I2f2f36b93f82e07756d069334db178604a9915b3
2023-10-16 21:14:09 -07:00
Bobby R. Bruce
adb5470996 arch-arm: Fix (other) line-length errors (#468)
https://github.com/gem5/gem5/pull/459 missed a couple.
This commit should complete the task.
2023-10-16 17:47:46 -07:00
Bobby R. Bruce
4b9c4e1e17 misc: Add --all to Runner docker system prune
Without `--all` `docker prune --force --volumes` will remove everything
exception non-dangling images. For an image to be considered dangling it
must be untagged and/or not used by a container at that time. As most of
the images we download are tagged (e.g., `:latest`) then most of our
images are never removed without the inclusion of `--all` which will
remove any image not currently used by a container.

Images were starting to accumulate on runners. This will ensure they do
not and are cleaned after each job run.

Change-Id: I6d8441a11d22fdcf827e9c44422dbcf02cf600e0
2023-10-16 13:33:30 -07:00
Bobby R. Bruce
cfef2ac23b util-docker: Fix end-of-line error in docker-bake.hcl
Change-Id: I2c792f35d8c74e29cf0dc0bc1287b6b5f3e4d6c8
2023-10-16 12:06:01 -07:00
Ivana Mitrovic
cb078f14c6 docker-bake: Changed compilers names to be more descriptive 2023-10-16 11:53:45 -07:00
Ivana Mitrovic
45df1dbb55 docker-images: Changed path from Google Registry to GitHub
Replaced all instances of the Google Docker registry
(gcr.io/gem5-test/) with the GitHub Docker registry (ghcr.io/gem5/).
2023-10-16 11:53:27 -07:00
Ivana Mitrovic
5b721b033f docker-bake: modified .hcl file
Migrated all the image build definitions from docker-compose.yaml to the bake file.
2023-10-16 11:47:49 -07:00
Ivana Mitrovic
df471092d9 dockerfiles: multi-platform setup (#336)
Updated Dockerfiles to work with multi-platform setups
2023-10-16 11:47:49 -07:00
Bobby R. Bruce
aaefda3b08 arch-arm: Fix line-length error in branch64.is
Change-Id: I62c5d5fd47927a838e6731a464fc7e6d8afab768
2023-10-16 10:57:03 -07:00
Hoa Nguyen
d048ad34d6 arch-riscv: Change to VS bits to DIRTY for rvv insts changing vregs (#376)
This is similar to [1] and [2].

Essentially, the VS bits of STATUS CSR keep track of the state of
the vector registers. (VS bits == DIRTY) means the content of vector
registers have been updated since the last time the VS bits were
updated.

This chain of changes is supposed to change the VS bits to DIRTY for if
any
vector register is potentially updated.

[1] https://gem5-review.googlesource.com/c/public/gem5/+/65272
[2] https://github.com/gem5/gem5/pull/370

Change-Id: I0427890dadc63b74a470d7405807dcfcad18005b
2023-10-16 10:07:40 -07:00
Yu-Cheng Chang
2825bc1d55 misc: Add missing RISCV valid ISA option to README.md (#462)
The list of valid ISA options should be same as the website:
https://www.gem5.org/documentation/general_docs/building

Change-Id: Id5ace5b0356ec35634caec5b11159551801c0615
2023-10-16 09:45:28 -07:00
Hoa Nguyen
9b2b6cd8d2 arch-riscv: Mark vector configuration insts as vector insts (#463) 2023-10-16 09:40:09 -07:00
Bobby R. Bruce
a9464a41f5 stdlib,resources: Generalize exception for request retry (#466)
In commit bbc301f2f0 the generalized
`Exception` was changed back to the more specific `HTTPError`.

In this case we do not desire specific error handling. If the connection
to the database fails I want the exception handled in the way outlined:
i.e., i want the connection to be retried 4 times before giving up. With
`HTTPError`, only `HTTPError`s warrent a retry.

Changing this to `HTTPError` cause tests to fail due to a failure to
retry downloading of a resource. Here is an example:
https://github.com/gem5/gem5/actions/runs/6521543885/job/17710779784

In this case `request.urlopen` raised a `URLError`. I suspect this was
some issued to do with reaching the DNS servers. It likely would've
succeeded if it had just tried again.
2023-10-16 09:39:44 -07:00
Bobby R. Bruce
322b105b9d arch-arm: Fix (another) line-length error in misc.cc
https://github.com/gem5/gem5/pull/459 missed one.
This commit should complete the task.

Change-Id: I0aeba79d6f13ddc45effe141945f5636b75daecc
2023-10-16 09:37:51 -07:00
Bobby R. Bruce
5240c07d3c util: Fix runners to extent to max disk size (#460)
THe `lvextend` command extends the logical volume. However, the
`resize2fs` command is needed to extend the filesystem to fill the
logical volume.

Prior to this patch the filesystem ran out of space despite there being
enough room in the volume. This was just wasted free space.
2023-10-16 09:20:13 -07:00
Bobby R. Bruce
97f4b44dd3 arch-arm: Fix line-length error in misc.cc (#459) 2023-10-16 08:35:54 -07:00
Giacomo Travaglini
f9cf8bf8a2 cpu, arch-arm: Add IsPseudo tag for gem5 pseudo instructions (#465)
This only applies to pseudo instructions with their own encoding (m5
ops)... In other
words memory mapped m5 operations are not supported. This make sense as
they should
rather be treated as device accesses... Though it is something to take
into consideration
when relying on the flag
2023-10-16 16:15:05 +01:00
Bobby R. Bruce
d42eeb6b68 cpu: Explicitly define cache_line_size -> 64-bit unsigned int (#329)
While it's plausible to define the cache_line_size as a 32-bit unsigned
int, the use of cache_line_size is way out of its original scope.

cache_line_size has been used to produce an address mask, which masking
out the offset bits from an address. For example, [1], [2], [3], and
[4]. However, since the cache_line_size is an "unsigned int", the type
of the value is not guaranteed to be 64-bit long. Subsequently, the bit
twiddling hacks in [1], [2], [3], and [4] produce 32-bit mask, i.e.,
0x00000000FFFFFFC0.

This behavior at least caused a problem in LLSC in RISC-V [5], where the
load reservation (LR) relies on the mask to produce the cache block
address. Two distinct 64-bit addresses can be mapped to the same cache
block using the above mask.

This patch explicitly defines cache_line_size as a 64-bit unsigned int
so the cache block mask can be produced correctly for 64-bit addresses.

[1]
3bdcfd6f7a/src/cpu/simple/atomic.hh (L147)
[2]
3bdcfd6f7a/src/cpu/simple/timing.hh (L224)
[3]
3bdcfd6f7a/src/cpu/o3/lsq_unit.cc (L241)
[4]
3bdcfd6f7a/src/cpu/minor/lsq.cc (L1425)
[5]
3bdcfd6f7a/src/arch/riscv/isa.cc (L787)
2023-10-16 07:50:35 -07:00
Jason Lowe-Power
d702d3b90a misc: fix clang13 overloaded-virtual warning (#454)
Like #363 clang is also unhappy about the overloaded virtual. However,
clang needs to have the diagnostic in a different place

Fixes #437
2023-10-16 07:23:08 -07:00
Giacomo Travaglini
3f925c4084 arch-arm: Mark gem5 pseudo-ops with IsPseudo flag
Change-Id: I9c8a146d73596597f28cdeca22ad7b7b01b381a7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2023-10-16 13:42:23 +01:00
Giacomo Travaglini
a3b1bfdbf0 cpu: Add a IsPseudo StaticInstFlag for gem5 pseudo-ops
Being able to recognise pseudo ops from the static instruction
pointer is actually quite useful in several circumstances

Change-Id: Ib39badf9aabba15ab3ebe7a8e9717583412731e4
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2023-10-16 13:41:04 +01:00
Giacomo Travaglini
2e85c95f4b arch-arm: Remove Jazelle state + ThumbEE support (#364)
This PR removes Jazelle state (while still keeping a "Trivial Jazelle
implementation",
see Arm Architecture Reference Manual) and ThumbEE support
2023-10-16 09:41:44 +01:00
Jason Lowe-Power
20f5555f30 python: Enable -m switch on gem5 binary (#453)
With -m, you can now run a module from the command line that is embedded
in the gem5 binary.
This will allow us to put some common "scripts" in the stdlib instead of
in the "configs" directory.
2023-10-14 20:08:06 -07:00
Matthew Poremba
ca2592d3ba configs: Fix missing param exchange for GPUFS (#457)
PR #367 adds an option to configs/ruby/GPU_VIPER.py that was not added
to the corresponding dGPU equal for GPUFS and thus all GPUFS runs are
failing. Fixed in this patch.
2023-10-14 20:07:39 -07:00
Daniel Kouchekinia
4931fb0010 mem-ruby: Always pass on GPU atomics to dir in write-through TCC (#367)
Added checks to ensure that atomics are not performed in the TCC when it
is configured as a write-through cache. Also added SLC bit overwrite to
ensure directory preforms atomics when there is a write-through TCC.

Change-Id: I4514e6c8022aeb7785f2c59871cd9acec8161ed8
2023-10-14 06:39:50 -07:00
Yu-Cheng Chang
a3c51ca38c arch-riscv: Fix write back register issue of vmask_mv_micro (#443)
After removing the setRegOperand in VecRegOperand
https://github.com/gem5/gem5/pull/341. The vmask_vm_micro will not write
back to register because tmp_d0 is not the reference type. The PR will
make tmp_d0 as reference of regFile.

Change-Id: I2a934ad28045ac63950d4e2ed3eecc4a7d137919
2023-10-13 15:20:42 -07:00
Matthew Poremba
7706e958e5 mem-ruby: Update cache recorder to use RubyPort and remove BUILD_GPU guards (#448)
This PR updates cache recorder to use a vector of RubyPorts for cache
cooldown and warmup instead of Sequencer or GPUCoalescer vectors (refer
to issue #403 for more details). It also removes the extra guards that
were added in #377 to prevent compile-time failures in non-GPU builds.
2023-10-13 14:36:45 -07:00
Kaustav Goswami
68af3f45c9 tests: updated the nightly tests to use SST 13.0.0 (#441)
PR https://github.com/gem5/gem5/pull/396 updates the gem5 SST bridge to
use StandardMem in SST. This change updates the nightly tests to use SST
13.0.0 instead of SST 11.1.0. It also updates the dockerfile.

Change-Id: I5c109c40379d2f09601a1c9f19c51dd716c6582e

---------

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Co-authored-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2023-10-13 14:31:35 -07:00
Andreas Sandberg
59f96deb0f cpu: Refactor indirect predictor (#429) 2023-10-13 11:35:02 +01:00