PULP Community
The signed/unsigned operation support by the Dotp-Unit of the RI5CY core - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: The signed/unsigned operation support by the Dotp-Unit of the RI5CY core (/showthread.php?tid=226)



The signed/unsigned operation support by the Dotp-Unit of the RI5CY core - Olivier - 01-05-2021

Hello and Happy New Year,

I took a look at the Near-Threshold RISC-VCore With DSP Extensions for Scalable IoT Endpoint Devices paper.

At the Dotp-Unit side, there are two 17bx17b multipliers and four 9bx9b multipliers respectively the input operands are 16b and 8b. The support of signed operations is achieved by adding a sign bit to each input operand.

The input values supported by the 17bx17b and 9bx9b multipliers should be between -65536 to 65535 and -256 to 255 respectively. With this choice, we move away from the classical short and char data types supporting data values between -32768 to 32767 and -128 to 127 respectively.

I can't understand why an extra sign bit is needed on data 16b and 8b for the execution of signed operations.
Can someone enlighten me with additional information about this choice to add an extra sign bit to data 16b and 8b?


Thank you in advance,


RE: The signed/unsigned operation support by the Dotp-Unit of the RI5CY core - kgf - 01-05-2021

Good question.

When you have combined operations (i.e. Multiply and Accumulate or Dot Product), you could either truncate/round after each (sub)operation or you could allow larger bit-widths in the intermediate levels and then truncate/round at the end. Especially with shorter bit-widths, the difference in overall accuracy actually justifies the slightly larger internal multipliers.