Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
717 Views

double precision multiplication

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
Highlighted
Valued Contributor III
5 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
Highlighted
Valued Contributor III
5 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