gem5.git
3 years agomem: Make MemCtrl a ClockedObject
Wendy Elsasser [Sat, 8 Feb 2020 00:00:57 +0000 (18:00 -0600)]
mem: Make MemCtrl a ClockedObject

Made DRAMCtrl a ClockedObject, with DRAMInterface
defined as an AbstractMemory. The address
ranges are now defined per interface. Currently
the model only includes a DRAMInterface but this
can be expanded for other media types.

The controller object includes a parameter to the
interface, which is setup when gem5 is configured.

Change-Id: I6a368b845d574a713c7196c5671188ca8c1dc5e8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28968
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem: Factor out DRAM interface
Wendy Elsasser [Mon, 18 Nov 2019 22:56:13 +0000 (16:56 -0600)]
mem: Factor out DRAM interface

Separate out the DRAM specific functions into a new class:
- DRAMInterface

Move the Rank class to DRAMInterface since rank functions are
specific to the media.

Move DRAMPacket and Bank class definitions outside of DRAMCtrl.

This is patch 1 within a set of patches that separate the
memory controller and media interface. These changes enable
future incorporation of new media interfaces into the model.

Change-Id: Ief632d73ec27176a61f16b4f642c10d56630f376
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28967
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoext: Make the testing-results folder visible
Hoa Nguyen [Thu, 3 Sep 2020 08:45:27 +0000 (01:45 -0700)]
ext: Make the testing-results folder visible

Currently, testlib will write outputs to .testing-results, which
is a hidden folder. However, the outputs in the folder are useful
for debugging. This commit makes this folder visible on Linux
systems.

Change-Id: I158e1a4a62c7b494309a0a4bf6521fedd04cbe22
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34015
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in crc.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:53:03 +0000 (23:53 -0700)]
base: Tag API methods in crc.hh

Change-Id: I4fc8977dad705a6774f649479184cdfb15aa2be5
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32961
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agobase: Tag API methods to debug.hh
Hoa Nguyen [Mon, 24 Aug 2020 05:46:41 +0000 (22:46 -0700)]
base: Tag API methods to debug.hh

Change-Id: Ic4395f3594cbc156a2b678710a3ed4717ce87a81
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33257
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in inet.hh
Hoa Nguyen [Mon, 24 Aug 2020 04:41:21 +0000 (21:41 -0700)]
base: Tag API methods in inet.hh

Change-Id: Id53ab873c7de9de7ccb99ff8434827aeec676c30
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33254
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API variables in date.cc
Hoa Nguyen [Thu, 20 Aug 2020 06:50:48 +0000 (23:50 -0700)]
base: Tag API variables in date.cc

Change-Id: I5a90f6496ef1e39b6135a14dfdf3f5febd22ece2
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32974
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agobase: Tag API methods in flags.hh
Hoa Nguyen [Thu, 20 Aug 2020 20:54:34 +0000 (13:54 -0700)]
base: Tag API methods in flags.hh

Change-Id: I12eb94b43e190ee46f82fba7d2a3ef6c29fdee80
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33035
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agobase: Tag API variables in version.cc
Hoa Nguyen [Fri, 21 Aug 2020 01:21:29 +0000 (18:21 -0700)]
base: Tag API variables in version.cc

Change-Id: I49438963a1cdb82b00fa6bea153d55b8cdbfcf33
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33079
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agobase: Tag API methods in intmath.hh
Hoa Nguyen [Thu, 20 Aug 2020 23:17:34 +0000 (16:17 -0700)]
base: Tag API methods in intmath.hh

Change-Id: Ia50830c7620380ff2aba081f56f74822aff982bf
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33075
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agobase: Tag API methods in sat_counter.hh
Hoa Nguyen [Fri, 21 Aug 2020 00:46:04 +0000 (17:46 -0700)]
base: Tag API methods in sat_counter.hh

Change-Id: Id5da647f35cca30276bb34b745999f4571a47d89
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33117
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agobase: Tag API methods in condcodes.hh
Hoa Nguyen [Thu, 20 Aug 2020 22:03:53 +0000 (15:03 -0700)]
base: Tag API methods in condcodes.hh

Change-Id: Ife6b5ed6ee684b65790c374ab6e709ce8eb708ad
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33074
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods to trace.hh
Hoa Nguyen [Mon, 24 Aug 2020 04:56:06 +0000 (21:56 -0700)]
base: Tag API methods to trace.hh

Change-Id: Ia2ad759b9bee4fd3413abd62cfa6b120616a14f9
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33255
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in remote_gdb.hh
Hoa Nguyen [Mon, 24 Aug 2020 05:23:45 +0000 (22:23 -0700)]
base: Tag API methods in remote_gdb.hh

Change-Id: I7d4d6ce8a2b18a365561ad88434fea7d6823d310
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33256
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in stl_helpers.hh
Hoa Nguyen [Fri, 21 Aug 2020 01:14:04 +0000 (18:14 -0700)]
base: Tag API methods in stl_helpers.hh

Change-Id: Ibc967febfd29444214094883121a66600d80cad8
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33118
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in pollevent.hh
Hoa Nguyen [Thu, 20 Aug 2020 23:40:59 +0000 (16:40 -0700)]
base: Tag API methods in pollevent.hh

Change-Id: Ic2eb596c873fc4917cf650c2e240310b1e025fa5
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33114
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in addr_range.hh
Hoa Nguyen [Thu, 20 Aug 2020 05:58:01 +0000 (22:58 -0700)]
base: Tag API methods and variables in addr_range.hh

Change-Id: I4bff99ecf1e0eeab4a76574e99163303f7dec83b
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32955
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
3 years agobase: Tag API methods and variables in callback.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:33:36 +0000 (23:33 -0700)]
base: Tag API methods and variables in callback.hh

Change-Id: I4ff6d9914e6edb4e8e7b033aec4b26482e950cc0
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32959
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in bitunion.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:28:01 +0000 (23:28 -0700)]
base: Tag API methods and variables in bitunion.hh

Change-Id: I322645801e9832014f54d4ed633796b082b06c6b
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32958
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in trie.hh
Hoa Nguyen [Fri, 21 Aug 2020 01:25:10 +0000 (18:25 -0700)]
base: Tag API methods and variables in trie.hh

Change-Id: I4492dbb997a3ece5cb2675b45bf37d7512449ab6
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33080
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in socket.hh
Hoa Nguyen [Fri, 21 Aug 2020 01:09:52 +0000 (18:09 -0700)]
base: Tag API methods in socket.hh

Change-Id: Ifdbe1d9367df602e45fa3d39c91de9e0f8f1d87e
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33078
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in channel_addr.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:39:36 +0000 (23:39 -0700)]
base: Tag API methods and variables in channel_addr.hh

Change-Id: I91c806e88f035457f93dcfcee1833d6955a07807
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32960
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in addr_range_map.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:05:01 +0000 (23:05 -0700)]
base: Tag API methods and variables in addr_range_map.hh

Change-Id: I9dc630e7c0d0826a20f032879346da6327b38a2d
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32956
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in amo.hh
Hoa Nguyen [Mon, 24 Aug 2020 05:06:50 +0000 (22:06 -0700)]
base: Tag API methods in amo.hh

Change-Id: I8014d729611721dd15ee27a974acbab2744c5e82
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33274
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in random.hh
Hoa Nguyen [Thu, 20 Aug 2020 23:57:46 +0000 (16:57 -0700)]
base: Tag API methods and variables in random.hh

Change-Id: I75f8843ee696055f156aa0d9e035094d8206f4b9
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33115
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase, sim: Make ByteOrder into a ScopedEnum accessible to Python
Andreas Sandberg [Fri, 21 Aug 2020 10:53:18 +0000 (11:53 +0100)]
base, sim: Make ByteOrder into a ScopedEnum accessible to Python

There is currently no good way of passing a byte order as a Param
since the ByteOrder type is defined in C++. Make this into a generated
ScopedEnum that can be used in Params.

Change-Id: I990f402340c17c4e0799de57df19516ae61794d4
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33174
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
3 years agobase: Tag API methods and variables to circular_queue.hh
Hoa Nguyen [Thu, 20 Aug 2020 07:08:07 +0000 (00:08 -0700)]
base: Tag API methods and variables to circular_queue.hh

Change-Id: I0e6a89a3e3d14a6d269277e1ffeea1ed49d8e1e4
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32962
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and variables in chunk_generator.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:44:40 +0000 (23:44 -0700)]
base: Tag API methods and variables in chunk_generator.hh

Change-Id: I8dbcef360ec1c5539fc415781729fcb86112fdbc
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32935
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods and macros in logger.hh
Hoa Nguyen [Thu, 20 Aug 2020 23:24:05 +0000 (16:24 -0700)]
base: Tag API methods and macros in logger.hh

Change-Id: I36c4d39eb26fc3af1683ec648df91d6055be97ba
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33076
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>
3 years agobase: Tag API methods and variables in fiber.hh
Hoa Nguyen [Thu, 20 Aug 2020 20:48:59 +0000 (13:48 -0700)]
base: Tag API methods and variables in fiber.hh

Change-Id: I586183426c8c56929a4640b0a985b4ddbf48c21f
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33054
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Tag API methods in coroutine.hh
Hoa Nguyen [Thu, 20 Aug 2020 20:31:49 +0000 (13:31 -0700)]
base: Tag API methods in coroutine.hh

Change-Id: Ifd0aade13b0979d8f8433577be7f019d83406e6a
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32963
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
3 years agobase: Tag API methods and variables in bitfield.hh
Hoa Nguyen [Thu, 20 Aug 2020 06:14:43 +0000 (23:14 -0700)]
base: Tag API methods and variables in bitfield.hh

Change-Id: Ifd7d1b6ba243fd70af6974fde8228fce8aeecb40
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32957
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Gabe Black <gabeblack@google.com>
3 years agotests: Removed test-progs/insttest
Bobby R. Bruce [Thu, 20 Aug 2020 19:58:22 +0000 (12:58 -0700)]
tests: Removed test-progs/insttest

The insttests source is now found in gem5-resources:
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/master/src/insttest/

The pre-compiled binaries are pulled from dist.gem5.org.

There is no reason to keep these here. They are therefore being
removed.

Change-Id: I65d1237e275da4df6026090d8a064f47ada09687
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33140
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agotests,arch-sparc: Move SPARC insttests to long
Bobby R. Bruce [Fri, 4 Sep 2020 21:40:18 +0000 (14:40 -0700)]
tests,arch-sparc: Move SPARC insttests to long

We should not compile and run SPARC tests as part of the quick tests.
The SPARC insttests have thefore been moved to be part of the long
tests.

Change-Id: I8e4263414af2d7a882715202124671dc0723d961
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34136
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: HTM Implementation for O3CPU
Timothy Hayes [Wed, 2 Sep 2020 10:28:33 +0000 (11:28 +0100)]
cpu: HTM Implementation for O3CPU

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

Change-Id: I83787f4594963a15d856b81ad283b4f032d1c007
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30328
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: HTM Implementation for TimingCPU
Timothy Hayes [Wed, 2 Sep 2020 10:33:15 +0000 (11:33 +0100)]
cpu: HTM Implementation for TimingCPU

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

Change-Id: I3e1de639560ea5492e914470e31bacb321425f0a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30327
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem-ruby: HTM mem implementation
Timothy Hayes [Tue, 14 Jan 2020 16:29:09 +0000 (16:29 +0000)]
mem-ruby: HTM mem implementation

This patch augments the MESI_Three_Level Ruby protocol with hardware
transactional memory support.

The HTM implementation relies on buffering of speculative memory updates.
The core notifies the L0 cache controller that a new transaction has
started and the controller in turn places itself in transactional state
(htmTransactionalState := true).

When operating in transactional state, the usual MESI protocol changes
slightly. Lines loaded or stored are marked as part of a transaction's
read and write set respectively. If there is an invalidation request to
cache line in the read/write set, the transaction is marked as failed.
Similarly, if there is a read request by another core to a speculatively
written cache line, i.e. in the write set, the transaction is marked as
failed. If failed, all subsequent loads and stores from the core are
made benign, i.e. made into NOPS at the cache controller, and responses
are marked to indicate that the transactional state has failed. When the
core receives these marked responses, it generates a HtmFailureFault
with the reason for the transaction failure. Servicing this fault does
two things--

(a) Restores the architectural checkpoint
(b) Sends an HTM abort signal to the cache controller

The restoration includes all registers in the checkpoint as well as the
program counter of the instruction before the transaction started.

The abort signal is sent to the L0 cache controller and resets the
failed transactional state. It resets the transactional read and write
sets and invalidates any speculatively written cache lines.  It also
exits the transactional state so that the MESI protocol operates as
usual.

Alternatively, if the instructions within a transaction complete without
triggering a HtmFailureFault, the transaction can be committed. The core
is responsible for notifying the cache controller that the transaction
is complete and the cache controller makes all speculative writes
visible to the rest of the system and exits the transactional state.

Notifting the cache controller is done through HtmCmd Requests which are
a subtype of Load Requests.

KUDOS:
The code is based on a previous pull request by Pradip Vallathol who
developed HTM and TSX support in Gem5 as part of his master’s thesis:

http://reviews.gem5.org/r/2308/index.html

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

Change-Id: Icc328df93363486e923b8bd54f4d77741d8f5650
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30319
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem: Add HTM fields to the Packet object
Timothy Hayes [Mon, 6 Apr 2020 14:37:25 +0000 (15:37 +0100)]
mem: Add HTM fields to the Packet object

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

Change-Id: I39268825327f2387ca7e622093fdb42c24a6c82c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30318
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Base dyn inst HTM flags getter
Timothy Hayes [Mon, 13 Jan 2020 10:05:14 +0000 (10:05 +0000)]
cpu: Base dyn inst HTM flags getter

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

Change-Id: Ie15d8849edcff34ee7d5c7dd5e6ee2e099f937fc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30326
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agosim: Add HTM Generic Fault
Timothy Hayes [Fri, 10 Jan 2020 17:04:21 +0000 (17:04 +0000)]
sim: Add HTM Generic Fault

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

Change-Id: Iedbf06d25330a92790123805cff50d57b613a7a5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30325
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Add HTM ThreadContext API
Timothy Hayes [Fri, 10 Jan 2020 18:03:22 +0000 (18:03 +0000)]
cpu: Add HTM ThreadContext API

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

Change-Id: I9d60f69592c8072e70cef18787b5a4f2fc737a9d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30324
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Add HTM ExecContext API
Timothy Hayes [Fri, 10 Jan 2020 17:41:38 +0000 (17:41 +0000)]
cpu: Add HTM ExecContext API

* initiateHtmCmd(Request::Flags flags)
* getHtmTransactionUid()
* newHtmTransactionUid()
* inHtmTransactionalState()
* getHtmTransactionalDepth()

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

Change-Id: I438832a3c47fff1d12d0123425985cfa2150ab40
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30323
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem: Re-remove the arch/isa_traits.hh include in the base prefetcher.
Gabe Black [Mon, 7 Sep 2020 05:47:29 +0000 (22:47 -0700)]
mem: Re-remove the arch/isa_traits.hh include in the base prefetcher.

This was removed but then accidentally re-added by a following change,
probably from a slighly incorrect rebase.

Change-Id: Ia7e8c755f92343c8b5e82febea2c1db4683fa69a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34166
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem: Add HTM fields to Request
Timothy Hayes [Fri, 10 Jan 2020 17:14:09 +0000 (17:14 +0000)]
mem: Add HTM fields to Request

This starts the support of Hardware Transactional Memory on the mem side

* The following flags have been added:

HTM_START: The request starts a HTM transaction
HTM_COMMIT: The request commits a HTM transaction
HTM_CANCEL: The request cancels a HTM transaction
HTM_ABORT: The request aborts a HTM transaction

* The following fields have been added:

_instCount: The instruction count at the time this request is created
_htmAbortCause: The cause for HTM transaction abort

https://gem5.atlassian.net/browse/GEM5-587

Change-Id: Ic582a6566fdd23f30eb92723e629d0c4d4ca10e5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30316
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Add HTM CPU API
Timothy Hayes [Fri, 10 Jan 2020 17:55:24 +0000 (17:55 +0000)]
cpu: Add HTM CPU API

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

Change-Id: Iff95eb97603b4cb9629c04382a824b02594ee5c7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30322
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Add HTM Instruction Flags
Timothy Hayes [Fri, 10 Jan 2020 17:30:27 +0000 (17:30 +0000)]
cpu: Add HTM Instruction Flags

IsHtmStart: Starts a HTM transaction
IsHtmStop: Stops (commits) a HTM transaction
IsHtmCancel: Explicitely aborts a HTM transaction

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

Change-Id: I33144f97a2009e28b0c64777f0313cd6eadb7ff9
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30321
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Add HtmCpu DebugFlag
Timothy Hayes [Mon, 13 Jan 2020 10:26:18 +0000 (10:26 +0000)]
cpu: Add HtmCpu DebugFlag

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

Change-Id: Id4b86b8964bc64bce1d2e4af941217eb114f3cc4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30320
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agopython: Remove unused debug APIs
Andreas Sandberg [Fri, 4 Sep 2020 16:17:28 +0000 (17:17 +0100)]
python: Remove unused debug APIs

The following APIs are not exported from the _m5 namespace and not
used by any of the debug glue code:

 * m5.debug.findFlag
 * m5.debug.setDebugFlag
 * m5.debug.clearDebugFlag
 * m5.debug.dumpDebugFlags

All of them have a clean Python interface where flags are exported
using the m5.debug.flags dictionary. There is also an m5.debug.help
function that lists the available debug flags.

Remove the unused APIs to avoid confusion.

Change-Id: I74738451eb5874f83b135adaccd30a0c6b478996
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34120
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agopython: Add the ability to check if a debug flag has been enabled
Andreas Sandberg [Fri, 4 Sep 2020 16:12:27 +0000 (17:12 +0100)]
python: Add the ability to check if a debug flag has been enabled

There is currently no Python API to check if a debug flag is
enabled. Add a new status property that can be read or set to control
the status of a flag. The stat of a flag can also be queried by
converting it to a bool.

For example:

  m5.debug.flags["XBar"].status = True

  if m5.debug.flags["XBar"]:
      print("XBar debugging is on")

Change-Id: I5a50c39ced182ab44e18c061c463d7d9c41ef186
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34119
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Cleanup debug flags API
Andreas Sandberg [Fri, 4 Sep 2020 15:01:24 +0000 (16:01 +0100)]
base: Cleanup debug flags API

The debug flags API has a couple of quirks that should be cleaned
up. Specifically:

 * Only CompoundFlag should expose a list of children.
 * The global enable flag is just called "active", this isn't very
   descriptive.
 * Only SimpleFlag exposed a status member. This should be in the base
   class to make the API symmetric.
 * Flag::Sync() is an implementation detail and needs to be protected.

Change-Id: I4d7fd32c80891191aa04f0bd0c334c8cf8d372f5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34118
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Remove unused Debug::All flag
Andreas Sandberg [Fri, 4 Sep 2020 14:52:09 +0000 (15:52 +0100)]
base: Remove unused Debug::All flag

The Debug::All flag doesn't seem to be used. Remove it.

Change-Id: I3d6ad1b2f61a2a0a5c52cbc6d520112855946007
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34117
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoscons: Simplify arch enum generation
Andreas Sandberg [Fri, 4 Sep 2020 14:14:14 +0000 (15:14 +0100)]
scons: Simplify arch enum generation

C++ allows a trailing comma after the last item in an enum, so there
is no need for a special case.

Change-Id: I6ead36b4a8562b4a7a5aec88e4f6390182eedf56
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34116
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Cleanup Debug::CompoundFlag
Andreas Sandberg [Fri, 4 Sep 2020 14:10:53 +0000 (15:10 +0100)]
base: Cleanup Debug::CompoundFlag

Compound flags are currently constructed using a constructor with a
finite set of arguments that default to nullptr that refer to child
flags. C++11 introduces two cleaner ways to achieve the same thing,
variadic templates and initializer_list. Use an initializer list to
pass dependent flags.

Change-Id: Iadcd04986ab20efccfae9b92b26c079b9612262e
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34115
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomisc,scons,util: Drop support for GCC 4
Bobby R. Bruce [Sat, 29 Aug 2020 01:28:23 +0000 (18:28 -0700)]
misc,scons,util: Drop support for GCC 4

Corresponding website update:
https://gem5-review.googlesource.com/c/public/gem5-website/+/33657

Issue-on: https://gem5.atlassian.net/browse/GEM5-218
Change-Id: Ia72edda6229214e2f9d548266a42a0affd49b340
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33659
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agolearning-gem5: convert simple cache to new style stats
eavivi [Fri, 4 Sep 2020 20:23:33 +0000 (13:23 -0700)]
learning-gem5: convert simple cache to new style stats

Change-Id: I6988c45c13955825fde974f390460f4473af017a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34135
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem-garnet: Separable allocator in Garnet not fair enough.
Srikant Bharadwaj [Tue, 16 Jul 2019 21:15:57 +0000 (17:15 -0400)]
mem-garnet: Separable allocator in Garnet not fair enough.

Currently there are independent round robin arbiter at each
input port and output port. Every time a VC is selected for
output allocation round robin is incremented irrespective of
if it is selected by its output port or not. This leads to
unfair arbitration at input port and is well known[1]. This
patch fixes it to increment only if the output port also
selects it.

[1] D. U. Becker and W. J. Dally, "Allocator implementations
for network-on-chip routers," Proceedings of the Conference
on High Performance Computing Networking, Storage and
Analysis, Portland, OR, 2009, pp. 1-12

Change-Id: I65963fb8082c51c0e3c6e031a8b87b4f5c3626e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32601
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agomem-garnet: Add a check to see if router is already scheduled
Srikant Bharadwaj [Tue, 16 Jul 2019 20:34:31 +0000 (16:34 -0400)]
mem-garnet: Add a check to see if router is already scheduled

Currently the Switch Allocator takes up most of the simulation
wall clock time. This function checks for all VCs to see if it
should wakeup next. The input units which are simulated before
the switch allocator could have scheduled it already. This patch
adds a check for it.

Change-Id: I8609d4e7f925aa5e97198f6cd07466530f6fcf4c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32600
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agomem-garnet: Flexible VCs per Vnet for each router
Srikant Bharadwaj [Thu, 28 Mar 2019 01:23:02 +0000 (21:23 -0400)]
mem-garnet: Flexible VCs per Vnet for each router

This change allows configuring each router with a certain number
of VCs for each VNET. This is beneficial when dealing with
heterogenous link widths in a system. Configuring VCs
for each router allows one to ensure equal throughput
within the network while avoiding head-of-line blocking.
Changing a router's VCs number can be done in topology files
using the vcs_per_vnet value argument of router.

Change-Id: Icf4f510248128429a1a11f19f9802ee96f340611
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32599
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem-garnet: Initialize unused Credit members
Michael LeBeane [Fri, 8 Mar 2019 19:12:36 +0000 (14:12 -0500)]
mem-garnet: Initialize unused Credit members

The Credit class doesn't initialize a number of its unused base class
fields.  This leads to non-determanistic traces when printing flits that
are Credits.  This patch initializes all unused fields to 0.

Change-Id: Ib73c652c71a10be57b24c0d6e1ac22eafa421e11
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32598
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agomem-garnet: Integration of HeteroGarnet
Srikant Bharadwaj [Thu, 19 Jul 2018 17:34:24 +0000 (13:34 -0400)]
mem-garnet: Integration of HeteroGarnet

This upgrades the garnet model to support HeteroGarnet
1) Static and dynamic multi-freq domains in network
2) Support for CDC
3) Separate links for each message class
4) Separate linkwidth for each message class
5) Support for SerDes

Change-Id: I6d00e3b5cb3745e849d221066cb46b2138c47871
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32597
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
3 years agocpu: Failure to restore RAS during squash
Sungkeun Kim [Sat, 22 Aug 2020 20:55:33 +0000 (15:55 -0500)]
cpu: Failure to restore RAS during squash

During squash of branch predictor history, RAS recovery mess up the
stack because of function "restore" in RAS (src/cpu/pred/ras.cc). In
restore function, it does not update "usedEntries" variable resulting in
restore failure.

To be specific, in order to remove mispredicted call, it uses pop() and
it updates tos. However in order to restore mispredicted ret
instruction, it uses restore() but it does not update tos. This pair of
function call mess up the RAS resulting in many misspeculation.

The solution is to update usedEntries variable as “push” function does.
This is possible because restoration is done with reverse order of push
and pop.

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

Change-Id: Ia14e71c26d20b2795fd55a6a0dd3284c03570614
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33214
Reviewed-by: Trivikram Reddy <tvreddy@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>
3 years agotests: Removed author info from insttest test.py
Bobby R. Bruce [Thu, 3 Sep 2020 00:15:15 +0000 (17:15 -0700)]
tests: Removed author info from insttest test.py

We no longer include author information directly in gem5 source.

Change-Id: I460d399f25ea955e7cf3bf5ed002246199ef4436
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33976
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests,arch-arm: Pass gem5_root as an arg in run.py
Bobby R. Bruce [Tue, 1 Sep 2020 21:06:49 +0000 (14:06 -0700)]
tests,arch-arm: Pass gem5_root as an arg in run.py

Previously `tests/gem5/fs/linux/arm/run.py` contained an ugly,
hard-coded `gem5_root` variable. In this commit we pass `gem5_root`
as an argument from `tests/gem5/fs/linux/arm/test.py`, utilizing
`config.base_dir`.

Change-Id: I2b1e3369b1078cce9375fadb7c39fa4292648658
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33955
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agotests: Standardized test resources download dir
Bobby R. Bruce [Fri, 21 Aug 2020 00:41:24 +0000 (17:41 -0700)]
tests: Standardized test resources download dir

We were downloading resources to various different locations, for no
real reason. This standardizes the process. From this commit onwards,
all testing resources are downloaded to `tests/gem5/resources` by
default. This may be overriden via the `--bin-path` TestLib argument.

Note: In order to do this I have changed the meaning of the `bin-path`
TestLib argument slightly. Previously the `bin-path` assumed a flat
(non-existant) hierarchy. A simple directory of local resources. This
new bin-path functionality maintains logical sub-directories. This is
technically an API change and will be noted in the release notes.

Change-Id: I4df85c121fa65f787fd71f03d74361afea121380
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33145
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agotests: Removed learning-gem5 tests/configs
Bobby R. Bruce [Thu, 20 Aug 2020 22:09:43 +0000 (15:09 -0700)]
tests: Removed learning-gem5 tests/configs

These configs are currently unused, and only served as redirects. They
are therefore being removed.

Change-Id: I12e5c2adb3a9c63ffc3177472eaa698b1cf80e41
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33144
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agotests: Moved realview config files
Bobby R. Bruce [Thu, 20 Aug 2020 21:59:09 +0000 (14:59 -0700)]
tests: Moved realview config files

This is part of a process of getting rid of the `tests/config`
directory, and placing these configs either where they are used,
removing them if unneeded, or moving them to `configs/example`.

These config files, in this patchset, are part of the realview tests
found in `tests/gem5/fs/linux/arm/`. They have been moved to
`tests/gem5/configs`.

Change-Id: I7706b59c58da6413f5f3dd816a1e5cd54a834a58
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33143
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests: Removed test-progs/asmtest
Bobby R. Bruce [Thu, 20 Aug 2020 20:46:54 +0000 (13:46 -0700)]
tests: Removed test-progs/asmtest

The insttests source is now found in gem5-resources:
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/master/src/asmtest

The pre-compiled binaries are pulled from dist.gem5.org.

There is no reason to keep these here. They are therefore being
removed.

Change-Id: Ic7869677278248f77b2703497ae7fc808d8f767a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33142
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests: Removed test-progs/pthread
Bobby R. Bruce [Thu, 20 Aug 2020 20:43:40 +0000 (13:43 -0700)]
tests: Removed test-progs/pthread

The Pthread source is now found in gem5-resources:
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/master/src/pthreads

The pre-compiled binaries are pulled from dist.gem5.org.

There is no reason to keep these here. They are therefore being
removed.

Change-Id: Id07dc72c62d19920fb304eea505deaa9ebc5599f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33141
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests: Removed the ignoring of tests
Bobby R. Bruce [Thu, 20 Aug 2020 19:42:02 +0000 (12:42 -0700)]
tests: Removed the ignoring of tests

This commit reverts
https://gem5-review.googlesource.com/c/public/gem5/+/23023.

It has proven to be an unpopular piece of functionality which makes it
too easy to silently ignore failing tests. The new policy will be to
remove/comment-out failing tests in the testing source and tag with Jira
issues as to why.

Change-Id: I17d69fc57a9171ce3702e019615390a9aa3da250
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33139
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agotests: Removed SPARC Insttests from .testignore
Bobby R. Bruce [Thu, 20 Aug 2020 19:35:06 +0000 (12:35 -0700)]
tests: Removed SPARC Insttests from .testignore

Due to the fixing of the SPARC insttest binary, recorded here:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/33396,
these tests now pass.

Change-Id: I4dca4504476f6d388e607a1075d44e9be69b5259
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33138
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests: Removed tests/configs/tgen files
Bobby R. Bruce [Wed, 19 Aug 2020 08:48:01 +0000 (01:48 -0700)]
tests: Removed tests/configs/tgen files

These files were needed by the memory tests found in `tests/memory`, but
this directory already has local copies.

Change-Id: I04628b151d2ab60b1127990dbe8baaab77e768b1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33136
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests: Removed `tests/halt.sh`
Bobby R. Bruce [Wed, 19 Aug 2020 08:26:31 +0000 (01:26 -0700)]
tests: Removed `tests/halt.sh`

`tests/halt.sh` is a duplicate of `configs/tests/halt.sh`. The one
instance of using `halt.sh`, `tests/gem5/fs/linux/arm/run.py`, has been
updated to use `configs/tests/halt.sh` and `tests/halt.sh` has been
removed.

Change-Id: I42f77a22b5985959a579c75541e4a0fdc135aa0c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33135
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotests: Removed realview tests from .testignore
Bobby R. Bruce [Wed, 19 Aug 2020 08:10:42 +0000 (01:10 -0700)]
tests: Removed realview tests from .testignore

The tests still fail, as recorded in
https://gem5.atlassian.net/browse/GEM5-364, though they have been
removed from the .testignore file as part of our goal of removing the
.testignore directory: https://gem5.atlassian.net/browse/GEM5-361.

Change-Id: I74f8a6c86e24835acbb4891ab4c88320baf12346
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33134
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoutil: add dev-hsa commit message tag
Matt Sinclair [Fri, 4 Sep 2020 02:34:10 +0000 (21:34 -0500)]
util: add dev-hsa commit message tag

The dev-hsa commit message tag was originally an option, but
appears to have been removed during the merge of the AMD GCN3
staging branch.  This commit adds it back.

Change-Id: Ie755b5ebe6ca1e5e92583b1588fd7aaeddcb5b00
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34095
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: Set ContextId on request from trace CPU
Jason Lowe-Power [Thu, 3 Sep 2020 15:21:14 +0000 (08:21 -0700)]
cpu: Set ContextId on request from trace CPU

Adds a contextId to the trace CPU in one more case that was missing.
Without this a panic is triggered in the cache.

Change-Id: I78bd70ad1e3657c9a6a1d56c234c007c2e2b586c
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34035
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoutil: Install scons 3.1 from pip in gcn-gpu dockerfile
Kyle Roarty [Thu, 3 Sep 2020 18:30:05 +0000 (13:30 -0500)]
util: Install scons 3.1 from pip in gcn-gpu dockerfile

A previous commit updated the minimum required version of scons to 3.0

The gcn Dockerfile previously installed scons from apt, which installed
scons 2.4, as the Dockerfile is based on Ubuntu 16

This patch installs scons through pip, which installs scons 3.1

Change-Id: I4f731b301f97e25c730df26afde20ae1cdfaa1b3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34075
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Daniel Gerzhoy <daniel.gerzhoy@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: convert thread_state to new style stats
eavivi [Wed, 26 Aug 2020 00:18:28 +0000 (17:18 -0700)]
cpu: convert thread_state to new style stats

Change-Id: Ib8cc8633ca5fced63918a7a6d10e15126f7c7459
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33400
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: convert tage_base to new style stats
Emily Brickey [Tue, 1 Sep 2020 22:25:35 +0000 (15:25 -0700)]
cpu: convert tage_base to new style stats

Change-Id: If03102af545855125e87782c77ff5b43da8ac73b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33937
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: convert statistical_corrector to new style stats
Emily Brickey [Tue, 1 Sep 2020 21:52:59 +0000 (14:52 -0700)]
cpu: convert statistical_corrector to new style stats

Change-Id: Id9e075fb45babeeafe65105679c8bf2135823d41
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33936
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: convert loop_predictor to new style stats
Emily Brickey [Tue, 1 Sep 2020 21:02:58 +0000 (14:02 -0700)]
cpu: convert loop_predictor to new style stats

Change-Id: Ib0383fc6d5f884fd6c020bcd938eee2f802ad412
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33935
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu: convert bpred_unit to new style stats
Emily Brickey [Mon, 31 Aug 2020 21:49:39 +0000 (14:49 -0700)]
cpu: convert bpred_unit to new style stats

Change-Id: Ife80b2df3cb900a73a4f0c1d6925d9ed2d625dd0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33797
Reviewed-by: Trivikram Reddy <tvreddy@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

3 years agoarch: Use a fault to trigger system calls in SE mode.
Gabe Black [Mon, 24 Aug 2020 08:36:53 +0000 (01:36 -0700)]
arch: Use a fault to trigger system calls in SE mode.

When the system call happens during the execution of the system call
instruction, it can be ambiguous what state takes precedence, the state
update from the instruction or the system call. These may be tracked
differently and found in an unpredictable order in, for example, the O3
CPU. An instruction can avoid updating any state explicitly, but
implicitly updated state (specifically the PC) will always update,
whether the instruction wants it to or not.

If the system call can be deferred by using a Fault object, then it's no
longer ambiguous. The PC update will be discarded, and the system call
can set the PC however it likes. Because there is no implicit PC update,
the PC needs to be walked forward, either to what it would have been
anyway, or to what the system call set in NPC.

In addition, because of the existing semantics around handling Faults,
the instruction no longer needs to be marked as serializing,
non-speculative, etc.

The "normal", aka architectural, aka FS version of the system call
instructions don't return a Fault artificially.

Change-Id: I72011a16a89332b1dcfb01c79f2f0d75c55ab773
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33281
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
3 years agocpu-kvm: convert kvm base to new style stats
eavivi [Mon, 31 Aug 2020 20:45:53 +0000 (13:45 -0700)]
cpu-kvm: convert kvm base to new style stats

Change-Id: Iab2e99720cf9ac58edfcbdcedc944264eb12b7e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33796
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agocpu-o3: convert fetch to new style stats
eavivi [Mon, 31 Aug 2020 19:10:19 +0000 (12:10 -0700)]
cpu-o3: convert fetch to new style stats

Change-Id: Ib50a303570ac1dd45ff11a32a823f47a6c4c02cd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33815
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoext: Link gem5 libelf to ext/libelf/libelf.a
Hoa Nguyen [Wed, 2 Sep 2020 00:36:55 +0000 (17:36 -0700)]
ext: Link gem5 libelf to ext/libelf/libelf.a

Currently, gem5 might use system's libelf library instead of
the one compiled from ext/libelf.
This commit tells scons to use ext/libelf version.

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

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: I8dc4555c32a956e9f5249288c71982fa6a3678f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33941
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoext: Revert "base: Use system libelf instead of ext"
Hoa Nguyen [Wed, 2 Sep 2020 00:31:57 +0000 (17:31 -0700)]
ext: Revert "base: Use system libelf instead of ext"

This reverts commit bbb32ca1ef8eb8249cdca72be6171b94f61bd62e,
which tells scons to use the system's libelf instead of
ext/libelf.

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: I3bb3e62f2ef0fbc72983c221d5570edb4b35d157
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33940
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoext: Revert "ext: remove libelf"
Hoa Nguyen [Wed, 2 Sep 2020 00:30:46 +0000 (17:30 -0700)]
ext: Revert "ext: remove libelf"

This reverts commit fa13042b5a1b4120bb7d96d15170bbd5d5068fad,
which removes ext/libelf.

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: Id0ffb480fa5f5fe8faa4816d367b580ebe4c38d7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33939
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem,ext: Integrating DRAMSim3 with gem5
Mahyar Samani [Mon, 27 Jul 2020 15:26:04 +0000 (15:26 +0000)]
mem,ext: Integrating DRAMSim3 with gem5

Adding DRAMSim3 source code to the gem5 source code, the original
code was taken from umd-memsys github at https://github.com/umd-memsys/

Change-Id: I32c982206f33b0acf2121f322d15baa064c412c4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31757
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>
3 years agomem,ext: Fixed DRAMSim2 Integration
Mahyar Samani [Tue, 1 Sep 2020 23:17:28 +0000 (16:17 -0700)]
mem,ext: Fixed DRAMSim2 Integration

Fixed the way callbacks were used due to changes in
src/sim/callback.hh. Removed author line in SConsript.

Change-Id: I2c2b8dbe13e4f58680806126cd9cf209748e788a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33938
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomem: Relax packet limit in packet queue
Timothy Hayes [Tue, 14 Jan 2020 16:24:54 +0000 (16:24 +0000)]
mem: Relax packet limit in packet queue

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

Change-Id: I4ac24bf18a0aff08a5b33c48179b882b27ef910c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30317
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoarch: Add uReset helper to UPCState
Timothy Hayes [Fri, 10 Jan 2020 17:07:41 +0000 (17:07 +0000)]
arch: Add uReset helper to UPCState

This allows to reset without advancing the pc

https://gem5.atlassian.net/browse/GEM5-587

Change-Id: Ied566f4cd5efed5eb500447d3f14388482435475
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30315
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
3 years agoarch, mem: Initial Hardware Transactional Memory implementation
Timothy Hayes [Fri, 10 Jan 2020 17:06:24 +0000 (17:06 +0000)]
arch, mem: Initial Hardware Transactional Memory implementation

Gem5 Hardware Transactional Memory (HTM)

Here we provide a brief note describing HTM support in Gem5 at
a high level.

HTM is an architectural feature that enables speculative concurrency in
a shared-memory system; groups of instructions known as transactions are
executed as an atomic unit. The system allows that transactions be
executed concurrently but intervenes if a transaction's
atomicity/isolation is jeapordised and takes corrective action. In this
implementation, corrective active explicitely means rolling back a
thread's architectural state and reverting any memory updates to a point
just before the transaction began.

This HTM implementation relies on--
(1) A checkpointing mechanism for architectural register state.
(2) Buffering speculative memory updates.

This patch is focusing on the definition of the HTM checkpoint (1)

The checkpointing mechanism is architecture dependent. Each ISA
leveraging HTM support can define a class HTMCheckpoint inhereting from
the generic one (GenericISA::HTMCheckpoint).

Those will need to save/restore the architectural state by overriding
the virtual HTMCheckpoint::save (when starting a transaction) and
HTMCheckpoint::restore (when aborting a transaction).

Instances of this class live in O3's ThreadState and Atomic's
SimpleThread.  It is up to the ISA to populate this instance when
executing an instruction that begins a new transaction.

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

Change-Id: Icd8d1913d23652d78fe89e930ab1e302eb52363d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30314
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agomisc: Remove the "fault" parameter from syscall functions.
Gabe Black [Sun, 23 Aug 2020 07:25:06 +0000 (00:25 -0700)]
misc: Remove the "fault" parameter from syscall functions.

This parameter was never set or used, just plumbed everywhere,
occasionally with a dummy value. This change removes all of that
plumbing.

Change-Id: I9bc31ffd1fbc4952c5d3096f7f21eab30102300b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33277
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

3 years agoarch-arm,arch-x86: Added missing overrides
Bobby R. Bruce [Mon, 31 Aug 2020 21:43:45 +0000 (14:43 -0700)]
arch-arm,arch-x86: Added missing overrides

These overrides were missing, causing compilation errors when
compiling with clang 9. Noted here:
https://www.mail-archive.com/gem5-dev@gem5.org/msg35657.html

Change-Id: I6d09a0e57af3131b9172d01468d2cdcf4b444c5d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33817
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agosim: Add missing overrides in the *Fault classes
Nikos Nikoleris [Mon, 31 Aug 2020 05:23:20 +0000 (08:23 +0300)]
sim: Add missing overrides in the *Fault classes

Change-Id: I7a74df78f0f85ccf7fd896f98b301c1f998c1497
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33777
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agobase: Make the Value stat's functor method accept lambdas.
Gabe Black [Wed, 19 Aug 2020 03:48:06 +0000 (20:48 -0700)]
base: Make the Value stat's functor method accept lambdas.

This class can already accept a proxy variable and a "functor" which is
a pointer to either a function or an instance of a class with the ()
operator overloaded.

This change adds a FunctorProxy partial specialization which accepts
anything that can be used to construct a std::function<Result()>. The
constructor argument is copied and stored in the proxy which makes it
possible to define a lambda inline without having to keep a copy of it
around for the proxy to point to.

Also, the ValueBase stat's functor method now has a second version which
accepts a const reference rather than just a reference to its argument.
We need both because when accepting a reference to a lambda it needs to
be a const reference, but when accepting a pointer to a functor object,
we don't want it to be const because that would force the () operator to
also be const.

Change-Id: Icb1b3682d51b721f6e16614490ed0fe289cee094
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32901
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

3 years agoscons: Make scons aware of changes to cxx_type in param types.
Gabe Black [Sat, 29 Aug 2020 09:21:09 +0000 (02:21 -0700)]
scons: Make scons aware of changes to cxx_type in param types.

If the cxx_type value changes, then the way the parameter is declared
in the param struct will also change, and the header needs to be
updated. scons would miss this sort of change before because it was only
checking the module the SimObject's source came from. The python names
and types of the parameters could stay the same, but the C++
representation might have changed because of edits somewhere else.

This CL assumes that cxx_type is the only thing that will change and
transparently affect the params struct. I tried making scons sensitive
to the entire ptype which would capture other parameters, but that
didn't work for some reason. This should be pretty safe in general, but
not 100% safe

Issue-on: https://gem5.atlassian.net/browse/GEM5-753
Change-Id: I06774889e60b987f727799f55d7ea2a775b6a319
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33695
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotest: Fix unittest cprintftime's build.
Gabe Black [Tue, 1 Sep 2020 03:52:24 +0000 (20:52 -0700)]
test: Fix unittest cprintftime's build.

This test, which measures the performance of cprintf vs. sprintf, was
missing a couple of includes which were needed for the alarm() and
signal() functions, as well as the SIGALRM constant.

Also, it was using %#x to print the value of a pointer which gcc
complained about when compiling sprintf. This is fixed by changing that
format specifier to %p, the specifier to use when printing pointers.
Apparently either the implicit conversion to an integer value (which %#x
expects) or the size of the type it was converted to weren't good enough
for gcc any more.

Change-Id: I8eca3479bef2c2fa79f8ef4881bb3ff35d7c54ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33897
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agotest: Remove refcnttest from the unittest SConscript.
Gabe Black [Tue, 1 Sep 2020 03:51:06 +0000 (20:51 -0700)]
test: Remove refcnttest from the unittest SConscript.

The test itself was removed, but it was left in the SConscript. If you
tell scons to build everything in that directory, it will try to build
that test and fail.

Change-Id: I1e3923b0de12e891f53dab6f4e6e3e2b6975dc45
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33896
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 years agoarch-gcn3: Added missing header to hsa_driver.cc
Bobby R. Bruce [Mon, 31 Aug 2020 17:53:16 +0000 (10:53 -0700)]
arch-gcn3: Added missing header to hsa_driver.cc

`TypedBufferArg`, used in `src/dev/hsa/hsa_driver.cc` is defined in
`src/sim/syscall_emul_buf.hh` yet was not included. This commit adds
this missing header.

Change-Id: I3239a097eb71b6ebdad045eab6525a888a970f08
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33816
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>