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

CompressionTreeMultiplier should support mixed signed/unsigned operands #143

Open desmonddak opened 5 days ago

desmonddak commented 5 days ago

Motivation

It would be useful to have the multiplier components support a mix of signed and unsigned multiplier and multiplicand. Today, it supports operands that are either both signed or both unsigned.
A workaround exists to support mixed by widening the unsigned operand by 1 bit. But in some cases this is not possible to do, or expensive for shorter operands.

Desired solution

Change the signed parameter to both operands (multiplier and multiplicand). Change the signedOperands input to both operand types (say signedMultiplierOp and signedMultiplicandOp). Modify the logic to separate the support of sign extension versus booth encoding of sign.

Alternatives considered

No response

Additional details

Consider the potential for using fixed sign versus runtime sign configuration for the parameter versus runtime-based configuration (do we need to support both or can we presume fully fixed and fully runtime configurable). Should we have, say, signedMultiplier (hardcoded) and signedMultiplicandOperand runtime configuration.