-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the Zvk* ISA extensions #333
Conversation
This patch includes initial vector support for ACT. It defines a couple of new macros that allow to test vector instructions. Key features: - defines four GPRs that have be reserved - enablement code for vector unit - helper macro to update test signatures - support for all SEW configurations (8, 16, 32, 64 bits) - support for all immediate AVL values (0..31 elements) - If VLENB indicates that a test can't be executed, then it will be skipped - Support for several instruction formats (VV, VVR, VVU, VVV with and without vm bit set) Known limitations: - Vector configuration will be set with vsetivli x0, AVL, eSEW, m1, ta, ma - No tests for invalid configurations (that would trigger exceptions) Signed-off-by: Christoph Müllner <[email protected]>
The tests do look good. However, this PR does not indicate any coverage information. Tests cannot be merged without corresponding coverage reports/support. |
Additionally, I see that the tests in rv32 are also replicated for rv64. If the same assembly file is relevant for both rv32 and rv64 then it should be present only once under the rv32 directory. When a test is applicable for multiple extensions, it is placed under the repository corresponding to the extension which occurs first canonically. |
I'm not sure how you envision coverage reports without vector support in the riscv-ctg repo. Anyway, I've created a PR with initial ctg files for Zvk: riscv-software-src/riscv-ctg#61 |
This patch introduces support for Zvkb: - vandn.[vv,vx] - vbrev8.v - vclmul.[vv,vx] - vclmulh.[vv,vx] - vrev8.v Support for RV32 and RV64 is added, but both versions are identical. Signed-off-by: Christoph Müllner <[email protected]>
This patch introduces support for Zvkg: - vghsh.vv - vgmul.vv Support for RV32 and RV64 is added, but both versions are identical. Signed-off-by: Christoph Müllner <[email protected]>
This patch introduces support for Zvkned: - vaesdf.[vs,vv] - vaesdm.[vs,vv] - vaesef.[vs,vv] - vaesem.[vs,vv] - vaeskf1.vi - vaeskf2.vi - vaesz.vs Support for RV32 and RV64 is added, but both versions are identical. Signed-off-by: Christoph Müllner <[email protected]>
This patch introduces support for Zvknh[a,b]: - vsha2ch.vv - vsha2cl.vv - vsha2ms.vv Support for RV32 and RV64 is added, but both versions are identical. Signed-off-by: Christoph Müllner <[email protected]>
This patch introduces support for Zvksed: - vsm4k.vi - vsm4r.vv - vsm4r.vs Support for RV32 and RV64 is added, but both versions are identical. Signed-off-by: Christoph Müllner <[email protected]>
This patch introduces support for Zvksh - vsm3c.vi - vsm3me.vv Support for RV32 and RV64 is added, but both versions are identical. Signed-off-by: Christoph Müllner <[email protected]>
PR has been updated: the duplicated rv64 tests have been removed. |
Test reports for the following can be found here:
|
The arch-test framework uses tests that are not self -checking; they
compare a reference model resultvwith a DUT's result (DeviceUnderTest).
The official reference model is Sail, but if support is not available
there, you can use Spike (or Imperas's RVOVPSIM, QEMU probably, etc.
…On Wed, Jun 14, 2023 at 3:25 PM Andrew de los Reyes < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In riscv-test-suite/rv32i_m/Zvk/src/vandn.vv-01.S
<#333 (comment)>
:
> +
+RVTEST_V_ENABLE()
+RVTEST_VALBASEUPD(DATA_BASE, dataset_tc1)
+RVTEST_SIGBASE(SIG_BASE, signature_tc1)
+
+// VANDN.VV has the following inputs and outputs:
+// - input VS1: Op1 (to be inverted)
+// - input VS2: Op2
+// - input VM: Mask encoding (<nothing> or v0.t)
+// - output VD: Result
+
+#define VINST vandn.vv
+
+inst_1x8:
+// This test will define v0, which will later be used as mask register
+TEST_CASE_VVV(1, 8, VINST, v0, v0, 0*8, v1, 1*8)
Apologies for what is likely a dumb question here. Is the expected result
of the instruction (vandn.vv in this case) anywhere in the code, or is the
expectation that SAIL and SPIKE will both exhibit identical behavior, so
there is no assert/check needed to check against a golden expected value?
Thanks!
—
Reply to this email directly, view it on GitHub
<#333 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJRHPDMQBQDVNSA5ODLXLI25BANCNFSM6AAAAAAWYIUBUI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Its pre-req PR at CTG (PR#61) has been reviewed, and it is good to go. Tests are also good, happy to merge this one. |
This patch introduces support for the RISC-V Zvk* ISA extensions:
The Zvk* extensions are not frozen yet, but
The implementation follows the version 20230303 of the specification,
which can be found here:
https://github.com/riscv/riscv-crypto/releases/tag/v20230303
There is an updated version available which introduces significant changes (e.g. new instructions),
but public patchset for Binutils, GCC, QEMU, Spike and SAIL only support the spec version, that this
PR supports.
There is zero support for vector instructions in this repository or any related repo (e.g. riscv-ctg).
Therefore, this PR introduces new helper macros in the first commit (inspired by the existing ones).
All tests have been hand-written.
Description
Related Issues
Ratified/Unratified Extensions
List Extensions
Reference Model Used
Mandatory Checklist:
Optional Checklist: