Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Division and standard library support by NIOSII compiler

Altera_Forum
Honored Contributor II
1,447 Views

HI, 

 

I have been trying to port an embedded sw to NIOSII. I have some division operations, array initializations, sprintf function calls in the code. I find that NIOS II compiler (processor core does not directly support division) is not providing built-in calls to division, memset/memcpy (as in array initialization, etc) or sprintf. Should the compiler not support these functionalities (mebe not sprintf..). Or am i missing some compiler or linker options..? 

 

Pl send suggestions.. 

 

Thanks, 

Sunil
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
497 Views

These items you mention are all supported. Division is emulated if not enabled in core (I believe this to be true but we enabled division). mem and str functions are all definitely present in the NIOS II Libraries. 

 

Bill
0 Kudos
Altera_Forum
Honored Contributor II
497 Views

Nios II supports 32 bit (and less) integer division when enabled and single precision floating point division if you add the custom instruction floating point unit. 

 

The library functions you mentioned are all present.... in string.h, and stdio.h if I remember correctly.
0 Kudos
Reply