FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6059 Discussions

Nios II, floating point hardware.

PShar32
New Contributor I
271 Views

Hi,

Hi, I want to perform some huge multiplications in nios 2 processor,

I learned that unlike ‘nios 2 e’ , nios 2 fast says it does hardware based multiplication,
so adding floating point hardware is worthless or it will further reduce computation time ?

0 Kudos
1 Solution
ShengN_Intel
Employee
197 Views

Hi @PShar32 ,

 

Do you have any further update or concern?

Let me know if there's any.

 

Thanks,

Best Regards,

Sheng

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

 

View solution in original post

6 Replies
ShengN_Intel
Employee
249 Views

Hi,


You're right. Nios II/f does support hardware multiplication check this link https://www.intel.com/content/www/us/en/docs/programmable/683836/current/multiply-and-divide-perform.... So not necessary to add floating point hardware anymore.


Thanks,

Best regards,

Sheng

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


PShar32
New Contributor I
240 Views

Hello,

  thank you, for your  reply, 

also the link you suggests to make multiplication in assembly code. I am writing in c++, how will I write those functions ? (Mul r1, r2, r3)??

   Is there any other means to make the “ 64 bit double precision “ multiplication more faster, in nios II.  .?

 

//

ShengN_Intel
Employee
233 Views

Hi @PShar32 ,

 

If you're using C++, then you can just ignore the assembler code. The performance table in this link https://www.intel.com/content/www/us/en/docs/programmable/683836/current/multiply-and-divide-perform... also applicable to C++ arithmetic operators.

 

As for performance, the Nios II/f will be the fastest among the Nios II. Can check the Arithmetic Instructions tab (image):

ShengN_Intel_0-1669107071767.png

The best performance for Multiply Extended (64-bit double precision) is 1 cycle if set Multiply Implementation: 1 32-bit multiplier.

 

Based on the link above,

However, if an instruction depends on the result of an earlier instruction, then the processor stalls through any result latency cycles until the result is ready.

If there is dependency between the results and operands for back-to-back instructions, there will be extra 2 Result Latency Cycles. In that case, that'll be a total of 3 cycles (1 cycle + 2 cycles).

 

Thanks,

Best regards,

Sheng

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

 

PShar32
New Contributor I
218 Views

Thankyou for the reply,

  As I understand, you are suggesting me as i don't need anything else to perform high speed 64 bit multiplication as NIOS II/f already has hardware multipliers and extended multipliers/ 

But I can further improve the speed if my multiplication variables does not depend upon previous operation. 

right ?

 

Pratik

ShengN_Intel
Employee
211 Views

Hi,


Yes. Multiplication variables does not depend upon previous operation will definitely increase the speed.


Thanks,

Best Regards,

Sheng


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


ShengN_Intel
Employee
198 Views

Hi @PShar32 ,

 

Do you have any further update or concern?

Let me know if there's any.

 

Thanks,

Best Regards,

Sheng

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

 

Reply