spatial-lang icon indicating copy to clipboard operation
spatial-lang copied to clipboard

Use MACC IP

Open shadjis opened this issue 7 years ago • 3 comments

Rather than use separate DSP blocks for multiplies and then adds, the Xilinx MACC IP can be used. This would reduce DSP utilization.

shadjis avatar Oct 04 '17 06:10 shadjis

So should we have a MAC analysis that checks for a multiply map function and addition reduce function?

mattfel1 avatar Oct 05 '17 17:10 mattfel1

If I understand the operation of the DSP correctly, the term MACC is actually a bit of a misnomer? It's actually just a fused multiply-add, no accumulate, meaning we just look for that pattern regardless of reduction. Maybe we prioritize reductions though?

dkoeplin avatar Oct 05 '17 18:10 dkoeplin

I think there are 2 versions,

Multiply-Add does AB + C (3 inputs) https://www.xilinx.com/products/intellectual-property/multiply_adder.html

Multiply-Accumulate does AB + previous product (2 inputs) https://www.xilinx.com/products/intellectual-property/multiply_accumulator.html

As we discussed this might not reduce DSP utilization, only logic utilization because rather than use adders inside CLBs it would use adders in DSP blocks. It might still be an important logic optimization in the future if a design has a lot of multiply-add operations but maybe it is lower priority.

shadjis avatar Oct 05 '17 21:10 shadjis