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

Nios II, floating point hardware.

PShar32
New Contributor I
788 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
714 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

0 Kudos
6 Replies
ShengN_Intel
Employee
766 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-performance-83984.html. 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
757 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.  .?

 

//

0 Kudos
ShengN_Intel
Employee
750 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-performance-83984.html 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.

 

0 Kudos
PShar32
New Contributor I
735 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

0 Kudos
ShengN_Intel
Employee
728 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.


0 Kudos
ShengN_Intel
Employee
715 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.

 

0 Kudos
Reply