Skip to content

Restore the declared sew64 blocks for the vd,vs2,uimm,vm and vd,vs2,v… - #96

Open
cwssemi wants to merge 1 commit into
chipsalliance:mainfrom
cwssemi:sew64-dimension
Open

cwssemi wants to merge 1 commit into
chipsalliance:mainfrom
cwssemi:sew64-dimension

Conversation

@cwssemi

@cwssemi cwssemi commented Aug 25, 2026

Copy link
Copy Markdown

Restores the sew64 blocks that these two formats' configs already declare.

vd,vs2,uimm,vm truncated the SEW list unconditionally:

sews := iff(vs2Widening, allSEWs[:len(allSEWs)-2], allSEWs[:len(allSEWs)-1])

The -1 on the non-widening arm drops SEW=64 for every member that does not widen. Only .wi widens
vs2 and only vw* widens vd; with neither, SEW=64 is legal and the configs declare values for it.
So vsll.vi, vsra.vi, vssra.vi, vror.vi and the rest were never generated at SEW=64.

vd,vs2,vm computes float and then never consults it:

sews := iff(vdWidening || vdNarrowing, i.floatSEWs()[:len(i.floatSEWs())-1], i.floatSEWs())

so the integer members of the format — vbrev.v, vbrev8.v, vclz.v, vcpop.v, vctz.v,
vrev8.v — get the float SEW list and are never tested at SEW=8, which they declare and which is
legal for them.

19 instructions across the two files. The fix keeps the widening arms exactly as they were and only
restores the non-widening/integer arms.

Why it matters beyond the count

The dropped dimension is not neutral: SEW=64 is where 32-bit-truncation defects live. Running these
configs against a production RVV implementation once the dimension was restored surfaced two
silent-wrong-result defects at SEW=64 that the truncated matrix passes on — one an immediate-decode
defect on vror.vi, one a saturation-bound defect on vsmul.

Fixes #94

…m formats

The SEW list for these two formats was truncated unconditionally, so the sew64
blocks declared in their configs were generated for no instruction that does
not widen. 19 instructions were affected across the two files.

vd,vs2,uimm,vm: only .wi widens vs2 and only vw* widens vd; with neither, SEW=64
is legal and must be tested. The previous unconditional -1 dropped it for the
non-widening forms (vsll.vi, vsra.vi, vssra.vi, vror.vi, ...).

vd,vs2,vm: 'float' was computed but never consulted, so the integer members of
the format (vbrev.v, vbrev8.v, vclz.v, vcpop.v, vctz.v, vrev8.v) were handed the
float SEW list and never tested at SEW=8, which they declare and which is legal.

Fixes chipsalliance#94
@cwssemi
cwssemi marked this pull request as ready for review August 25, 2026 13:57
@cwssemi

cwssemi commented Aug 25, 2026

Copy link
Copy Markdown
Author

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.

Generator silently drops declared sew* blocks — 19 instructions across two files

1 participant