Skip to content

Check all vtype bits in vsetvl - #486

Open
flaviens wants to merge 1 commit into
pulp-platform:mainfrom
flaviens:fix/vsetvl-vtype
Open

Check all vtype bits in vsetvl#486
flaviens wants to merge 1 commit into
pulp-platform:mainfrom
flaviens:fix/vsetvl-vtype

Conversation

@flaviens

Copy link
Copy Markdown

vsetvl ignored vtype bits above bit 7. Check the full XLEN value. Set vill for unsupported encodings.

Verification: Verilator elaboration.

@flaviens
flaviens marked this pull request as ready for review August 22, 2026 06:24
Copilot AI lite review requested due to automatic review settings August 22, 2026 06:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes vsetvl vtype decoding/legality by validating the full XLEN-wide vtype encoding instead of only the low 8 bits, and by marking unsupported encodings as illegal via vill.

Changes:

  • Treat any nonzero reserved vtype bits ([XLEN-2:8]) as illegal by folding them into vill during CSR decoding.
  • For vsetvl, consume the full rs2 (XLEN bits) when updating vtype, and explicitly reject vill/illegal combinations when computing the new vl.
  • Document the fix in the changelog.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
hardware/src/ara_dispatcher.sv Validates full-XLEN vtype for vsetvl and forces vill on unsupported encodings.
CHANGELOG.md Notes the vsetvl/vtype validation fix under “Fixed”.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants