Add some detail on how libraries work.

This commit is contained in:
Stephen Williams 2011-08-05 12:11:54 -07:00
parent 13ecb67717
commit 3e3b83da30
1 changed files with 22 additions and 1 deletions

View File

@ -28,4 +28,25 @@ LIBRARY FORMAT:
The vhdlpp program stores libraries as directory that contain
packages. The name of the directory (in lower case) is the name of the
library as used on the "import" statement. Within that library, there
are packages in files named <foo>.pkg.
are packages in files named <foo>.pkg. For example:
<directory>/...
sample/...
test1.pkg
test2.pkg
bar/...
test3.pkg
Use the "+vhdl-libdir+<directory>" record in a config file to tell
Icarus Verilog that <directory> is a place to look for libraries. Then
in your VHDL code, access packages like this:
library sample;
library bar;
use sample.test1.all;
use bar.test3.all;
The *.pkg files are just VHDL code containing only the package with
the same name. When Icarus Verilog encounters the "use <lib>.<name>.*;"
statement, it looks for the <name>.pkg file in the <lib> library and
parses that file to get the package header declared therin.