Forum Discussion

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

question about VHDL library

Hi all,

when I compile my VHDL design, there is always a error saying that * design library "book_lib" does not contain primary unit "utils_pkg"*.

Does anyone know how to fix it?Thanks

Following is my code:

library ieee,book_lib;

use ieee.std_logic_1164.all,book_lib.utils_pkg.all;

--bla bla bla

4 Replies

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

    I am not familiar with VHDL, but is it supposed be a comma after "all" ?

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

    library uses are usually ended with a semi-colon (;).

    But this error means you have not compiled the utils package into the book_lib library.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    library uses are usually ended with a semi-colon (;).

    --- Quote End ---

    Not necessary: you can write a comma separated list of things to use.

    use ieee.NUMERIC_BIT.all, ieee.std_logic_1164.all;

    is the same as:

    use ieee.NUMERIC_BIT.all;
    use ieee.std_logic_1164.all;
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You need to find the file that contains package utils_pkg, and add it to your project, in the book_lib library.