Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

VHDL and Fixed Point

Altera_Forum
Honored Contributor II
2,165 Views

Hello all, 

 

VHDL 2008 have fixed point types but these feature aren't included in Quartus, downloading from vhdl.org fixed_pkg_c I can use fixed point with add,mul and div but it lack operations like sqrt,exp,sin,etc.. 

 

1) There is a good Fixed Point Math IP or VHDL library? 

2) Why Altera have only floating point IP? 

3) When fixed point types will be implemented in Quartus? 

 

Thanks
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
786 Views

1) The package you point to is the arithmatic package, and it works just fine in Quartus (I used it many years ago successfully) 

2) because fixed point arithmatic is just integer arithmatic, so no special IP is required 

3) No Idea. make an enhancement request for it. The difficulty is in supporting the package generics that 2008 uses. But the '93 compatible versions you have downloaded work just fine.
0 Kudos
Altera_Forum
Honored Contributor II
786 Views

Thank you 

 

For 1) I mean a libray with trascendental functions like exp,log,etc.. in fixed points without implementing and testing my own algorithm.
0 Kudos
Altera_Forum
Honored Contributor II
786 Views

I dont know of any. If they exist there may be one on opencores.org. Otherwise you'll have to make your own.

0 Kudos
Altera_Forum
Honored Contributor II
786 Views

In folder C:\altera\15.0\quartus\libraries\vhdl\ieee\2008 there are fixed_pkg_vhdl2008.vhd etc.. there is a way to use it without adding files to project? 

Because if I add "fixed_float_types_c.vhdl" "fixed_pkg_c.vhdl" to project then Modelsim complaints that  

 

(vcom-1295) Function "to_ufixed" has already been defined in this region. 

 

and similar messages
0 Kudos
Altera_Forum
Honored Contributor II
786 Views

Modelsim have IEEE library with its fixed_pkg_c that conflict with mine in work. There is a way to solve? 

 

Thanks
0 Kudos
Altera_Forum
Honored Contributor II
786 Views

At the end I created a custom script to compile testbench that exclude fixed_pkg_c and fixed_float_types_c files. 

Now all works fine :)
0 Kudos
Reply