Search code examples
c++ccompiler-errorsvhdlghdl

ghdl missing util.misc_conv_pkg ubuntu 14.04


I am trying to compile vhdl code using ghdl compiler. However I am missing two util libraries:

util.misc_conv_pkg and
util.vstring.

therefore this code is not working

LIBRARY util;
  USE util.misc_conv_pkg.ALL;
  USE util.vstring.ALL;

I have tried all possible installations methods I found: http://ghdl.free.fr/site/pmwiki.php?n=Main.Installation or https://sourceforge.net/p/ghdl-updates/wiki/Installing%20ghdl/

But it is still not working. How do i fix this.


Solution

  • You need to find the source for those packages and compile them into the util library. They are part of the project you're working on, not part of VHDL.

    If you can't find them, just comment out the USE clauses. Then one of two things will happen...

    1. They aren't actually used at all, in which case the project will compile and work fine without them, and you have cleaned it up by eliminating unnecessary dependencies. It's amazing how often this is the case with those deprecated std_logic_arith packages.
    2. Some functions or declarations from them are used, in which case compilation will fail with a fairly accurate description of what's missing. (Add the first few to the question if necessary).

    Normally with a "util" library, the functionality is fairly obvious, so you can either find a more standard or more portable way of doing it, or you can write your own package that fulfils JUST the bits required for this project.