Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
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.
17268 Discussions

Real numbers on altera fpga de5

Altera_Forum
Honored Contributor II
1,742 Views

Hi all, 

 

The problem that I m facing is that I have to perform some operations that are mostly logarithms exponentials multiplications division and additions on Real numbers. 

From the simulation point of view there were no problems but now when I try to synthetize it I obtain an error message. I m using math_real library. 

Are there any smart solutions in order to deal with Real numbers instead of write its own floating point unit??
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
1,036 Views

The real type is not synthesisable at all. So forget about using it on an FPGA. 

 

Altera provides floating point cores for all FP operations. But why do you need floating point? FPGAs are not designed for floating point, so they take up a large amount of logic and have high latency to keep the clock frequencies high. Fixed point is much better because it is basically integer arithmatic that FPGAs are designed for.
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

I know but we want to compare the proejct on the fpga with later on the realization of the asic keeping the same structures. Do you know if all this operation like exp and log and mul of floating points are supported by the fp cores? 

Thanks for the reply
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

Have a look at the core list. http://www.altera.co.uk/literature/ug/ug_altfp_mfug.pdf. It has exponent and log functions 

 

You cannot use real type on asic either... the real type is for simulation only.
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

If logic count is a concern but not latency, create an IEEE754 compliant FPU with only basic add, mult, and divide. 

CORDIC can be applied to calculate almost all commonly used math functions iteratively.
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

If neither speed nor accuracy (especuially of the trig functions) is required, write an emulator for the old sinclair scientific calculator!

0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

I would prefer in order to accelerate all the design use a fp core from altera. Do you think that is so bad use it ?? I mean in terms of perfomances is it so slow??

0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

Its not slow. With a decent level of pipelining you should get high FMAX. But why do you need floating point? is fixed point unnacceptable?

0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

You are perfectly right but I need to follow some design constrains ( in the asic realization there will be a floating point unit) and so they want one also on the fpga.

0 Kudos
Reply