Forum Discussion

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

Custom library in Altera

Hi all,

I have a custom library of components which I will be using on my projects on demand. I have put these components in a directory called elements. In each of the entities and packages in this directory I have put the directive -- synthesis library elements at the top of each file.I have also wrote a package that calls these entities as a component as well as some custom functions. I have called this Elements_Package

In the VHDL units that will be using these entities I have used the directive library elements and the use clause use elements.elements_package.all. I have also included the path in the Tools-Options-Libraries-Global libraries.

When running the synthesis tool I am getting this error "error (10481): vhdl use clause error at design.vhd: design library "elements" does not contain primary unit "elements_package"" and "error (10800): vhdl error at design.vhd(7): selected name in use clause is not an expanded name"

i am using quartus 11.0sp1

What am I doing wrong?

Thanks,

jozamm

4 Replies

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

    Usually thi happens when you haven't yet compiled the elements package. Make sure it comes first in the file list.

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

    Hi,

    Thanks a lot. So should it come even before the library ieee declaration?

    Thanks.

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

    Add the 'Elements_Package.vhd' source file to the Quartus II project (Assignments->Settings->Files). There is no real advantage in specifying a specific library, 'Elements' in this case. You can use the default 'work' library.

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

    Hi,

    Thanks a lot. Its better to put everything in a package and adding the package to the project.

    Regards,

    jozamm