Commit Graph

20521 Commits

Author SHA1 Message Date
Roger Chang
def89745bc arch-riscv: Allow Minor and O3 CPU execute RVV
Change-Id: I4780b42c25d349806254b5053fb0da3b6993ca2f
2023-09-12 13:56:22 +08:00
Roger Chang
0f54cb0593 arch-riscv: Remove check vconf done implementation
Change-Id: If633cef209390d0500c4c2c5741d56158ef26c00
2023-09-12 13:56:22 +08:00
Roger Chang
31b95987da arch-riscv: Change the instruction family to jump like
The method that get the vl, vtype from PCState in the next changes

Change-Id: I022b47b7a96572f6434eed30dd9f7caa79854c31
2023-09-12 13:56:22 +08:00
Roger Chang
282765234b arch-riscv: Implement the branchTarget for vset*vl*
Change-Id: I10bf6be736ce2b99323ace410bff1d8e1e2a4123
2023-09-12 13:56:22 +08:00
Roger Chang
a3aaad2ecd arch-riscv: Refactor the execution part of vset*vl*
Change-Id: Ie0d9671242481a85bb0fe5728748b16c3ef62592
2023-09-12 13:56:21 +08:00
Roger Chang
1bde42760f arch-riscv: Get vl, vtype and vlenb from PCState
Change-Id: I0ded57a3dc2db6fcc7121f147bcaf6d8a8873f6a
2023-09-12 13:56:21 +08:00
Roger Chang
8918302239 arch-riscv: Change the implementation of vset*vl*
The changes includes:

1. Add VL, Vtype and VlenbBits operands
2. Change R/W methods of VL, Vtype and VlenbBits from PCState

Change-Id: I0531ddc14344f2cca94d0e750a3b4291e0227d54
2023-09-12 13:56:21 +08:00
Roger Chang
7b5d8b4e5b arch-riscv: Add vlenb, vtype and vl in PCState
Change-Id: I7c2aed7dda34a1a449253671d7b86aa615c28464
2023-09-12 13:56:21 +08:00
Roger Chang
f94658098d arch-riscv: Remove checked_type in StaticInst Constructor
We should not try to check vtype when decoding the instruction.
It should be checked in vset{i}vl{i} since the register can be
modified via vset{i}vl{i}

Change-Id: I403e5c4579bc5b8e6af10f93eac20c14662e4d2d
2023-09-12 13:56:21 +08:00
Roger Chang
3f0475321a arch-riscv: Change VTYPE to BitUnion64
Change-Id: I7620ad1ef3ee0cc045bcd02b3c9a2d83f93bf3fe
2023-09-12 13:56:21 +08:00
Roger Chang
dfc725838e arch-riscv: Refactor PCState class
Change-Id: I1d25350ba2a3c7c366f42340c20b4488c33cde6f
2023-09-12 13:56:21 +08:00
Bobby R. Bruce
a217c218e0 util: Update gcn-gpu Dockerfile (#290)
This adds the setting up of environment variables to the gcn-gpu
Dockerfile from the halofinder Dockerfile in gem5-resources so that we
don't need to use a separate Docker image in the gpu tests.
2023-09-11 11:19:49 -07:00
Jason Lowe-Power
a89aeb3906 util: Revert "Add docker prune cron to GitHub..." (#299)
This reverts commit 0249d47acc,
https://github.com/gem5/gem5/pull/271.

This solution doesn't work. GitHub runners pull the images they need at
the start of job (i.e., all the images they may need for each step).
They then create the containers later, at the step they are needed. This
solution therefore breaks in the case a cleanup happens during the
running of a job. I.e., a `docker system prune` happens after setup,
therefore deleting all the images, then the job tries to use one of the
images during a step.

This crontab solution may work if we can only do it when the runner is
in an idle state. Whether this is possible is unknown.
2023-09-11 09:33:28 -07:00
Bobby R. Bruce
7091a8b7a0 util: Revert "Add docker prune cron to GitHub..."
This reverts commit 0249d47acc,
https://github.com/gem5/gem5/pull/271.

This solution doesn't work. GitHub runners pull the images they need at
the start of job (i.e., all the images they may need for each step).
They then create the containers later, at the step they are needed.
This solution therefore breaks in the case a cleanup happens during the
running of a job. I.e., a `docker system prune` happens after setup,
therefore deleting all the images, then the job tries to use one of the
images during a step.

This crontab solution may work if we can only do it when the runner is
in an idle state. Whether this is possible is unknown.

Change-Id: I7cb5b2d98d596e9380ae1525c7d66ad97af1b59b
2023-09-10 20:32:49 -07:00
Jason Lowe-Power
ebde1133c0 redirect_path patch for restoring cpt (#221)
Modify the FDArray::unserialize function to perform a checkPathRedirect
if a Process pointer is passed in.
Currently when restoring a checkpoint, it doesn't perform
checkPathRedirect for files that were opened during checkpointing. This
patch adds a checkPathRedirect in the FDArray::unserialize to redirect
app path for restoring checkpoints.
2023-09-08 15:30:53 -07:00
Bobby R. Bruce
d5f5211b91 scons: Add an option specifying the path to mold linker binary (#244)
To use mold linker with gcc of version older than 12.1.0, the user has
to pass the -B option to specify where the linker is. [1]

Currently in gem5, scons only looks for the mold binary at conventional
places, such as /usr/libexec/mold and /usr/local/libexec/mold. There's
no option to manually specify the path to the linker.

gcc-12 and mold are not widely available on older systems. Having an
option to manually input the linker path allows user to build and use
mold without sudo permission.

[1] https://github.com/rui314/mold#how-to-use
2023-09-08 11:21:29 -07:00
Melissa Jost
16e8c95091 util: Update gcn-gpu Dockerfile
This adds the setting up of environment variables to the gcn-gpu
Dockerfile from the halofinder Dockerfile in gem5-resources
so that we don't need to use a seperate Docker image in the
gpu tests.

Change-Id: Ifcc7a4c6bbcd5289ce9561923366e9ed193f170c
2023-09-08 10:25:09 -07:00
Bobby R. Bruce
ce27f5c07a sim-se: Fix crash in chdirFunc() on nonexistent directory (#277)
This commit fixes a crash in the syscall emulation of the chdir(2)
syscall, implemented by chdirFunc() in src/sim/syscall_emul.cc, when
passed a nonexistent directory. The buggy code did not check the return
value of realpath().

This patch adds code to check the return value of realpath(), and if it
is NULL (i.e., there was an error with the requested directory to change
to), propagates the error in `errno` to the application.

GitHub issue: https://github.com/gem5/gem5/issues/276
2023-09-08 10:10:30 -07:00
Nicholas Mosier
e0498cb490 Merge branch 'develop' into bugfix-chdir 2023-09-07 14:13:00 -07:00
Bobby R. Bruce
ce54ff061a scons: Fix 'recompiling' -> 'recompile'
Change-Id: Ifb2366a0c2342bf4e7207df8db6196e14184a9d5
2023-09-07 12:52:31 -07:00
Bobby R. Bruce
aca67fe3a3 misc: Add test status badges to README.md (#233)
These allow visitors to the repository to quickly see the status of our
tests run on the develop branch.
2023-09-07 12:47:00 -07:00
Bobby R. Bruce
eb5ae35341 resources,stdlib: Add workload to resource specialization and deprecate workload.py (#212) 2023-09-07 12:45:45 -07:00
Bobby R. Bruce
9cdd6093bd util: Add docker prune cron to GitHub runners (#271)
Issue-on: https://github.com/gem5/gem5/issues/254

This has been implemented in the runners. The regular pruning of the
docker images should fix the issue.
2023-09-07 12:06:41 -07:00
Bobby R. Bruce
84e0224e85 util-docker: Proof-of-concept using Docker buildx (#273)
Introduced in https://github.com/gem5/gem5/pull/236 the
"docker-build.yaml" file will allow us to build and push docker images
to the GitHub Container Registry. This allows for both automation of
docker image building and allows us to utilize Github's zero-cost
pulling policy for downloads to GitHub Actions runners.

In this PR https://github.com/gem5/gem5/pull/236 has been altered to use
Docker `buildx` which allows for multi-platform Docker Image builds. A
multi-platform Docker image pull automatically pull the correct image
for your platform from a single URL. In this prototype the images are
build to both `linux/arm64` and `linux/amd64` have been set.

Docker `buildx` has it's own file format for specifying image builds
called `bake`. "util/dockerfiles/docker-bake.hcl" has been added with
the goal of replacing "util/dockerfiles/docker-compose.yaml".

In this proof-of-concept doesn't build all our docker images, just
enough to ensure it works inside our actions as intended.
2023-09-07 11:37:24 -07:00
Nicholas Mosier
62e81930d6 Merge branch 'develop' into bugfix-chdir 2023-09-07 09:54:35 -07:00
Giacomo Travaglini
1fa1575f58 sim: add bypass_on_change to the set() of a signal (#279)
When reset a port, we don't want to trigger a onChange(). Offer an
option to bypass it and update state only.

Change-Id: Ia53b7a76d2a320ea67101096cdbfe2eafaf440d2
2023-09-07 18:42:08 +02:00
studyztp
e206b16f73 sim:fixed some style issues
Change-Id: I0832a8b68e802e9671b755d3a71fd9c8f17e1648
2023-09-07 08:52:24 -07:00
studyztp
377c875733 sim: check redirect path when unserialize for cpt
sim/fd_array.hh:
Add "class Process;" to forward declare Process for unserialize
function to pass in a Process object pointer.
Fix the styling issue with include files.

sim/fd_array.cc"
Add comments.

Change-Id: Ifb21eb1c7bad119028b8fd8e610a125100fde696
2023-09-07 08:52:24 -07:00
studyztp
2a4f3f206b sim: modifed the type of path
Change-Id: I56be3b62b1804371b9b9e0f84ee1ec49cbedf553
2023-09-07 08:52:24 -07:00
studyztp
0dab27f24a sim: check redirect path when unserialize for cpt
Change-Id: I55b8ce1770b0580d52b8dfa782572d492c1bf727
2023-09-07 08:52:24 -07:00
Johnny
105839ae2b sim: add bypass_on_change to the set() of a signal
When reset a port, we don't want to trigger a onChange().
Offer an option to bypass it and update state only.

Change-Id: Ia53b7a76d2a320ea67101096cdbfe2eafaf440d2
2023-09-07 11:54:56 +08:00
Nicholas Mosier
6cdaa2c16a sim-se: Fix crash in chdirFunc() on nonexistent directory
This commit fixes a crash in the syscall emulation of the chdir(2)
syscall, implemented by chdirFunc() in src/sim/syscall_emul.cc,
when passed a nonexistent directory. The buggy code did not check
the return value of realpath().

This patch adds code to check the return value of realpath(), and
if it is NULL (i.e., there was an error with the requested directory
to change to), propagates the error in `errno` to the application.

GitHub issue: https://github.com/gem5/gem5/issues/276

Change-Id: I8a576f60fe3687f320d0cfc28e9d3a6b477d7054
2023-09-07 03:18:58 +00:00
Bobby R. Bruce
0249d47acc util: Add docker prune cron to GitHub runners
Change-Id: Ic90ebc650b6a89606eaf9e8feafddfe15c44e578
Issue-on: https://github.com/gem5/gem5/issues/254
2023-09-06 15:09:32 -07:00
Bobby R. Bruce
e80cde0713 ext: Stop excluding 'ext/testlib' from pre-commit and format (#267)
Though in "ext" this directory is regularly modified. `pre-commit`
should run on these files.

This PR includes running `pre-commit run --files ext/testlib` to
reformat the files in "ext/testlib" using Python Black.
2023-09-06 11:18:19 -07:00
Bobby R. Bruce
cc757cfe7a misc: Fix buggy special path comparisons (#270)
This patch fixes the buggy special path comparisons in
src/kern/linux/linux.cc Linux::openSpecialFile(), which only checked for
equality of path prefixes, but not equality of the paths themselves.
This patch replaces those buggy comparisons with regular
std::string::operator== string equality comparisons.

GitHub issue: https://github.com/gem5/gem5/issues/269
2023-09-06 11:10:19 -07:00
Bobby R. Bruce
5d98d18fb6 misc: Fix CI GitHub Action to stop if Workflow re-triggered (#275)
This ensures that if the CI tests are running for a PR, and a new
workflow is triggered (typically by pushing/rebasing the PR) then the
older workflow is cancelled.
2023-09-06 11:09:52 -07:00
Harshil Patel
bbe96d6485 stdlib: Changed use of Workload to obtain_resource
- Changed files calling Workload class to call obtain_resoucre instead.

Change-Id: I41f5f0c3ccc7c08b39e7049eabef9609d6d68788
2023-09-06 10:06:16 -07:00
Bobby R. Bruce
12c6742607 misc: Fix CI GitHub Action to stop if Workflow re-triggered
This ensures that if the CI tests are running for a PR, and a new
workflow is triggered (typically by pushing/rebasing the PR) then the
older workflow is cancelled.

Change-Id: Ifa172bdbdac09c5a91abb41a0162c597445e4e2e
2023-09-05 20:49:28 -07:00
Bobby R. Bruce
d10d752d7e misc: Improve ".github/ISSUE_TEMPLATE/bug_report.md" (#268)
The bug report template used escape characters. This is not necessary as
the bug report is not rendered when creating a bug report. It is
displayed to the user in plain text for them to edit.

In addition languages have been added to the code-blocks and newlines
have been added and removed where appropriate to cleanup the document.
2023-09-05 18:00:28 -07:00
Bobby R. Bruce
1b0bb678ab util-docker: Proof-of-concept using Docker buildx
Introduced in https://github.com/gem5/gem5/pull/236 the
"docker-build.yaml" file will allow us to build and push docker images
to the GitHub Container Registry. This allows for both automation of
docker image building and allows us to utilize Github's zero-cost
pulling policy for downloads to GitHub Actions runners.

In this PR https://github.com/gem5/gem5/pull/236 has been altered to
use Docker `buildx` which allows for multi-platform Docker Image builds.
A multi-platform Docker image pull automatically pull the correct image
for your platform from a single URL. In this prototype the images are
build to both `linux/arm64` and `linux/amd64` have been set.

Docker `buildx` has it's own file format for specifying image builds
called `bake`. "util/dockerfiles/docker-bake.hcl" has been added with
the goal of replacing "util/dockerfiles/docker-compose.yaml".

In this proof-of-concept doesn't build all our docker images, just
enough to ensure it works inside our actions as intended.

Change-Id: Id0debed216c91ec514aa4fce3bc2ff4fc2ea669b
2023-09-05 17:59:06 -07:00
Nicholas Mosier
3dfdd48211 misc: Fix buggy special path comparisons
This patch fixes the buggy special path comparisons in
src/kern/linux/linux.cc Linux::openSpecialFile(), which only checked
for equality of path prefixes, but not equality of the paths
themselves. This patch replaces those buggy comparisons with
regular std::string::operator== string equality comparisons.

GitHub issue: https://github.com/gem5/gem5/issues/269

Change-Id: I216ff8019b9a6a3e87e364c2e197d9b991959ec1
2023-09-05 13:44:10 -07:00
Harshil Patel
bf06d61c35 stdlib, tests, resources: Updated tests
- Updated workload tests to use WrokloadResource and obtain_resource

Change-Id: I39194e7fe764566a528e5141c29f30efa14e0cde
2023-09-05 12:39:38 -07:00
Bobby R. Bruce
96144f90ed misc: Add pre-commit run to .git-blame-ignore-revs
Change-Id: Iaae9d735e2972e41f1f9225ea5bed9acf22ff991
2023-09-05 00:01:35 -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
ff75e5b30e misc,ext: Update pre-commit hook to run on ext/testlib
Though in ext, we regularly modify these files to add features and
extend our testlib testing infrastructure. Ergo, the pre-commit checks
should be run.

Change-Id: I921a263f25f850b03e5535a8a1f509921c124763
2023-09-05 00:00:25 -07:00
Bobby R. Bruce
2eeecc532a mem-ruby: Reorder SLC atomic and response actions (#255)
Currently the MOESI_AMD_Base-directory transition for system level
atomics sends the response message before the atomic is performed. This
was likely done because atomics are supposed to return the value of the
data *before* the atomic is performed and by simply ordering the actions
this way that was taken care of.

With the new atomic log feature, the atomic values are pulled from the
log by the coalescer on the return path. Therefore, these actions can be
reordered. In fact, it is now necessary that the atomics be performed
before sending the response so that the log is populated and copied by
the response action. This should fix #253 .
2023-09-02 04:48:45 -07:00
Bobby R. Bruce
1ec58d589a misc: Fix broken code example in bug_report.md
Change-Id: I9bc1b42d488a415d2ea165385d83fea3d4ac288d
2023-09-02 04:46:04 -07:00
Bobby R. Bruce
188d29fe05 misc: Add language specification to code-blocks
Change-Id: I875aeee7eb0f9970711a97448d3bcb7acddbe7b1
2023-09-02 04:44:07 -07:00
Bobby R. Bruce
fcb586cfed misc: Add/Remove new lines from bug_report.md
There were some weird newline characters in this file, or lack of lines.
This patch adds/removes them.

Change-Id: I6cc918788c07bbc4be5c68401ad3987be00fffc4
2023-09-02 04:42:53 -07:00
Bobby R. Bruce
0ac2f67437 misc: Remove escape characters from bug_report.md
The bug_report.md is rendered as plain text, not markdown, when creating
a bug report. As such the escape characters are removed in this commit.

Change-Id: I524c66ae61d00b7ed59153ba9f4b2297ff50ee18
2023-09-02 04:41:08 -07:00