RISC-V and Floating Point

· databases · Source ↗

TLDR

  • Comprehensive overview of RISC-V floating-point extensions: F/D/Q scalar, Zfh half-precision, Zfinx register-file variants, RVV vectors, BFloat16, and emerging OFP8/MX scaling.

Key Takeaways

  • RISC-V base ISA (RV32I/RV64I) has zero floating-point instructions; all FP support comes from optional extensions built on IEEE-754 2008.
  • Separate FRF register file (32 x FLEN-bit) adds hardware cost but decouples XLEN from FLEN, so RV32+D or RV64+F pay only for what they need.
  • Zfinx family (Zfinx, Zdinx, Zhinx) eliminates the FRF entirely, reusing XRF for FP ops – useful for cost-sensitive embedded targets.
  • RVV 1.0 vector FP goes beyond scalar: widening ops, reciprocal estimates, narrowing conversions with round-to-odd, and destructive multiply-accumulate variants.
  • BFloat16 is ratified (Zfbfmin, Zvfbfmin, Zvfbfwma) and listed as optional in RVA23U64 profile; extended Zvfbfa and OFP8 Zvfofp8min are in-progress.

Hacker News Comment Review

  • Commenters acknowledge the extension naming scheme is genuinely hard to track for implementers and hardware designers, not just casual readers.
  • The practical counterpoint: the RVA23 profile abstracts the mess for most users; only custom silicon designers need to enumerate extensions manually.

Original | Discuss on HN