Home/Instructions/VFWCVTBF16-F-F-V
VFWCVTBF16.F.F.V

RISC-V VFWCVTBF16.F.F.V Instruction Details

Instruction ManualR-type

Exactly widen BF16 vector sources to FP32.

Instruction Syntax

vfwcvtbf16.f.f.v vd, vs2, vm
Operand Breakdown
vd: destination vector register group.
vs2/vs1 or scalar source: selected by suffixes such as .vv, .vx, .vi, or .vf.
vm: when present, vm=0 uses v0 as the execution mask and vm=1 is unmasked.
ZvfbfminVector Operations

Instruction Behavior

VFWCVTBF16.F.F.V, with SEW=16, exactly widens 16-bit BF16 source elements from vs2 to 32-bit FP32 results in vd. For normal values and infinities, the BF16 encoding is shifted left by 16 and the low 16 FP32 bits are zero-filled; it belongs to Zvfbfmin.

VFWCVTBF16.F.F.V Decode And Execute Animation

Decode the OP-V encoding and execute vector BF16 widening conversion: each active lane exactly widens BF16 to FP32.

Step 1 / 15
Read OP-V encoding fields

V-extension FP instructions use the OP-V major opcode, with funct6, source registers, vm, funct3, vd, and opcode fields.

Instruction input
vfwcvtbf16.f.f.v
Execution context
frm
RNE
demo dynamic rounding mode
dest EEW
32
destination element width
vta/vma
ta, ma
tail/inactive policy
opcode
1010111
OP-V major opcode
vs1
01101
VFUNARY0 conversion selector
Encoding fields
0x48869257
31..26
25
24..20
19..15
14..12
11..7
6..0
010010
funct6
0
vm
01000
vs2
01101
vs1/sel
001
funct3
00100
vd
1010111
OP-V
Lane results
Long vectors scroll inside this module without page overflow.
i=0active
fp32(0x3fc0)
1.5 / 0x3fc00000
i=1active
fp32(0xc010)
-2.25 / 0xc0100000
i=2skip
v0.t=0, not executed
--
i=3active
fp32(0xc0c0)
-6 / 0xc0c00000
i=4active
fp32(0x4100)
8 / 0x41000000
i=5active
fp32(0xc120)
-10 / 0xc1200000
i=6skip
v0.t=0, not executed
--
i=7active
fp32(0xc1a0)
-20 / 0xc1a00000
SEW=16, source EEW=16 / BF16 -> destination EEW=32 / FP32. BF16-to-FP32 is an exact widening conversion; for normal numbers and infinity, the BF16 encoding is shifted left by 16 and the low 16 bits are zero-filled.

Quick Understanding & Search Notes

This is the RVV BF16 BF16-to-FP32 exact widening conversion: the assembly syntax has only vd, vs2, and vm; SEW is fixed to 16, and vs1[19:15]=01101 is a VFUNARY0 selector.

OP-V encoding: funct6=010010, vs1/selector=01101, funct3=001 (OPFVV), opcode=1010111.
Official reserved encoding: any SEW value other than 16 is reserved.
Source elements are EEW=16 BF16 and destination elements are EEW=32 FP32; active elements are controlled by vl and v0.t.
The widening conversion is exact; normal values and infinities shift the BF16 encoding left by 16 and write zeroes into the low 16 FP32 bits.
The page animation shows the mapping from raw 16-bit BF16 patterns to FP32 values and 32-bit encodings.

Vector Execution Context

When reading VFWCVTBF16.F.F.V, do not stop at the mnemonic. Official V-extension semantics also depend on the current vl, vtype, and mask state. The suffix and operand form determine whether sources are vector, scalar, or immediate values.

Check vl first

The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.

Then check vtype

The current vtype supplies SEW, LMUL, tail policy, and mask policy; these affect element width, register-group size, and inactive/tail destination elements.

Then check vm/v0

For ordinary vector instructions with vm, vm=0 uses v0 as the execution mask and vm=1 is unmasked. A few forms such as VMERGE use v0 as data-selection input.

Official source: RISC-V V Standard Extension for Vector Operations

Common Usage Scenarios

Vector Operations

Understand this scenario with real code like «vfwcvtbf16.f.f.v v4, v8 # v4[fp32] = fp32(v8[bf16])».

Machine Learning

Understand this scenario with real code like «vfwcvtbf16.f.f.v v4, v8 # v4[fp32] = fp32(v8[bf16])».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

SEW must be 16; other SEW encodings are reserved.
The vs2 source elements have EEW=16 BF16, while vd destination elements have EEW=32 FP32.
BF16-to-FP32 is an exact widening conversion and does not use frm rounding.
This instruction is a format conversion, not BF16 arithmetic.
Invalid may be set, for example for signaling NaN; exact widening of finite values, normals, subnormals, and infinity does not round and does not raise OF, UF, or NX.

FAQ

Do these vector BF16 instructions support any SEW?

No. The official vector BF16 instructions reserve encodings when SEW is not 16; this page animation fixes SEW=16.

Is BF16 the same as IEEE binary16?

No. BF16 has 1 sign bit, 8 exponent bits, and 7 fraction bits; it differs from half-precision binary16 in exponent and fraction widths.

Does VFWCVTBF16.F.F.V use frm?

No. BF16-to-FP32 is an exact widening conversion; in contrast, FP32-to-BF16 VFNCVTBF16.F.F.W rounds according to frm.