I’m working on some DSP stuff and noticed that floating point primitives were missing. I understand the rationale for this given in the documentation. There is growing support for floating points in various shapes and sizes with DSP primitives in newer chips, and I am working on a block floating point implementation which plays well with fixed numbers for the most part, but does occasionally want to handle floating point values. I think it’s worth at least having types available to pass them around anyway.
I’m imagining something like SFixed, but you’d define the length of the significand and exponent part.
Which might be interesting for you to have a look at.
It doesn’t (currently) support changing the type/size of the numbers. Even though the underlying primitives do support that, to some extend.
It does support configuring some of the pipelining/timing aspects of the implementation, which is exposed via a DSignal interface.
Having something like SFixed, but with two type parameters, for fractional and exponent size should definitely be possible.
It’s a crude work in progress at the moment and I’d like to find the time or resources to bring it in a usable state, but have not been able to do that yet.