Lee,
A package in VHDL is like a *.h file in C except that
the reference to a package is the compiled version and
not the source version (*.h). This ensures that all
designs use the same compiled version of the package.
Consider a large project - if someone changes a package
and only recompiles their package and their subblock -
if another block references the package, the design will
not load. With a *.h file, the software guys call this
a build problem and it takes some design teams a while
to debug.
A library on the other hand is nothing more than a
container of compiled programs (like a collection of
*.o files in C). The cool thing about VHDL libraries
is that separate libraries have separate name spaces.
This way if I design an FPGA and you design an FPGA
and we both name our CPU interface block CPUIF, then
we compile our chips into separate named libraries and
life is good.
Cheers,
Jim
Hi,
In VHDL, package and library are introduced. What is difference
between them? Library must be obtained after compiling package,right?
In my openion, we don't need library and just include package as head
file in C/C++. If so, anything wrong?
Thanks,
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:
[email protected]
SynthWorks Design Inc.
http://www.SynthWorks.com
1-503-590-4787
Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~