Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
724 Views

Multiplication Optimization

Hi; 

 

We use EP3C55f484I7 FPGA and NIOS. I work for time critical project. We use soft processor in the FPGA and in software we make some multiplications in floating point. We used FPGA multiplication custom instructions but it isn't enough at all. For example 9 multiplication and 6 addition approximately 52 us. Optimization Level = 3 in software and bsp.  

 

Can we calculate this calculation more faster? 

 

Note: NIOS ii 9.1 and Quartus ii 9.1 is being used in this project.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
32 Views

Use fixed point :-) 

I've no idea how fast the FP instructions are, but: 

Have you actually verified that the custom instructions are being executed. 

Remember they only do 'float', not 'double' - and you need to make sure everything if 'float' otherwise you'll get a lot of float<->double conversion happening. 

Does that fpga have the DSP multipler blocks in it? (and do the fp custom instructions use them if it does?). 

(Even for the integer multiply, Altera ought to give the option of throwing logic into the multiply instruction to support faster multiplies and/or 64bit results.)
Altera_Forum
Honored Contributor I
32 Views

"FPGA multiplication custom instructions" sounds like the integer hardware multiplier support in the NIOS processor itself. 

 

Floating point support is accomplished separately from that. You need to include the floating piont custom instruction hardware in your Qsys/SOPC Builder project and connect it to your NIOS (and regenerate your BSP and recompile everything). 

 

In other words, it sounds like your software is currently using software emulation of floating point operations. 

 

http://www.altera.com/literature/tt/tt_floating_point_custom_instructions.pdf 

 

 

I believe floating point multiply / add operations take around (6) clocks when done in hardware (ALTFP_MULT megafunction etc.)
Reply