intel / rohd-hcl

A hardware component library developed with ROHD.
https://pub.dev/packages/rohd_hcl
BSD 3-Clause "New" or "Revised" License
81 stars 23 forks source link

Sign agnostic multiplier #121

Closed desmonddak closed 2 weeks ago

desmonddak commented 3 weeks ago

Motivation

Right now you need to specify whether a multiplier is signed or unsigned. We need a mode-based multiplier where, say, an 8-bit operand can be either signed or unsigned as a way to show configurable hardware as opposed to generating unique hardware.

Desired solution

Unsigned multiplication is wider than signed, so this forms the baseline. The same multiplier that performs 8-bit unsigned is one-bit wider in partial products and so what needs to happen is under the signed mode, a single position sign extension would be needed (using the new muxing code) to enable configurable hardware between signed and unsigned using the wider unsigned footprint.

Alternatives considered

No response

Additional details

No response

desmonddak commented 2 weeks ago

Fixed with PR #125