Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

VHDL and Fixed Point

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

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

    Thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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 :)