FP Brownfield Opcode identification table and list of publicly-known FP extensions

215 views
Skip to first unread message
Assigned to luke.l...@gmail.com by me

lkcl

unread,
Aug 4, 2019, 3:59:36 AM8/4/19
to RISC-V ISA Dev
https://libre-riscv.org/rv_major_opcode_1010011/

this table is to aid and assist in the innovation and development of FP extensions.  it is quite tricky to identify the brownfield encoding space and ensure that there are no clashes.

this is a public wiki, so may be edited by anyone (please email me if there are difficulties creating an account).

if adding to this table please:

* add the name of the extension and a public link at the top
* if requiring a new funct5, only use one marked "?" in the Main FP opcode 1010011 table's "function" field and create a sub-table below (funct5=NNNNN)
* note that funct3 is also often used for brownfield encoding, *specifically* in cases where the operation does *not* require a "rounding mode".

i've identified the "types" of each funct5 sub-table, describing the types of operations for which they are currently utilised (funct5=00101 is 2-operand FP ops, uses funct3 selecting the type of operation, and the result is also an FP register).  this aids and assists in selecting a suitable brownfield location for future extensions.

currently-known FP extensions are:

* Zfrsqrt - reciprocal square-root
* Zftrans - transcendental FP functions (sin, cos, atan, pow, exp, log, reciprocal)
* HI-half FP MV (FMVH) for both RV32.D and RV64.Q to have full functionality

please discuss actual development of extensions in *separate* threads.

l.

Andrew Waterman

unread,
Aug 4, 2019, 4:12:11 AM8/4/19
to lkcl, RISC-V ISA Dev
Just as a reminder, the 'Z' prefix is reserved for standard extensions, and available opcode space not explicitly marked custom is reserved.  It would be accurate to use the 'X' prefix for these, and it would be conforming to use one of the CUSTOMx major opcodes, until such a time as these extensions are standardized.

--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/970f2f52-7299-4dca-a4af-620db3c6162e%40groups.riscv.org.

lkcl

unread,
Aug 4, 2019, 4:16:56 AM8/4/19
to RISC-V ISA Dev, luke.l...@gmail.com


On Sunday, August 4, 2019 at 9:12:11 AM UTC+1, waterman wrote:
Just as a reminder, the 'Z' prefix is reserved for standard extensions, and available opcode space not explicitly marked custom is reserved.  It would be accurate to use the 'X' prefix for these, and it would be conforming to use one of the CUSTOMx major opcodes, until such a time as these extensions are standardized.

thank you for clarifying, andrew.  what is the process by which "outsiders" - groups and organisations that cannot join the RISC-V Foundation - may propose standard extensions, particularly those which are intended for extremely high-profile mass-volume production usage in UNIX Platform products, such as GPUs, VPUs, and other *reprogrammable* end-user products, where it would cause huge pressure on the upstream compiler developers to accept the extensions as "de-facto" industry standards?

l.

Jacob Lifshay

unread,
Aug 4, 2019, 3:50:01 PM8/4/19
to Luke Kenneth Casson Leighton, RISC-V ISA Dev
On Sun, Aug 4, 2019, 00:59 lkcl <luke.l...@gmail.com> wrote:

* Zftrans - transcendental FP functions (sin, cos, atan, pow, exp, log, reciprocal)
where did you get the Zftrans encodings (Google search returned no results)?
the pow encoding is using the same funct5 as what I had proposed as the standard encoding for frsqrt.

Jacob

lkcl

unread,
Aug 4, 2019, 5:52:44 PM8/4/19
to RISC-V ISA Dev, luke.l...@gmail.com


On Sunday, August 4, 2019 at 8:50:01 PM UTC+1, Jacob Lifshay wrote:
On Sun, Aug 4, 2019, 00:59 lkcl <luke.l...@gmail.com> wrote:
https://libre-riscv.org/rv_major_opcode_1010011/
* Zftrans - transcendental FP functions (sin, cos, atan, pow, exp, log, reciprocal)
where did you get the Zftrans encodings (Google search returned no results)?

started preparing it yesterday.  it's needed for any Open 3D GPU initiative,
and as you note on the list, ML can benefit as well.

refs:

let's discuss there, and/or on a separate isa-dev thread

the pow encoding is using the same funct5 as what I had proposed as the standard encoding for frsqrt.

you may have missed this: again, let's discuss on that thread:

Jacob Lifshay

unread,
Aug 4, 2019, 8:51:02 PM8/4/19
to Luke Kenneth Casson Leighton, RISC-V ISA Dev
On Sun, Aug 4, 2019, 14:52 lkcl <luke.l...@gmail.com> wrote:


On Sunday, August 4, 2019 at 8:50:01 PM UTC+1, Jacob Lifshay wrote:
On Sun, Aug 4, 2019, 00:59 lkcl <luke.l...@gmail.com> wrote:
https://libre-riscv.org/rv_major_opcode_1010011/
* Zftrans - transcendental FP functions (sin, cos, atan, pow, exp, log, reciprocal)
where did you get the Zftrans encodings (Google search returned no results)?

started preparing it yesterday.  it's needed for any Open 3D GPU initiative,
and as you note on the list, ML can benefit as well.
ah, thought it was from an external source or something.

lkcl

unread,
Aug 6, 2019, 8:40:00 AM8/6/19
to RISC-V ISA Dev, luke.l...@gmail.com
On Monday, August 5, 2019 at 8:51:02 AM UTC+8, Jacob Lifshay wrote:

> * Zftrans - transcendental FP functions (sin, cos, atan, pow, exp, log, reciprocal)

Cross-ref Link to Zftrans (and subextensions) proposal:

https://groups.google.com/a/groups.riscv.org/d/msg/isa-dev/8knne5BtlvM/QtdcVRSFFQAJ

Reply all
Reply to author
Forward
0 new messages