Does VNSRL.WI round?
No. It is a narrowing right shift; use VNCLIP/VNCLIPU when fixed-point rounding and saturation are required.
logical narrowing right shift from 2*SEW source elements to SEW results.
VNSRL.WI logically right-shifts each unsigned 2*SEW-wide source element and writes the shifted value's low SEW bits. Its 5-bit uimm is zero-extended, and only its low lg2(2*SEW) bits select the shift amount.
Starts from OP-V encoding fields, then shows how VNSRL reads unsigned 2*SEW-wide vs2, takes the low lg2(2*SEW) shift-count bits for a logical right shift, and writes the low SEW bits to vd.
Require enabled vector state, valid vtype, and support for source 2*SEW and destination SEW; VL=0 updates no destination elements. Same-start narrow-destination/wide-source overlap is legal and forces mask- and tail-agnostic behavior. Only body elements are shown; no definite inactive or tail values are invented.
The teaching model fixes LMUL=m1, vstart=0, and VLEN=4096, so VLMAX=4096/16=256. Only body elements for selected VL=8 are shown; support for source 2*SEW and destination SEW is assumed. Wide vs2 has EMUL=2 and must start at an even register; .wv vs1 cannot overlap the wide source group. No definite inactive or tail results are shown; legal different-EEW overlap forces agnostic behavior. Steps are teaching stages, not processor cycles.
vnsrl.wi uses OP-V encoding. The animation places fixed fields, register fields, vm, and the uimm field in one encoding strip.
This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, 2*SEW-to-SEW integer logical narrowing right shift, mask control, and vd writeback. It does not model pipelines, caches, or timing.
VNSRL.WI shrinks wide integer results back to SEW width using a logical right shift.
Syntax: vnsrl.wi vd, vs2, uimm[, v0.t]; omit v0.t for vm=1, include it for vm=0. 32-bit OP-V: opcode=1010111, funct6=101100, funct3=011.
vd is the SEW/LMUL narrow destination; vs2 is the 2*SEW/2*LMUL wide source. Logical-right-shift the unsigned wide source, then take low SEW bits, without rounding, saturation, vxrm use or vxsat updates.
uimm is a zero-extended 5-bit immediate in 0–31; .wi can encode only 0–31 even when 2*SEW permits larger counts.
Only low lg2(2*SEW) count bits are used. vd may overlap wide vs2 only at the same lowest register, forcing mask/tail agnostic; .wv vs1 cannot overlap the wide source group. Group starts align to EMUL, EMUL≤8, and both widths must be supported.
Require V 1.0, enabled vector state and valid supported vtype. Active body satisfies vstart≤i<vl with mask enabled; prestart is unchanged and inactive/tail follow vma/vta. vstart≥vl (including vl=0) updates no destination elements. Masked vd cannot contain v0, which cannot supply both mask and data.
Assume enabled V/VS, valid m1, VLEN≥128, supported operand widths, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, v12=[4660,32768,65535,256], uimm=4 → v8=[35,0,255,16]. Logical-right-shift unsigned 16-bit sources by 4, then take low 8 bits. Inactive/tail follow policy without assumed zeroing.
Assume enabled V/VS, valid m1, VLEN≥128, supported operand widths, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, v12=[4660,32768,65535,256], uimm=4 → v8=[35,0,255,16]. Logical-right-shift unsigned 16-bit sources by 4, then take low 8 bits. Inactive/tail follow policy without assumed zeroing.
No. It is a narrowing right shift; use VNCLIP/VNCLIPU when fixed-point rounding and saturation are required.