SpinalHDL / VexiiRiscv

Like VexRiscv, but, Harder, Better, Faster, Stronger
MIT License
63 stars 7 forks source link

Ieee 754 floating point -> Just a gentle question: Is there any plan to integrate the floating-point operations from the VexiiRiscv project into the SpinalHDL library? #17

Open dreamflyings opened 1 week ago

dreamflyings commented 1 week ago

Hello!

I’ve noticed that the floating-point operation core/plugin in VexRiscv, especially the commonly used floating-point adder and multiplier, seems quite stable now. Are there any plans to integrate them into SpinalHDL?

I see that SpinalHDL/lib/src/main/scala/spinal/lib/experimental/math/Floating.scala hasn’t been updated for a long time.

My abilities are limited, and it’s somewhat challenging for me to port the floating-point multiplier and adder into the SpinalHDL library. I spent some time trying but didn’t succeed (I also didn’t fully understand it; it seems to require some modifications), so I would like to hear your opinion. What do you think?

Dolu1990 commented 1 week ago

Hi

The Vexii/Nax FPU implementation isn't using the same format than lib/experimental/math/Floating.scala, instead of trying to fit more information in the exponent / mantisa, it has a "proper" enum to record normal/subnormal/zero/infinity/nan modes.

There is no realy a plan to merge it back to spinal lib currently. but i think merging the floating point type would be ok in a first time.

The main reason why not merging the other stuff, is that it would require a real heavy usage in a non cpu related project ("eat your own dog food" concept), and i don't feel like i would use it enough to get something of a proper quality.