intel / intel/rohd

Fixed point support

Open
#470 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dart
Stars
489
Forks
88
Avg merge
3d 23h
Merged PRs (30d)
10

Description

### 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
- Aligning the binary point of addition / subtraction operands by left shifting
- Keeping track of how the binary point moves after a multiplication

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.