Commit Graph

19341 Commits

Author SHA1 Message Date
Bobby R. Bruce
840e030db3 arch-mips,cpu-minor: Add MinorCPU to MIPS ISA
While it may not be well supported, it's better to incorporate the
MinorCPU into the MIPS ISA gem5 binary than leave it out.

Change-Id: If44aa0531f287f4c3d8789c54025c7bb5259586a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61536
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-26 18:37:48 +00:00
Bobby R. Bruce
b2fee855d8 stdlib: Fix SimpleSwitchableProcessor to allow Minor type
Without setting the correct memory mode the SimpleSwitchableProcessor,
the Minor CPU could not be used as a valid core. This patch corrects
this issue by setting the memory mode to TIMING for Minor CPU cores.

Due to the increasingly complex if-else to determine the memory mode, a
function has been added to CPUTypes to determine what MemMode is
required for each CPUType.

Change-Id: I9384b4a9c0673af34cca04917d763ca45d0ea434
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61535
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-26 18:37:48 +00:00
Bobby R. Bruce
117f1dd38c stdlib,tests: Fix stdlib SE mode for multicore setups
The `set_se_binary_workload` function was only setting up the binary to
work on one (the first) processor core. This caused an exception to be
thrown when trying to run an SE mode binary on a multicore system.

Tests have been added to ensure this works as intended.

Note: While this implementation fixes the bugs, it is limited. Future
work is needed to allow for multiprogram workloads.

Change-Id: I33dbaf5015705c299215dc83e8449b16df301cd4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62014
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-26 18:37:48 +00:00
Bobby R. Bruce
0d921a84de tests: Add "tests/gem5/se_mode" directory for SE tests
At present only the "test_hello_se.py" tests are run, but this directory
will serve as a directory for other SE tests going forward.

Change-Id: I814d1e673df0195960d3af69277db8d397f299e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62012
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-26 18:37:48 +00:00
Bobby R. Bruce
ff1ea07ca4 tests: Fix incorrect doc-string in test_hello_se.py
Change-Id: Ic21e59cfc8fba92f93661d8b33803bd4c4c6fc58
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62011
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-26 18:37:48 +00:00
Jason Lowe-Power
b6e0e72d92 stdlib: Improve core names in switchable processor
Currently, when using the switchable processor the first N cores are the
starting cores and the next N cores (e.g., board.processor.core<N+1>)
are the switched in cores. This is confusing when looking at the stats.

This change makes it so that the names of the different processor lists
used in the dictionary when constructing the switchable processor are
used in for the member names as well. This will allow users to have
names like board.processor.ff_cores and board.processor.detailed_cores.

A bit of refactoring of the base processor was required for this.

Change-Id: I244ee5f6080599acb60a777da979da048cf7463e
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62652
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-08-25 14:55:07 +00:00
yiwkd2
35a60a45b8 stdlib: Minor typo fixed
In hbm.py, it says "Interfaces for LPDDR5 memory devices".

I think LPDDR5 should be replaced with HBM.

Change-Id: I87e0beafa79e6e3d9176edaf69b34a38230e9271
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62654
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jiajie Chen <c@jia.je>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-08-25 05:18:49 +00:00
Bobby R. Bruce
c0df86fb3e misc: Add gerrit commit message hook to pre-commit
This pre-commit hook adds the Change-ID etc. to the commit message.

Change-Id: I43b239468ab60ce1a8aaabb53dd6905819a2ce05
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62575
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
6bb7b09749 misc: Update CONTRIBUTING.md for pre-commit
This patch does two things:

1. Ensures that both the 'pre-commit' and 'commit-msg' hooks are
   installed. The `pre-commit install` by itself will only install the
   'pre-commit' hooks. This expanded instlal command will also install
   the 'commit-msg' hook.
2. How to run pre-commit to automatically format your code.

Change-Id: I0561f2918568bb9191e4ec457c297fcd264248c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62573
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
5a88dcfdef scons: Update automatic hook install for pre-commit
This replaces the old hooks with the pre-commit check. If Python
pre-commit has not been installed an error is thrown asking the user to
install the requirements via pip.

Change-Id: I2d42f42624e10d38d0da39b473f0363db128ce1c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62553
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
68c00268cc python: Add 'requirements.txt'
Change-Id: Ic7ef47bbef8879d6235ef669ff39a17f602f5cfd
Issue-on: https://gem5.atlassian.net/browse/GEM5-1268
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62632
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
2bc5a8b71a misc: Run pre-commit run on all files in repo
The following command was run:

```
pre-commit run --all-files
```

This ensures all the files in the repository are formatted to pass our
checks.

Change-Id: Ia2fe3529a50ad925d1076a612d60a4280adc40de
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62572
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
64add0e04d misc: Exclude test ref directories from pre-commit
The files in "tests/*./ref" directories are used in tests to check the
output of a test is valid. As such these should not be automatically
formatted by the pre-commit.

Change-Id: I82be1a91132a0b6c66c8bbb8f6d7dcc6e72abe77
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62631
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
ab04acc26e misc: Add the legacy gem5 .git/hooks to the pre-commit
The gem5 commit msg checker must be run during the 'commit-msg'
stage ergo this is explicitly set. The other hooks are only applicable
to the "commit" stage, the `default_stage` for the hooks.

To install all the hooks, you need to run the following:

```
pre-commit install -t pre-commit -t commit-msg
```

This ensures both the 'commit-msg' and 'pre-commit' hooks are installed.
If you run just `pre-commit install`, only the pre-commit hooks are
installed.

Change-Id: I4a0dcc7159ed5048baa120adf80bbf65f63c11dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62552
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-24 21:47:07 +00:00
Kyle Roarty
4ea8f35e50 configs: Add default to max_cu_tokens CLA
Fixes nightly tests

Change-Id: Ibad2e8a52afb62b0605ffa7ca958e378df799dae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62653
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-08-24 18:26:33 +00:00
Kyle Roarty
5f2a26701f configs: Add CLA for max_cu_tokens to apu_se.py
Adds a command-line argument for the Compute Unit's maximum
number of coalescer tokens

Change-Id: Ie00c3ac7e28ad162b801643bff345b4cf434a878
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62551
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-08-23 03:43:49 +00:00
Jiajie Chen
963c96c600 misc: Fix dynamic decision of TranslatingPortProxy.
In commit 83b14e56, getVirtProxy is replaced by inline ternary operators
to decide between FS or SE version. However, dynamic dispatch will not
work in this scenario and the virtual function of SETranslatingPortProxy
will not be called. It may lead to failure in m5op read_file in SE mode.

Change-Id: I9b5f757096cfdbd6fb8bc14b1b0e02245703a0ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62611
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-22 22:53:23 +00:00
Jiajie Chen
590e17e7ff arch-arm: Switch from getVec* to getReg* accessor.
Commit 7f61db0f missed one change in armv8_cpu.cc and led to
compilation error. The fix is done in the same way as
remote_gdb.cc in the previous commit.

This commit also fixes undeclared error by adding includes.

Jira issue: https://gem5.atlassian.net/browse/GEM5-1271

Change-Id: I48ce9b430d1d1988d5595ccfcbd7175a6cd030b7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62591
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-22 22:52:58 +00:00
Bobby R. Bruce
d6e422c4dd stdlib: Fix SimpleCore no ISA set use-case
The error was highlighted via this Nightly test failure:
https://jenkins.gem5.org/job/nightly/324

The bug was triggered when creating a SimpleCore without passing an ISA.
This is allowed but the SimpleCore should have ran `get_runtime_isa` to
determine which ISA is to be used in the simulation. This was missing.
This patch fixes this.

Change-Id: I4b2718233819783f779462d24b694306e9e76e30
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62571
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-21 15:05:40 +00:00
Jiajie Chen
38131c8a61 configs: Add option to override cpu vendor string
Glibc requires x86-64-v2 ISA level on newer Linux distributions (e.g.
Debian Bookworm), and running applications in GEM5 will fail with "CPU
ISA level is lower than required" error. It is due to glibc not
detecting CPU features when the vendor string is unknown yet requiring
them to run. For glibc to detect correct CPU features, this commit adds
a command line option to allow user to override x86 cpu vendor string to
well-known ones, e.g. GenuineIntel. It allows glibc to detect more cpu
features and fixes the issue.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-1117

Change-Id: I22907e7b983e9aa6122543042af207e35b09badb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62555
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 07:40:51 +00:00
Gabe Black
608b930ba6 scons: Remove support for generating config/the_isa.hh.
Change-Id: I06e4fa0193009fe1a84d8b24af4fe3f09057e674
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62198
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 07:30:45 +00:00
Gabe Black
a8a2ab5ec6 misc: Stop including config/the_isa.hh.
It is no longer necessary anywhere in gem5.

Change-Id: Iac999acf8c59ee7387214057bebb617acd01617c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62197
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-08-20 07:30:32 +00:00
Gabe Black
f4209bbdee misc: Remove lingering uses of TheISA::.
Change-Id: Ie55e0d79867fbc8f75a993fb456a58c84de5def4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62196
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 07:30:16 +00:00
Gabe Black
a13e3debed misc: Stop excluding code when building the NULL ISA.
The BaseCPU needs a little extra hacking because it tries to create
default objects based on what the ISA is. If the ISA isn't recognized,
then the types will be set to None, and some extra checks have been
added as the type is set up.

Change-Id: Ia3cae313e1a96a953d2316d9192f41a8fd28c141
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62195
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 07:30:07 +00:00
Gabe Black
aefc0576a2 scons: Get rid of the isa.hh switching header file.
Change-Id: I1aebf05f6d0f2cde3841d6e6d3361c9733538b08
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51240
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:17:41 +00:00
Gabe Black
2da4a2cdca cpu: Stop including arch/isa.hh.
This header file is no longer needed.

Also fix some places where the isa header file was being transitively
included.

Change-Id: Ib9a9d7db0c9808b29d7614bbd68e2052ea345e9f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51239
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:17:06 +00:00
Gabe Black
ba4dba4cb3 cpu: Store the ISA class using BaseISA and not TheISA::ISA.
All generic functionality of the ISA class can now be accessed using
virtual methods, and so we don't need to keep the ISA specific version
of the class around any more.

Change-Id: I9f9a3de2dc68983276ef7efc008a18960412d509
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51238
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:15:35 +00:00
Gabe Black
5d00ba897f arch: Make the (read|set)MiscReg methods virtual.
They will then be accessible through the base class. This adds some
small hypothetical amount of overhead to each call, but a quick test
booting linux on x86 does not show any significant slowdown.

Change-Id: If706ddf173d4e24d85468fb118b45099acf3c05b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51237
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:15:23 +00:00
Gabe Black
b3365e767a arch: Make the ISA::clear() method virtual.
This method is not at all on the critical path, and the adding virtual
method overhead to it will have essentially no effect on over all
performance.

Change-Id: I583bbe30f5ed923a0c771f36c3f07e5979c28476
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51236
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:14:54 +00:00
Gabe Black
d130fdc092 arch: Remove unused register flattening methods.
Most flattening methods in the ISA classes aren't used. The one
exception is the flattenMiscIndex function in ARM.

Change-Id: I26088692fe3f56914009afb0203f59da7cf6023a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51235
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:14:36 +00:00
Gabe Black
eaa67ca1ab fastmodel,cpu: Remove the flattenRegId ThreadContext method.
This is no longer used or necessary.

Change-Id: Ide8dd74b5d39b245d3d71979dd84c7fee60d566e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51234
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:14:22 +00:00
Gabe Black
ff4b675fb8 arch-arm,cpu: Remove all uses of flattenRegId.
RegIds can now be flattened directly.

Change-Id: I2a603c12bbc586720082363996f303cd3b43ac9c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51233
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:14:13 +00:00
Gabe Black
8918021f63 cpu: Eliminate the (get|set)RegFlat methods.
These can now be performed with the (reg|set)Reg methods by using an
already flattened RegId.

Change-Id: Ie02cda224d96644061227eada100675d38797e57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51232
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:13:51 +00:00
Gabe Black
c686c93d4d arch,cpu: Replace calls to (get|set)RegFlat.
Make these use RegIds which are based on already flattened RegClass-es.

Change-Id: I50f50614830c7010c18a8ebb95aba8decc078ac0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51231
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:13:29 +00:00
Gabe Black
36de693dda arch-sparc: Implement RegClass based register flattening.
Change-Id: Ib1d5b7ac7ff5aa6f35099fd9fd4530951c3efa19
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51230
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:13:13 +00:00
Alexandru Dutu
c6b38909e1 gpu-compute: Adding support for LDS atomics
This changeset is adding support for LDS atomics
and implementing DS_OR_B32 instruction.

Change-Id: I84c5cf6ce0e9494726dc7299f360551cd2a485f5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61791
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-19 16:44:31 +00:00
Jarvis Jia
2816598831 mem-ruby: Fix replacement policy updates in MI_example
The current MI_example protocol's L1 caches updates the MRU information twice per request on misses -- once when the request reaches Ruby and once when the miss is returned from another level of the memory hierarchy.

Although this approach does not cause any correctness bugs for replacement policies like LRU since this request is the LRU in both cases, it does not work correctly for other policies like SecondChance and LFU, where updating the information twice (for misses) causes them to devolve to LRU.

Note that this was not directly a problem with Ruby previously, because it only supported LRU-based policies that were unaffected by this.  However, with the integration of 20879 Ruby now uses the same replacement policies as Classic (which has additional, non-LRU based replacement policies).

This patch resolves this problem by not updating the MRU information a second time for the misses. It has been tested and validated with the replacement policy tests in 20880.

Change-Id: I82a57abf2a16d70820413ba8118378f2e91fd7fb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62232
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
2022-08-19 03:08:02 +00:00
Hoa Nguyen
a57d336b7f arch-riscv: Remove one of two BasicDecode per atomic insts format
BasicDecode, or decode block templates in general, contains the template
for substituting the return statement returning a StaticInst given a
machine code.

In the case of micro-coding an instruction, this return statement is for
the macro op. Additionally, in gem5 riscv, the spawned micro-ops will be
added in the macro op constructor, which is done in the macro-op
constructor template. Thus, there's no need for having a return statement
for the micro-op.

Currently, there are two return statements in decode-method.cc.inc for
each riscv atomic inst. This change removes one of the two BasicDecode
blocks in atomic inst templates.

This change is expected to a cosmetic change.

Change-Id: Id14bde25d5d3f164b4faafd33bfd5c802a94ca09
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62492
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-19 02:49:28 +00:00
Hoa Nguyen
35bb55554e arch: Bump MaxVecRegLenInBytes to 2^16
Per chapter 2 of RVV 1.0 specs [1], RISCV vector extension supports
vector register size of upto 64kB.

[1] https://github.com/riscv/riscv-v-spec/releases/tag/v1.0

Change-Id: Ib62eb9d59006403f6fe08cfb06cb8a1bc0adbe36
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62491
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-19 02:48:36 +00:00
Bobby R. Bruce
3238822e9e stdlib,tests: Add BaseCPUProcessor to stdlib
The BaseCPUProcessor is processor containing BaseCPUCores. This gives
gem5 stdlib users a way to create processors containing BaseCPU
SimObjects. While SimpleProcessor does this by-proxy (the user simply
specifies the desires CPUType and ISA and the correct BaseCPU
instantiation is chosen), this new Processor allows a more raw passing
of BaseCPU objects.

The SimpleProcessor now inherrits from this BaseCPUProcessor to avoid
duplcation of functionality. A refactor to achieve this was moving the
setting of the board's memory mode from the SimpleProcessor's
"incorporate_processor" function to the BaseCPUProcessor's then altering
it to determine MemMode based on BaseCPU subclass rather than the
CPUType.

The tests/gem5/configs/simple_binary_run.py test script has been
extended to create an stdlib run with a BaseCPUProcessor instead of the
SimpleProcessor and tests have been included to ensure the
BaseCPUProcessor functions as intended.

Multiple cores comprising of different BaseCPU types has not been tested
and is not officially supported as of this commit.

Change-Id: I229943ab98ece39646f1b4feb909250bb5c61772
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62353
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-17 20:31:16 +00:00
Bobby R. Bruce
5e281c969b stdlib: Add "requires_send_evicts" function to AbstractCore
This is the last part needed needed to deprecate SimpleCore's
"get_type" function. This "requires_send_evicts" function can be used by
the cache hierarchy to determine whether the core requres sending
evictions from caches.

Change-Id: I4e42d9fcecf0b1c4344f4cd145126a2ea57b7b76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62352
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-17 20:31:16 +00:00
Bobby R. Bruce
d0b2345086 stdlib: Add "is_kvm_core" function to AbstractCore
This function is useful in various parts of the stdlib to know if a core
is KVM or not as KVM cores requires the simulation to be setup slightly
differently.

Prior to this commit checking whether a core was a KVM core was only
possible via the CPUType which we may not always have.

Change-Id: Ibf6155ad631d5d5e93189d7376f022ea1baa685e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62351
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-17 20:31:16 +00:00
Bobby R. Bruce
d9b6a7ff9e stdlib: Create BaseCPUCore type
This separates the idea of a SimpleCore and a BaseCPUCore. A SimpleCore
selects the correct BaseCPU subclass based on user-specified CPUTypes
and target ISA. The new BaseCPUCore type simply wraps any BaseCPU core
for usage in the stdlib.

Much of the code previously handled in SimpleCore has been moved to
BaseCPUCore.

The `cpu_simobject_factory` method has been moved from AbstractCore to
SimpleCore; a more logical location for this function.

Change-Id: I29ce9e381e7d5e8fe57e0db5deb04ad976b7dab9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62292
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-17 20:31:16 +00:00
Bobby R. Bruce
d023d8a3dd stdlib: Remove "CPUType" from AbstractCore
This constraint bound us in many ways. There are many cases where we
want a core in a component which does not correspond to a CPUType
enum value.

This refactoring makes it so only SimpleCore utilizes this.

Docstrings have been updated to reflect this change.

Change-Id: I918c73310fc530dd060691cf9be65163cacfffb4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62291
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-17 20:31:16 +00:00
Jason Lowe-Power
d4cde65327 tests: Remove functional tests from Garnet
Garnet doesn't support functional reads. We were getting lucky in our
tests that no functional reads were going to the network. This change
removes the functional read check from the garnet-specific Ruby random
test.

Change-Id: I9c12c4aaab662555a1de58b73813118914ee495f
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62431
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-17 16:47:04 +00:00
Giacomo Travaglini
0ad684a6f2 arch-arm: XPACD, XPACI, XPACLRI do not trap
The HCR_EL2.API and SCR_EL3.API bits do not control the trapping of
those stripping instructions.

Change-Id: I84349937f8c50d63b5b52146743b035d1058fd8d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34055
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-08-17 13:30:08 +00:00
Giacomo Travaglini
5bbc326423 mem-ruby: Replace deprecated Stats namespace with statistics
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I5633510c91ba35852a63965bbe508e8965744093
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62311
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-16 16:36:11 +00:00
Bobby R. Bruce
631e6ced3c stdlib: Add the "GEM5_USE_PROXY" seting for download proxy
This patch allows a user to set the "GEM5_USE_PROXY" environment
variable, in the format of "<host>:<port>", to declare a socks5 proxy
server to use when obtaining gem5 resources and the resources.json
file.

Note, this requires the Python SOCKS client module, which can be
installed via `pip install PySocks`.

Change-Id: I13f50d71fb6e0713f6a280ec9d2f0b3049c27eb6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62391
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-16 06:04:50 +00:00
Bobby R. Bruce
5dc8833f23 misc: Remove trailing whitespaces from src/Doxyfile
This was causing our pre-commit checks to fail when this file was
modified.

Change-Id: I144bbb72fa81358ef343b979b7a1422704306069
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62332
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-15 16:06:44 +00:00
Philip Metzler
50c8d9655e fastmodel: Use current execution state for memory lookup
The previous implementation used the physical memory view when reporting
memory back to GDB. This circumvents MMUs and caches, and leads to wrong
backtraces at the least.

Current architectures support EL3, EL2, and EL1/EL0, and the Iris
interface presents a Msn that corresponds to that (`0x10ff`), see
table "Canonical memory space numbers" in the Iris user guide.

As GDB expects the view of the processor when querying memory (e.g. for
backtraces), this will allow proper backtraces.

Not sure if there is an implicit way of expressing memory attributes
(like in Lauterbach with the access modifiers before address
specifications), or if there is a need to implement special monitor
commands. But for the common use, using `CurrentMsn` should be the
correct choice.

Change-Id: Ibd14c1f94163105539a7fb9132550fe713b5c295
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61951
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-12 05:02:40 +00:00