Posted on 2011-05-26 by Philippe Faes
Last modified on 2023-06-06
Tagged as: EmacsVHDLLibraries

No VHDL Libraries in Emacs VHDL mode

In VHDL, the concept of libraries is used to separate namespaces. The idea is that separate teams can develop code in their own library, without previously agreeing on naming conventions. Even if both teams implement an entity called memory, they will still be able to use both implementations in a joint project. Assuming the two implementations are made by Acme, corp. and Yoyodyne, Inc., they may be instantiated as acme.memory(RTL) and yoyodyne.memory(RTL) respectively.

There is a some debate about whether or not to use libraries in VHDL code. Especially sub-prime synthesis tools are known not to support VHDL libraries. A quick survey showed that today, most tools support libraries. Notorious exception is Quartus, which does not support libraries for entities.

In the this blog post, I’m assuming that the benefits of VHDL libraries are established. If you disagree and you, nor your colleagues, nor your customers, nor your IP vendors, nor any companies you ever intend to acquire, ever use libraries at all, feel free to skip the rest of this article.

Emacs

The use of libraries is not supported in Emacs. From the documentation:

Limitations: Only library units and dependencies within the current library are considered. Makefiles for designs that span multiple libraries are not (yet) supported.

Sigasi

Sigasi HDT has supported libraries since the beginning. Since november 2009, Sigasi even offers the option to show the library name for each file in your project: To encourage the use of VHDL libraries to organize your projects. We now clearly mark each VHDL file and folder with the name of the library they belong to.

It is unlikely that Emacs users will use VHDL libraries. They are limiting themselves and their projects. As Adam Maslow could have said it: If the only tool you have is a hammer, you’re always going to shy away from Phillips screws.

See also