gem5.git
6 years agomem: Add support for handling CMOs in the MSHRs
Nikos Nikoleris [Thu, 22 Sep 2016 12:34:17 +0000 (13:34 +0100)]
mem: Add support for handling CMOs in the MSHRs

To add support for cache maintenance operations (CMOs) in the MSHRs,
this change adds the following functionality:
- If a CMO request hits in the MSHRs, we deferred as we can't
  coalesce it with any other requests.
- When we promote any deferred targets, we promote them in order and
  stop if we encounter a CMO request. If the CMO request is at the
  beginning of the deferred targets list it will be the only promoted
  target.

Change-Id: I10d1f7e16bd6d522d917279c5d408a3f0cee4286
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5050
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for CMOs in the cache
Nikos Nikoleris [Wed, 1 Jun 2016 12:29:04 +0000 (13:29 +0100)]
mem: Add support for CMOs in the cache

This change adds support for maintenance operations (CMOs) in the
cache. The supported memory operations clean and/or invalidate a cache
block as specified by its VA to the specified xbar (PoU, PoC).

A cache maintenance packet visits all memories down to the specified
xbar. Caches need to invalidate their copy if it is an invalidating
CMO. If it is (additionally) a cleaning CMO and a dirty copy exists,
the cache cleans it with a WriteClean request.

Change-Id: Ibf31daa7213925898f3408738b11b1dd76c90b79
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5049
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Promote deferred targets only when the block is valid
Nikos Nikoleris [Thu, 8 Sep 2016 11:02:47 +0000 (12:02 +0100)]
mem: Promote deferred targets only when the block is valid

When a response indicates that there are no other sharers of the
block, the cache can promote its copy of the block to writable and
potential service deferred targets even if the request didn't ask for
a writable copy.

Previously, a response would guarantee the presence of the block in
the cache. A response could either be filling, upgrading or a response
to an invalidation due to a pending whole line write. Responses to
cache maintenance invalidations break this assumption. This change
adds an extra check to make sure that the block was already valid or
that the response is filling before promoting the block.

Change-Id: I6839f683a05d4dad4205c23f365a925b7b05e366
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5048
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for cache maintenance operation requests
Nikos Nikoleris [Thu, 22 Sep 2016 09:18:24 +0000 (10:18 +0100)]
mem: Add support for cache maintenance operation requests

This change adds new packet cmds and request flags for cache
maintenance operations.

1) A cache clean operation writes dirty data in the first memory below
the specified xbar and updates any old copies in the memories above
it.
2) A cache invalidate operation invalidates all copies of the
specified block in the memories above the specified xbar
3) A clean and invalidate operation is a combination of the two
operations above

Change-Id: If45702848bdd568de532cd57cba58499e5e4354c
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5047
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Support for specifying the destination of a WriteClean
Nikos Nikoleris [Thu, 22 Sep 2016 09:07:11 +0000 (10:07 +0100)]
mem: Support for specifying the destination of a WriteClean

Previously, WriteClean packets would always write to the first memory
below unless the memory was unable to allocate in which case it would
be forwarded further below.

This change adds support for specifying the destination of a
WriteClean packet. The cache annotates the request with the specified
destination and marks the packet as write-through upon its
creation. The coherent xbar checks packets for their destination and
resets the write-through flag when necessary e.g., the coherent xbar
that is set as the PoC will reset the write-through flag for packets
to the PoC.

Change-Id: I84b653f5cb6e46e97e09508649a3725d72d94606
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5046
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for WriteClean packets in the memory system
Nikos Nikoleris [Tue, 31 May 2016 17:03:42 +0000 (18:03 +0100)]
mem: Add support for WriteClean packets in the memory system

This change adds support for creating and handling WriteClean
packets. The WriteClean operation is almost identical to a
WritebackDirty with the exception that the cache generating a
WriteClean retains a copy of the block.

Change-Id: I63c8de62919fad0f9547d412f8266aa4292ebecd
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5045
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

6 years agomem: Add a WriteClean command to the packet class
Nikos Nikoleris [Thu, 26 May 2016 08:49:52 +0000 (09:49 +0100)]
mem: Add a WriteClean command to the packet class

A WriteClean packet allows a cache to write a block to a memory below
without evicting its copy. A typical usecase for a WriteClean packet
is a cache clean operation.

Change-Id: If356cb067da5ddf3210c135f41ef0891fb811568
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5044
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem-cache: Add support for checking whether a cache is busy
Nikos Nikoleris [Fri, 29 Sep 2017 14:24:13 +0000 (15:24 +0100)]
mem-cache: Add support for checking whether a cache is busy

This changeset adds support for checking whether the cache is
currently busy and a timing request would be rejected.

Change-Id: I5e37b011b2387b1fa1c9e687b9be545f06ffb5f5
Reviewed-on: https://gem5-review.googlesource.com/5042
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

6 years agomem: Add function to check if the slave can receive a timing req
Nikos Nikoleris [Fri, 29 Sep 2017 14:00:55 +0000 (15:00 +0100)]
mem: Add function to check if the slave can receive a timing req

This changeset adds support for tryTiming, an interface that allows a
master to check if the slave is busy or otherwise if it can accept a
timing request.

Change-Id: Idc7c2337ae9ccf5dec54f308e488660591419a63
Reviewed-on: https://gem5-review.googlesource.com/5041
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Christian Menard <christian.menard@tu-dresden.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add the notion of point of unification in the coherent xbar
Nikos Nikoleris [Tue, 31 May 2016 12:43:50 +0000 (13:43 +0100)]
mem: Add the notion of point of unification in the coherent xbar

The point of unification is the first crossbar at which the
instruction cache, the data cache and the translation table walks of
the core are guaranteed to see the same copy of a memory location.

Change-Id: Ica79b34c8ed4f1a8f2379748e8520a8f8afffa90
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5040
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

6 years agoconfig, mem, hmc: fix HMC test script
Éder F. Zulian [Wed, 22 Nov 2017 16:03:29 +0000 (17:03 +0100)]
config, mem, hmc: fix HMC test script

This patch keeps the logic behind the HMC model implementation untouched.

Additional changes:
- simple hello world script using HMC (SE simulation)

Usage examples:

./build/ARM/gem5.opt configs/example/hmctest.py
./build/ARM/gem5.opt configs/example/hmctest.py --enable-global-monitor --enable-link-monitor --arch=same
./build/ARM/gem5.opt configs/example/hmctest.py --enable-global-monitor --enable-link-monitor --arch=mixed
./build/ARM/gem5.opt configs/example/hmc_hello.py
./build/ARM/gem5.opt configs/example/hmc_hello.py --enable-global-monitor --enable-link-monitor

Change-Id: I64eb6c9abb45376b6ed72722926acddd50765394
Reviewed-on: https://gem5-review.googlesource.com/6061
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agolearning_gem5: Adding code for SimpleCache
Jason Lowe-Power [Fri, 6 Oct 2017 21:54:02 +0000 (14:54 -0700)]
learning_gem5: Adding code for SimpleCache

This is the rest of the code for part 2.

See http://learning.gem5.org/book/part2/simplecache.html

Change-Id: I5db099266a1196914656be3858fdd5fb4f8eab48
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5023
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agolearning_gem5: Adds the simple MemObject code
Jason Lowe-Power [Fri, 6 Oct 2017 21:43:09 +0000 (14:43 -0700)]
learning_gem5: Adds the simple MemObject code

Adding more code from Learning gem5 Part II

See http://learning.gem5.org/book/part2/memoryobject.html

Change-Id: Iaa9480c5cdbe4090364f02e81dc1d0a0ddac392a
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5022
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agolearning_gem5: Add code for hello-goodbye example
Jason Lowe-Power [Fri, 6 Oct 2017 21:27:37 +0000 (14:27 -0700)]
learning_gem5: Add code for hello-goodbye example

Adding more code from Learning gem5 Part II

See http://learning.gem5.org/book/part2/parameters.html

Change-Id: I9fe5655239e011c718c5cf5fd62bebcda66ea966
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5021
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agolearning_gem5: Add code for simple SimObject
Jason Lowe-Power [Fri, 6 Oct 2017 21:26:22 +0000 (14:26 -0700)]
learning_gem5: Add code for simple SimObject

This adds code from Learning gem5 Part II.

See http://learning.gem5.org/book/part2/helloobject.html

Change-Id: Ic2caa07876ca57f937729c27ce29b2cd8bf2380c
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5020
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
6 years agobase: Rework the trie dump function to accept a different ostream.
Gabe Black [Sun, 3 Dec 2017 09:51:53 +0000 (01:51 -0800)]
base: Rework the trie dump function to accept a different ostream.

It might often be useful to write output to cout when dumping a trie,
but sometimes it might be useful to dump ot to something else like a
string stream instead.

Change-Id: Iaa4ae772c902b7dbc753f320d1a7eb5fcd4a3db3
Reviewed-on: https://gem5-review.googlesource.com/6266
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agomisc: Rename misc.(hh|cc) to logging.(hh|cc)
Gabe Black [Fri, 1 Dec 2017 01:36:53 +0000 (17:36 -0800)]
misc: Rename misc.(hh|cc) to logging.(hh|cc)

These files aren't a collection of miscellaneous stuff, they're the
definition of the Logger interface, and a few utility macros for
calling into that interface (panic, warn, etc.).

Change-Id: I84267ac3f45896a83c0ef027f8f19c5e9a5667d1
Reviewed-on: https://gem5-review.googlesource.com/6226
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agomisc: Move the ExitLogger class definition into misc.cc
Gabe Black [Fri, 1 Dec 2017 00:17:06 +0000 (16:17 -0800)]
misc: Move the ExitLogger class definition into misc.cc

This class isn't referred to outside of misc.hh, and isn't necessarily
useful outside of the particular logging setup implemented in misc.cc.
The Logger class itself is different since it provides a generic
interface that can be used with different logging schemes.

Change-Id: Ibae926fea039d9e3d75a43d97348bc4a3c5d555e
Reviewed-on: https://gem5-review.googlesource.com/6225
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Remove trietest's dependence on cprintf.
Gabe Black [Thu, 30 Nov 2017 01:58:59 +0000 (17:58 -0800)]
tests: Remove trietest's dependence on cprintf.

Dumping the structure of the tries being constructed was useful for
debugging when the trie data structure was being developed, but the
output can't be automatically verified easily, and what's considered
correct depends on the specific implementation of the trie itself.

To make some of the earlier tests more meaningful, additional lookups
were added which verified that the correct values were returned when
the nodes of the trie were in particular arrangements.

Change-Id: Ib464ad1804d13fe40882da2190d7bf452da83818
Reviewed-on: https://gem5-review.googlesource.com/6223
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Add a ptr helper function trietest.
Gabe Black [Thu, 30 Nov 2017 01:29:22 +0000 (17:29 -0800)]
tests: Add a ptr helper function trietest.

This function casts an integer constant into a uint32_t * to make the
actual test lines a bit less verbose.

Change-Id: I9307dfd3d5861ddb9c0f6dcf4b28c846004f0a8d
Reviewed-on: https://gem5-review.googlesource.com/6222
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Get rid of the bitvectest unit test.
Gabe Black [Tue, 28 Nov 2017 03:11:53 +0000 (19:11 -0800)]
tests: Get rid of the bitvectest unit test.

This test doesn't really test anything other than the STL vector
implementation.

Change-Id: I1b932640b1be4fb92a44d314d0b51a94a6a324a2
Reviewed-on: https://gem5-review.googlesource.com/6221
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarm: Enable ns registers access in secure mode
Giacomo Travaglini [Thu, 16 Nov 2017 17:44:12 +0000 (17:44 +0000)]
arm: Enable ns registers access in secure mode

Arm security extension introduced register banking between secure and
non-secure mode. This has been removed in armv8 using AArch64 in EL3,
where the decoded register is by default the non-secure version. Using
non-secure register infos(flags) was preventing secure execution to
access the register with the MRC/MCR at EL1.
The patch updates the following banked registers' flags so that their
non-secure version can be accessed in secure mode:

MISCREG_CSSELR, MISCREG_SCTLR, MISCREG_ACTLR, MISCREG_TTBR0,
MISCREG_TTBR1, MISCREG_TTBCR, MISCREG_DACR, MISCREG_DFSR, MISCREG_IFSR,
MISCREG_ADFSR, MISCREG_AIFSR, MISCREG_DFAR, MISCREG_IFAR, MISCREG_PAR,
MISCREG_PRRR, MISCREG_MAIR0, MISCREG_NMRR, MISCREG_MAIR1,
MISCREG_AMAIR0, MISCREG_AMAIR1, MISCREG_VBAR, MISCREG_CONTEXTIDR,
MISCREG_TPIDRURW, MISCREG_TPIDRURO, MISCREG_TPIDRPRW, MISCREG_CNTP_TVAL,
MISCREG_CNTP_CTL, MISCREG_CNTP_CVAL

For those registers the following permission bits have been set:

MISCREG_PRI_S_RD
MISCREG_PRI_S_WR

Change-Id: Ib881c526e75d69e313f8ef66eb78fc704de6bf59
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6201
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-riscv: use sext rather than manual masks
Alec Roelke [Wed, 29 Nov 2017 19:04:11 +0000 (14:04 -0500)]
arch-riscv: use sext rather than manual masks

Replace manual creation of masks for sign extension of immediates with
the sext<N> function.

Change-Id: Ief2df91a25500c64f5bcae0dcd437c1e3bb95e6c
Reviewed-on: https://gem5-review.googlesource.com/6182
Reviewed-by: Alec Roelke <ar4jc@virginia.edu>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Remove spaces around ea_code
Alec Roelke [Wed, 29 Nov 2017 17:12:53 +0000 (12:12 -0500)]
arch-riscv: Remove spaces around ea_code

This patch makes mem.isa conform to style guidelines better by removing
spaces around the "ea_code" argument default value assignment of the
Load format.

Change-Id: I1c62b99de3617a3734b128b00fb421773e021317
Reviewed-on: https://gem5-review.googlesource.com/6181
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Add missing license paragraphs
Alec Roelke [Wed, 29 Nov 2017 19:20:47 +0000 (14:20 -0500)]
arch-riscv: Add missing license paragraphs

Some of the files in earlier patches rearranging instruction definitions
were missing copyright and license information.  This patch adds them.

Change-Id: I2ac4910a415de6032fc0b7d4422904c682e0ad87
Reviewed-on: https://gem5-review.googlesource.com/6183
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agocpu: Don't override ISA if provided by user
Andreas Sandberg [Fri, 24 Nov 2017 18:38:06 +0000 (18:38 +0000)]
cpu: Don't override ISA if provided by user

The BaseCPU.createThreads() method currently overrides the BaseCPU.isa
parameter. This is sometimes undesirable. Change the behavior so that
the default value for the isa parameter is the empty list and teach
createThreads() to only override the ISA if none has been specified.

Change-Id: I2ac5535e55fc57057e294d3c6a93088b33bf7b84
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jack Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Sudhanshu Jha <sudhanshu.jha@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6121
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agocpu-minor: Add missing instruction stats
David Guillen Fandos [Thu, 16 Jun 2016 10:45:11 +0000 (11:45 +0100)]
cpu-minor: Add missing instruction stats

Change-Id: I811b552989caf3601ac65a128dbee6b7bb405d7f
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
[ Updated to use IsVector instruction flag. ]
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5732
Reviewed-by: Gabe Black <gabeblack@google.com>
6 years agoarch-riscv: Remove static parts of AMOs out of ISA
Alec Roelke [Fri, 10 Nov 2017 17:23:43 +0000 (12:23 -0500)]
arch-riscv: Remove static parts of AMOs out of ISA

This patch removes the static parts of the RISC-V atomic memory
instructions out of the ISA generated code and into arch/riscv/insts. It
also makes the LR and SC instructions subclasses of MemInst from
arch/riscv/insts/mem.hh.

Change-Id: I6591f3d171045c4f1b457eb1264bbb7bd62b3e51
Reviewed-on: https://gem5-review.googlesource.com/6025
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Move parts of mem insts out of ISA
Alec Roelke [Tue, 7 Nov 2017 20:19:56 +0000 (15:19 -0500)]
arch-riscv: Move parts of mem insts out of ISA

This patch moves static portions of the memory instructions out of the
ISA generated code and puts them into arch/riscv/insts.  It also
simplifies the definitions of load and store instructions by giving
them a common base class.

Change-Id: Ic6930cbfc6bb02e4b3477521e57b093eac0c8803
Reviewed-on: https://gem5-review.googlesource.com/6024
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Move unknown out of ISA description
Alec Roelke [Tue, 7 Nov 2017 17:11:11 +0000 (12:11 -0500)]
arch-riscv: Move unknown out of ISA description

This patch removes the Unknown instruction type out of the ISA generated
code and puts it into arch/riscv/insts.  Since there isn't any dynamic
behavior to it, all that's left behind is a template for creating a new
Unknown instruction.

Change-Id: If7c3258a24ecadd3e00ab74586e1740e14f028db
Reviewed-on: https://gem5-review.googlesource.com/6023
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Move standard ops out of ISA
Alec Roelke [Tue, 7 Nov 2017 19:15:41 +0000 (14:15 -0500)]
arch-riscv: Move standard ops out of ISA

This patch removes static portions of the standard instruction types
from the generated ISA code and puts them into arch/riscv/insts. Some
dynamically-generated content is left behind for each individual
instruction's implementation. Also, BranchOp is removed due to its
similarity with ImmOp and ImmOp and UImmOp are joined into a single
templated class, ImmOp<T>.

Change-Id: I1bf47c8b8a92a5be74a50909fcc51d8551185a2a
Reviewed-on: https://gem5-review.googlesource.com/6022
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agocpu-o3: Add missing vector stat initializers
Andreas Sandberg [Thu, 23 Nov 2017 14:31:36 +0000 (14:31 +0000)]
cpu-o3: Add missing vector stat initializers

All of the O3 vector stats added by 'arch: ISA parser additions of
vector registers' are currently missing their stat initializers. Add
the missing stat initialization to InstructionQueue::regStats.

Change-Id: Idc4b8e2824120a2542d8a604340a1b41bde6aa28
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6101
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoarch-arm: Add haveEL pseudocode function
Giacomo Travaglini [Mon, 27 Nov 2017 18:10:17 +0000 (18:10 +0000)]
arch-arm: Add haveEL pseudocode function

This patch introduces the ARM pseudocode haveEL function
into gem5.

Change-Id: I0d96070959e8e13773eb7fa9964894ec0ff2cac2
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6162
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Add assertions when extracting an ArmSystem from a TC
Giacomo Travaglini [Mon, 27 Nov 2017 18:17:25 +0000 (18:17 +0000)]
arch-arm: Add assertions when extracting an ArmSystem from a TC

We sometimes need to cast the System pointer stored in a
ThreadContext to an ArmSystem pointer to query global
system setting.
Add an assertion to make sure that the cast resulted in a
valid pointer.

Change-Id: Id382d0c1dceefee8f74d070c205c7b43b83ab215
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6161
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Move the bituniontest to be alongside the bitunion header.
Gabe Black [Tue, 28 Nov 2017 03:04:15 +0000 (19:04 -0800)]
tests: Move the bituniontest to be alongside the bitunion header.

Change-Id: I7c1a49c41672a1108fcf67c5505b0441f90588ef
Reviewed-on: https://gem5-review.googlesource.com/6142
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Build GTests in the directory they're declared.
Gabe Black [Tue, 28 Nov 2017 02:59:27 +0000 (18:59 -0800)]
scons: Build GTests in the directory they're declared.

This will let us move unit tests into the directory of the code they're
testing.

Change-Id: I611582eb00a06a848f3ce7da89f64e42660cb844
Reviewed-on: https://gem5-review.googlesource.com/6141
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Reimplement the bituniontest as a googletest.
Gabe Black [Thu, 23 Nov 2017 02:11:58 +0000 (18:11 -0800)]
tests: Reimplement the bituniontest as a googletest.

The implementation is very similar to the old test structurally, and
should test all the same things.

Change-Id: I58f1559d0943f2494ef06ee1d7ee5314a3852a8c
Reviewed-on: https://gem5-review.googlesource.com/6085
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Add in a new type of unit test called GTest.
Gabe Black [Thu, 23 Nov 2017 02:10:06 +0000 (18:10 -0800)]
scons: Add in a new type of unit test called GTest.

This type of unit test is almost the same as UnitTest, except that
it builds in the googletest library with the appropriate flags, and
it also omits all the gem5 object files by default.

Change-Id: I230db7ede563a73a9da0ebeed44aca389f724465
Reviewed-on: https://gem5-review.googlesource.com/6084
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: scons: Integrate the googletest library into the build.
Gabe Black [Thu, 23 Nov 2017 02:06:14 +0000 (18:06 -0800)]
tests: scons: Integrate the googletest library into the build.

A static library is built using gtest-all.cc and includes the gtest
main function from gtest_main.cc. extra libraries to use when linking
are included in the main environment variable GTEST_LIBS, and extra
CPPFLAGS are in GTEST_CPPFLAGS. The library's path is added to the
library search path, and it's headers to the header search path.

Change-Id: I2bd6f705bd9fac5db9280996f574b168c11ff8ce
Reviewed-on: https://gem5-review.googlesource.com/6083
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Import the googletest library, release version 1.8.0.
Gabe Black [Thu, 23 Nov 2017 02:05:33 +0000 (18:05 -0800)]
tests: Import the googletest library, release version 1.8.0.

Change-Id: Ic6c1391a19238011ff5cc97f513dbdc020dc6144
Reviewed-on: https://gem5-review.googlesource.com/6082
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Minor cleanup of how partial linking is handled in makeEnv.
Gabe Black [Tue, 21 Nov 2017 05:01:59 +0000 (21:01 -0800)]
scons: Minor cleanup of how partial linking is handled in makeEnv.

Git rid of the unused partial_objs variable, and change append to
extend since the result of builders is a list of nodes and not
individual nodes, even if there's only one target.

Change-Id: Ie51225d3ea699eb7da18199ac3bf3e868e3994a6
Reviewed-on: https://gem5-review.googlesource.com/5985
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-riscv: Move static_inst into a directory
Alec Roelke [Tue, 7 Nov 2017 16:45:47 +0000 (11:45 -0500)]
arch-riscv: Move static_inst into a directory

This patch creates an "insts" directory in src/arch/riscv to store
static portions of instruction definitions that aren't part of the code
generated by the ISA description.  It serves as a starting point for
future patches to simplify the ISA description.

Change-Id: I6700522143f6fa6c9b18a30e1fbdc8f80cdc7afa
Reviewed-on: https://gem5-review.googlesource.com/6021
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agotests: Build the input file into the initest unit test.
Gabe Black [Thu, 23 Nov 2017 02:02:13 +0000 (18:02 -0800)]
tests: Build the input file into the initest unit test.

This breaks an external dependency and makes the expected command line
conform to the other unit tests. Also get rid of some ancient tests
which test adding to the ini's contents based on command line
arguments.

This test still needs to be modified so that it actually checks whether
what happened was correct.

Change-Id: I2c9ea9fa79781bceb5cd3d1419870924e8bbd45f
Reviewed-on: https://gem5-review.googlesource.com/6081
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Break make_obj into make_static and make_shared functions.
Gabe Black [Tue, 21 Nov 2017 02:34:11 +0000 (18:34 -0800)]
scons: Break make_obj into make_static and make_shared functions.

The make_obj function took a boolean value which just selected which
of the two lines it in would actually do something. This change breaks
it into two lambdas, make_static and make_shared, which just do
whichever line would have been requested, making the funciton name more
self descriptive and getting rid of the generally unnamed and opaque
boolean argument.

Change-Id: I457e40034b7e7f5a3e7294a8e1f15bbd42e0720e
Reviewed-on: https://gem5-review.googlesource.com/5984
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Remove the extra_deps option from the helper function make_obj.
Gabe Black [Tue, 21 Nov 2017 02:30:41 +0000 (18:30 -0800)]
scons: Remove the extra_deps option from the helper function make_obj.

This had only one use, and made the function more complicated than it
needed to be.

Change-Id: I22147a0c1239b457c577a6a24b423065e539833b
Reviewed-on: https://gem5-review.googlesource.com/5983
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Get rid of a flag which makes Werror optional.
Gabe Black [Tue, 21 Nov 2017 02:26:29 +0000 (18:26 -0800)]
scons: Get rid of a flag which makes Werror optional.

This flag wasn't being used. Also move the Werror code to the
SConstruct now that it's being applied universally.

Change-Id: I18b00d4b41bc1add9271ca299c020c14970a6926
Reviewed-on: https://gem5-review.googlesource.com/5982
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Move some compiler flag setting code to the SConstruct.
Gabe Black [Tue, 21 Nov 2017 02:21:19 +0000 (18:21 -0800)]
scons: Move some compiler flag setting code to the SConstruct.

These settings are invariant, so there's no reason to apply them over
and over again for the child environments used for various build
products.

Change-Id: Icb4053105e4f1c43008f2422ba30c7206b7ff365
Reviewed-on: https://gem5-review.googlesource.com/5981
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Get rid of SourceFile's done function.
Gabe Black [Sun, 19 Nov 2017 05:38:03 +0000 (21:38 -0800)]
scons: Get rid of SourceFile's done function.

This function doesn't seem to be used by anything. A similar one off
mechanism exists for SimObjects which is we might also be able to get
rid of.

Change-Id: I65038c3495fa69cf94042dc78f09876d5e9a557f
Reviewed-on: https://gem5-review.googlesource.com/5841
Maintainer: Gabe Black <gabeblack@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agoscons: Switch from "guards" to "tags" on source files.
Gabe Black [Sun, 19 Nov 2017 04:39:48 +0000 (20:39 -0800)]
scons: Switch from "guards" to "tags" on source files.

Tags are just arbitrary strings which are attached to source files
which mark them as having some property. By default, all source files
have the "gem5 lib" tag added to them which marks them as part of the
gem5 library, the primary component of the gem5 binary but also a
seperable component for use in, for example, system C.

The tags can be completely overridden by setting the "tags" parameter
on Source, etc., functions, and can be augmented by setting "add_tags"
which are tags that will be added, or alternatively additional tags.
It's possible to specify both, in which case the tags will be set to
the union of tags and add_tags. add_tags is supposed to be a way to
add extra tags to the default without actually overriding the default.
Both tags and add_tags can be a list/tuple/etc of tags, or a single
string which will be converted into a set internally.

Other existing tags include:
1. "python" for files that need or are used with python and are
   excluded when the --without-python option is set
2. "main" for the file(s) which implement the gem5 binary's main
   function.
3. The name of a unit test to group its files together.
4. Tags which group source files for partial linking.

By grouping the "tags" into a single parameter instead of taking all
extra parameters as tags, the extra parameters can, in the future, be
passed to the underlying scons environment. Also, the tags are either
present or not. With guards, they could be present and True, present
and False, or not present at all.

Change-Id: I6d0404211a393968df66f7eddfe019897b6573a2
Reviewed-on: https://gem5-review.googlesource.com/5822
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Resurrect initest input file(s).
Gabe Black [Wed, 22 Nov 2017 01:58:41 +0000 (17:58 -0800)]
tests: Resurrect initest input file(s).

Delete the current version of foo.ini which was modified, restore the
previous version, and initest.ini. Preprocess initest.ini which
includes foo.ini, and tidy up the resulting file. This file will
(mostly) get the initest unit test to work. Some other cleanups are
still necessary.

Change-Id: I4e46abc73ac89f88177eec92f572452f63ba8019
Reviewed-on: https://gem5-review.googlesource.com/6041
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Fix the stats unit test.
Gabe Black [Wed, 22 Nov 2017 00:52:48 +0000 (16:52 -0800)]
tests: Fix the stats unit test.

This has been broken since February. The interface for opening
initializing where the stats output should go was changed, but the
test wasn't updated.

Change-Id: I54bd8be15bf870352d5fcfad95ded28d87c7cc5a
Reviewed-on: https://gem5-review.googlesource.com/6001
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Add support for the brk instruction
Andreas Sandberg [Fri, 23 Jun 2017 13:49:56 +0000 (14:49 +0100)]
arch-arm: Add support for the brk instruction

Add support for software breakpoints as signalled by the aarch64 brk
instruction. This introduces a new SoftwareBreakpoint fault.

Change-Id: I93646c3298e09d7f7b0983108ba8937c7331297a
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5721
Reviewed-by: Giacomo Gabrielli <Giacomo.Gabrielli@arm.com>
6 years agoarch-arm: HVC instruction undefined in secure EL1
Giacomo Travaglini [Mon, 20 Nov 2017 17:02:11 +0000 (17:02 +0000)]
arch-arm: HVC instruction undefined in secure EL1

Since EL2 is not available in secure mode, any HVC call from secure mode
should be treated as undefined. This behaviour was implemented in
aarch32 HVC but not in 64 bit version

Change-Id: Ibaa4d8b1e8fe01d2ba3ef07494c09a4d3e7e87b0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5921
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-riscv: Add missing system calls
Alec Roelke [Sat, 28 Oct 2017 16:35:20 +0000 (12:35 -0400)]
arch-riscv: Add missing system calls

This patch adds all system calls present in riscv-gnu-toolchain at
commit hash 65cb174. Many of them do not have implementations in gem5, so
they are just placeholders.

[Remove the variadic macro and replace it with a function that has
default arguments because variadic macros may not be portable across
compilers]
[Remove spaces around default arguments of createSyscall for better
style]
[Switch from using a loose function to using SyscallDesc's new
constructor]

Change-Id: Iff97c689109121b39df423c72d0e79c6366e31b9
Reviewed-on: https://gem5-review.googlesource.com/5322
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agosim-se: Add default to SyscallDesc constructor
Alec Roelke [Tue, 7 Nov 2017 03:04:11 +0000 (22:04 -0500)]
sim-se: Add default to SyscallDesc constructor

This patch adds a default value of unimplementedFunc to SyscallDesc's
constructor's second argument, which makes adding system call
placeholders to SE mode cleaner.

Change-Id: I3e7efb3a887cc52d16d2095d3dd2e2a96fb882fb
Reviewed-on: https://gem5-review.googlesource.com/5501
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

6 years agosparc: Move integer StaticInst base classes out of the ISA desc.
Gabe Black [Tue, 7 Nov 2017 07:30:42 +0000 (23:30 -0800)]
sparc: Move integer StaticInst base classes out of the ISA desc.

Change-Id: I24008c1e2a94ad8dc4cc13739214928eb846a496
Reviewed-on: https://gem5-review.googlesource.com/5483
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Move the mem base classes out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 07:19:56 +0000 (23:19 -0800)]
sparc: Move the mem base classes out of the ISA description.

Change-Id: Ifbeee464e2d7f872e192f065ad3494f52d274596
Reviewed-on: https://gem5-review.googlesource.com/5482
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Move the microop/macroop base classes out of the ISA desc.
Gabe Black [Tue, 7 Nov 2017 07:01:03 +0000 (23:01 -0800)]
sparc: Move the microop/macroop base classes out of the ISA desc.

These were just raw C++ classes.

Change-Id: Id2101400d885c6938efb6b94f2949722cfbb94ae
Reviewed-on: https://gem5-review.googlesource.com/5481
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Return debug faults from unimplemented instructions.
Gabe Black [Tue, 7 Nov 2017 03:25:21 +0000 (19:25 -0800)]
sparc: Return debug faults from unimplemented instructions.

These had been marked as non-speculative so that their execute
functions would only be called if the instruction should really be
executed. Instead, we can return faults which will cause the same
behavior when the instruction is committed and let the instruction
execute as normal.

Change-Id: I39fa5073e93399424144724b99bdc12070e42286
Reviewed-on: https://gem5-review.googlesource.com/5465
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull the unimplemented formats out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 03:14:51 +0000 (19:14 -0800)]
sparc: Pull the unimplemented formats out of the ISA description.

These are simple classes which don't need to be in the ISA description.

Change-Id: Ia0bb45f50c4da2536855efcb3c17c7780b431332
Reviewed-on: https://gem5-review.googlesource.com/5464
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull the "Uknown" StaticInst class out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 02:57:27 +0000 (18:57 -0800)]
sparc: Pull the "Uknown" StaticInst class out of the ISA description.

The only thing the Unknown format does is return an instance of this
class, so there's no reason to have it in the ISA description.

Change-Id: I3f8187b1450a8622a974c030c0cb552b26f6b5f0
Reviewed-on: https://gem5-review.googlesource.com/5463
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull most of the Nop format out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 02:38:32 +0000 (18:38 -0800)]
sparc: Pull most of the Nop format out of the ISA description.

The Nop format mostly just made instructions that inherited from the
Nop base class but with different mnemonics, so there doesn't need
to be very much dynamic content.

Change-Id: I1cf5e25ca8372f9b71f56d49756879c7545c9f6c
Reviewed-on: https://gem5-review.googlesource.com/5462
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull more StaticInst base classes out of the ISA desc.
Gabe Black [Tue, 7 Nov 2017 02:22:38 +0000 (18:22 -0800)]
sparc: Pull more StaticInst base classes out of the ISA desc.

These are for the trap and branch instructions.

Change-Id: Idedab6f3e6c6c954c1f8a36dae52976cf25ad394
Reviewed-on: https://gem5-review.googlesource.com/5461
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull flat static instruction classes out of the ISA.
Gabe Black [Mon, 6 Nov 2017 01:58:56 +0000 (17:58 -0800)]
sparc: Pull flat static instruction classes out of the ISA.

These classes are just used as base classes for other instructions
and don't need to be part of the ISA definition. Pull them into
standard C++ files.

Change-Id: If3e0bd82b1e676f20459bc0293fbda49de66b554
Reviewed-on: https://gem5-review.googlesource.com/5422
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarch-arm: ArmPMU refactor
Jose Marinho [Tue, 26 Sep 2017 13:33:49 +0000 (14:33 +0100)]
arch-arm: ArmPMU refactor

Change the definition of PMU events in order to integrate events not
cannot easily be represented by probe points. The software
increment event is now defined as a special type with its separate
implementation in pmu.cc and pmu.hh.

Change-Id: I43874b9641bf38c54f6ba2c26386542b6a73e282
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5764
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Do not increment PMU cycle event in WFI/WFE
Jose Marinho [Tue, 17 Oct 2017 14:34:56 +0000 (15:34 +0100)]
arch-arm: Do not increment PMU cycle event in WFI/WFE

Change-Id: I09531e9992e045254e5ee989dd11ccabbf84e4ce
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5763
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agocpu, cpu, sim: move Cycle probe update
Jose Marinho [Thu, 20 Jul 2017 13:57:39 +0000 (14:57 +0100)]
cpu, cpu, sim: move Cycle probe update

Move the code responsible for performing the actual probe point notify
into BaseCPU. Use BaseCPU activateContext and suspendContext to keep
track of sleep cycles. Create a probe point (ppActiveCycles) that does
not count cycles where the processor was asleep. Rename ppCycles
to ppAllCycles to reflect its nature.

Change-Id: I1907ddd07d0ff9f2ef22cc9f61f5f46c630c9d66
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5762
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agosim: Fix need to save address space info during serialization.
Austin Harris [Mon, 20 Nov 2017 21:55:40 +0000 (15:55 -0600)]
sim: Fix need to save address space info during serialization.

This fixes a fatal already mapped error in
FuncPageTable::allocate that occurs in some cases
when restoring from a checkpoint.

Change-Id: Ib726a69358118626663e42b7f14889b0d3a98de0
Reported-by: Ruohuang Zheng <zhengruohuang@gmail.com>
Signed-off-by: Austin Harris <austinharris@utexas.edu>
Reviewed-on: https://gem5-review.googlesource.com/5901
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoscons: Build error introduced by site_tools/default.py
Giacomo Travaglini [Tue, 21 Nov 2017 11:08:12 +0000 (11:08 +0000)]
scons: Build error introduced by site_tools/default.py

One of the latest commits affecting the build system introduced a change
in the environment setting: rather than using the ENV dictionary,
environment key-val pairs were saved directly into the class. This
patch reverts that behaviour.

Change-Id: If206ba0a34ac8c35695a493cb90654b7ec81971b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5941
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Fix MCR/MRC disassemble
Giacomo Travaglini [Wed, 15 Nov 2017 15:27:35 +0000 (15:27 +0000)]
arch-arm: Fix MCR/MRC disassemble

This patch is fixing the Aarch32 MCR/MRC disassemble, which was
previously printing unexisting integer registers as source/destination
operands rather than the coprocessor register name

Change-Id: I1937938c43680200cf6c5c9558e835ce2b209adc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5862
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Fix MSR/MRS disassemble
Giacomo Travaglini [Fri, 10 Nov 2017 15:35:26 +0000 (15:35 +0000)]
arch-arm: Fix MSR/MRS disassemble

This patch is fixing the Aarch64 MSR/MRS disassemble, which was
previously printing unexisting integer registers as source/destination
operands rather than the system register name

Change-Id: Iac9d5f2f2fea85abd9a398320ef7aa4844d43c0e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5861
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agocpu-o3: Prevent cpu from suspending if it is already draining
Nikos Nikoleris [Mon, 9 Oct 2017 12:57:49 +0000 (13:57 +0100)]
cpu-o3: Prevent cpu from suspending if it is already draining

Suspending the current thread context while draining due to a quiesce
pseudo instruction (for example a wfi instruction) could deadlock the
cpu and prevent it from successfully draining. This change ensures
that the cpu is not draining before suspending the thread context.

Change-Id: I7c019847f5a870d4bc9ce2b19936bc3dc45e5fd7
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5881
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Ensure counters keep events on checkpoint resume
Jose Marinho [Tue, 17 Oct 2017 15:39:54 +0000 (16:39 +0100)]
arch-arm: Ensure counters keep events on checkpoint resume

Events were not being attached to counters after a checkpoint resume.
By not storing the enable private variable from the stored state the
recreation of the event to counter association is automatically carried.
The enable state is stored in the reg_pmcnten.

Change-Id: I46344df0882a9050c900efb2e8996d64dbfbf297
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5761
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agocpu: Make automatic transition to OFF optional
Jose Marinho [Thu, 19 Oct 2017 17:45:26 +0000 (18:45 +0100)]
cpu: Make automatic transition to OFF optional

Add the power_gating_on_idle option to control whether a core
automatically enters the power gated state. The default behaviour is
to transition to clock gated when idle, but not to power gated. When
this option is set to true, the core automatically transitions to the
power gated state after a configurable latency.

Change-Id: Ida98c7fc532de4140d0e511c25613769b47b3702
Reviewed-on: https://gem5-review.googlesource.com/5741
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agopwr: Adds logic to enter power gating for the cpu model
Anouk Van Laer [Fri, 17 Mar 2017 12:02:00 +0000 (12:02 +0000)]
pwr: Adds logic to enter power gating for the cpu model

If the CPU has been clock gated for a sufficient amount of time
(configurable via pwrGatingLatency), the CPU will go into the OFF
power state.  This does not model hardware, just behaviour.

Change-Id: Ib3681d1ffa6ad25eba60f47b4020325f63472d43
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3969
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agosparc: Pull StaticInst base classes out of the ISA description.
Gabe Black [Sun, 5 Nov 2017 23:41:59 +0000 (15:41 -0800)]
sparc: Pull StaticInst base classes out of the ISA description.

Also, do some minor refactoring to use a BitUnion to pull apart
condition codes, etc.

Change-Id: I0c88878b07a731d0c0fe30f264f53dd795db99ae
Reviewed-on: https://gem5-review.googlesource.com/5421
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agodev: Fix the SPARC and X86 platform devices.
Gabe Black [Fri, 17 Nov 2017 23:24:28 +0000 (15:24 -0800)]
dev: Fix the SPARC and X86 platform devices.

A recent serial device refactoring changed the name of the parameter
that the terminal device gets attached to on the UART. The x86 and
SPARC platform devices didn't get updated though, and were still using
the old name. This change updates those objects.

Reported-by: Kanad Basu <kanad.kut@gmail.com>
Change-Id: I0824a9df8639062d8561420ea9ffea26b8b7e2e9
Reviewed-on: https://gem5-review.googlesource.com/5781
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agotests: Fix compilation of cprinftest.
Gabe Black [Sun, 19 Nov 2017 04:53:51 +0000 (20:53 -0800)]
tests: Fix compilation of cprinftest.

This test has been broken since 70176fecd1ff04 in 2014. The problem was
that the array size in the test was technically not constant because it
was based on an int variable that wasn't declared as const. That
prevented g++ from resolving it as a template parameter. Before the
change mentioned above, the implementation wasn't based on templates.

Change-Id: I6819cf522f9ba4636ac661da368b9bcbae0a813f
Reviewed-on: https://gem5-review.googlesource.com/5821
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agosim: Implement load_addr_mask auto-calculation
Geoffrey Blake [Thu, 12 May 2016 16:47:43 +0000 (11:47 -0500)]
sim: Implement load_addr_mask auto-calculation

Recent Linux kernels for AArch64 have changed their start addresses
but we still want to relocate the kernel to 0x80080000 which
required hacking the load_addr_mask in Realview.py to be 0x7ffffff
from 0xfffffff to mask off the proper number of MSBs to load the
kernel in the desired location.  To avoid having to make this change
in the future again, we auto-calculate  the load_addr_mask if it is
specified as 0x0 in the System sim-object to find the most restrictive
address mask instead of having the configuration specify it.  If the
configuration does specify the address mask, we use it instead of
auto-calculating.

Change-Id: I18aabb5d09945c6e3e3819c9c8036ea24b6c35cf
Signed-off-by: Geoffrey Blake <Geoffrey.Blake@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2323
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agosystem-arm: change system/arm/aarch64_bootloader/boot.S copyright
Jose Marinho [Tue, 13 Jun 2017 08:58:21 +0000 (09:58 +0100)]
system-arm: change system/arm/aarch64_bootloader/boot.S copyright

The aarch64 boot loader was distributed using a BSD license that was
using non-standard formatting. Updated the license to match gem5's
canonical license format and removed the separete LICENSE.txt file.

Change-Id: I660b73ca5ddd922763a2b72051c73d539248ebcf
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5728
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agosim: ScopedMigration does nothing if both eqs are the same
Tiago Muck [Fri, 8 Sep 2017 17:24:42 +0000 (12:24 -0500)]
sim: ScopedMigration does nothing if both eqs are the same

Added a check to avoid unlocking/locking the same event queue. Also,
added an optional parameter to enable the migration to be skipped. This
can be useful to disable the synchronization for certain runtime
conditions.

Change-Id: I4b03b3ffff4f9503153cd41dd8aa78705bf16cc4
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5730
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoutil: Add script to plot DRAM low power sweep
Radhika Jagtap [Wed, 21 Jun 2017 10:17:43 +0000 (11:17 +0100)]
util: Add script to plot DRAM low power sweep

This change adds a script to generate graphs from the stats file
output by the configuration script low_power_sweep.py.

The graphs show stacked bars for time spent and energy consumed
wherein each component of the stacked bar represents a DRAM power
state (Idle, Refresh, Active, Active Power-down, Precharge Power-down
and Self-refresh). The script generates one plot per delay value. It
also generates a pdf (--pdf option) in which the graphs are laid out
such that you can easily compare how the increasing delay and other
swept params affect the resulting energy.

Change-Id: Id80b0947bfde27e11e5505b23a3adb30f793a43f
Reviewed-by: Wendy Elsasser <wendy.elsasser@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5727
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Add tests for DRAM low power modes
Radhika Jagtap [Fri, 16 Dec 2016 16:55:37 +0000 (16:55 +0000)]
tests: Add tests for DRAM low power modes

This patch adds two regression tests that execute the script in the
configs dir for triggering low power mode transitions. A separate
test is required for each page policy because for close-adaptive
page policy the DRAM goes into the Precharge Power-down mode while
for open-adaptive page policy it goes into the Activate Power-down
mode.

Change-Id: Iad61af23f132db046f2857cc3ef64b2bf42cf5e4
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5726
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoconfig: Add low power sweep for DRAM
Radhika Jagtap [Fri, 25 Nov 2016 16:16:17 +0000 (16:16 +0000)]
config: Add low power sweep for DRAM

This change adds a Python script to sweep a few parameters with a
goal to trigger transitions to the low power states of the DRAM
controller.

This script is largely based on the sweep.py but is helpful to study
the impact of inter-transaction delay on the behaviour of the DRAM
in addition to typical sweep params like stride size, bank
utilization and read percent. An idle period is added as the last
traffic generator state to target hitting self-refresh.

Change-Id: I34380afffbf2de9f4e997dfe9fff5e615e077524
Reviewed-by: Wendy Elsasser <wendy.elsasser@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5725
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoext, mem: Pull DRAMPower SHA 90d6290 and rebase
Radhika Jagtap [Mon, 19 Dec 2016 10:32:40 +0000 (10:32 +0000)]
ext, mem: Pull DRAMPower SHA 90d6290 and rebase

This patch syncs the DRAMPower library of gem5 to the
external github (https://github.com/ravenrd/DRAMPower).

The version pulled in is the commit:
90d6290f802c29b3de9e10233ceee22290907ce6
from 30th Oct. 2016.

This change also modifies the DRAM Ctrl interaction with the
DRAMPower, due to changes in the lib API in the above version.

Previously multiple functions were called to prepare the power
lib before calling the function that would calculate the enery. With
the new API, these functions are encompassed inside the function to
calculate the energy and therefore should now be removed from the
DRAM controller.

The other key difference is the introduction of a new function called
calcWindowEnergy which can be useful for any system that wants
to do measurements over intervals. For gem5 DRAM ctrl that means we
now need to accumulate the window energy measurements into the total
stat.

Change-Id: I3570fff2805962e166ff2a1a3217ebf2d5a197fb
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5724
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agopwr: Enable multiple power models per component
David Guillen Fandos [Fri, 1 Jul 2016 16:46:25 +0000 (17:46 +0100)]
pwr: Enable multiple power models per component

This patch allows the user to specify more than one
power model for any given Clocked Object. This is
useful and some times necessary to properly model
components that have multiple power sources (or
subcomponents) but gem5 doesn't model them.

The ideal solution would be to have a DictParam
to replace the VectorParam so each model can have
a name and can be identified in the stats file.

Change-Id: I4080a7054a16b56069c44750a7a9ce4e674cdf9d
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5733
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch, arm: Print value being ignored on DummyISA write
Sean McGoogan [Thu, 2 Feb 2017 20:49:12 +0000 (20:49 +0000)]
arch, arm: Print value being ignored on DummyISA write

When ignoring writes to the Dummy ISA device (DummyISADevice),
additionally print the value being ignored in the diagnostic.

Sometimes it is useful to know exactly what we are dropping ...

Change-Id: I9a01623611f0da0aa12b065fbb2031aa27e2c036
Signed-off-by: Sean McGoogan <Sean.McGoogan@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5731
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agosim: Clocked object debug message updated for clarity
Tiago Muck [Fri, 8 Sep 2017 16:39:01 +0000 (11:39 -0500)]
sim: Clocked object debug message updated for clarity

Change-Id: I5bbf36ef21ac14d9edf68ec6766d33f88e84d308
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5729
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agosim: Add an option to load additional kernel objects
Andreas Sandberg [Tue, 12 Apr 2016 10:34:13 +0000 (05:34 -0500)]
sim: Add an option to load additional kernel objects

There are cases where it is desirable to load a kernel and a set of
additional objects. This can, for example, be useful for testing where
the bootstrap code can be loaded from one object (the kernel) and the
test proper from another.

This changeset adds this functionality by adding a kernel_extras
vector parameter to the System class. Object files in this vector are
loaded in order after the kernel when running in full system mode.

Change-Id: I06f57c6a65a17b02eb4267bed0aa829f21bcfa3b
Reviewed-on: https://gem5-review.googlesource.com/5703
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoarch-arm: Dsb instruction shouldn't flush the pipeline
Giacomo Travaglini [Mon, 23 Oct 2017 09:54:16 +0000 (10:54 +0100)]
arch-arm: Dsb instruction shouldn't flush the pipeline

DSB Instruction shouldn't flush the pipeline, hence the IsSquashAfter
attribute will be removed for either the 32 and 64 bit version.

Change-Id: I98b2b8bc78aa28445ed1a9b5f34645f8d71616ad
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5363
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Writes to DCCMVAC shouldn't flush pipeline
Giacomo Travaglini [Mon, 23 Oct 2017 09:49:38 +0000 (10:49 +0100)]
arch-arm: Writes to DCCMVAC shouldn't flush pipeline

Writes to DCCMVAC (Data Cache line Clean by VA to PoC) system register
shouldn't flush the pipeline as a result of the operation. This addition
was wrongly introduced for supporting self-modifying code. Software
barriers should be used instead.

Change-Id: Idf0c27d2e49ca01be19888ae5523b8f8eaefa7b3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5362
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Removing FlushPipe fault, using SquashAfter
Giacomo Travaglini [Fri, 20 Oct 2017 13:18:00 +0000 (14:18 +0100)]
arch-arm: Removing FlushPipe fault, using SquashAfter

This Patch is removing the FlushPipe ArmFault, which was used for
flushing the pipeline in favour of the general IsSquashAfter StaticInstr
flag. Using a fault was preventing tracers from tracing barriers like
ISB and from adding them to the instruction count

Change-Id: I176e9254eca904694f2f611eb486c55e50ec61ff
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5361
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarm: Add support for armv8 CRC32 instructions
Giacomo Travaglini [Fri, 13 Oct 2017 09:03:14 +0000 (10:03 +0100)]
arm: Add support for armv8 CRC32 instructions

This patch introduces the ARM A32/T32/A64 CRC Instructions, which are
mandatory since ARMv8.1. The UNPREDICTABLE behaviours are implemented as
follows:
1) CRC32(C)X (64 bit) instructions are decoded as Undefined in Aarch32
2) The instructions support predication in Aarch32
3) Using R15(PC) as source/dest operand is permitted in Aarch32

Change-Id: Iaf29b05874e1370c7615da79a07f111ded17b6cc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5521
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoutil: Remove support for hg patches in patch creation script
Andreas Sandberg [Mon, 16 Oct 2017 14:36:41 +0000 (15:36 +0100)]
util: Remove support for hg patches in patch creation script

Simplify the patch creation helper script by removing support for
automatic conversion to Mercurial's patch format. We no longer use
Mercurial as a primary repository, so this support is not likely to be
needed again.

Change-Id: I83f6efb9ccaee9c548b33257a4d6128153750c76
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5162
Reviewed-by: Gabe Black <gabeblack@google.com>
6 years agoutil: Optionally search entire history when listing changes
Andreas Sandberg [Mon, 18 Sep 2017 15:33:53 +0000 (16:33 +0100)]
util: Optionally search entire history when listing changes

The helper script to list changes currently only looks at the changes
between a branch point and two heads. This helps performance, but
sometimes misclassifies changes that exist both in the upstream
branch before the branch point and in a feature branch. Such changes
should normally not exist, but can be the product of an incorrect
rebase.

This change adds an option to the helper script to search the entire
upstream repo history when determining the set of upstream
changes. When this option is provided, the script lists the changes
that exist upstream before the branch point and in the feature branch
as "Incorrectly rebased changes".

Change-Id: I4cb72cea2152c49d0317dc43613be94a0a2de1e5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5161

6 years agocpu, probe: Fix elastic trace register dependency
Radhika Jagtap [Thu, 21 Sep 2017 16:24:09 +0000 (17:24 +0100)]
cpu, probe: Fix elastic trace register dependency

Change-Id: I017852eac183fac3f914fdb96d7e72a56ea9d682
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5121
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoconfig: Fix the "script" SysPath functor.
Gabe Black [Sat, 11 Nov 2017 01:43:07 +0000 (17:43 -0800)]
config: Fix the "script" SysPath functor.

This particular functor looks in the config root, not in the path
specified by M5_ROOT like binary and disk.

Change-Id: Ib007c36934c65ca9f808e995a2e0c71f0b338788
Reviewed-on: https://gem5-review.googlesource.com/5641
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoconfig: Add an Energy param type.
Gabe Black [Fri, 10 Nov 2017 11:37:37 +0000 (03:37 -0800)]
config: Add an Energy param type.

This type expects values in joules (J).

Change-Id: I77a3a4f1c19443f573d5fe7a84d5abd954ce1603
Reviewed-on: https://gem5-review.googlesource.com/5625
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoconfig: Export the "Current" param type from m5.params.
Gabe Black [Fri, 10 Nov 2017 11:39:28 +0000 (03:39 -0800)]
config: Export the "Current" param type from m5.params.

This type was defined, but it was never added to __all__.

Change-Id: I5414829a9562790416f5ceab71af01503d142903
Reviewed-on: https://gem5-review.googlesource.com/5624
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoutil: Add a "toEnergy" function to the convert module.
Gabe Black [Fri, 10 Nov 2017 11:36:57 +0000 (03:36 -0800)]
util: Add a "toEnergy" function to the convert module.

Change-Id: I7299af0e2a6ce9bd2272d6ccb898997336e95e51
Reviewed-on: https://gem5-review.googlesource.com/5623
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>