Commit Graph

904 Commits

Author SHA1 Message Date
Bobby R. Bruce
5f40935da2 stdlib: Add 'common.Options' as a banned stdlib module
This commit adds the concept of a "banned module" to the stdlib. This
blocks the user from importing modules from elsewhere in the project
with known incompatibility to the stdlib.

'common.Options' has been added to this as 'common.Options' will import
options to an stdlib run which are not supported.

Issue-on: https://gem5.atlassian.net/browse/GEM5-1282
Change-Id: I8f2b1e24d03fab2872c735342dc8a1ff6528fb5d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63071
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-09-02 20:54:51 +00:00
Bobby R. Bruce
36a1b6a73d stdlib: Only set 'sim_quantum' value of KVM cores included
This commit:
https://gem5-review.googlesource.com/c/public/gem5/+/62471
set `sim_quantum` for any simulation done via the Simulator module.
However, this causes issues when setting exit events at a particular
tick. It resulted in the exit being off by the `sim_quantum` value. This
is required for KVM setups but is undesirable for non-KVM setups. Ergo,
this commit ensures the `sim_quantum` is only set in cases where KVM
cores are included in a simulation.

There are two items of note here:

1. When using the SwitchableProcessor the KVM cores may be switched out
   and therefore not accessable via the `get_cores` method. To get round
   this we check if the processor is a SwitchableProcessor and run an
   additionial check that _any_ of the cores in the SwitchableProcessor
   are KVM. This is a big hacky; the Processor API should be changed to
   make this easier.
2. This only partially fixes the problem of exit events being off given
   a specified tick. This will still occur in the case a
   SwitchableProcessor is used containing KVM cores. E.g., non-KVM cores
   will still be "off" when KVM cores are switched out. This issue will
   be addressed in a later commit.

Change-Id: Id966d76cd1630b6c41c5972fa9423c9e48eafaf6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63051
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-02 20:54:51 +00:00
Bobby R. Bruce
3a1c9ad904 stdlib: Fix 'set_{text/json}_stats_output' in Simulator
These functions were using "os.is_path_exists_or_creatable". This is a
non-existant function. It has been replaced with a simple test to ensure
the specified stats file either exists or is creatable.

Change-Id: I9a1b2c575d18356fdc87c8b1848c09735e0f18e7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62971
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-09-02 18:42:18 +00:00
yiwkd2
411e986a91 stdlib: Add PrivateL1SharedL2CacheHierarchy
This is implemented based on PrivateL1PrivateL2CacheHierarchy

Following modifications are made.

* The associativities of caches are parameterized
* Only single L2bus and L2cache exist
* Connections of L2cache (i.e., l2bus - l2cache, membus - l2cache) are
done out of for loop which is repeated num_cpus times.

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

Change-Id: I1307954ffff4fab2bf5f61e225881b03a352a1e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62655
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-01 03:22:56 +00:00
yiwkd2
a39f68d5fb stdlib: Fix default values in classic caches
By default, caches in classic memory system are assume to be a mostly
inclusive cache with respect to their upstream caches.
Therefore, `writeback_clean` should be `False` by default, which is
consistent with src/mem/cache/Cache.py

Change-Id: I1395690f7f5fafee7fb151906302877ada953861
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62831
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-01 03:22:07 +00:00
Bobby R. Bruce
329a917c71 stdlib: Add Workload to the stdlib
This commit adds the concept of a "Workload" to the stdlib. Workloads
specify the details needed to run a particular gem5 workload on an
stdlib board. These are specified as part of gem5-resources and loaded
via the `Workload` class though can be specified locally via the
`CustomWorkload` class.

Tests are included in this commit to verify the functionality of these
Workloads.

Change-Id: I8840d281eb01ee4138f01ee499cae96bf7e0579d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62532
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-31 02:08:25 +00:00
Bobby R. Bruce
eb1242d96a stdlib: Remove deprecated "artifact" type
Change-Id: I40331242912d330bcd3924587c85211732e93f6f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62531
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-31 02:08:25 +00:00
Ayaz Akram
291be70b1e stdlib: fix HBM2Stack component get_mem_port
This change makes sure that the ruby directory controllers
see the entire address range covered by a single HBMCtrl
(including two pseudo channels/dram interfaces)

Change-Id: I89d01d7bc78e98ee0ef6113dc0c97de6acf2e256
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62873
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-30 09:01:49 +00:00
Ayaz Akram
10c51f0856 stdlib: Add a component for HBM2 stack
This change adds a component for HBM2 stack in the gem5 stdlib.
For HBM2 stack, the atom size is used to interleave across pseudo
channels in a single physical channel or HBMCtrl and the bits
beyond that will be used to interleave across channels/controllers.

Change-Id: I95a279504981a5c000f38c9a6ad0e03484eb258e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61489
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-28 01:20:18 +00:00
Jason Lowe-Power
c3e21ceac4 python: Fix up arrow in interactive shell
Simply by importing the readline module, the up arrow will work in
gem5's interactive shell now.

Change-Id: I41d87adc34253abf5a00ac484da377f9f065a27a
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62671
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-08-27 15:56:59 +00:00
Bobby R. Bruce
c8031233e8 stdlib: Remove setting of 'kvm_vm' from SwitchableProcessor
This stops a `kvm_mv already has parent` warning from happening when
using a SwitchableProcessor.

Change-Id: I495a040e03c33228ceafc99a94b0d0957f4ff6a2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62657
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-26 18:37:48 +00:00
Bobby R. Bruce
50fd37a3b1 stdlib: Fix SwitchableProcessor to allow switch to KVM
An exception was raised if the SwitchableProcessor was setup to
switch to a KVM core from a non-KVM core (i.e., if KVM cores were
present they needed to be the starting core). This was due to a bug in
the Simulator module where the `root.sim_quantum` as not setup for cases
where the SwitchableProcessor was not starting with a KVM core, thus
causing an error when switched to KVM cores.

This has been fixed by modifying the Simulator module to always set
root.sim_quantum. This is acceptable as this is only used in KVM setups.

Change-Id: If57352ba67b7bca81882eae2ef1e9013ef45272f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62471
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-26 18:37:48 +00:00
Bobby R. Bruce
18ab41965c stdlib: Fix incorrect return type in cpu_types and isa
`get_cpu_types_str_set()` and `get_isas_str_set()` return `Set[str]` not
`Set[CPUTypes]`/`Set[ISA]`.

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

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

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

Tests have been added to ensure this works as intended.

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

Change-Id: I33dbaf5015705c299215dc83e8449b16df301cd4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62014
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-26 18:37:48 +00:00
Jason Lowe-Power
b6e0e72d92 stdlib: Improve core names in switchable processor
Currently, when using the switchable processor the first N cores are the
starting cores and the next N cores (e.g., board.processor.core<N+1>)
are the switched in cores. This is confusing when looking at the stats.

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

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

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

I think LPDDR5 should be replaced with HBM.

Change-Id: I87e0beafa79e6e3d9176edaf69b34a38230e9271
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62654
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jiajie Chen <c@jia.je>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-08-25 05:18:49 +00:00
Bobby R. Bruce
2bc5a8b71a misc: Run pre-commit run on all files in repo
The following command was run:

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

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

Change-Id: Ia2fe3529a50ad925d1076a612d60a4280adc40de
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62572
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-24 21:47:07 +00:00
Bobby R. Bruce
d6e422c4dd stdlib: Fix SimpleCore no ISA set use-case
The error was highlighted via this Nightly test failure:
https://jenkins.gem5.org/job/nightly/324

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

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

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

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

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

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

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

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

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

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

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

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

This refactoring makes it so only SimpleCore utilizes this.

Docstrings have been updated to reflect this change.

Change-Id: I918c73310fc530dd060691cf9be65163cacfffb4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62291
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-17 20:31:16 +00:00
Bobby R. Bruce
631e6ced3c stdlib: Add the "GEM5_USE_PROXY" seting for download proxy
This patch allows a user to set the "GEM5_USE_PROXY" environment
variable, in the format of "<host>:<port>", to declare a socks5 proxy
server to use when obtaining gem5 resources and the resources.json
file.

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

Change-Id: I13f50d71fb6e0713f6a280ec9d2f0b3049c27eb6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62391
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-08-16 06:04:50 +00:00
Gabe Black
3b7ac7aa54 stdlib: Fix get_supported_isas.
This was equating the presence of the USE_*_ISA variables with the
support of that ISA, without actually checking that variable's value.

Change-Id: I4a19a694fa808de4d962ae2f5b30d9981b036224
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62200
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-11 02:21:46 +00:00
Bobby R. Bruce
787204c92d python: Apply Black formatter to Python files
The command executed was `black src configs tests util`.

Change-Id: I8dfaa6ab04658fea37618127d6ac19270028d771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47024
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-03 09:10:41 +00:00
Zhantong Qiu
0bcc2e5249 stdlib: Allow set_se_binary_workload to take input parameters
This commit added two paramaters in the set_se_binary_workload to pass
input parameters for the binary.
The "arguments" object allows users to pass in arugments in a list.
The "stdin_file" object allows users to pass in input file as a
Resource.
This commit also created a local variable "binary_path" to save the
return object of "binary.get_local_path()".

Note:
These new parameters were tested and passed in 4 cases:
1. only passing in (Resource/CustomResource) binary
2. passing in (CustomResource) binary and input_file
3. passing in (CustomResource) binary and argument(no input file
 directory included)
4. passing in (CustomResource) binary and argument(with input file
 directory included)

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

Change-Id: I6433a349f7ecb5d630c7cdbe7268ff18915bf23f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61609
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-07-26 20:42:04 +00:00
Joël Porquet-Lupine
011ffb300b python: remove "earlycon" linux option from LupV board
This option doesn't work and triggers a warning by Linux when booting.

To make it work, we need a chosen node containing an `stdout-path`
property in the FDT which currently doesn't exist.

I tried to create via a couple of approaches it but encountered multiple
issues:

1. One can set `stdout-path` to the complete path of the tty device, but
   such path is impossible to get programmatically (unless it's
   hardcoded).
2. One can set `stdout-path` as a reference to a label. While labels are
   possible to generate easily, reference to labels cannot be generated
   with the current FDT library.

So just remove this option for the time being.

Change-Id: I58ad879c0fdf567a812069ae91ebc7d4f8accf13
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61534
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-07-21 23:54:23 +00:00
Joël Porquet-Lupine
e391805d41 python: improve FDT generation in LupV board
Change-Id: Ia28513a844090d12024ae2328f924a9ce6088059
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61533
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-21 23:54:23 +00:00
Joël Porquet-Lupine
d1d7690123 python: update IRQ mapping in LupV board
Match IRQ map of QEMU LupV platform.

Change-Id: I2a17250343032bdebdf92b9a47a3b5f7a9b6b917
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61532
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-07-21 23:48:20 +00:00
Joël Porquet-Lupine
da3feeef09 python: swap memory addresses of lupio-rng and lupio-sys
Match the same memory map as in QEMU LupV platform.

Change-Id: I0319e6de26c308eb1b2f402fafe5337dba44733d
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61531
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-07-21 23:48:13 +00:00
Kaustav Goswami
4b554f6f03 stdlib: se_binary_workload exits on work items by default
This change makes the method se_binary_workload to exit automatically
when work items are encountered during simulation. This makes it
similar to the method set_kernel_disk_workload in terms of work items.

Change-Id: I8a676e3e174fd65930853b1849e3e0be6a643231
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61311
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-07-15 20:55:24 +00:00
Mahyar Samani
152ffb0d43 stdlib: Removing incorrect requires.
This change removes call to requires for checking isa_required
in AbstractProcessor.__init__() and
AbstractGeneratorCore.__init__(). The previous calls would cause
incorrect errors when running generators with any isa other than
NULL.

Change-Id: I303f1e48a7d5649bbe19e0f52ace808225a771c5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61289
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-07-13 22:45:24 +00:00
Gabriel Busnot
43820b0700 misc: Represent Int links as directional edges
Int links are uni-directional in Ruby. This patch make them
unidirectional in the dot representation as well.

Change-Id: I86086d6689bfaa76856b84bf4cac3701d1e5cad9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61010
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-07-11 09:06:22 +00:00
Gabriel Busnot
1f32846874 python: limit tooltip string length to 16384
Pydot limits the maximum line length to this value

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

Change-Id: I0e6423b79f014695496dad279322304ae10a3978
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61009
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-07-11 09:06:22 +00:00
Zhantong Qiu
131f5f033a stdlib: This commit added warning for exit default behavior
This commit imported the warn from m5.util library and added a function
 named "defaultBehaviorWarning" to the exit_event_generators.py file
under src/python/gem5/simulator.

This function takes two string variable and output a warning that
contains a warning about the default behavior, the behavior type,
 and an detail explaination about it.

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

Change-Id: I54500425eaa1a556769aa1f8ea6b32852694c94d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61189
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-07-10 16:54:52 +00:00
Jasjeet Rangi
16af1f0cc0 stdlib: Fix KVM required message typo
Change word "unavaiable" to "unavailable".

When kvm_required is set to True in requires() from gem5.utils.requires
and KVM is not available on the host system, print "KVM is required but
is unavailable on this system" instead of ""KVM is required but is
unavaiable on this system".

Change-Id: I483fb75a6a4781560ae338370ba2714fd8737cc6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61169
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-08 16:03:27 +00:00
Wende Tan
527b91a0e8 configs: Fix timebase-frequency of RISC-V board
Fix the timebase-frequency in the device tree of RISC-V board to make it
consistent with RiscvRTC.

Fixes: 23afee2d9e ("configs: Add RISC-V board to components")
Change-Id: I6fdfba4393ff391185851a036d34bc6ce91eece5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60909
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-02 04:16:07 +00:00
Earl Ou
3a65347e0f python: Avoid re-adding child when cloning SimObject
For SimObject type param, we should avoid duplicated addChild
call if it already belongs to other parent.

In the original implementation, the following code:

```

class A(SimObject):
  ...

class B(SimObject):
  a = Param.A(...)

class Top(RealView):
  a = A()
  b = B(a=a)
```

will generate incorrect warning:

```
warn: <orphan B>.a already has parent not resetting parent.
        Note: a is not a parameter of B
	warn: (Previously declared as <orphan Top>.a)
```

The code tries to add `a` as the child of `Top` as well as child of
`Top.b`, which is incorrect.

Change-Id: I8c55c5dd4cc0dd45c68169a2b08450ff053c07aa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60789
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-06-29 12:40:28 +00:00
Earl Ou
1f32c7ac71 python: use box instead of Mrecord for dot plot
Base on https://graphviz.org/doc/info/shapes.html#record, record shape
has problems with edge between adjacent nodes on the same rank.  This will
produce message "flat edge between adjacent nodes one of which has a record
shape" and dump a huge svg file in gem5's stdout. Also, the edge will
not be plotted in the output svg.

By looking at out dot_writer, we don't really use any record specific
label. As a result, we can simply apply box as the shape to achieve the
same output without the strange error message.

Change-Id: Ibbbcbfbc29edcd64bfeb7ae10adccfb54ea2613a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60749
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: Yu-hsin Wang <yuhsingw@google.com>
2022-06-28 00:21:20 +00:00
Bobby R. Bruce
978558defe misc: Revert "stdlib: Update the resources.json version to v22.0"
This reverts commit 73da4d794c.
https://gem5-review.googlesource.com/c/public/gem5/+/60531

Change-Id: I01c3879b1f96bd92db60195369354f542f3e829e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60636
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-20 19:56:24 +00:00
Bobby R. Bruce
a10073119e misc: Add v22.0.0.1 hotfix
This hotfix fixes a bad import in
src/python/gem5/components/processors/simple_core.py
2022-06-18 03:36:27 -07:00
Bobby R. Bruce
73da4d794c stdlib: Update the resources.json version to v22.0
This is used to ensure the stdlib obtains the resources for v22.0.

Change-Id: Ib38e331dcc96cd2d50922dfeeb7edfee3f19d321
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60531
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-17 05:34:13 +00:00
Bobby R. Bruce
fda4137780 stdlib: Refactor multi-isa stdlib incorporation
The previous version of this requires the user to set the `main-isa` at
runtime, as inplemented via
https://gem5-review.googlesource.com/c/public/gem5/+/55423. In order to
keep this work in-sync with how the multi-protocol approach will work
(see here: https://gem5-review.googlesource.com/c/public/gem5/+/59193),
it's been decided this should be set at compile time. With this we are
keeping the `TARGET_ISA` parameter. If this is set, this is the de
facto "main-isa". The `main-isa` parameter has been removed from the
gem5 command-line.

If the `TARGET_ISA` parameter is not set, but only one ISA is compiled,
then this single ISA is assumed to be the `main-isa` for simulation. If
neither `TARGET_ISA` is set or the binary is compiled to a single ISA,
an exception is thrown when `get_runtime_isa` is called.

At the time of writing this change is moot as the multi-isa work has
yet to be merged into the gem5 develop branch. It exists here:
https://gem5.googlesource.com/public/gem5/+/refs/heads/multi-isa and
will need refactored to work with this patch.

The multi-isa tests have been updated. As we no longer pass the
`main-isa` as a run-time parameter, we remove many tests which validated
this use-case.

Change-Id: If3366212fe1dacbae389efa43d79349deb907537
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59949
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-08 17:24:13 +00:00
Hoa Nguyen
c088af945e stdlib: Add checkpoint to Simulator
This change modifies the Simulator constructor to optionally
take a checkpoint directory as an input so that the m5 can
instantiate from the saved checkpoint.

A new method is also added to the Simulator class. The function
will save the checkpoint to the specified directory.

Change-Id: I58b686b6b4f69260ab45709c6ef0bddf4539f0c4
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58789
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-07 21:18:12 +00:00
Kaustav Goswami
c64f296695 stdlib: AbstractCore calls ArmV8KvmCPU class for aarch64
This change calls the stdlib's correct ArmKvmCPU class (ArmKvmCPU or
ArmV8KVMCPU) depending upon the host machine's architecture when
using KVM cores with ARM ISA.

Change-Id: I2ba8070825503659cd93da15da8507528d7f12ad
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60329
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-06 18:56:06 +00:00
ntampouratzis
f3e9484969 arch-riscv,dev: Add PCI Host to RISCV Board
Add GenericRiscvPciHost to RISCV Board. In addition, we connect the IGbE_e1000
ethernet card to PCI in order to verify the correct functionality.

To be noticed that we build a new Linux kernel v5.10 (with Bootloader) according to these steps (
https://github.com/gem5/gem5-resources/tree/stable/src/riscv-fs) adding the the PCI and e1000 drivers:

CONFIG_PCI_SYSCALL=y
CONFIG_PCI_STUB=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_NET_VENDOR_INTEL=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_IGB=y
CONFIG_NET_VENDOR_I825XX=y

Here you can find the kernel.config and our prebuild kernel to verify the correct behaviour:
https://www.dropbox.com/scl/fo/sz9s37vybpfecbfilxqzz/h?dl=0&rlkey=klkxh33anjqnzwj3sopucqqzx

You can verify it with the following command:
build/RISCV/gem5.fast configs/example/gem5_library/riscv-fs.py

Dear Jason Lowe-Power,

Thank you for your comments! We have addressed all of them.

Best regards,
Nikolaos Tampouratzis

Dear Jason,

I think that it is ok now! :)

Thanks!

Best regards,
Nikolaos Tampouratzis

Change-Id: Id27d84a5588648b82cbfd5c88471927157ae6759
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59969
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-06 18:42:12 +00:00
Kaustav Goswami
c6299cbe8e stdlib: Removed SECURITY from the ArmBoard Script
The ARM Board does not support SECURITY extension at the moment.
This change removes the extension from the config script so that
the board functions properly.

Change-Id: I12a5bdf48803e86739967830204a9eef6057bd36
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60209
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-01 21:59:35 +00:00
Bobby R. Bruce
424b946d16 stdlib: Fix LupvBoard to inherit from AbstractSystemBoard
In this patch:
https://gem5-review.googlesource.com/c/public/gem5/+/58909, the
AbstractBoard was refactored. While all otherboards were updated
correctly, the LupvBoard was not. This caused the nightly tests to
fail: https://jenkins.gem5.org/job/nightly/240

This patch corrects this issue.

Change-Id: Icac39d48358daf4acb2f7077f5d3e8871320812e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60095
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-06-01 17:41:36 +00:00