zip Bit interleave This instruction scatters all of the odd and even bits of a source word into the high and low halves of a destination word. It is the inverse of the unzip instruction. This instruction is available only on RV32. Assembly format zip rd, rs1 Decode Variables Bits<5> rs1 = $encoding[19:15]; Bits<5> rd = $encoding[11:7]; Execution IDL Sail XReg input = X[rs1]; XReg output = 0; for (U32 i = 0; i < (xlen() / 2 - 1); i = i + 1) { output[2 * i] = input[i]; output[2 * i + 1] = input[i + xlen() / 2]; } X[rd] = output; foreach (i from 0 to xlen/2-1) { X(rd)[2*i] = X(rs1)[i]; X(rd)[2*i+1] = X(rs1)[i+xlen/2]; } Encoding Defining extension Zbkb, version >= Zbkb@1.0.0 Access M HS U VS VU Always Always Always Always Always Containing profiles Mandatory: Optional: RVA22S64, RVA22U64, RVA23M64, RVA23S64, RVB23M64, RVB23S64, RVB23U64