Webcentive RISC-V Reference

vsha2ch.vv

Vector SHA-2 two rounds of compression, high part

Extension
Zvkn, Zvknha, Zvknhb
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
vsha2ch.vv vd, vs2, vs1
Length
32-bit

Encoding

31262524201915141211760
1011101vs2vs1010vd1110111

Match 0xba002077, mask 0xfe00707f. Source: vsha2ch.vv 31..26=0x2E 25=1 vs2 vs1 14..12=0x2 vd 6..0=0x77 in riscv-opcodes/extensions/rv_zvknha.

FieldBitsriscv-opcodes name
vs224:20vs2
vs119:15vs1
vd11:7vd

Description

Performs two rounds of SHA-2 compression (SHA-256 when SEW=32; SHA-512 when SEW=64, which requires Zvknhb). Two message schedule words from vs1 are processed with the eight words of current state held in vd and vs2 to produce four words of the next state, which are written to vd. vsha2ch.vv uses the two most significant message schedule words of the element group in vs1; vsha2cl.vv is identical except that it uses the two least significant.

Description from riscv-unified-db, reformatted.

Specification and related pages