Forum Discussion

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

Fixed point library in VHDL

Hi, On another thread, i was suggested to use the fixed point library in VHDL. I've been trying to get it to work for several days, but I dont think i am including the files correctly in Quartus 14.1. Can someone please let me know what steps I should follow to add the appropriate package/library to my quartus project to use the fixed point types such as sfixed and ufixed? I am ok to use with VHDL-93 or VHDL-2008, whichever is easier. thank you!

5 Replies

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

    You need download the '93 version of the package from www.vhdl.org/fphdl add it to your project. Quartus doesn't have proper 2008 support yet. The 2008 switch is just a small subset of new features.

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

    --- Quote Start ---

    You need download the '93 version of the package from www.vhdl.org/fphdl add it to your project. Quartus doesn't have proper 2008 support yet. The 2008 switch is just a small subset of new features.

    --- Quote End ---

    Hi, Thank you. Would you be able to tell me how I can do that correctly? I tried putting the files in the same folder as my top level entity file but quartus cant seem to find it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you need to add the files to your quartus project. Quartus cannot automatically find any files.

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

    --- Quote Start ---

    you need to add the files to your quartus project. Quartus cannot automatically find any files.

    --- Quote End ---

    Hi, I tried that, the way it said on that website for Altera. But I'm still getting an error saying ufixed is used but not declared. ( it took a long time to compile, so im guessing it did compile all those files first so im not sure why it didnt find the definition of ufixed)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thats normally because you didnt include the fixed point library in your source code:

    
    library <something>;
    use <something>.fixed_pkg.all;