Open samimia-swks opened 6 months ago
Thank you for the feature suggestion! I'm wondering whether there's sufficient complexity that it needs to be integrated into ROHD itself or if it could be added to the library at https://github.com/intel/rohd-hcl.
Hi Max. I am very unfamiliar with Dart and ROHD still, but in my mind a user friendly implementation would look something like this wish list:
var fp = FixedPoint(name: 'b', iw: 1, qw: 15, signed: true)
There is more here but this covers most of the use cases for DSP applications.
Thanks for the context, very helpful! I think this sounds quite achievable.
Motivation
Efficient DSP hardware is typically implemented in fixed point arithmetic: see https://en.wikipedia.org/wiki/Q_(number_format) https://ieeexplore.ieee.org/document/7199829
It is painful to write a fixed point data path in SV, as it offers no help in managing the Q point (the number of fractional bits). The designer has to undertake the error prone process of
Desired solution
Add support for signed and unsigned fixed point 'type's in ROHD, and overload operators such as +, - and * to shift as necessary and keep track of the Q point of the result
Alternatives considered
No response
Additional details
No response