ARitt4
New Contributor
4 years agoALTMULT_ADD subtract direction
I'm trying to figure out one detail of the Quartus ALTMULT_ADD megafunction. It is set up with two pairs of inputs, dataa_0, datab_0, dataa_1 and datab_1. I understand that it multiplies dataa_0 * datab_0, multiplies dataa_1 * datab_1 and then either adds or subtracts the products based on the addnsub1 input. When it's adding, no problem but when it's subtracting, is the subtraction:
(dataa_0 * datab_0) - (dataa_1 * datab_1)
or is it
(dataa_1 * datab_1) - (dataa_0 * datab_0)
That is, which direction is the subtraction of the input products? I've been through the ug_lpm_alt_mfug.pdf writeup about six times and I haven't seen anywhere that it defines the direction of the subtraction. Obviously, it matters (a lot) to the result.