0
\$\begingroup\$

I don't know where to start from. I want to compile VHDL codes by ncvhdl.

But I have met some error messages like this when I have compiled like this.

ncvhdl text.vhdl text1.vhdl

USE ZOTLIB.ZOTLIB_COMPONENTS.all ncvhdl_p identifier (ZOTLIB) is not declared.

So how to make ZOTLIB and how to compile vhdl with libraries?

\$\endgroup\$
7
  • 1
    \$\begingroup\$ While searching what ncvhdl is I found this old [tutorial]( google.de/…) there is an example on how to build a lib file and how to include it. I'm no Cadence tool user so I don't know if this is up to date. \$\endgroup\$
    – Paebbels
    Commented Jun 1, 2015 at 2:08
  • \$\begingroup\$ Thanks but i acutally want to know is how to get and compile user-defined-library. \$\endgroup\$
    – gmotree
    Commented Jun 1, 2015 at 2:35
  • \$\begingroup\$ Typically, as I know , normal vhdl library used ieee , so we don't need to care specially about this library to compile. But user defined library is seeming as special. \$\endgroup\$
    – gmotree
    Commented Jun 1, 2015 at 2:39
  • 1
    \$\begingroup\$ What is zotlib? The tutorial describes how to write a *.lib file. This file assoziates a VHDL library with a directory in each line: DEFINE <lib name> <path>. This file in then loaded into ncvhdl by -cdslib <file.lib>`. \$\endgroup\$
    – Paebbels
    Commented Jun 1, 2015 at 8:14
  • \$\begingroup\$ @Paebbels Thanks zotlib is user defined library from opus, but I don't know opus, also how does it works. \$\endgroup\$
    – gmotree
    Commented Jun 1, 2015 at 8:51

1 Answer 1

1
\$\begingroup\$

If you don't have a precompiled ZOTLIB you'll need its source. Perhaps you can buy it from wherever you got this code.

If you have the source, add that info to the question, and it becomes a simple matter of how to run the compiler.

If you can't find the ZOTLIB source, how to move forward? I would simply comment out the library ZOTLIB/use ZOTLIB.* statements and compile the file anyway.

If you're lucky, it will simply compile. Often proprietary code treats these clauses as boilerplate, including them whether they are used or not. In such cases they can safely be eliminated. If the compile succeeds, you didn't need them. VHDL in this respect is much safer than languages like C where implicit declarations are assumed (possibly wrongly) if something goes wrong in the #includes.

However, you may see compilation errors of the form entity ZOTLIB.ZOTLIB_Components.DFF not found at line xxy

If you're lucky, there will only be a few, or they all reference the same few components. Now you need to replace the missing units. This requires knowledge (occasionally encrypted in the form of "documentation") as to what the missing units do.

In the case of entity ZOTLIB.ZOTLIB_Components.DFF it's reasonably likely that the component is a D-type flipflop, which you can borrow from somebody elses library or replace with a few lines of VHDL.

In the case of entity ZOTLIB.ZOTLIB_Components.FFT or entity ZOTLIB.ZOTLIB_Components.80186 you are probably out of luck, as not only do you need to write an FFT processor or Intel-compatible CPU, but it must be an exact match for the way ZOTLIB implemented it. At that point, this VHDL file is beyond rescue, you're better starting from scratch.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.