PackagesUse Clause
Packages must be made visible before their contents can be used
- The USE clause makes packages visible to entities, architectures, and other packages
-- use only the binary and add_bits3 declarations
USE my_stuff.binary, my_stuff.add_bits3;
... ENTITY declaration...
... ARCHITECTURE declaration ...
-- use all of the declarations in package my_stuff
... ENTITY declaration...
... ARCHITECTURE declaration ...
Notes:
Packages are made visible to a VHDL description through the use of the USE clause. This statement comes at the beginning of the entity or architecture file and makes the contents of a package available within that file.
The USE clause can select all or part of a particular package. In the first example above, only the binary data type and add_bits3 procedure are made visible. In the second example, the full contents of the package are made visible by use of the keyword ALL in the use clause.