From: Luke Kenneth Casson Leighton Date: Mon, 5 Aug 2019 05:16:59 +0000 (+0100) Subject: add ztrans proposal X-Git-Tag: convert-csv-opcode-to-binary~4279 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=539b741e656ac7b1816142fef502663377fa9141;p=libreriscv.git add ztrans proposal --- diff --git a/ztrans_proposal.mdwn b/ztrans_proposal.mdwn new file mode 100644 index 000000000..15c6ea766 --- /dev/null +++ b/ztrans_proposal.mdwn @@ -0,0 +1,51 @@ +# Ztrans - transcendental operations + +See: + +* +* + +[[!toc levels=2]] + +# List of 2-arg opcodes + +[[!table data=""" +opcode | Description | pseudo-code | Extension | +FATAN2 | atan2 arc tangent | rd = atan2(rs2, rs1) | Ztrans | +FATAN2PI | atan arc tangent / pi | rd = atan2(rs2, rs1) / pi | | +FPOW | power of | rd = pow(rs1, rs2) | Ztrans | +"""]] + +# List of 1-arg opcodes + +[[!table data=""" +opcode | Description | pseudo-code | Extension | +FCBRT | Cube Root | rd = pow(rs1, 3) | | +FEXP2 | power-of-2 | rd = pow(2, rs1) | | +FLOG2 | log2 | rd = log2(rs1) | | +FEXPM1 | exponent minus 1 | rd = pow(e, rs1) - 1.0 | | +FLOG1P | log plus 1 | rd = log(e, 1 + rs1) | | +FEXP | exponent | rd = pow(e, rs1) | | +FLOG | natural log (base e) | rd = log(e, rs1) | | +FEXP10 | power-of-10 | rd = pow(10, rs1) | | +FLOG10 | log base 10 | rd = log10(rs1) | | +FSIN | sin (radians) | | Ztrans | +FCOS | cos (radians) | | Ztrans | +FTAN | tan (radians) | | Ztrans | +FSINPI | sin times pi | rd = sin(pi * rs1) | | +FCOSPI | cos times pi | rd = cos(pi * rs1) | | +FTANPI | tan times pi | rd = tan(pi * rs1) | | +FSINH | hyperbolic sin (radians) | | | +FCOSH | hyperbolic cos (radians) | | | +FTANH | hyperbolic tan (radians) | | | +FASINH | inverse hyperbolic sin | | | +FACOSH | inverse hyperbolic cos | | | +FATANH | inverse hyperbolic tan | | | +"""]] + +# Pseudo-code ops + +* FRCP rd, rs1 - pseudo-code alias for rd = 1.0 / rs1 +* SINCOS - fused macro-op between FSIN and FCOS (issued in that order). +* SINCOSPI - fused macro-op between FSINPI and FCOSPI (issued in that order). +