We have defined a KxMxN MAC unit as a device which takes K signed M-bit numbers ($a_0, a_1, ..., a_{K-1}$) and K signed N-bit numbers ($b_0, b_1, ..., b_{K-1}$), and computes
$$ a_0*b_0 + a_1*b_1 + ... + a_{K-1}*b_{K-1} $$
For making an KxMxN MAC unit, the number of output bits will be
For our specialized case of a 5x9x8 MAC unit, $\lceil\log_2 5\rceil + 9 + 8 = 20$ bits.
First, to perform a signed multiplication, we use the modified Baugh-Wooley form on slide 64 of
\url{https://web.ece.ucsb.edu/~parhami/pres_folder/f31-book-arith-pres-pt3.pdf}. A more clear representation of this method is shown at \url{https://en.wikipedia.org/wiki/Binary_multiplier#Signed_integers} with the exception of a missing 1 in the MSB of the last partial sum.
Using an example calculation with a 4-bit by 5-bit signed multiply with multiplicands `a` and `b`:
We have defined a 5x9x8 MAC unit as a device which takes 5 signed 9-bit numbers (a0, ..., a4) and 5 signed 8-bit numbers (b0, ..., b4), and computes a0*b0 + a1*b1 + a2*b2 + a3*b3 + a4*b4.
We have defined a 5x9x8 MAC unit as a device which takes 5 signed 9-bit numbers (a0, ..., a4) and 5 signed 8-bit numbers (b0, ..., b4), and computes a0*b0 + a1*b1 + a2*b2 + a3*b3 + a4*b4.
For making an KxMxN MAC unit, the number of output bits will be
For making an KxMxN MAC unit, the number of output bits will be