Forum Discussion
Altera_Forum
Honored Contributor
8 years agoAre you sure about this? I have compiled over one thousand floating-point kernels and never encountered such thing. The rule for using DSPs in OpenCL is pretty simple: on both Stratix V and Arria 10, all integer additions are implemented using logic, and integer multiplications are implemented using DSPs. For floating-point operations, on Stratix V, only multiplication uses DSP and addition uses logic, but on Arria 10, both use DSPs. Of course this is if none of the numbers are constant. OpenCL does NOT provide any documented way of forcing operations to use logic instead of DSP; I specifically inquired Altera about this once and they said such functionality is not provided. They might have a secret/undocumented way to do it, though.
If you are masking bits out, I guess multiplying less than 9 bits by 9 bits could be implemented using logic, but anything bigger than that will very likely use DSP.