- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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. .?
//
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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):
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page