Commit Graph

21249 Commits

Author SHA1 Message Date
Jason Lowe-Power
b3870ee7b0 arch-riscv: Fix fence.i instruction in O3 CPU (#816)
arch-riscv: Fix fence.i instruction in O3 CPU
2024-01-30 15:39:32 -08:00
Harshil Patel
d1fca18eb3 tests: Added tests for suites (#676)
Change-Id: I69db8e82e9373d659d125d3bd48a69de12b32390
2024-01-29 10:52:33 -08:00
Bobby R. Bruce
c0100b18cc util: add scripts that help maintain mongoDB (#653) 2024-01-29 10:42:08 -08:00
Harshil Patel
5a7d61d990 misc: move dependabot.yml to .github (#812)
Change-Id: I5c882afd1e15420b8fcdcc14895a77b275aedc4e
2024-01-29 10:07:32 -08:00
Jason Lowe-Power
bb5d55510f arch-riscv: Fix RVV instructions vmsbf/vmsif/vmsof (#814)
This pull request has two commits, one is to fix the segmentation fault,

> arch-riscv: Fix segmentation fault in vmsbf/vmsof/vmsif
    
    This commit simplifies the conditional logic in vmsbf/vmsof/vmsif
    by removing an unnecessary variable and condition.
The updated logic checks 'this->vm' or the result of 'elem_mask(v0, i)'
    directly, which prevents a segmentation fault regardless of
    whether 'vm' is set or not.

another is to fix the incorrect output,

> arch-riscv: Add template Vector1Vs1VdMaskDeclare
    
    This commit adds a new template, Vector1Vs1VdMaskDeclare, to replace
    the use of Vector1Vs1RdMaskDeclare in Vector1Vs1VdMaskFormat.
    
The change addresses the issue with the number of indices in
srcRegIdxArr.
Only two indices are available in Vector1Vs1RdMaskDeclare, but
instructions
    that use Vector1Vs1VdMaskFormat, like 'vmsbf', require three indices
    (for vs1, vs2(old_vd), and vm) to function correctly.
    
Demonstration of incorrect output compared with spike:
[vmsbf](https://github.com/QQeg/rvv_intrinsic_testcases/tree/master/vmsbf)
```
**** REAL SIMULATION ****
src/sim/simulate.cc:199: info: Entering event queue @ 0.  Starting simulation...
Vs1 = 0 0 0 0 0 0 0 0   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   
Vd  = 1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   
Exiting @ tick 23504000 because exiting with last active thread context

 ----SPIKE----
bbl loader
Vs1 = 0 0 0 0 0 0 0 0   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   
Vd  = 1 1 1 1 1 1 1 1   0 0 0 0 0 0 0 0   0 0 0 0 0 0 0 0   0 0 0 0 0 0 0 0
```
2024-01-29 08:28:16 -08:00
Roger Chang
d94ef08a36 arch-riscv: Fix fence.i instruction in O3 CPU
We should clean the instruction buffer after the fence.i is execute
to avoid execute old instruction for self-modifying code

Change-Id: Iece0ee0d10631fcd9bd17ee67cf0c92f72acdbd8
2024-01-29 11:43:27 +08:00
QQeg
08ed87bc9d arch-riscv: Add template Vector1Vs1VdMaskDeclare
This commit adds a new template, Vector1Vs1VdMaskDeclare, to replace
the use of Vector1Vs1RdMaskDeclare in Vector1Vs1VdMaskFormat.

The change addresses the issue with the number of indices in srcRegIdxArr.
Only two indices are available in Vector1Vs1RdMaskDeclare, but instructions
that use Vector1Vs1VdMaskFormat, like 'vmsbf', require three indices
(for vs1, vs2(old_vd), and vm) to function correctly.

Change-Id: I0c966e11289ce07efcc3b0cc56948311289530ad
2024-01-28 09:38:11 +00:00
QQeg
31ffc11c57 arch-riscv: Fix segmentation fault in vmsbf/vmsof/vmsif
This commit simplifies the conditional logic in vmsbf/vmsof/vmsif
by removing an unnecessary variable and condition.
The updated logic checks 'this->vm' or the result of 'elem_mask(v0, i)'
directly, which prevents a segmentation fault regardless of
whether 'vm' is set or not.

Change-Id: I799fa7b684ff98959a64f9694ef9c854f3a1f43a
2024-01-28 09:38:11 +00:00
Giacomo Travaglini
ce32d7c523 arch-arm: Replace CRYPTO extension with canonical names (#810)
These are:

FEAT_AES,
FEAT_PMULL,
FEAT_SHA256,
FEAT_SHA1,
FEAT_CRC32

With this patch we are also enabling them by default by adding them to
the Armv8 release object. Some of them are mandatory anyway since
Armv8.1

Change-Id: I221ae8646d91151fdfaf97a4815168a4fe3d8c5a

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-01-26 19:39:35 +00:00
Ivana Mitrovic
8a6804231c misc: Added dependabot config file (#767)
- Added a yaml file to make dependabot target develop instead of stable.
2024-01-25 19:25:51 -08:00
Matthew Poremba
7f71477f15 dev-amdgpu: Limit SDMA NOP count to wptr boundary (#806)
If the NOP count of an SDMA NOP packet goes beyond the wptr address, the
queue decode method will loop infinitely. If a packet comes in with a
bad count this causes gem5 to hang. This change advances the rptr one
dword at a time until either reaching the NOP count or when rptr == wptr
to prevent this issue.

Change-Id: Ib2c0f74a477bff27890c9c064bb4190e76e513bd
2024-01-25 15:35:35 -08:00
Ivana Mitrovic
235f6bd43f misc: Update .mailmap file (#739)
The .mailmap file is designed to maintain a record of unique
contributors, aiming for a single identifier for each person. What is
included in this file does not impact or alter commits; rather, it just
merges the counts for all commits by one person under a single name.
2024-01-25 12:00:13 -08:00
Ivana Mitrovic
1c0127ae7c base: Fix Integer overflow in AddrRange (#786)
This PR fixes the bug mentioned in #240.
2024-01-25 10:18:29 -08:00
Ivana Mitrovic
24e0d71034 arch-gcn3: Remove gcn3 (#781)
Related to issue #703 , this PR removes GCN3 related files and updates
source code, documentation, and tests to switch over to Vega is that was
not done already. Highlights are:

 - Remove all src/arch/amdgpu/gcn3 files and update Kconfigs.
 - Remove references to GCN3 and replace with Vega where applicable.
- Update the build targets in the gcn-gpu Docker. This will need to be
rebuilt but not urgently.
- Remove the GCN3 tag in testlib. Most tests seem to be using Vega
already, so that commit is small.
2024-01-25 10:14:46 -08:00
Harshil Patel
7cf5c8c840 misc: Added dependabot config file
- Added a yaml file to make dependabot target develop instead of stable.

Change-Id: I5b28c06960c5a346b40e2af8f9284b11d9cc07cd
2024-01-25 08:57:32 -08:00
QQeg
7a96709b11 arch-riscv: Fix vsadd_vi and vsaddu_vi to match v-spec (#805)
This commit fixes the implementation of two instructions, vsadd_vi and
vsaddu_vi, in the OPIVI category
to match the RISC-V vector specification.

According to
[riscv-v-spec](https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#101-vector-arithmetic-instruction-encoding),
the immediate field of these two instructions should be sign extended.

> For integer operations, the scalar can be a 5-bit immediate, imm[4:0],
encoded in the rs1 field. The value is sign-extended to SEW bits, unless
otherwise specified.

There is an example in both
[vsadd](https://github.com/QQeg/rvv_intrinsic_testcases/tree/master/vsadd_vi)
and
[vsaddu](https://github.com/QQeg/rvv_intrinsic_testcases/tree/master/vsaddu_vi).

Change-Id: Ib877627ba01c0868b2103d41613651df488fca13
2024-01-24 17:21:26 -08:00
Yu-Cheng Chang
6dd936e5b5 arch-riscv: Simply implementation of vector multiply and divide instructions (#793)
Align the implementation of scalar multiply and divide instructions

Change-Id: I53297d4c841c41593baaae0ea140bfbbd874a1d9
2024-01-24 13:20:15 -08:00
Matthew Poremba
44c78d843c arch-vega: Implement memory aperture operands (#803)
Vega (gfx900) introduced new memory aperture registers to get the base
address and limit for LDS and private (scratch) memory. These have not
commonly been used by the compiler until ROCm 6. Now that the compiler
is generating reads from these special registers, implement the support
for them.

Tested with LULESH which is using the SHARED_BASE register (LDS) with
ROCm 6.0. This assembly seems to replace S_GETREG_B32 emitted by the
ROCm 5 compiler.

Change-Id: Id2bd26ce8ef687c84a647fa2ac2da54d657913e5
2024-01-24 11:19:43 -08:00
Matthew Poremba
0ac110ac95 dev-amdgpu: Check privledge bit for SDMA RLC queues (#792)
By default all SDMA queues are privileged queues, meaning the addresses
in SDMA packets use the privileged translation tables. RLC queues
(sometimes called user queues) are not necessarily privileged and might
use user translation tables. RLC queues are used more often in ROCm 6.0
exposing an issue with invalid translations with RLC queues.

This changeset checks the priv bit in the SDMA MQD when an RLC queue is
mapped. Each packet type which uses an address then checks the bit
before performing translation. Tested with daily/weekly tests with a
ROCm 6.0 disk image and tests are passing.

Change-Id: I6122fbc194e8d6f5d38e81f1b0e11646d90e0ea0
2024-01-24 07:25:43 -08:00
Matthew Poremba
dfafc5792a arch-vega: Remove deleted instruction.cc from build (#801)
Change-Id: I03073d35a0d36788dfe8309e6ed466d0a496e31e
2024-01-23 18:47:01 -08:00
Harshil Patel
78613e2307 base: Add a check for edge case
- Now check for the condition where the bigger address range wraps but smaller does not.

Change-Id: Icc7a549afaf82a277dc2845255aa1702a1d662e0
2024-01-23 11:35:54 -08:00
Harshil Patel
fea4106414 util: updated resource manager dependencies (#737)
Change-Id: Ia07eed6c2f2e55f1a2cb8da30e75f0b3a2fb3bc3

Co-authored-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2024-01-23 11:09:15 -08:00
Matthew Poremba
4fe6489038 arch-vega: Reorganize inst and misc files (#789)
This PR reorganizes the instructions.cc into multiple files and renames
some files which do not match their corresponding header file names. The
intention is to make iterating on development of these files faster.
2024-01-23 10:06:40 -08:00
Harshil Patel
7372097376 base: fix Integer overflow in AddrRange bug
An issue raised in #240 where if an address range ends
at the last byte of a 64 bit address space, it will be
considered a subset of any other address range that starts
at the first byte of the range.

Change-Id: I517f4717052eda2504de971be0eb59ee9a623dd3
2024-01-22 15:43:11 -08:00
Ivana Mitrovic
f2916e1b2b misc: Merge Weekly GPU tests into Weekly Tests (#647)
This separation was only for convenience while GPU tests were under
development and rapidly changing. This test merges the GPU tests into
the weekly tests where they belong.
2024-01-22 10:53:28 -08:00
Matthew Poremba
a5757e7e01 arch-vega: Rename mismatched source/header files
The files registers.cc, isa.cc, and decoder.cc do not match the header
name. This is a minor cleanup to make development more straightforward.

Change-Id: Ibab18dfe315b0ce84359939b490f8227ea43cac0
2024-01-19 13:32:24 -06:00
Matthew Poremba
cd91c6321f arch-vega: Reorganize instructions to multiple files
The Vega instructions.cc file is 47k lines long which results in both
large compilation times whenever it is modified and long style check
times. This makes iterating over more complex instruction
implementations very time consuming.

This commit moves the instruction definitions to multiple files based on
the instruction encoding (SOP2, VOP2, FLAT, DS, etc.). The resulting
files are much smaller (max is 8k lines) and compilation and style check
times are much more reasonable. Other than moving code around, there are
no functional changes in this commit.

Change-Id: Id4ac8e98ef11a58de5fd328f8a0cd7ce60a11819
2024-01-19 13:32:24 -06:00
Jason Lowe-Power
a555449c12 arch-arm: Fix compile error in kvm (#784)
The addition of std::optional in #732 caused a compile error. This
change fixes the error by checking to see if the value is present and
panicing otherwise.

Change-Id: I46c3fb76eb0e14ba7bede7c336293fbe9add8c84

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-01-19 07:59:59 -08:00
Bobby R. Bruce
5f767d7836 misc: Fixing comment indentation in weekly-tests.yaml
Change-Id: I047ef921703e635b37bacb54cd5b091c2a41b1d3
2024-01-18 15:55:25 -08:00
Yu-Cheng Chang
f56459470a arch-riscv: Refactor the RISC-V multiplication utility (#780)
1. Add the new double width for int64_t and uint64_t
2. Use the wider type to get the upper result of multiplication

Change-Id: Id6cfa6f274c65592b2b3e2b70c00f82954b41f1a
2024-01-18 12:40:11 -08:00
Matthew Poremba
9b89149142 tests,ext: Remove GCN3 tags, update tests to Vega
Change-Id: I782b6e61cd43b51cfbe80161d4dc1cee125f7f64
2024-01-17 11:13:50 -06:00
Matthew Poremba
0f45ae424c util: Remove GCN3 references and target from gcn-gpu docker
Change-Id: I622470588a7e02088a1b9bb3dcfaa677e835e87c
2024-01-17 11:12:36 -06:00
Matthew Poremba
63caa780c2 misc: Remove all references to GCN3
Replace instances of "GCN3" with Vega. Remove gfx801 and gfx803. Rename
FIJI to Vega and Carrizo to Raven.

Using misc since there is not enough room to fit all the tags.

Change-Id: Ibafc939d49a69be9068107a906e878408c7a5891
2024-01-17 11:11:06 -06:00
QQeg
511729ab76 arch-riscv: Fix issue when vl=0 in VectorIntMaskMacroConstructor (#715)
I’ve been working on a fix for the issue #759 where ‘vd’ incorrectly
stores all zeros when ‘vl’ is set to 0 in VectorIntMaskMacroConstructor.
My solution seems to work, but it behaves differently from other macros
when ‘vl’ = 0. Instead of pushing a ‘nop’ to ‘microops’, it pushes a
micro operation that remains ineffective due to ‘vl’ being 0.
2024-01-17 08:45:08 -08:00
Matthew Poremba
57fb083f43 arch-gcn3: Remove all GCN3 files
Change-Id: Ib7d9e8676a31e51a330e68d81099580e2509a90a
2024-01-17 10:44:44 -06:00
Nitish Arya
c2a22b03b4 mem-ruby: fix ruby startup() to reset exit event correctly (#773)
When restoring the simulate_limit_event pointer is not
restored after running the dry simulation run which ends up in
"Panic: event not found!"
In this commit we fix this issue by correctly restoring
the pointer value along with the event queue head

Change-Id: Id5ad4d2a270a6cd34eec1dc5c9b170b2b84610d4

---------

Co-authored-by: narya <nitish.arya@bsc.es>
Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
2024-01-17 08:41:10 -08:00
Matthew Poremba
70376d43a3 arch-vega: Fix upsize cast error in newer compilers (#774)
Newer compilers error on -Warray-length in the recent MI200 patches due
to casting from a 32-bit data type to a 64-bit type. Change it to cast
the 32-bit integer first then 64-bit integer latter to remove the
warning.

Rerun of validation tests on the three instructions passed.

Change-Id: I0309e5f7b5b8cc8ce1651660ddddb120fa6e7666
2024-01-16 09:41:23 -08:00
Matthew Poremba
6a9e80c54c gpu-compute: Support for MI200 GPU model (#733) 2024-01-15 08:18:34 -08:00
Hoa Nguyen
85eb99388a arch-riscv: Remove the check of bit 63 of the physical address (#756)
Currently, the TLB enforces that the bit 63 of a physical address to be
zero. This check stems from the riscv-tests that checks for the bit 63
of a physical address [1]. This is due to the fact that the ISA
implicitly says that the physical address must be zero-extended on the
most significant bits that are not translated [2]. More details on this
issue is here [3].

The check for bit 63 of a physical address in the TLB is rather too
specific, and I believe the check of invalid physical address is alread
implemented in PMA. Thus, this change proposes to remove this check from
RISC-V TLB.

[1]
bd0a19c136/isa/rv64mi/access.S (L18)
[2] https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/8kO7X0y4ubo
[3] https://github.com/gem5/gem5/issues/238

Change-Id: I247e4d4c75c1ef49a16882c431095f6e83f30383

Signed-off-by: Hoa Nguyen <hn@hnpl.org>
2024-01-12 15:17:49 -08:00
Arteen Abrishami
e5bdc760e3 mem-ruby: allow comparison of int and Addr in SLICC (#701)
allow easy isolation of specific addresses in coherence protocols.
useful for debugging.

Change-Id: I93e07956b8e29837219d328dacfbd5c6067c1a62
2024-01-12 10:02:29 -08:00
Giacomo Travaglini
7487c13181 configs: Add o3 --cpu choice to the starter_se.py script (#764)
This is matching what we are already doing in the starter_fs.py script

Change-Id: I50239050be9bd151a607ec892f8dd9322b24040b

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-01-12 07:47:51 -08:00
Harshil Patel
77d6442c1a util: Addressed requested changes
Change-Id: I202bb591960b76f74c3fbb95867905b968c3517d
2024-01-10 21:59:21 -08:00
Yu-Cheng Chang
2f24ee570e arch-riscv: Move PMAChecker and PMP to RiscvISA namespace (#691)
The PMAChecker and PMP are only used in the RisvISA and it should be in
the RiscvISA to simply the implementation

Change-Id: I4968e2de4c028cb2dceed977f2173fc8b1efd175
2024-01-10 16:58:13 -08:00
Yu-Cheng Chang
74dd0bb9bb fastmodel: Fix the Fastmodel RemoteGDB initial (#735)
Change-Id: Iec9ef145ccac353b8a41f501dd76bf53288dd478
2024-01-10 16:55:54 -08:00
Matt Sinclair
ab9e61ea03 gpu-compute: WAX dependency detection (#731)
WAX Dependencies would be missed if a RAW Dependency also existed.
2024-01-05 12:57:24 -06:00
Matt Sinclair
dc85d1492c gpu-compute: Added register file cache support (#730)
The RFC is defaulted to a size of 0 which removes it completely. To use
the RFC set the --register-file-cache-size to a non-zero multiple of
two. In addition, rfc_pipe_length may be altered to increase or decrease
RFC latency benefit.
2024-01-05 12:57:06 -06:00
KaiBatley
359ac63280 gpu-compute: Added register file cache support
The RFC is defaulted to a size of 0 which removes it completely. To use
the RFC set the --register-file-cache-size to a non-zero multiple of
two. In addition, rfc_pipe_length may be altrered to increase or
decrease RFC latency benefit.

Change-Id: I6f5bf5b750eb64155fbc8c8343e9feadce5c9f79
2024-01-04 22:43:05 -06:00
Tiago Mück
b652ab8558 mem-ruby: fix missing txnId for prefetch requests (#734)
Internal prefetch message generation at AllocateTBE_PfRequest was
missing the expected txnId value.

Change-Id: I7d1ead24db947a15133f6ec45b27a47c70096682

Signed-off-by: Tiago Mück <tiago.muck@arm.com>
2024-01-04 07:55:11 -08:00
Giacomo Travaglini
5e2e748f3a arch-arm: Handle invalid case for encodeAArch64SysReg (#732)
This patch is amending encodeAArch64SysReg so that it covers the case
where there are no arch numbers available for the misc index passed as
an argument.

This could happen if the register ID is a gem5 pseudo register which is
not associated with any architected op1/op2/crn/crm tuple.

Rather than panicking we return a nullopt.

Change-Id: I7ab70467105ef93c0c78ac4e999c7dc8e5e09925

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-01-04 10:04:40 +00:00
KaiBatley
55fce58c19 gpu-compute: WAX dependency detection
WAX Dependencies would be missed if a RAW Dependency also existed.

Change-Id: I2a9e50b9d0540a30de9c1bf6bb544c7b9654cb29
2024-01-03 22:02:02 -06:00