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++
12600 Discussions

double precision multiplication

Altera_Forum
Honored Contributor II
1,060 Views

Hi, 

 

Is it normal that a double precision multiply operation between local variables is taking about 1100 cycles for a NIOS II to execute it? 

 

Note: The nymber of cycles is measured using the perfomance counters peripheral. 

 

Thank you, 

 

George
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
348 Views

I don't know the exact number of cycles, but floating point calculations are not quick if you do not have dedicated hardware for the job. Having the double precision doesn't help matters. If you want this to be fast, I think their is a relatively small floating point core in this forum.

0 Kudos
Altera_Forum
Honored Contributor II
348 Views

Thanx for pointing this out. I will keep this alternative in mind. 

But before i decide to add a hardware FPU i would like to make sure that it is actually needed. 1100 cycles for a single double precision multiply operation sounds too big to be true. So, i am suspecting that i am doing something wrong here. Perhaps someone from Altera could say a word here.  

I wouldn't like to add a hardware FPU now and find out later that i am actually "killing a mosquito using a cannon!" 

I am using the Nios II/f and something like 50 cycles per double percision multiply operation would be more than enough for my application.
0 Kudos
Reply