Commit Graph

201 Commits

Author SHA1 Message Date
Bobby R. Bruce
e2f7d7bef3 tests: Add the 'constants.all_compiled_tag'
This can be used to write tests which use the 'build/ALL/gem5.opt'
binary.

Change-Id: I7a94ac74b2e59493fa04f96e7f4c26bbf9772fbb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57509
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-04-04 22:48:12 +00:00
Gabe Black
caa5f12e21 ext: Add a cont_choice keyword to kconfiglib.
This keyword lets you pick up a "choice" entry from elsewhere and add
new entries to it, greatly improving modularity of the Kconfig files.

Change-Id: Id20da6bc573e841e3ca7a42678911de827b53584
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56756
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-03-28 20:31:21 +00:00
Bobby R. Bruce
78a9e772ca tests,ext: Fix so ex/include regex are applied after defaults
The seldom used '--include-tags' and '--exclude-tags' flags allows a
testing user to remove and include tags from the search used by TestLib
to select tests. For example, by default the 'quick' tag is included as
part of the search of tests to run. The '--exclude-tags' flag could then
be used to remove the 'quick' tags from the search.

The TestLib framework was applying the regex these flags input before
the default flags. This meant if the user wished to remove a flag, it
was impossible. This is now applied after.

Change-Id: I569e0f8d6093ff5e5cdc76faff89c15e75ff297a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56830
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-03-18 18:16:09 +00:00
Bobby R. Bruce
2f48aa9e5c tests: Add 'kvm' tag to tests
Some of our tests require KVM. Tagging these tests as such allow us to
filter them in or out during testing.

Change-Id: I3f188d3e268409535043cc32b64d99e4657638cd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56829
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-03-18 18:16:09 +00:00
Gabe Black
443067253c ext,scons: Make kconfiglib available for use in SCons.
Change-Id: Ie9c902819ed0750a04f8318911fa914701c2a0fe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56755
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-03-15 00:30:39 +00:00
Gabe Black
64d1297d86 scons: Move the build of ext/ into the variant dirs.
These are no longer split out and shared in the root build/ directory.
This does result in a small amount of overhead from building redundant
copies of these files, although the overhead is not significant. When
building 7 different variants of gem5, all the ISAs and NULL, the
difference on my machine was:

Before:
real    41m25.372s
user    914m22.266s
sys     41m51.816s

After:
real    42m38.074s
user    921m36.852s
sys     43m2.949s

This is about a 2-3% difference, which is a worse than typical case,
since the overhead scales with the number of variants being built.

The benefit of pulling ext/ into the variant directory is that there can
now be a single config which applies to all files used to build gem5,
and that config is represented by the variant of gem5 being built.

Change-Id: I6f0db97c63a7f3e252e7e351aa862340978e701b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56750
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2022-03-11 22:54:16 +00:00
Gabe Black
0d59a8417a ext-testlib: Import MutableSet properly.
The MutableSet class used to be part of the collections module directly,
but in 3.3 was moved to collections.abc. Apparently there was still a
version in collections, since we had been importing it from that old
location and it had been working up until now. After a recent update,
this stopped working for me, and may be tied to an update to the local
version of python on my machine.

This change imports MutableSet from collections.abc instead of
collections directly. I found only one place that this class was used in
src or ext, so I don't think it needs to be fixed anywhere else.

Change-Id: I8b2e82160fd433d57af4a7008ec282ee8ad8a422
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56849
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
2022-02-19 01:13:46 +00:00
Gabe Black
772b2ab8ba ext: Update ply to version 3.11.
We had been using version 3.2 from 2009, which does not have support for
t_eof().

Change-Id: Id5610a272fe2cecd586991f4c59f3ec77184164e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56342
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-02-10 16:57:10 +00:00
Yu-hsin Wang
52661838a4 ext: upgrade to googletest 1.11.x
Upgrade googletest to 1.11.x
upstream commit: 8306020a3e9eceafec65508868d7ab5c63bb41f7

sha1sum df8cdd26ee7cdf2a3d9c05a92d3630a96f406422 generated by command:
find . -type f ! -name SConscript ! -path "./.*" -print0 \
| sort -z | xargs -0 sha1sum | sha1sum

This upgrade is mainly for providing ConditionalMatcher support.

Change-Id: I27d971c02c59a3ad42c3002f1b4e1a8b18269c56
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55384
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-01-20 01:16:02 +00:00
Bobby R. Bruce
5e6a561a3f misc: Revert v21.2 specific commits for develop
These changes were made to the release staging branch for the v21.2
release. This commit reverts them for the develop branch.

Change-Id: I9f02470d00d5034a0797f32d4c1fe0e7055860a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54904
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-28 21:30:21 +00:00
Bobby R. Bruce
da5efee4fd ext,misc: Update ext/sst/README.md for v21.2 release
Change-Id: I2cd982c819074962182da43754399852f9e72174
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54703
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-27 05:58:04 +00:00
Bobby R. Bruce
798d2ed15b ext,tests: Update the testlib download URL for v21.2
Change-Id: I36bb8208485536482f30ef77f6e509379481b5ee
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54467
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Hoa Nguyen
c7689b0ddb ext: Fix dumping stats error at the end of simulation
A missing comma causing two commands to be one, which resulted in
a Python interpreter syntax error.

Change-Id: Ieb0e3c620c175731084ff0e2040388b15364691e
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54343
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
e35812f256 ext: In sst, set sys.argv up even when not initializing python.
pybind11 gives us a simple way to set up sys.argv when initializing the
python interpreter, but we need to set that up even if the python
interpreter is already running. We need to do that manually, which we do
like gem5's main() used to.

Change-Id: If9b79a80e05158226d13f68bf06a2a98a36c2602
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54310
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
539aaa4bc3 ext: In sst, don't assume existing imports in python blobs.
When executing blobs of python code in the gem5 sst integration, don't
assume previous blobs have already imported modules. Import them
explicitly instead.

Change-Id: I3aa008ffa092cf8ad82ad057eb73bc9de4bf77c5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54308
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
3e83208332 ext: Stop using the uninitialized pythonMain in sst.
Import the __main__ module when it's first used.

Change-Id: If800bd575398970faa8cb88072becd3d2b4218c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54307
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
b39c106eea ext: Fix compilation of the sst gem5 integration.
Replace the old copied version of gem5's main function with an updated
copy. This fixes compilation, but there's still a problem running an sst
example where there's a segfault inside the python interpreter.

Change-Id: I95714a9264636c14e1dda3174bc0d79e3d881727
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54006
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54266
2021-12-16 01:57:26 +00:00
Giacomo Travaglini
7f2079f662 ext: Avoid content duplication in gem5-SST docs
A brief guide on how to run the gem5 SST example scripts
is already provided in the README file, so there is no need
to copy-paste it in the INSTALL file, which should cover
the building phase only.

Change-Id: I49c677f54450d97a1c8508764e45ab23b4b5fe33
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53629
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
5e89f1f679 ext: Add an Arm section for gem5-SST README.md
Change-Id: Ia10948a836797855219aef406bf38f52d28d8e26
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53628
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
12502d2529 ext, configs: Add example Arm gem5 SST platform
JIRA: https://gem5.atlassian.net/browse/GEM5-1121

Change-Id: I7544823710d9a63146d18d4fe9b7c969312ad4d7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53627
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
85dc34ebf8 ext: Make gem5-SST support CMOs
Change-Id: I45047702018512dfef5a93a633871821f3c69820
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53626
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
d421e7acd0 ext: Fix segfault in simulate_limit_event shortcut
In the SST integration the top of the main queue is checked
for an event before starting the simulation.

If the first event is scheduled after the ending tick, we are
just returning the simulate_limit_event without entering
the simulation loop.

If the method is called with an empty queue, the following
line will segfault (getHead() == nullptr):

gem5::mainEventQueue[0]->getHead()->when()

With this patch we are covering the case where we have
an empty event queue

Change-Id: I04463b45b269361172a9dd2fe1ba6e9428ac64f5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53723
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:48:44 +00:00
Giacomo Travaglini
d9b18b0f8d ext: Make gem5-SST Memory Size configurable from script
The memory interface param was hardcoded to 8GiB therefore
not matching any python changes in the memory size

Change-Id: I180f57f662886010a38a9b7ebbdbb73e0ae48276
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53625
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-07 09:35:38 +00:00
Hoa Nguyen
56c57db298 ext: Update ext/sst/INSTALL.md
Currently, the installation instructions are for installing
SST-core and SST-elements version 11.0.0. This change updates
instructions to the current SST-core and SST-element version,
11.1.0.

This change also reflects that manually downloading the
`bbl-busybox-boot-exit` is no longer necessary as the example
gem5 config will download automatically.

Change-Id: I616ca38316213dcbd71b6eab121b5ac89eed1962
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53463
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-01 18:10:24 +00:00
Hoa Nguyen
7bc9b0175f misc,ext: Add gem5/SST integration
Enable a gem5 system to be an SST::Component.

This change includes,
  - SST::gem5Component: responsible for,
      - initializing the Python environment for gem5
      - instantiating gem5 SimObjects
      - connecting SST::SSTResponderSubComponent to
gem5::OutgoingRequestBridge
      - hanlding the gem5 event queue (no thread-synchronization)
      - handling executing gem5 events
  - SST::SSTResponderSubComponent: responsible for,
      - receiving gem5 requests and sending the requests to
memory.
      - sending responses to the corresponding
gem5::OutgoingRequestBridge.
  - SST::SSTResponder: owned by SSTResponderSubComponent, the
actual actor that sends gem5's requests to memory.
  - gem5::OutgoingRequestBridge: receives the requests from
gem5 and sends them to SST. This SimObject allows the initialization
requests to be cached and the receiver could query the
initialization data later on.
  - gem5::SSTResponderInterface: the interface specifying how SST
communicates with gem5.
  - A working example of a gem5/SST setup.

More information is available at ext/sst/README.md.
For installation instructions, please refer to ext/sst/INSTALL.md.

Change-Id: I6b81260ef825415bcfe72b8a078854f4c94de782
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50468
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-11-27 04:24:15 +00:00
Richard Cooper
378778fcb7 ext: Add extra defines to libelf to support Apple silicon.
The current version of libelf does not include a configuration
compatible with Apple silicon. This patch adds the required defines.

Change-Id: I9b7b9b1f711973159f31666d3fe480c2dc01a6b7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52723
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Austin Harris <mail@austin-harris.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-11-15 08:34:33 +00:00
Jason Lowe-Power
1e8aeee698 ext: Update pybind11 to v2.8.1
Change-Id: Ia1c7081377f53fd470addf35526f8b28a949a7b0
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52523
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-11-09 15:34:32 +00:00
Austin Harris
2b69ff2afc ext: Update libelf from elftoolchain 0.7.1
Change-Id: I8f86cd918ad01897c42aa479f9c64520def36830
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50927
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Austin Harris <mail@austin-harris.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-06 15:13:01 +00:00
Austin Harris
0703c968ca scons: Setup the m4 tool for libelf
This resolves an error that SConsEnvironment has no attribute 'm4' on
some systems.

Change-Id: I9dfce277308d1939c3bd392f83dc49937884660e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50259
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-14 15:20:58 +00:00
Bobby R. Bruce
091ba116ee ext,tests: Add 'very-long' tag for test length
This new tag will be used to specify tests to run Weekly (with the
'long' tests for Nightly, and the 'quick' tests for Kokoro/presubmit).

Change-Id: I088c2ef36cb14746e581eac5b1771f82250f2b98
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49326
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Gabe Black
9fa9840691 scons: Turn the Blob method into a builder.
Build the blob .cc and .hh files in the same directory as the file
they're based off of. Move the GDB XML files into the arch directories
they go with.

Change-Id: I12fe48873312c3aba5910989d6e3049ebd5e5bbf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48136
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-08-28 04:19:40 +00:00
Bobby R. Bruce
cec0d074a4 misc: Updated gem5 versioning information for develop branch
Change-Id: I17382ac18dcdce4cdf8c3366886cd41fbcd7d946
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48813
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-30 04:44:09 +00:00
Bobby R. Bruce
76ceda55f7 misc: Merge branch 'release-staging-v21-1' into develop
Change-Id: I0f69d3d0863f77c02ac8089fb4dccee3aa70a4ea
2021-07-28 17:37:04 -07:00
Gabe Black
5a53ed4e31 scons,test: Don't -Wall or -Werror for googletest libraries.
These libraries come from elsewhere, and so there's no reason to worry
about warnings. We can't fix them even if they crop up. Also, set
CCFLAGS to avoid having a mixture of gem5 flags and googletest flags.

Change-Id: I19b07747a43cebb263ae1546c75631cff1f13132
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48368
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-28 01:49:18 +00:00
Bobby R. Bruce
5586b84298 misc: Update the version to v21.1.0.0
Change-Id: I4174611bdaf68673f77a446e979776ad502ae20b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48583
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 18:20:12 +00:00
Daniel R. Carvalho
4b2118ed4b misc: Remove sim/cur_tick dependency from sim/core.hh
Remove this unnecessary dependency. Fixed all incorrect
includes of sim/core.hh.

Change-Id: I3ae282dbaeb45fbf4630237a3ab9b1a593ffbe0c
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43592
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-06 09:59:11 +00:00
Sandipan Das
065362ddfc arch-power: Add multi-mode debugging support
This adds multi-mode support for remote debugging via GDB
with the addition of the XML target description files for
both 32-bit and 64-bit variants of the Power architecture.
Proper byte order conversions have also been added.

MSR has now been modeled to some extent but it is still
not exposed by getRegs() since its a privileged register
that cannot be modified from userspace. Similarly, the
target descriptions require FPSCR to also be part of the
payload and hence, it has been added too.

Change-Id: I156fdccb791f161959dbb2c3dd8ab1e510d9cd4b
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40946
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-04 18:19:47 +00:00
Daniel R. Carvalho
974a47dfb9 misc: Adopt the gem5 namespace
Apply the gem5 namespace to the codebase.

Some anonymous namespaces could theoretically be removed,
but since this change's main goal was to keep conflicts
at a minimum, it was decided not to modify much the
general shape of the files.

A few missing comments of the form "// namespace X" that
occurred before the newly added "} // namespace gem5"
have been added for consistency.

std out should not be included in the gem5 namespace, so
they weren't.

ProtoMessage has not been included in the gem5 namespace,
since I'm not familiar with how proto works.

Regarding the SystemC files, although they belong to gem5,
they actually perform integration between gem5 and SystemC;
therefore, it deserved its own separate namespace.

Files that are automatically generated have been included
in the gem5 namespace.

The .isa files currently are limited to a single namespace.
This limitation should be later removed to make it easier
to accomodate a better API.

Regarding the files in util, gem5:: was prepended where
suitable. Notice that this patch was tested as much as
possible given that most of these were already not
previously compiling.

Change-Id: Ia53d404ec79c46edaa98f654e23bc3b0e179fe2d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46323
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-01 19:08:24 +00:00
Bobby R. Bruce
1cfeab7359 misc: Revert version info back to develop
Change-Id: I0afb7e18c66a829fe1f1f3330da3300c0d0eb99b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47160
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-06-24 18:17:16 +00:00
Bobby R. Bruce
b69f97edc3 misc: Merge branch 'minor-release-staging-v21-0-1'
Change-Id: I4ac09b563094f5b375246ee87eca364e5b6e131b
2021-06-23 11:29:56 -07:00
Bobby R. Bruce
a912482862 python,misc: Fix develop resources URL to v21-0
This was incorrectly kept as `http://dist.gem5.org/dist/develop` in the
v21.0.0 release of gem5. The `dist/develop` directory is used by the
develop branch, not by gem5 releases. This change updates the URL to
point towards the currect v21-0 branch, which will remain stable and
contain resoruces always compatible with the v21-0 release.

Change-Id: I5d9a9497cebffa91f08be253f1637e11e0d5e62c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44725
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-14 18:14:39 +00:00
Gabe Black
2e27ed2351 python,scons: Move readCommand and compareVersions into site_scons.
These functions are only used by scons, so it makes sense to move them
to site_scons/gem5_scons/util.py.

Change-Id: If2b3995f208cb71adf3c59aac4eabe378c47f94f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41599
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-10 23:33:22 +00:00
Gabe Black
960b9246c5 scons: Convert gem5_scons.Configure to a context manager.
This has two purposes. First, SCons assumes that once you call
Configure, you won't set up the environment the Configure is based on
until after you get the environment back from it again with
conf.Finish(). We get away with this when the cache mode for config
tests is not "force", since Configure just reuses the environment we
pass in, and any changes we make are immediately communicated between
the two.

If the cache mode *is* "force" though, SCons modifies the decider so
that everything the conf environment goes to build looks like it's out
of date. It does that by cloning the original environment, and then
using that clone to do its tests. That causes a problem because we have
a long lived "conf" object and make further changes to main, and since
the two environments are now separate the one in conf doesn't see those
updates.

Second, and more subtly, we export our "main" and "env" environments so
that other SConsopts and SConscript files can use them and define things
in them. The way Configure is designed, if the config caching mode is
"force", then it will create a new environment, and then that
environment will replace what the, for instance, "main" variable points
to when "main = conf.Finish()" is executed.

Unfortunately, if we've already Export()-ed main, we've exported what
the "main" variable pointed to at that time. Our view of "main" will
track with the value that conf.Finish() returned, but since that
construction environment is mearly derived from the main we Exported and
not actually the same thing, they have diverged at that point and will
behave independently.

To solve both of these problems, this change modifies the
gem5_scons.Configure() method so that it's a context manager instead of
a regular function. As before, it will call Configure for us and create
a configuration context, which it will yield as the "with" value. When
the context exits, all the variables in the context Finish() returns
will be shoved back into the original context with Replace(). This isn't
perfect since variables which were deleted in the environment (probably
very rare in practice) will not exist and so will not overwrite the
still existent variable in the original dict.

This has several advantages. The environment never splits into two
copies which continue on independently. It makes the lifetime of a
configuration context short, which is good because behavior during that
time is tricky and unintuitive. It also makes the scope of the context
very clear, so that you won't miss the fact that you're in a special
setting and need to pay attention to what environment you're modifying.

Also, this keeps the conceptual overhead of configuration localized to
where the configuration is happening. In parts of the SConscripts which
are not doing anything with conf, etc, they don't have to modify their
behavior since no configuration context is active.

This change is based on this change from Hanhwi Jang who identified this
problem and proposed an initial solution:

https://gem5-review.googlesource.com/c/public/gem5/+/44265

Change-Id: Iae0a292d6b375c5da98619f31392ca1de6216fcd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44389
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Hanhwi Jang <jang.hanhwi@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-04-13 01:04:54 +00:00
Gabe Black
b464d16444 ext: Fix an operator precedence bug in the nomali library.
An expression in that library intended to create a bitmask by checking
if a bit should be set, and then using ?: to select between a bitmask
with that bit, or 0. Unfortunately | is higher precedence than ?:, and
so 0 would be |-ed with the condition of the next ?: instead. This CL
fixes the bug by adding some parenthesis.

Change-Id: Ib7e06f261e07a6ad00b9a96939d07b64c3a50409
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40954
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-04-03 05:52:43 +00:00
Gabe Black
fad705680e systemc: Stop using std::gets in systemc.h.
This is in the Accellera version of systemc, used when gem5 is built
into systemc as a black box. std::gets was depdecated in c++11, and
removed entirely in c++14. Since gem5 has moved to c++14, this can't be
brought in with "using" in that header. More recent versions of systemc
from Accellera may have this fixed, and it's pretty bad practice to have
a universal header file squash unrelated namespaces like that in the
first place.

Rather tha update all of this copy of systemc, this change just makes
the smallest adjustment possible to get things to work again.

Change-Id: I8a95665d4b5d49ffc014097714cf2e602bf9b937
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42583
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-03-11 07:32:47 +00:00
kai.ren
3a9d0de609 ext: Add SoftFloat Library to ext directory
This patch adds Softfloat library for supporting RISCV
float operation implement.

Using SoftFloat Package to reinplement Riscv FPops.

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

Change-Id: Ic96e6c8adec0713bdbd744d581c750034b88246c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39357
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-19 02:26:13 +00:00
Giacomo Travaglini
7ed22b36cb ext: testlib loading tests from multiple directories
We currently run regressions with the following command line

./main.py run [...] <directory>

Where <directory> is the positional argument pointing to the tests root
directory: Testlib will walk through the directory and load every
testsuite it encounters in its path.

./main.py run [...] <directory1> <directory2> ...

Allowing testlib to load tests from multiple directories will make it
possible to load out of tree regressions (living in an EXTRAS repository
for example)

JIRA: https://gem5.atlassian.net/browse/GEM5-905

Change-Id: I802d8753a18f4dfb00347252f031b5438e9be672
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40136
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-02 10:02:52 +00:00
Gabe Black
c4aaf373aa ext: Update pybind11 to version 2.6.2.
This should help reduce warning spew when building with newer compilers.
The pybind11::module type has been renamed pybind11::module_ to avoid
conflicts with c++20 modules, according to the pybind11 changelog, so
this CL also updates gem5 source to use the new type. There is
supposedly an alias pybind11::module which is for compatibility, but we
still get linker errors without changing to pybind11::module_.

Change-Id: I0acb36215b33e3a713866baec43f5af630c356ee
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40255
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-02 06:26:03 +00:00
Giacomo Travaglini
39046a0260 ext: Replace Queue.Empty with queue.empty
Queue.Empty is not an exception in python3
(Queue has been renamed to queue)

Change-Id: I82555d96608094fa47990f888fd11663379547bc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40135
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-01-30 04:52:48 +00:00
Andreas Sandberg
9f31b5c576 tests: Remove Python 2.7 glue code from testlib
Remove the dependency on six in testlib.

Change-Id: I247088d119cf8f9d815632eae16a1cbf87930516
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39759
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-01-27 10:17:55 +00:00