Commit Graph

12290 Commits

Author SHA1 Message Date
Gabe Black
7901e56206 dev: Drop include of drm/drm.h in kfd_ioctl.h.
I don't have this header on one of the machines I build on, so this is
breaking the build for me. Removing this include seems to make the
build succeed, implying that it's not actually necessary. I looked at
the file it's used in and didn't see anything that looked like it came
from this header file.

Change-Id: If4a29063d6d0d25904183cab78c9713ff1f8daa6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48603
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 21:34:58 +00:00
Gabe Black
2f42e79956 mem: Use the new "debug" namespace, and not "Debug".
The "Debug" namespace is deprecated and has been replaced by "debug".

Change-Id: Ic8e9082361a6717f3b07990dbaa1a66b0926f000
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48647
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 21:32:21 +00:00
Gabe Black
be3e6174d6 fastmodel: Minimally implement reading MiscRegs for the CortexR52.
This currently supports only the CPSR and SPSR currently. The CPSR is
needed to be able to read the PC since that also reads other related
info which ultimately comes from the CPSR. The SPSR is also set up
since it was easy to do at the same time.

Change-Id: I977fde47c81927f4972d4da2e781df306dfa3f4e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46139
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 21:29:06 +00:00
Yu-hsin Wang
4560cf8531 fastmodel: add iris readMem and writeMem function
Iris memory API allows us to access the memory inside the core, for
example the tightly coupled memory (TCM). If we access a memory address
which is not in the CPU, it also fire a request to memory system.

Change-Id: I5925214534a10e3a55b780c3d4ed06e7559aafe0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45268
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 01:07:11 +00:00
Giacomo Travaglini
4ae8db4aa4 arch, arch-arm: Make BaseMMU translate methods virtual
As we are shifting towards making the MMU the main translating
agent, we need to make those methods virtual to let all ISAs
move their TLB::translate* methods to the MMU class

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

Change-Id: I50c84784546e8148230d79efe4bf010d0e36d6ab
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48140
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-26 23:29:46 +00:00
Bobby R. Bruce
c0a3c70304 misc: Merge branch 'release-staging-v21-1' into develop
Change-Id: I6ba57d7f70be70ae43fab396780d18623679a59a
2021-07-26 09:48:25 -07:00
Gabe Black
59496b6136 mem,gpu-compute: Stop using the GEM5_NO_DISCARD macro.
The [[nodiscard]] attribute is now standard, so we can use that
directly.

Change-Id: I57f59935858facb2a15bf4712be4bfd584bf0c7e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48509
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
b17f4c3037 base: Deprecate the GEM5_DEPRECATED macro.
The [[deprecated()]] attribute is now standard, so we don't need to hide
it behind a macro.

Change-Id: Icfa6ad8b75ac64330f50f72fa310e104161bbf9d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48508
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
89529e6261 sim: Use the [[deprecated()]] attribute instead of GEM5_DEPRECATED.
The [[deprecated()]] attribute is now standard c++, so use that
directly.

Change-Id: I246551b05484a707ac9da05dc91af34d78aae1ff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48507
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
5590f2a903 base: Deprecate the GEM5_FALLTHROUGH macro.
The [[fallthrough]] attribute is now standard.

Change-Id: I9ab115f0135256a701efaa9a6c7ba4e966283f4b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48506
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
cb266a099f misc: Replace GEM5_FALLTHROUGH with [[fallthrough]].
Now that the [[fallthrough]] attribute is standard (as of c++-17), we
can use it directly instead of hiding it behind a macro.

Change-Id: I4d11e35b619532b1a3fd8d042265e18c80d86f9b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48505
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Kyle Roarty
523a92f7f0 arch-gcn3: Implement large ds_read/write instructions
This implements the 96 and 128b ds_read/write instructions in a similar
fashion to the 3 and 4 dword flat_load/store instructions.

These instructions are treated as reads/writes of 3 or 4 dwords, instead
of as a single 96b/128b memory transaction, due to the limitations of
the VecOperand class used in the amdgpu code.

In order to handle treating the memory transaction as multiple dwords,
the patch also adds in new initMemRead/initMemWrite functions for ds
instructions. These are similar to the functions used in flat
instructions for the same purpose.

Change-Id: I0f2ba3cb7cf040abb876e6eae55a6d38149ee960
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48342
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alex Dutu <alexandru.dutu@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-07-24 17:27:02 +00:00
Kyle Roarty
1415308d10 mem-ruby: Account for misaligned accesses in GPUCoalescer
Previously, we assumed that the maximum number of requests that would be
issued by an instruction was equal to the number of threads that were
active for that instruction.

However, if a thread has an access that crosses a cache line, that
thread has a misaligned access, and needs to request both cache lines.

This patch takes that into account by checking the status vector for
each thread in that instruction to determine the number of requests.

Change-Id: I1994962c46d504b48654dbd22bcd786c9f382fd9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48341
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-07-24 17:27:02 +00:00
Kyle Roarty
f8578e4b05 gpu-compute: Fix TLB coalescer starvation
Currently, we are storing coalesced accesses in
an std::unordered_map indexed by a tick index, i.e.
issue tick / coalescing window. If there are
multiple coalesced requests, at different tick
indexes, to the same virtual address, then the
TLB coalescer will issue just the first one.

However, std::unordered_map is not a sorted
container and we issue coalesced requests by iterating
through such container. This means that the coalesced
request sent in TLBCoalescer::processProbeTLBEvent is
not necessarly the oldest one. Because of this, in
cases of high contention the oldest coalesced request
will have a huge TLB access latency.

To fix this issue, we will use an std::map which is
a sorted container and therefore guarantees the
oldest coalesced request will be sent first.

Change-Id: I9c7ab32c038d5e60f6b55236266a27b0cae8bfb0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48340
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 17:27:02 +00:00
Gabe Black
5412b20b47 base: Use if constexpr to simplify the reverseBits function.
Handle the sizeof(T) == 1 special case within the function using if
constexpr, instead of having two functions.

Change-Id: Idce63e18c77d2f7cc59d86c19f42d57ccdbefe5c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48504
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 11:35:00 +00:00
Gabe Black
0f2fb7bbb4 base: Use if constexpr to simplify the templates in __to_number.
The c++-17 feature "if constexpr" allows you to put code inside a normal
if which would normally have to be separated out using templates. The
condition of the if must be compile time evaluated, and the not-taken
path is discarded by the compiler.

Change-Id: I026381b2dbb140ef7f1b5cb23803782683ec419c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48503
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 11:35:00 +00:00
Gabe Black
faae3f0be9 cpu: Remove unnecessary includes of arch/locked_mem.hh.
Change-Id: I85769ea286e5ecc77ac7d7db1b09cb4b87129cd4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48383
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-07-23 10:41:21 +00:00
Gabe Black
02f47187ab python: Minor cleanups in the marshal program source.
Fix some minor style issues, use a "raw" string constant to make the
marshal script more readable, get rid of a redundant \n in the help
text, and make argv const.

Change-Id: I1dc3181a67b50286e3a0b833bb7251b7efd01978
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48382
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-07-23 09:43:09 +00:00
Gabe Black
7daeed83f7 cpu,fastmodel: Eliminate the now unnecessary initMemProxies method.
The proxies this method initializes no longer exist, since they're now
created locally.

Change-Id: I5fd1c99fbc00f5057ea8868e91be02d577b1c176
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45909
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-23 08:59:54 +00:00
Gabe Black
a6e023906e fastmodel,cpu: Eliminate the unused getVirtProxy.
Change-Id: I84683a3297143102a74ac6dfe744cd5804b83fe4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45908
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-23 08:59:36 +00:00
Gabe Black
83b14e569b misc: Stop using getVirtProxy.
The proxies are not used on the critical path, and it's usually implicit
whether they should be the FS or SE version.

Ideally in the future we won't need to worry about which version we need
to use, but the differences haven't quite been abstracted away, and
occasionally we need to decide between the two.

Change-Id: Idb363d6ddc681f7c1ad5e7aba69865f40aa30dc8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45907
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2021-07-23 03:42:17 +00:00
Gabe Black
94e00fa905 base: Fix base/cprintftime.cc.
The compiler is unhappy that one of the parameters in a call to sprintf
is also the buffer it's supposed to output to, when that parameter is
marked "restrict", which means it shouldn't alias to other arguments.

Also, this code can't go inside the gem5 namespace, since it has a
main() function in it. The linker will look for main(), not
gem5::main().

Change-Id: Ib17c601aefdc3e7201eba021dafb1c51204d54bc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48423
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-22 20:45:18 +00:00
Gabe Black
b2067870e5 sim: Use a range based for loop in EmbeddedPython::initAll.
Change-Id: I380bed880735a411c6069079b4ae38a9d9080744
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48366
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-22 12:03:09 +00:00
Gabe Black
21c1d03dda arch-x86: De-conditionalize segmentation microops.
These were never used with conditions, so the condition check just added
overhead. Also, the not-taken path through the instruction didn't
actually set the destination to something, meaning that it would set it
to something arbitrary and not actually leave it unmodified.

Change-Id: I33fef088979b14ad74adf22b26419a1cacf386dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45305
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-07-21 09:45:32 +00:00
Giacomo Travaglini
a10106e94a arch-arm: Stage1&2 TableWalkers sharing same port
This patch reverts part of the changes made by the removal of
the Stage2MMU class [1]:

Prior to that patch the stage1 and stage2 walkers were sharing
the same port (which was instantiated in the Stage2MMU).
By removing the Stage2MMU we provided every table walker a
unique port.

With this patch we are reintroducing port sharing to temporarily fix
existing platforms using walker caches.
(The long term design goal will be to have a unique page table walker)

Those complain if we try to connect a single ported cache to 2 table
walker ports (stage1 and stage2)

[1]: https://gem5-review.googlesource.com/c/public/gem5/+/45780

Change-Id: Ib68ef97f1e9772a698771269c9a4ec4514f5d4d7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48200
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-19 13:27:11 +00:00
Hoa Nguyen
a021618745 arch-riscv: Revert change-45522
This reverts change:
https://gem5-review.googlesource.com/c/public/gem5/+/45522.

This reverts commit 1cf41d4c54.

Reason for revert:

The above commit caused booting Linux using RISCV either to
hang or to take significantly time more than to finish.

For the v21-1 release, the above commit will be reverted.

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

Change-Id: I58fbe96d7ea50031eba40ff49dabdef971faf6ff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48099
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-16 20:50:47 +00:00
Hoa Nguyen
ccd03cf704 cpu: remove O3 dependency of CheckerCPU
Currently, compiling CheckerCPU uses the dyn_inst.hh header from
O3CPU. However, including this header is not required and it
causes gem5 failed to build when O3CPU is not part of CPU_MODELS.

This change also involves moving the the dependency on
src/cpu/o3/dyn_inst.hh to src/cpu/o3/cpu.cc and src/cpu/lsq_unit.cc,
which previously includes src/cpu/o3/dyn_inst.hh implicitly through
src/cpu/checker/cpu.hh.

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

Change-Id: I7664cd4b9591bf0a4635338fff576cb5f5cbfa10
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48079
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-15 06:01:48 +00:00
Kyle Roarty
fb4a7e1e24 gpu-compute: Fix off-by-one when creating an AddrRange
The end value of an AddrRange is already not included in the range,
so subtracting one from the end creates an off-by-one error.

This patch removes the extra -1 that was used when determining the
end of an AddrRange in allocateGpuVma

Change-Id: I75659e9a7fabd991bb37be9aa40f8e409eb21154
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48020
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-14 20:47:27 +00:00
Kyle Roarty
46e62e5eb3 arch-gcn3: Free dest registers in non-memory Load DS insts
Certain DS insts are classfied as Loads, but don't actually go through
the memory pipeline. However, any instruction classified as a load
marks its destination registers as free in the memory pipeline.

Because these instructions didn't use the memory pipeline, they
never freed their destination registers, which led to a deadlock.

This patch explicitly calls the function used to free the destination
registers in the execute() method of those Load instructions that
don't use the memory pipeline.

Change-Id: Ic2ac2e232c8fbad63d0c62c1862f2bdaeaba4edf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48019
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-14 20:47:27 +00:00
Javier Garcia Hernandez
4754e32219 arch-arm: Fixes an error related to HTM error code handling
Arguments of the function bits(), called in restore method,
are the other way around.

This leads to wrong retry handling.

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

Change-Id: I0748b1cad57bea5527ca585852d183bd75b4c9ef
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47939
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-14 17:21:37 +00:00
Bobby R. Bruce
eb919229e6 Merge "misc: Merge branch release-staging-v21-1 into develop" into develop 2021-07-13 16:47:42 +00:00
Kyle Roarty
5820818c11 arch-vega: Add fatal when decoding missing insts
Certain instructions don't have implementations in instructions.cc,
and get decoded as a nullptr.

This adds a fatal when decoding a missing instruction, as we aren't
able to properly run a program if all its instructions aren't
implemented, and it allows us to figure out which instruction is
missing due to fatals printing the line they were called.

Change-Id: I7e3690f079b790dceee102063773d5fbbc8619f1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47522
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-13 01:26:39 +00:00
Bobby R. Bruce
b2677990f6 gpu-compute: Add missing overrides
These missing overrides were causing compilations errors with the Clang
11 compiler:
https://www.mail-archive.com/gem5-dev@gem5.org/msg39683.html

Change-Id: Ib5e7096ab9a7a8505bcc848ff3f08674f7f289ce
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47899
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-13 00:16:51 +00:00
Bobby R. Bruce
b9df038ca8 systemc,tests,python: Updated testall.py to python3
Change-Id: I95fce9d71bf0af9cd76e8bf0dd353281cff8ed74
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47022
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
(cherry picked from commit f9a941524f)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47919
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-07-12 23:31:54 +00:00
Bobby R. Bruce
f9a941524f systemc,tests,python: Updated testall.py to python3
Change-Id: I95fce9d71bf0af9cd76e8bf0dd353281cff8ed74
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47022
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-12 18:17:28 +00:00
Nikos Nikoleris
264ee10991 cpu-minor: Substitute calls to functions removed in c++-17
Change-Id: Ib15234b37e577afd7ff186f1ba7cc5896aea1430
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47799
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-10 21:07:23 +00:00
Nikos Nikoleris
d63c30df97 base: Make the random number generator public
There are cases where we need a random number generator engine. The
Random class has such an engine but its interface currently only
allows for generating random numbers. To make sure we can reuse the
same random number generator in as many places as possible this patch
makes the engine in the Random class public.

Change-Id: I80153dd39f5b0d12537e4c0cf54773e7725b2a94
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47859
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-10 21:07:23 +00:00
Kyle Roarty
e2e18d41e1 configs,gpu-compute: Add support for gfx902/Raven
This patch adds support for a gfx902 Vega APU, ripping the
appropriate values for device_id from the ROCm Thunk
(src/topology.c).

Note: gfx902 isn't officially supported by ROCm. This
means that it may not work for all programs. In particular,
rocBLAS is incompatible with gfx902, so anything that uses
rocBLAS won't be able to run with gfx902.

Change-Id: I48893e7cc9c7e52275fdfd22314f371a9db8e90a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47530
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-10 03:42:03 +00:00
Matthew Poremba
897c0c11ed dev,dev-hsa,gpu-compute: Refactor dmaVirt calls
Remove the duplicate dmaVirt calls from HSA packet processor and GPU
command processor and move them into their own class. This removes some
duplicate code and allows a DmaVirtDevice to be created which will be
useful for upcoming full system GPU commits.

The DmaVirtDevice is an abstraction of the base DmaDevice but iterates
using ChunkGenerator over virtual addresses. Classes which inherit from
DmaVirtDevice must provide a translation function to translate from
virtual address to physical address. Once translated, the physical
address is passed to DmaDevice to do the work.

Change-Id: Idd59ccb4d9ba21c0b1150ee328ededf5a88d824e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47179
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 22:40:18 +00:00
Nathanael Premillieu
5c7e1bd917 mem-cache: adding late prefetch stats
Adding a late prefetch stat plus stats for each reason a prefetch can be
detected as late

Change-Id: Ia6d5294e8ce58b2b0aae2be98fd0cee83be73b8d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47204
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
0339f34b87 mem-cache: count pf filtered by demand to the same cache line
Add a stat to count how many prefetch request are filtered in the
prefetch queue becasue a demand is going to the same cache line
Also adding a corresponding debug statement for when it happens

Change-Id: I52475f19bd109c135b7259d08d5f5c0b5fd90ee5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47203
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
de80da9204 mem-cache: show in DPPRINTF if block is prefetched
Add the prefetch status in the DPRINTF showing the
state of a cache block.

Change-Id: Ib8edf882dc17414f751cc8773d9035ee2887e971
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47202
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
b193c0adfd mem-cache: add option to send pf on hit on pf
From the point of view of the prefetchers, a hit on a prefetched block
should be considered the same as a miss: a new prefetch should be
generated.

Change-Id: If865324502b81cfd3ae8c009666d3f498092b90f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47201
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
352ae672e2 mem-cache: accuracy and coverage stat for prefetchers
Add an accuracy and coverage stat for the prefetchers.
Accuracy is defined as the ratio of the number of prefetch
request that have been counted as useful over the number
of prefetch request issued.
Accuracy tells whether the prefetcher is producing useful
requests or not.
Coverage is defined as the ratio of of the number of prefetch
request that have been counted as useful over the number of
demand misses if there was no prefetch, which is counted as
the number of useful prefetch request plus the remaining
demand misses. Due to the way stats are defined in the cache,
I have to add a stat to count the number of remaining demand
misses directly in the prefetcher stat. Demand is defined
as being one of this request type: ReadReq, WriteReq,
WriteLineReq, ReadExReq, ReadCleanReq, ReadSharedReq.
Coverage tells what part of misses are covered by the prefetcher.

Change-Id: I3bb8838f87b42665fdd782889f6ba56ca2a802fc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47603
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
c66f32f24e mem-cache: add a prefetch useful stat
Count how many time a prefetch is useful, meaning
a hit has happened on a prefetched cache block.
Another stat (pfUsefulButMiss) has been added to count
the special case where there is a hit on prefetched block
but it is counted as a miss because the block is not in
the requested coherency state.

Change-Id: I253216b9ac96d5f21139b710c489d6eb3fce7136
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47602
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
f691613876 mem-cache: print when hitting on a prefetched line
Only print it on the first it on a prefetched line
(as the prefetched flag is removed after the first hit)
This is useful when debugging prefetchers.

Change-Id: Id67cc957c7366a244bedad93824a3c4fdf2055b5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47601
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
cf0881433b mem-cache: add pfIssued stat in MultiPrefetcher
Count issued prefetches for each prefetchter in a MultiPrefetcher

Change-Id: If03fb0669af9bb92ce9cf210b6201a9719a7c771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47600
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
85a8dbf761 mem-cache: move unusedPrefetches stat to prefetcher
This stat belongs to prefetchers.
It has been renamed to pfUnused to match the naming of
exisiting prefetcher stats.

Change-Id: Iec350a62da544535dfc0c2527fcdf73217ae4db7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47599
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 22:30:45 +00:00
Nathanael Premillieu
f3e7d02150 mem-cache: print prefetch queues in Queued prefetcher
Added to track the content of the prefetch queues in the debug output

Change-Id: I49d0f4f643ec0dbd7af3087b6267d454cfccddba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47199
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 22:30:45 +00:00
Kyle Roarty
1812041dc0 gpu-compute: Update GET_PROCESS_APERTURES IOCTLs
The apertures for non-gfx801 GPUs are set differently.
If the apertures aren't set properly, ROCm will error out.

This change sets the apertures appropriately based on the
gfx version of the simulated GPU. It also adds in new
functions to set the scratch and lds apertures in GFX9 to mimic
the linux kernel.

Change-Id: I1fa6f60bc20c7b6eb3896057841d96846460a9f8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47529
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-09 16:22:07 +00:00