ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

vzip.vv

T1 riscv simd insn
Vector zip
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zvzip, Zkt-DIT
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZvzip, Zkt-DIT

Summary

Interleaves the elements of source vector register groups vs2 and vs1, each with EMUL=LMUL/2, into destination vd with EMUL=LMUL. For destination element index i, even indices read vs2[i/2] and odd indices read vs1[i/2], producing vd = [vs2[0], vs1[0], vs2[1], vs1[1], ...]. When vl is odd, vs2 supplies one more element than vs1.

Syntax / Encoding

vzip.vv vd, vs2, vs1, vm | 111110xxxxxxxxxxx010xxxxx1010111 (mask=0xfc00707f match=0xf8002057)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV111110xxxxxxxxxxx010xxxxx10101110xfc00707f / 0xf8002057

Operands

NameDescription
vmbits [25]
vs2bits [24:20]
vs1bits [19:15]
vdbits [11:7]

Reference Notes

Interleaves the elements of source vector register groups `vs2` and `vs1`,
each with EMUL=LMUL/2, into destination `vd` with EMUL=LMUL. For destination
element index `i`, even indices read `vs2[i/2]` and odd indices read
`vs1[i/2]`, producing `vd = [vs2[0], vs1[0], vs2[1], vs1[1], ...]`. When
`vl` is odd, `vs2` supplies one more element than `vs1`.

Masking, prestart, body, and tail element handling follow the base
specification, applied to the destination element indices.

An illegal-instruction exception is raised when `2*SEW > LMUL*ELEN`, i.e.
when SEW is too large for a source operand with EMUL=LMUL/2.

A source vector register group may overlap the destination vector register
group only if it is the highest-numbered half of the destination register
group (which requires LMUL>=2), as for widening instructions. Any other
overlapping encoding raises an illegal-instruction exception.