Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15469 Discussions

ALTMULT_ADD subtract direction

ARitt4
Beginner
185 Views

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.

 

0 Kudos
2 Replies
CheePin_C_Intel
Employee
166 Views

Hi,


As I understand it, you have some inquiries related to the subtraction of the altmult_add. For your information, as I tested with simulation, the following should be the right operation:


(dataa_1 * datab_1) - (dataa_0 * datab_0)


You may run a Modelsim simulation with your design to verify as well. Thank you.


CheePin_C_Intel
Employee
151 Views

Hi,


I believe the initial inquiry has been addressed. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.


Reply