Working
with precompiled modules
Use of precompiled modules is a powerful feature of vIDE that allows you
to reuse your Verilog code without the overhead of re-parsing the sources.
Each precompiled module is stored inside a file with the same name as
the module's identifier and with the extension ".vo". The interpreter
expects to find such files inside the current directory or in one of those
given with the "-o" option (inside the IDE you can use the Preferences
dialog box to add custom directories).
Using precompiled modules
They're stored in the vIDE standard library directory (called objects),
or in the directory given using either the -Dvide.libdir command-line JVM
property, or the Library directory option in the Preferences
dialog box. So, as you presume, there's nothing special to do in order
to take advantage of them. This is due to the module name resolving mechanism
(inspired from the Java Class Loader :). The module finding algorithm works
in two steps: first, a module cache is searched for a matching module for
the given name. If it isn't found, then a file with the same name as the
module and the extension ".vo" is searched inside some known directories.
If the file is found, it is assumed to contain the compiled form of the
required module, and thus loaded into the cache.
Creating the precompiled modules
Step one
After you finished writing&testing your modules, add one (or more)
$export
directives with the following syntax:
$export( <exported_module_identifier> * );
This directive can be placed anywhere in the source but outside any
moduleor
primitive construct; also, for documentation purposes it is recommended
to put them at the top of the Verilog source file that contains the modules.
Step two
Run the command line interpreter with the -l option. This
will cause object files to be created inside the current working directory.
You can move now the object files into a personal library directory or
in the vIDE standard library directory.