package fpu
- Alphabetic
- Public
- All
Type Members
-
case class
FloatUnpacked(p: FloatUnpackedParam) extends Bundle with Product with Serializable
This is the floating format used in the FPU ALUs Unlike ieee 754, it doesn't support subnormals, so, to convert from ieee 754 to FloatUnpacked accurately on subnormals, the FloatUnpacked need to have an extended exponent field, allowing to cover the subnormal numbers as if they were normal.
- case class FloatUnpackedParam(exponentMax: Int, exponentMin: Int, mantissaWidth: Int) extends Product with Serializable
-
class
FpuAdd extends Area
This Area can be used to implement and bind a floating point adder on a given pipeline.
-
class
FpuAddPlugin extends FiberPlugin
Add the floating point add instruction the CPU.
Add the floating point add instruction the CPU. Rely on the FpuAddSharedPlugin to do the maths.
- case class FpuAddSharedCmd(p1: FloatUnpackedParam, p2: FloatUnpackedParam, ats: Seq[Int]) extends Bundle with Product with Serializable
-
class
FpuAddSharedPlugin extends FiberPlugin
This plugin implements an shared hardware floating point adder and provide an API for other plugins to time share it.
This plugin implements an shared hardware floating point adder and provide an API for other plugins to time share it. In practice, the RISC-V fadd and fma instruction use it. The actual adder hadware is provided by the FpuAdd plugin.
- class FpuAddSharedPort extends Area
-
class
FpuClassPlugin extends FiberPlugin
Provide the RISC-V fclass instruction, which allows to figure out the kind of a given floating point number (normal, submornal, infinit, nan, ...)
-
class
FpuCmpPlugin extends FiberPlugin
Implement a bunch of simple RISC-V floating point instruction : - sign manipulation - min/max - compare
-
class
FpuCsrPlugin extends FiberPlugin with FpuDirtyService
Provide the RISC-V FPU csr (rounding mode and flags)
- trait FpuDirtyService extends AnyRef
-
class
FpuDivPlugin extends FiberPlugin
Implement the RISC-V floating point division.
Implement the RISC-V floating point division. The mantissa division is implemented by reusing the hardware from the integer divider Not having to deal with subnormal numbers helps, as it fix the range of the mantissa between [1.0, 2.0[
-
class
FpuF2iPlugin extends FiberPlugin
Implement the RISC-V floating point to integer convertions
- case class FpuFlags() extends Bundle with Product with Serializable
-
class
FpuFlagsWritebackPlugin extends FiberPlugin
Handle the update of the FPU flags for all inflight instruction (commited and uncommited)
- case class FpuFlagsWritebackPort(atsSpec: Seq[Int]) extends Bundle with Product with Serializable
-
class
FpuMulPlugin extends FiberPlugin
Add the floating point mul instruction the CPU.
Add the floating point mul instruction the CPU. The mantissa multiplier is implemented by reusing the hardware from the integer multiplier
-
class
FpuMvPlugin extends FiberPlugin
Implement the RISC-V floating point <> integer binary casts
- case class FpuPackerCmd(p: FloatUnpackedParam, ats: Seq[Int]) extends Bundle with Product with Serializable
-
class
FpuPackerPlugin extends FiberPlugin with RegFileWriterService
Implement the floating point rounding, recode the result into (ieee 754) and then writeback it back into the register file using the WriteBackPlugin.
Implement the floating point rounding, recode the result into (ieee 754) and then writeback it back into the register file using the WriteBackPlugin. Subnormal recoding will stall the pipeline 2 extra cycles to save FMax.
- class FpuPackerPort extends Area
-
case class
FpuSqrt(mantissaWidth: Int) extends Component with Product with Serializable
Implement the floating point mantissa SQRT
- case class FpuSqrtCmd(mantissaWidth: Int) extends Bundle with Product with Serializable
-
class
FpuSqrtPlugin extends FiberPlugin
Implement the RISC-V floating point SQRT instruction by using the FpuSqrt hardware.
Implement the RISC-V floating point SQRT instruction by using the FpuSqrt hardware. Not having to deal with subnormal numbers helps, as it fix the range of the mantissa between [1.0, 2.0[
- case class FpuSqrtRsp(mantissaWidth: Int) extends Bundle with Product with Serializable
-
class
FpuUnpackerPlugin extends FiberPlugin
Recode the floating point number comming from the register file to get rid of subnormal numbers by extending the exponant range instead.
Recode the floating point number comming from the register file to get rid of subnormal numbers by extending the exponant range instead. Getting ride of subnormal helps various floating point operations, as it ensure that the range of the mantissa stay between [1.0, 2.0[
When a subnormal number come in, the pipeline will be stuck for a few cycles in order to preserve the FMax.
-
class
FpuXxPlugin extends FiberPlugin
Convert floating point 32 bits to/from 64 bits packAt at 1 to reduce timing presure (unpack -> pack)
Convert floating point 32 bits to/from 64 bits packAt at 1 to reduce timing presure (unpack -> pack)
The FpuPackerPlugin will do the heavy work (rounding)
Value Members
- object FloatMode extends SpinalEnum
- object FloatUnpacked extends Serializable
- object FpuCmpFloatOp extends SpinalEnum
- object FpuCsrPlugin extends AreaObject
- object FpuFormat extends SpinalEnum
- object FpuRoundMode extends SpinalEnum
- object FpuSqrtTester extends App
- object FpuUtils extends AreaObject