Feat/zvbb bitmanip#465
Open
micprog wants to merge 3 commits into
Open
Conversation
Introduce the configuration mechanism for the RISC-V vector crypto
extensions ahead of the actual instruction implementations. This adds
the crypto_support_e enumeration to ara_pkg and threads a CryptoSupport
parameter (defaulting to CryptoSupportNone) through the full module
hierarchy: ara_soc -> ara_system -> ara -> {ara_dispatcher, lane ->
vector_fus_stage -> valu -> simd_alu}.
No instructions are implemented yet; subsequent commits enable specific
extensions by adding enum values, helper predicates, and datapath logic
gated on this parameter.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the Zvkb (Vector Cryptography Bit-manipulation) extension, gated behind the CryptoSupportBitmanip configuration. Implements the following instructions in the SIMD ALU, with dispatch for .vv, .vx, and .vi encodings: - vandn.vv/vx: bitwise AND-with-complement - vrol.vv/vx, vror.vv/vx/vi: element-wise rotate left/right - vbrev8.v: bit-reverse within each byte - vrev8.v: byte-reverse within each element (endian swap) Adds a Zvkb() predicate over crypto_support_e, the new ALU op enums, and a riscv-tests suite (zvkb.c) covering all instructions across e8/e16/e32/e64 with masked variants. Enables zvkb in the LLVM and spike ISA strings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the Zvbb (Vector Basic Bit-manipulation) extension on top of Zvkb, gated behind the CryptoSupportBasicBit configuration. Since Zvbb implies Zvkb, the Zvkb() predicate is widened to also match Zvbb. Adds: - vbrev.v: full bit-reverse within each element - vclz.v / vctz.v: count leading / trailing zeros - vcpop.v: population count per element - vwsll.vv/vx/vi: widening shift-left-logical, with per-operand LMUL alignment checks Adds the supporting SIMD ALU helper functions and a riscv-tests suite (zvbb.c) covering all instructions with masking variants. Switches the toolchain and spike ISA strings from zvkb to zvbb (which subsumes it). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add initial scaffold for RISC-V Vector Crypto instructions, add zvkb and zvbb extension support.