From 3e3b83da3046498a4ef31e9de4e9943a3839b7ad Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Fri, 5 Aug 2011 12:11:54 -0700 Subject: [PATCH] Add some detail on how libraries work. --- vhdlpp/README.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/vhdlpp/README.txt b/vhdlpp/README.txt index 4f073570c..2007dd436 100644 --- a/vhdlpp/README.txt +++ b/vhdlpp/README.txt @@ -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 .pkg. +are packages in files named .pkg. For example: + + /... + sample/... + test1.pkg + test2.pkg + bar/... + test3.pkg + +Use the "+vhdl-libdir+" record in a config file to tell +Icarus Verilog that 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 ..*;" +statement, it looks for the .pkg file in the library and +parses that file to get the package header declared therin.