Commit Graph

786 Commits

Author SHA1 Message Date
Bobby R. Bruce
23071cfd8d util,python: Add escape chars to lowp_dram_sweep_ploy.py
Change-Id: I783ddfe0c4c04223527a93af9f367f00544cd300
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47019
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-06-22 20:05:27 +00:00
Daniel R. Carvalho
19c7429520 sim,util: Remove event dependencies from serialize.hh
With this change serialize.hh is no longer responsible
for the (un)serialization of events. As a general rule,
rules to (un)serialize non-basic types should be defined
at the file that introduces that type. Therefore,
(UN)SERIALIZE_EVENT have been moved to eventq.hh.

Globals has a single instance which must be serialized
and unserialized. Instead of having a stray global
variable handled by Serialization, we pass its management
to Root. As a side effect, Globals is assigned its own
files: sim/globals.(cc/hh).

Finally, 'unserializeGlobals()' is removed, so that
Root can fully handle Globals' serialization. This
breaks checkpoint compatibility, so a checkpoint
upgrader is added.

Change-Id: I9c8e57306f83f9cc30ab2b745a4972755191bec4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43586
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2021-06-16 10:50:26 +00:00
Daniel R. Carvalho
6977456207 util: Fix typo in cpt upgrader
The module is errno, not ennro.

Change-Id: I3f17bdc12a7acd680ac407042a75d5099f5f7339
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46799
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-06-11 18:42:13 +00:00
Matthew Poremba
f46c9ddbfb util: Add scripts to recreate amdgpu ROM and MMIOs
Although the binary ROM blob and MMIO trace will be placed in
gem5-resources later as 'golden' versions, the scripts are added to
provide instructions for power users of Full System amdgpu that may want
to recreate the files themselves or use a GPU other than the Vega10 GPU
currently modeled.

Change-Id: Ica7ef3b9820b30be32a148ce6cf1d2f81dc2adf9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46162
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-06-11 17:10:32 +00:00
Bobby R. Bruce
43ac896c9d tests: Move compiler-tests.sh script from "util" to "tests"
Change-Id: I69ccafc2a944a72e502a702d829c75e8ebfa7e13
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46519
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
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-06-10 17:59:15 +00:00
Hoa Nguyen
cfa028291e util: Make sorted includes verifier less confusing
verifiers.py complains about unordered includes where there is
more than one empty line under the #include region, even if
the includes are sorted.

This change adds a note about the fact.

Change-Id: I7a8dbc12fd82db0f0cadcfec270e42f6e0de4aea
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46580
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-06-08 06:23:02 +00:00
Daniel R. Carvalho
2f8a8508fb util: Rename recently renamed namespaces
These namespaces were recently renamed, but the
renames were not applied here.

Change-Id: I3093f193e835f81e1beca538cbca6a0751f6c21b
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46541
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-06-07 00:11:42 +00:00
Daniel R. Carvalho
89e36417d4 util,systemc: Fix create and params signature
These have been updated in src/, but were forgotten
here.

Change-Id: I19825f3f60d7ccd60282d5e7072c2f4c4959e7d8
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46540
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-06-07 00:11:42 +00:00
Daniel R. Carvalho
4e3eaa7d9d systemc: Fix module not found
Fix "ModuleNotFoundError: No module named 'SystemC'".

Change-Id: I81254a3ba2e221ecd81a6d879dc48ed528173964
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46539
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-06-07 00:11:42 +00:00
Bobby R. Bruce
0fd71ca168 util,tests: Add Clang version 10 and 11 to the compiler tests
Change-Id: Iad14cc57dad54a9b36f6304f882e55077f5f0156
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45683
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-19 15:57:28 +00:00
Bobby R. Bruce
db9f03fbf0 tests,util: Add Clang version 10 and 11 to Cloudbuild
This change will build the clang compilation images for version 10 and
11 in gem5's Google Cloud Build.  These can then be used in the gem5
compilation tests.

Change-Id: I9fc902bbaf3262c018231873abfe7fdedd13172c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45682
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-19 15:57:28 +00:00
Bobby R. Bruce
d2b494e7ef tests,util: Add Ubuntu 20.04 Clang Dockerfile
This new Dockerfiles enables use to build images for Clang versions 10
and 11, which are not available in Ubuntu 18.04 via APT.

Change-Id: I374a1c679377b7402a63241da34f9f4f7f5c7468
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45681
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-19 15:57:28 +00:00
Bobby R. Bruce
d3a1265324 tests,util: Remove Clang Versions <6 from Docker Build
cloud_create_image.yaml is used by Google Cloud build to build the
docker images for the gem5 project. We no longer support Clang versions
<6: https://gem5-review.googlesource.com/c/public/gem5/+/45621. As such
we no longer need to build the image for Clang versions 3.9, 4, and 5.
These were primarily used for the compiler tests, which have been
updated to only test Clang versions >=6.

Change-Id: I0c41cf0f189b4e24976f19a519018f3c9e87bb90
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45680
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-19 15:57:28 +00:00
Bobby R. Bruce
c01c299ace tests,util: Remove Clang Version <6 from compiler tests
gem5 will now only support Clang Version 6 and above:
https://gem5-review.googlesource.com/c/public/gem5/+/45621

Change-Id: I21c418e73560a0332675ced06c6937b109b7ef10
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45679
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-19 15:57:28 +00:00
Hoa Nguyen
808056ce4e util-docker: Use python3 by default for Ubuntu 18.04 docker images
gem5 dropped the support for python2. This change sets python3
to have a higher priority than python2 in the Ubuntu 18.04 docker
images. This is done so that gem5 will be compiled and tested
in the python3 environment by default.

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

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: I11ffb06697ecf4cebf9f98b611641faa42805547
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45125
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-06 04:36:43 +00:00
Hoa Nguyen
3530b8659e util: Fix checkpoint-tester.py checkpoint parameter
checkpoint-tester script tests gem5's checkpoints by
using gem5 to produce a series of checkpoints, each with
a specified interval. After that, for all K > 1,
each of K-th produced checkpoint is used by gem5 to produce
the {K+1}-th checkpoint. The newly produced checkpoint will
be compared against the {K+1}-th checkpoint that was
previously produced.

Previously, in the tester script, the inputs to
`--take-checkpoints X,Y` was `(interval, interval)`.
The intention was to restore the N-th checkpoint and to run
the simulation for `interval` ticks.

According to the current configs/common/Options.py file,
`--take-checkpoints X,Y` means `X` is the starting tick of
the simulation, while `Y` is the number of ticks to be simulated
after tick `X`.

Therefore, `X` should be the starting tick of the N-th checkpont,
and this change addresses this problem.

Change-Id: I1fd7c91c9454f42a4fb98aa878fb5e4ac7d238f3
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44449
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-05-04 02:28:13 +00:00
Giacomo Travaglini
8d5a8f01e4 util: Replace optparse with argparse
JIRA: https://gem5.atlassian.net/browse/GEM5-543

Change-Id: Id270ed29f14199f4f8eb6eb5739451a43d100484
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44512
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-04-21 09:05:21 +00:00
Giacomo Travaglini
fe3c2cd8a7 util: Remove unused package import
Change-Id: I67a03cffad11d4b26a193cc2c5ccb4cd30159a48
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44511
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-04-19 09:21:51 +00:00
Giacomo Travaglini
8f3e00d630 util: Fix cpt_upgrader format string
Change-Id: I9d15316f199b20976420c35d2c79dd13cc9db9ee
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44510
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-04-19 09:21:51 +00:00
Hoa Nguyen
f8d8547575 util: Add missing parameter for print_insts
JIRA: https://gem5.atlassian.net/browse/GEM5-949

Change-Id: I74fe7adc06124d193f17d682882766484ac18528
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44448
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-04-13 08:40:10 +00:00
Hoa Nguyen
004692487f util: Make o3-pipeview Python3 compatible
JIRA: https://gem5.atlassian.net/browse/GEM5-955

Change-Id: I48cb0bfb784eafe2057eb1095e6aad7abf9a1bc9
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44447
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-04-13 08:40:03 +00:00
Daniel R. Carvalho
1525ee8cdd util: Fix cpt_upgrader
This had multiple issues related to the upgrade
to Python 3.

Change-Id: Iebac5618a05d7c3ad08b34652bf2ba08a82b5948
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44105
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-04-11 14:09:24 +00:00
Daniel R. Carvalho
d67f28473a util: Revamp opening brace verifier
1 - Rename the verifier from ClassBraces to
StructureBraces.

2 - Add support for anonymous structures. This
includes anonymous classes, anonymous structs,
anonymous enums and anonymous unions. e.g.:

  struct {

3 - Make the verifier not trigger error for
structures that do not currently abide to gem5's
coding style and use non-uppercase characters as
their first character. e.g.:

  struct test {

4 - Improve handling of nested structures. e.g.:

  struct { enum { VAR, VAR2

becomes

  struct
  {
      enum {
          VAR, VAR2

But the verifier will fail for declarations like:

  struct { int a; }; struct {

which becomes

  struct
  {
      int a; struct {

However, this later issue is not a desired coding
style, so it should be handled by another kind of
verifier if desired.

Change-Id: I8f0536dcc2c164e2d3d2a2e5b7a35d5ee351a814
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43365
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-04-07 01:37:12 +00:00
Ayaz Akram
2dfa2ddc6f arch-riscv,util: update riscv crosstool-ng config and m5 README entry
Change-Id: I751a6c97a0ac97f7b3fce360577d0ee16f29fda4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44032
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-04-02 20:45:12 +00:00
Gabe Black
e0b4c2ee04 util: Add a logroll utility.
This utility receives input from stdin or a file, buffers up to "n"
lines of it, and prints those lines either when it reaches the end of
the file/stdin, or when it receives a SIGUSR1 which can be sent to it
using the "kill" utility. When it receives a SIGUSR1, it keeps running
and tracking the input.

Change-Id: I9eca4514378cf24a31002d37e10e58cc3ee63b5d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43266
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2021-03-31 08:43:39 +00:00
Giacomo Travaglini
fc9b1b5089 util: Stop providing support for linux-arm-legacy
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I758f66c9fe957eab4ed0867e46937ed265f42f06
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43745
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-03-26 21:23:45 +00:00
Bobby R. Bruce
502ad193ae misc: Merge branch v21.0.0.0 into develop
This incorporates the last of the v21.0 staging branch changes into the
develop branch.

Change-Id: I89349ac5c52fd454eb87d6199ea5ccde0d50dda3
2021-03-25 14:42:27 -07:00
Ayaz Akram
cc1bb34827 arch-riscv,util: fix the default cross compiler for riscv
Change-Id: I44b5f10fd9d0f3b7ac25a1adad16d5acaa44ddc3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43607
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-03-25 17:00:56 +00:00
Jason Lowe-Power
7cdf8c00f8 util-gem5art: Add gem5art packages
gem5art is a utility to help manage the artifacts used in gem5
experiments, the output from those experiments, and running the
experiments in parallel (artifacts, run, and tasks packages
respectively).

The current documentation can be found on readthedocs [1], but we are
planning on migrating this to the gem5 website very soon [2].

More information on the motivation and design was discussed at the gem5
workshop last summer. See the blog post [3] for more details.

The current version (v1.3.1) is already deployed on PyPI, and you can
install it with `pip install gem5art-artifact gem5art-run gem5art-tasks`

Once this is merged, we will update the PyPI version to match the
version in gem5 (v1.4.0). The only differences are mostly documentation
based (pointers to the documentation and source), but we have also
updated the style to strictly match PEP8 with black [4].

gem5art is a *utility* to use with gem5. So, we expect that the
versioning and release schedule will not necessarily match gem5's (hence
a separate versioning structure and separate RELEASE-NOTES, etc.).

[1]: https://gem5art.readthedocs.io/en/latest/
[2]: https://www.gem5.org/documentation/gem5art
[3]: http://www.gem5.org/2020/05/26/gem5art.html
[4]: https://github.com/psf/black

Change-Id: Ic8af63edf0cb7df4693a46413f7278a3e8ac6846
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42121
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Ayaz Akram <yazakram@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-03-24 16:06:39 +00:00
Daniel R. Carvalho
d7c9636237 util: Add verifier for opening braces of unions
Make sure that opening braces of unions are not declared
in the same line of the union name.

This does not work for multi-line unions.

Change-Id: Ieed6f974aec4b435b76195b1a05453da912f7450
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43329
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-03-23 23:41:54 +00:00
Daniel R. Carvalho
df8ef51d61 util: Add verifier for opening braces of enums
Make sure that opening braces of enums are not declared
in the same line of the enum name.

This does not work for multi-line enums.

Change-Id: I5fbdc317f954946127e6e79dbcaf46674abccb41
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43327
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-03-23 16:26:04 +00:00
Daniel R. Carvalho
96c202f819 util: Add verifier for opening braces of structs
Make sure that opening braces of structs are not declared
in the same line of the struct name.

This does not work for multi-line structs.

Change-Id: Ie9d5ccc8f7252ad37a90704ea09231a308fc6700
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43325
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-03-20 18:12:33 +00:00
Bobby R. Bruce
af81ec9041 Merge "misc: Merge branch 'release-staging-v21-0' into develop" into develop 2021-03-19 21:13:58 +00:00
Daniel R. Carvalho
f96de41fcf util: Add verifier for opening braces of classes
Make sure that opening braces of classes are not declared
in the same line of the class name.

This does not work for multi-line classes.

Change-Id: I232df1a9ebd974b9f4f66e1d96d03b12513bd49f
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39016
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-03-19 20:57:24 +00:00
Gabe Black
fcaf3a69fb scons,util: Make the tlm SConstruct put SConsign in the build dir.
Otherwise it ends up in the root of the source directory which makes it
harder to blast everything and do a truly clean build.

Change-Id: Id1e948b9059aaab0814c19c0cfb6ed611bf14d08
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42587
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:33:55 +00:00
Gabe Black
476069cdd3 systemc,util: Fix a bad port of a change from gem5 proper to here.
This change:

systemc: remove pipe through flag in TLM extension

applied a change from gem5 proper in the gem5/TLM bridge improperly
here, adding a reference to a member variable that didn't exist. This
change removes the extra and invalid level of indirection to get things
to build again.

Change-Id: I77ffdb5408525e116d414df2095a944c58e40b4d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42586
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Earl Ou <shunhsingou@google.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-03-11 07:33:44 +00:00
Gabe Black
391d860999 systemc,util: Update sc_master_port.cc now that params() returns a ref.
The params() methods (when they exist) now all return references instead
of pointers. Update sc_master_port.cc to work with this.

Change-Id: Ifa3c33e69ba9c16dc2b984784e7978b43714dbf2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42585
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:33:32 +00:00
Gabe Black
d278c229e0 scons,tlm: Update the gem5-within-systemc SConstruct to use c++14.
Gem5 has moved to c++14, and the sources used from there will no longer
compile with an older version of the standard. Move this SConstruct from
specifying c++11 to c++14.

Change-Id: I5be151648c3b72b5cbc005acc0c208a11de458ba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42584
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:33:17 +00:00
Bobby R. Bruce
e100156a51 misc: Adding 'make' to the compiler Dockerfiles
While gem5 will compile without make, LTO cannot link on multiple
threads without it.

Change-Id: Id5552aaa295e194789ab5f355bb62a3657384d38
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41873
Reviewed-by: Gabe Black <gabe.black@gmail.com>
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-02-25 23:19:15 +00:00
Gabe Black
12d9fadc59 util: Delete the build_cross_gcc utility.
Now that crosstool-ng can be used for any of the supported ISAs, the
build_cross_gcc tool is no longer needed.

Change-Id: Ie72d84197662eb0bea03ec27830b3ad4dbaa3084
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41454
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-17 19:35:16 +00:00
Gabe Black
01294faea6 util: Add a crosstool-ng defconfig for RISCV.
This may have been available before as well, but it was hidden behind an
"experimental" flag which needed to be enabled before riscv was
selectable.

Change-Id: I76239d826163e54d0b8a48c3492930bb787bea02
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41453
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-02-17 19:35:16 +00:00
Gabe Black
6bcb68e07c util: Delete the ccdrv kernel module.
This very small kernel module seems to be intended to measure the access
time to device registers when running in a linux kernel. It mentions
kernel version 2.6.x and so is fairly old and may not work with modern
kernels.

While there is probably some utility (no pun intended) to having a
driver like that and that sort of measurement capability, the usefulness
is probably not huge compared to its small but non-zero maintenance
burden. It seems like it's not something that gets active attention
given it's revision history, and is probably just taking up space these days.

Change-Id: I3b1f44d718d7e6ee23695e3117bb169268f2157a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41473
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>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-16 22:11:06 +00:00
Gabe Black
77e10d2ea1 util: Delete the very obsolete "compile" script.
This script is basically a wrapper around scons. Since scons is already
a pretty robust python based build environment, there doesn't seem to be
much need to add another python wrapper around it.

Also, this script is quite out of date. For instance, it only mentions
SPARC and MIPS (it used to mention ALPHA, but that was deleted), and
still makes reference to separate _FS and _SE builds which haven't been
a thing for many years.

Change-Id: I0e9fefaa5b3c2d092f70ad01b904eb7e64e5361e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41455
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-16 22:10:41 +00:00
Boris Shingarov
a116ff6bc7 util,python: Ignore ELF binary blobs in pre-commit
Change-Id: I60554b2ae7536687a6c0a883a7678f793c3c77d4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40636
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-02-05 04:09:54 +00:00
Bobby R. Bruce
58ccc6287e util,python: Add check to ensure files are utf-8 in pre-commit
The `file_from_index` function throws a UnicodeDecodeError if a modified
file targetted for style-checking (i.e. source-code) cannot be decoded
using `.decode("utf-8")`.

This check throws an error informing the user a submitted file must be
utf-8 encoded if this case arises.

Change-Id: I2361017f2e7413ed60f897d2301f2e4c7995dd76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40015
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-02-02 21:39:09 +00:00
Bobby R. Bruce
86222736e6 util,python: Fix Pre-commit hooks to ignore non-source files
Previously if binary blobs were modified the pre-commit hook attempted
to run style-checks on the binary, causing an error when attempting to
decode to utf-8. This commit runs a check on each file to ensure it has
a valid source-code extension prior to running style checks. If a file
does not have a valid extension style checks are not run.

Change-Id: Id1263cac0d6c190ad1a3d67720b3f373e0e42234
Issue-on: https://gem5.atlassian.net/browse/GEM5-903
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39795
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-02-02 21:39:09 +00:00
Richard Cooper
d8464eaa80 util: Fix gem5img when used to manually unmount a disk image.
When unmounting a disk image manually using the
`gem5img umount mount_point` command, the operation can fail if the
process is unable to stat any of the mounts in the mount table. On
some systems this can occur even when running using sudo.

Added an exception check so any mount points that fail to stat will not
cause the whole script to terminate early.

Change-Id: I69cd2494ad0e8c989e19ecd8af8a811905cd6c09
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39897
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-01 09:48:02 +00:00
Richard Cooper
2bcab28c33 util: Improve robustness of sfdisk parsing in util/gem5img.py
The format of the output of sfdisk can change between versions, and
can also change depending on the details of the disk image being
analysed. For example, extra attributes like grain size in the
preamble have been observed.

The current output parsing is quite brittle, expecting a specific
number of lines of preamble. This change switches to a regular
expression based method which searches the output for the line of
interest. The parsing will still be sensitive to changes in the output
of sfdisk, but hopefully less so than the current method.

Change-Id: If03fe999a4986049ae20709895ec1d1b42166023
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39896
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-02-01 09:48:02 +00:00
Richard Cooper
1d90e4716a util: Update util/gem5img.py to work with Python 3.
Tested on Ubuntu 18.04 with Python 3.6.8 and Python 2.7.15+.

Change-Id: Ic8b407ad41dc0d6d37a54a54eeef2b9156d893d6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39895
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-01 09:48:02 +00:00
Earl Ou
f2c6e8bd13 util: Fix packet parser for Python3
Change-Id: Id5124135b0dd4049ce6531d7bdbc562d33f4d299
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40075
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-02-01 08:21:13 +00:00