Forum Discussion

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

ieee.fixed_pkg in Quartus Prime 16.0 Lite Edition

Hi,

I just recently started fiddling with FPGAs and I am currently trying to learn VHDL 2008.

One of the textbooks I am following has an example of a MAC implementation that uses a type called u_sfixed that is a part of the fixed_pkg library in ieee.

However, when trying to compile the code, Quartus does not seem to recognise the ieee.fixed_pkg package.

I tried the same code in Active-HDL and it compiled without issues.

I have marked "VHDL 2008" in the project setting.

What am I doing wrong?

Thanks for any support.

6 Replies

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

    Afaik, the fixed_pkg is only available in the pro version of Quartus prime. Altera has only had limited 2008 support for several years, with those features being some minor usability enhancements, not the new packages.

    Raise an enhancement request with altera and complain.

    You can download the '93 compatability versions from here http://wayback.archive.org/web/20160313200350/http://vhdl.org/fphdl/index.html

    You can include them as source files in your own project and they should work just fine (I used them back in 2009/2010) without a problem.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    PS. VHDL 2008 doesnt really add anything to the language for synthesis. Anything new in VHDL 2008 can be done with the 93 version.

    In simulation, it adds many enhancements.

    I would recommend you keep your synthesisable code in '93 as this will ensure maximum compatability. But please use the 2008 code in testbenches (as it makes life much easier).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for the fast and helpful reply! :) I will focus on the '93 version.

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

    Hmm...oddly enough, there is a file called "fixed_pkg_vhdl2008.vhd" in the folder ..altera_lite\16.0\quartus\libraries\vhdl\ieee\2008 of the installation . Including that file removes the error but it seems that there's a "NEW" statement in the file that is not recognized by the compiler...

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

    That is the pure 2008 code, 2008 allows generics on packages and you have to create a "new" version of a package with the generics set before you can use it in your design. The file you found is an instantiation of the fixed_generic_pkg.

    Only the pro versions (15.1 and 16.0) should support the packages, not the prime versions. They're probably just included in the installation by default.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    That is the pure 2008 code, 2008 allows generics on packages and you have to create a "new" version of a package with the generics set before you can use it in your design. The file you found is an instantiation of the fixed_generic_pkg.

    Only the pro versions (15.1 and 16.0) should support the packages, not the prime versions. They're probably just included in the installation by default.

    --- Quote End ---

    I see! Thanks again.