Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
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.
12455 Discussions

implementation of an arbitrary precision integer librar for usage in application code

Honored Contributor II



This requirement is a part of my thesis and I was wondering have anyone occurred to do a similar task of this sort. 

I plan to implement NIOS II custom instructions that will accelerate the speed of an arbitrary precision integer arithmetic 

(since parallel operations can be done in FPGA). 


As a comparative study I am asked to compare the speed of a normal arbitrary precision integer library function with the custom instruction. 

Say an ADDITION of 1028 bit + 1028 bit data. (This can be implemented in NIOS II custom instruction using verilog modules and can be called 

from the application C/C++ program using macros in system.h file). The same addition can be done in the application code using a 

multiple precision library as well. 


Issue is with respect to porting such a library to the NIOS II build environment. 

MPIR is such an arbitrary precision library which can be built with a Microsoft Visual C++ 2008 edition solution. 


Is there someone who is experienced in bringing such libraries to the NIOS II IDE build environment? 

If so that would be a big help. 


Any pointers towards this direction will be appreciated.  


Thank You, 

Akhil Kalathungal
0 Kudos
1 Reply
Honored Contributor II



I figured out a user friendly library that can be moved easily to the NIOS II IDE build environment. 

Now in my application code I can use those library functions and see the timing analysis using the altera timestamp libraries. 


So I guess this question can be closed from my side. 



Thank You, 

Akhil Kalathungal