153 lines
6.5 KiB
HTML
153 lines
6.5 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en" data-content_root="../">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>VVP as a library — Icarus Verilog documentation</title>
|
|
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=cb25574f" />
|
|
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
|
|
<script src="../_static/doctools.js?v=888ff710"></script>
|
|
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
<link rel="icon" href="../_static/favicon.ico"/>
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
<link rel="next" title="vhdlpp Command Line Flags" href="vhdlpp_flags.html" />
|
|
<link rel="prev" title="VVP Interactive Mode" href="vvp_debug.html" />
|
|
|
|
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
|
|
|
|
</head><body>
|
|
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
|
|
|
|
<div class="body" role="main">
|
|
|
|
<section id="vvp-as-a-library">
|
|
<h1>VVP as a library<a class="headerlink" href="#vvp-as-a-library" title="Link to this heading">¶</a></h1>
|
|
<p>If configured with</p>
|
|
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>--enable-libvvp
|
|
</pre></div>
|
|
</div>
|
|
<p>the vvp program will be built as a small stub that
|
|
depends on a shared library, libvvp.so.
|
|
The library may also be used to include a vvp simulation
|
|
in a larger program. Typically, the simulation communicates
|
|
with its host program using VPI, but since
|
|
almost all the functions of vvp are included in the library
|
|
it may be possible to use text output and interactive mode.</p>
|
|
<p>The accessible functions of the library are defined and documented
|
|
in the header file, vvp/libvvp.h. Although vvp is a C++ program, the
|
|
header file presents a C interface.</p>
|
|
<p>Note that the vvp software was not designed to be used this way
|
|
and the library is a straightforward recompilation of the program code.
|
|
That imposes some restrictions, mostly arising from the use
|
|
of static variables: only a single run of a single simulation instance
|
|
can be expected to work without special actions.
|
|
To mitigate these restrictions, the library may by loaded dynamically
|
|
and unloaded at the end of each simulation run.
|
|
Parallel simulation should be possible by making multiple copies
|
|
of the library with different names.</p>
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h1 class="logo"><a href="../index.html">Icarus Verilog</a></h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Navigation</h3>
|
|
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
|
<ul class="current">
|
|
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Icarus Verilog Usage</a><ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation Guide</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="getting_started.html">Getting Started With Icarus Verilog</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="simulation.html">Simulation Using Icarus Verilog</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="command_line_flags.html">iverilog Command Line Flags</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="command_files.html">Command File Format</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="verilog_attributes.html">Verilog Attributes</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="ivlpp_flags.html">IVLPP - IVL Preprocessor</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="vvp_flags.html">VVP Command Line Flags</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="vvp_debug.html">VVP Interactive Mode</a></li>
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">VVP as a library</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="vhdlpp_flags.html">vhdlpp Command Line Flags</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="gtkwave.html">Waveforms With GTKWave</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="vpi.html">Using VPI</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="icarus_verilog_extensions.html">Icarus Verilog Extensions</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="icarus_verilog_quirks.html">Icarus Verilog Quirks</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="reporting_issues.html">Reporting Issues</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../targets/index.html">The Icarus Verilog Targets</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../developer/index.html">Icarus Verilog Developer Support</a></li>
|
|
</ul>
|
|
|
|
<div class="relations">
|
|
<h3>Related Topics</h3>
|
|
<ul>
|
|
<li><a href="../index.html">Documentation overview</a><ul>
|
|
<li><a href="index.html">Icarus Verilog Usage</a><ul>
|
|
<li>Previous: <a href="vvp_debug.html" title="previous chapter">VVP Interactive Mode</a></li>
|
|
<li>Next: <a href="vhdlpp_flags.html" title="next chapter">vhdlpp Command Line Flags</a></li>
|
|
</ul></li>
|
|
</ul></li>
|
|
</ul>
|
|
</div>
|
|
<div id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="footer">
|
|
©2024-2025, Stephen Williams.
|
|
|
|
|
|
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
|
|
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
|
|
|
|
|
|
<a href="../_sources/usage/vvp_library.rst.txt"
|
|
rel="nofollow">Page source</a>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |