Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21345 Discussions

question about VHDL library

Altera_Forum
Honored Contributor II
2,639 Views

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
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,915 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
1,915 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
1,915 Views

 

--- 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;
0 Kudos
Altera_Forum
Honored Contributor II
1,915 Views

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

0 Kudos
Reply