Update mac_5x9x8 Revised authored by gling's avatar gling
......@@ -87,6 +87,12 @@ p4_3[4:0] = a4[4:0] * b4[3]
P[11] P[10] P[9] P[8] P[7] P[6] P[5] P[4] P[3] P[2] P[1] P[0]
```
... This is wrong below
Focusing on the upper 4 high bits of these 5 constant terms, if K is even, these will always sum to zeroes and a carry out bit, have no effect on the result, and can be replaced with zeroes. If K is odd, these will always sum to 1's, inverting the upper 4 bits of the output sum. Therefore, those can be replaced with zeroes and inverting the upper 4 bits of P (`P[11:8]`) after summation.
The column of bits at `(1 << (M-1))` can be summed together prior to compilation into one constant value of `(K << (M-1))`. Therefore, the final MAC output can be shown by:
......
......