doc/manual.html in ruby-vpi-18.0.0 vs doc/manual.html in ruby-vpi-18.0.1

- old
+ new

@@ -3,11 +3,11 @@ <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="common.css" media="screen" /> <link rel="stylesheet" type="text/css" href="print.css" media="print" /> <link rel="alternate" type="application/rss+xml" href="http://ruby-vpi.rubyforge.org/doc/rss.xml" title="RSS feed for this project." /> - <title>Ruby-VPI 18.0.0 user manual</title> + <title>Ruby-VPI 18.0.1 user manual</title> </head> <body> <div id="site-links"> <a href="readme.html">Home</a> &middot; <a href="manual.html">Manual</a> @@ -21,17 +21,17 @@ </div> <div id="body"> <hr style="display: none"/> - <div id="Ruby-VPI_18.0.0_user_manual" class="front_cover"> - <h1 class="title"><big>Ruby-VPI 18.0.0 user manual</big></h1> + <div id="Ruby-VPI_18.0.1_user_manual" class="front_cover"> + <h1 class="title"><big>Ruby-VPI 18.0.1 user manual</big></h1> <h2 class="author">Suraj N. Kurapati</h2> - <h3 class="date">31 July 2007</h3> + <h3 class="date">02 August 2007</h3> <p> <div id="About_this_manual" class="paragraph"> <p class="title">About this manual</p> @@ -42,11 +42,11 @@ <p>In addition, this manual is distributed as one big HTML file so that you can easily search for a particular topic using nothing more than your web browser&#8217;s built-in text search mechanism. This facilitates offline reading, where an Internet search engine is not available.</p> - <p>You can give feedback about this manual and, in general, any aspect of the Ruby-VPI project on the <a href="http://rubyforge.org/forum/?group_id=1339">project forums</a>. Furthermore, you can <a href="#hacking.manual">edit this manual</a> and contribute your improvements to the <a href="http://rubyforge.org/tracker/?group_id=1339">project patches</a>. Finally, you can find the newest version of this manual at the <a href="http://ruby-vpi.rubyforge.org/">Ruby-VPI project website</a>.</p> + <p>You can give feedback about this manual and, in general, any aspect of the Ruby-VPI project on the <a href="http://ruby-vpi.rubyforge.org/forum/">project forums</a>. Furthermore, you can <a href="#hacking.manual">edit this manual</a> and contribute your improvements to the <a href="http://ruby-vpi.rubyforge.org/tracker/">project patches</a>. Finally, you can find the newest version of this manual at the <a href="http://ruby-vpi.rubyforge.org/">Ruby-VPI project website</a>.</p> </div> <div id="Legal_notice" class="paragraph"> <p class="title">Legal notice</p> @@ -62,11 +62,11 @@ <hr style="display: none"/> <div id="intro" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607201618">2</a> + Chapter <a href="#a-606978988">2</a> <br/><br/> <big>Welcome</big> </h1> @@ -88,23 +88,23 @@ <p> <hr style="display: none"/> <div id="resources" class="section"> <h2 class="title"> - <a href="#a-605996598">2.1</a> + <a href="#a-606913148">2.1</a> &nbsp; Resources </h2> <div id="Records" class="paragraph"> <p class="title">Records</p> <ul> - <li><a href="history.html#a18.0.0">What&#8217;s new</a> - &#8211; release notes for version 18.0.0. + <li><a href="history.html#a18.0.1">What&#8217;s new</a> + &#8211; release notes for version 18.0.1. <ul> <li><a href="history.html">History</a> &#8211; a record of all release notes.</li> <li><a type="application/rss+xml" href="http://ruby-vpi.rubyforge.org/doc/rss.xml"><img src="images/feed-icon-28x28.png" alt="RSS feed for release announcements" style="float: right"/></a> <a href="http://ruby-vpi.rubyforge.org/doc/rss.xml">RSS feed</a> &#8211; keep track of new releases at your leisure.</li> @@ -139,23 +139,25 @@ <div id="Facilities" class="paragraph"> <p class="title">Facilities</p> <ul> - <li><a href="http://rubyforge.org/frs/?group_id=1339">Downloads</a> + <li><a href="http://ruby-vpi.rubyforge.org/download/">Downloads</a> &#8211; obtain release packages</li> - <li><a href="http://ruby-vpi.rubyforge.org/src/ruby-vpi/">Source code</a> + <li><a href="http://ruby-vpi.rubyforge.org/code/">Source code</a> &#8211; browse online or obtain with <a href="http://darcs.net">Darcs</a>.</li> - <li><a href="http://rubyforge.org/forum/?group_id=1339">Forums</a> + <li><a href="http://ruby-vpi.rubyforge.org/forum/">Forums</a> &#8211; discuss things and ask questions.</li> - <li><a href="http://rubyforge.org/tracker/?group_id=1339">Bugs</a> + <li><a href="http://ruby-vpi.rubyforge.org/mail/">Mailing list</a> + &#8211; discuss things and ask questions.</li> + <li><a href="http://ruby-vpi.rubyforge.org/tracker/">Bugs</a> &#8211; report defects in the software.</li> - <li><a href="http://rubyforge.org/tracker/?group_id=1339">Patches</a> + <li><a href="http://ruby-vpi.rubyforge.org/tracker/">Patches</a> &#8211; submit patches to source code.</li> - <li><a href="http://rubyforge.org/tracker/?group_id=1339">Requests</a> + <li><a href="http://ruby-vpi.rubyforge.org/tracker/">Requests</a> &#8211; request new features or get support.</li> - <li><a href="http://rubyforge.org/projects/ruby-vpi/">Project portal</a> + <li><a href="http://ruby-vpi.rubyforge.org/portal/">Project portal</a> &#8211; hosted generously by <a href="http://rubyforge.org">RubyForge</a>.</li> </ul> </div> @@ -166,11 +168,11 @@ <p> <hr style="display: none"/> <div id="intro.features" class="section"> <h2 class="title"> - <a href="#a-605842608">2.2</a> + <a href="#a-606925458">2.2</a> &nbsp; Features </h2> @@ -237,11 +239,11 @@ <p> <hr style="display: none"/> <div id="intro.reqs" class="section"> <h2 class="title"> - <a href="#a-607160758">2.3</a> + <a href="#a-606937688">2.3</a> &nbsp; Requirements </h2> @@ -256,43 +258,75 @@ <ul> <li><a href="http://www.synopsys.com/products/simulation/simulation.html">Synopsys VCS</a> &#8211; any version that supports the <tt>-load</tt> option is acceptable.</li> - <li><a href="http://www.model.com">Mentor Modelsim</a> + </ul> + + + <ul> + <li><a href="http://www.model.com">Mentor Modelsim</a> &#8211; any version that supports the <tt>-pli</tt> option is acceptable.</li> - <li><a href="http://www.cadence.com/products/functional_ver/nc-verilog/">Cadence NC-Sim</a> - &#8211; any version that supports the <tt>+loadvpi</tt> option is <em>mostly</em> acceptable because you <strong>will not</strong> be able to <a href="manual.html#problem.ncsim.vpiForceFlag">force values onto wires</a>.</li> - <li><a href="http://www.pragmatic-c.com/gpl-cver/">GPL Cver</a> + </ul> + + + <ul> + <li><a href="http://www.cadence.com/products/functional_ver/nc-verilog/">Cadence NC-Sim</a> + &#8211; any version that supports the <tt>+loadvpi</tt> option should be acceptable. However, version 05.83-s003 is <em>mostly</em> acceptable because you <strong>will not</strong> be able to <a href="manual.html#problem.ncsim.vpiForceFlag">force values onto wires</a>.</li> + </ul> + + + <ul> + <li><a href="http://www.pragmatic-c.com/gpl-cver/">GPL Cver</a> &#8211; version 2.11a or newer is acceptable.</li> - <li><a href="http://www.geda.seul.org/tools/icarus/index.html">Icarus Verilog</a> + </ul> + + + <ul> + <li><a href="http://www.geda.seul.org/tools/icarus/index.html">Icarus Verilog</a> &#8211; version 0.8 is <em>mostly</em> acceptable because you <strong>will not</strong> be able to <a href="manual.html#Accessing_a_handle_s_relatives">access child handles through method calls</a>. The reason for this limitation is explained <a href="manual.html#problems.ivl.vpi_handle_by_name.absolute-paths">in the user manual</a>.</li> </ul> </div> <div id="Compilers" class="paragraph"> <p class="title">Compilers</p> <ul> <li><a href="http://en.wikipedia.org/wiki/Make">make</a> &#8211; any flavor should be acceptable.</li> - <li>C compiler + </ul> + + + <ul> + <li>C compiler &#8211; the <a href="http://www.gnu.org/software/gcc/" title="GCC">GNU Compiler Collection</a> is preferred, but any C compiler should be acceptable.</li> - <li><a href="http://www.swig.org/download.html">SWIG</a> + </ul> + + + <ul> + <li><a href="http://www.swig.org/download.html">SWIG</a> &#8211; version 1.3.29 or newer is necessary.</li> - <li><a href="http://www.ruby-lang.org/en/downloads/">Ruby</a> + </ul> + + + <ul> + <li><a href="http://www.ruby-lang.org/en/downloads/">Ruby</a> &#8211; version 1.8 or newer, including header and linkable object files for building extensions, is necessary. You can install Ruby by following <a href="http://www.ruby-lang.org/en/downloads/">these instructions</a>.</li> </ul> </div> <div id="Libraries" class="paragraph"> <p class="title">Libraries</p> <ul> <li><a href="http://en.wikipedia.org/wiki/Pthreads" title="pthreads">POSIX threads</a> &#8211; header and linkable object files, and operating system support for this library are necessary.</li> - <li><a href="http://rubyforge.org/frs/?group_id=126">RubyGems</a> + </ul> + + + <ul> + <li><a href="http://rubyforge.org/frs/?group_id=126">RubyGems</a> &#8211; any recent version should be acceptable. You can install RubyGems by following <a href="http://www.rubygems.org/read/chapter/3">these instructions</a>.</li> </ul> </div> </p> @@ -303,11 +337,11 @@ <p> <hr style="display: none"/> <div id="intro.applications" class="section"> <h2 class="title"> - <a href="#a-607163318">2.4</a> + <a href="#a-606940248">2.4</a> &nbsp; Applications </h2> @@ -349,11 +383,11 @@ <p> <hr style="display: none"/> <div id="intro.appetizers" class="section"> <h2 class="title"> - <a href="#a-607165918">2.5</a> + <a href="#a-606942848">2.5</a> &nbsp; Appetizers </h2> @@ -417,11 +451,11 @@ <p> <hr style="display: none"/> <div id="intro.license" class="section"> <h2 class="title"> - <a href="#a-607168788">2.6</a> + <a href="#a-606945718">2.6</a> &nbsp; License </h2> @@ -463,11 +497,11 @@ <p> <hr style="display: none"/> <div id="intro.related-works" class="section"> <h2 class="title"> - <a href="#a-607174178">2.7</a> + <a href="#a-606951108">2.7</a> &nbsp; Related works </h2> @@ -484,11 +518,11 @@ <p> <hr style="display: none"/> <div id="intro.related-works.pli" class="section"> <h3 class="title"> - <a href="#a-607171238">2.7.1</a> + <a href="#a-606948168">2.7.1</a> &nbsp; Ye olde PLI </h3> @@ -511,11 +545,11 @@ <hr style="display: none"/> <div id="setup" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607242278">3</a> + Chapter <a href="#a-607019648">3</a> <br/><br/> <big>Setup</big> </h1> @@ -523,11 +557,11 @@ <hr style="display: none"/> <div id="setup.manifest" class="section"> <h2 class="title"> - <a href="#a-607204808">3.1</a> + <a href="#a-606982178">3.1</a> &nbsp; Manifest </h2> @@ -549,11 +583,11 @@ <hr style="display: none"/> <div id="setup.reqs" class="section"> <h2 class="title"> - <a href="#a-607210248">3.2</a> + <a href="#a-606987618">3.2</a> &nbsp; Requirements </h2> @@ -566,11 +600,11 @@ <div class="admonition"> <div class="tip" id="Add_support_for_your_Verilog_simulator"> <img src="images/tango/tip.png" alt="tip" class="icon"/> - <p class="title"><a href="#a-607207278">Tip 1</a>. &nbsp; Add support for your Verilog simulator</p> + <p class="title"><a href="#a-606984648">Tip 1</a>. &nbsp; Add support for your Verilog simulator</p> Write a <a href="http://rubyforge.org/tracker/?group_id=1339">support request</a> for your simulator, while providing a sample transcript of the commands you use to run a test with your simulator, and I will add support for your simulator in the next release! </div> </div> </p> @@ -580,11 +614,11 @@ <hr style="display: none"/> <div id="setup.recom" class="section"> <h2 class="title"> - <a href="#a-607216418">3.3</a> + <a href="#a-606993788">3.3</a> &nbsp; Recommendations </h2> @@ -595,11 +629,11 @@ <p> <hr style="display: none"/> <div id="setup.recom.merger" class="section"> <h3 class="title"> - <a href="#a-607213078">3.3.1</a> + <a href="#a-606990448">3.3.1</a> &nbsp; Text merging tool </h3> @@ -639,11 +673,11 @@ <hr style="display: none"/> <div id="setup.inst" class="section"> <h2 class="title"> - <a href="#a-607225558">3.4</a> + <a href="#a-607002928">3.4</a> &nbsp; Installation </h2> @@ -665,22 +699,22 @@ <div class="admonition"> <div class="tip" id="Tuning_for_maximum_performance"> <img src="images/tango/tip.png" alt="tip" class="icon"/> - <p class="title"><a href="#a-607218968">Tip 2</a>. &nbsp; Tuning for maximum performance</p> + <p class="title"><a href="#a-606996338">Tip 2</a>. &nbsp; Tuning for maximum performance</p> You can tune your installation of Ruby-VPI for maximum performance by adding your C compiler&#8217;s optimization flag to the <code class="code"><span style="color:#036; font-weight:bold">CFLAGS</span></code> environment variable <em>before</em> you run the <pre>gem install -y ruby-vpi</pre> command. For example, if your C compiler is GCC, then you can set <code class="code"><span style="color:#036; font-weight:bold">CFLAGS</span></code> to <tt>-O9</tt> for maximum optimization. </div> </div> <hr style="display: none"/> <div id="setup.inst.windows" class="section"> <h3 class="title"> - <a href="#a-607221498">3.4.1</a> + <a href="#a-606998868">3.4.1</a> &nbsp; Installing on Windows </h3> @@ -727,11 +761,11 @@ <hr style="display: none"/> <div id="setup.maintenance" class="section"> <h2 class="title"> - <a href="#a-607227838">3.5</a> + <a href="#a-607005208">3.5</a> &nbsp; Maintenance </h2> @@ -751,11 +785,11 @@ <hr style="display: none"/> <div id="organization" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607196488">4</a> + Chapter <a href="#a-607025428">4</a> <br/><br/> <big>Organization</big> </h1> @@ -771,11 +805,11 @@ <div class="formal"> <div class="figure" id="fig:organization.detail"> - <p class="title"><a href="#a-607244878">Figure 1</a>. &nbsp; Where does Ruby-VPI fit in?</p> + <p class="title"><a href="#a-607022248">Figure 1</a>. &nbsp; Where does Ruby-VPI fit in?</p> <img src="figures/organization_detailed.png" alt="" /> </div> </div> @@ -785,11 +819,11 @@ <p> <hr style="display: none"/> <div id="overview.relay" class="section"> <h2 class="title"> - <a href="#a-607251168">4.1</a> + <a href="#a-607028538">4.1</a> &nbsp; Ruby/Verilog interaction </h2> @@ -808,11 +842,11 @@ <div class="formal"> <div class="figure" id="fig:ruby_relay"> - <p class="title"><a href="#a-607247688">Figure 2</a>. &nbsp; Interaction between Ruby and Verilog</p> + <p class="title"><a href="#a-607025058">Figure 2</a>. &nbsp; Interaction between Ruby and Verilog</p> <img src="figures/ruby_relay.png" alt="" /> <ol> @@ -834,11 +868,11 @@ <hr style="display: none"/> <div id="organization.tests" class="section"> <h2 class="title"> - <a href="#a-607256738">4.2</a> + <a href="#a-607034108">4.2</a> &nbsp; Tests </h2> @@ -851,11 +885,11 @@ <div class="formal"> <div class="figure" id="fig:organization"> - <p class="title"><a href="#a-607253638">Figure 3</a>. &nbsp; Organization of a test in Ruby-VPI</p> + <p class="title"><a href="#a-607031008">Figure 3</a>. &nbsp; Organization of a test in Ruby-VPI</p> <img src="figures/organization.png" alt="" /> </div> </div> @@ -874,11 +908,11 @@ <p> <hr style="display: none"/> <div id="VPI_in_Ruby" class="section"> <h2 class="title"> - <a href="#a-607326178">4.3</a> + <a href="#a-606948098">4.3</a> &nbsp; VPI in Ruby </h2> @@ -886,11 +920,11 @@ <hr style="display: none"/> <div id="Deviations_from_the_VPI_standard" class="section"> <h3 class="title"> - <a href="#a-607265658">4.3.1</a> + <a href="#a-607043028">4.3.1</a> &nbsp; Deviations from the VPI standard </h3> @@ -901,11 +935,11 @@ <p> <hr style="display: none"/> <div id="Names_are_capitalized" class="section"> <h4 class="title"> - <a href="#a-607259228">4.3.1.1</a> + <a href="#a-607036598">4.3.1.1</a> &nbsp; Names are capitalized </h4> @@ -922,11 +956,11 @@ <p> <hr style="display: none"/> <div id="a_vprintf__is__printf_" class="section"> <h4 class="title"> - <a href="#a-607261728">4.3.1.2</a> + <a href="#a-607039098">4.3.1.2</a> &nbsp; <code class="code">vprintf</code> is <code class="code">printf</code> </h4> @@ -959,11 +993,11 @@ <hr style="display: none"/> <div id="vpi.handles" class="section"> <h3 class="title"> - <a href="#a-607291198">4.3.2</a> + <a href="#a-607068568">4.3.2</a> &nbsp; Handles </h3> @@ -988,11 +1022,11 @@ <p> <hr style="display: none"/> <div id="Accessing_a_handle_s_relatives" class="section"> <h4 class="title"> - <a href="#a-607270878">4.3.2.2</a> + <a href="#a-607048248">4.3.2.2</a> &nbsp; Accessing a handle&#8217;s relatives </h4> @@ -1025,11 +1059,11 @@ <p> <hr style="display: none"/> <div id="Accessing_a_handle_s_properties" class="section"> <h4 class="title"> - <a href="#a-607273818">4.3.2.3</a> + <a href="#a-607051188">4.3.2.3</a> &nbsp; Accessing a handle&#8217;s properties </h4> @@ -1068,11 +1102,11 @@ <div class="formal"> <div class="figure" id="fig:method_naming_format"> - <p class="title"><a href="#a-607276618">Figure 4</a>. &nbsp; Method naming format for accessing a handle&#8217;s properties</p> + <p class="title"><a href="#a-607053988">Figure 4</a>. &nbsp; Method naming format for accessing a handle&#8217;s properties</p> <table> <tr> <th>Operation </th> <th>_ </th> @@ -1121,11 +1155,11 @@ <div class="formal"> <div class="table" id="tbl:accessors"> - <p class="title"><a href="#a-607279048">Table 1</a>. &nbsp; Possible accessors and their implications</p> + <p class="title"><a href="#a-607056418">Table 1</a>. &nbsp; Possible accessors and their implications</p> <table> <tr> <th>Accessor </th> <th>Kind of value accessed </th> @@ -1175,11 +1209,11 @@ <div class="formal"> <div class="table" id="ex:properties"> - <p class="title"><a href="#a-607281988">Table 2</a>. &nbsp; Examples of accessing a handle&#8217;s properties</p> + <p class="title"><a href="#a-607059358">Table 2</a>. &nbsp; Examples of accessing a handle&#8217;s properties</p> <table> <tr> <th rowspan="2">Ruby expression </th> <th colspan="6">Method naming format </th> @@ -1500,11 +1534,11 @@ <hr style="display: none"/> <div id="vpi.callbacks" class="section"> <h3 class="title"> - <a href="#a-607299628">4.3.3</a> + <a href="#a-607076998">4.3.3</a> &nbsp; Callbacks </h3> @@ -1520,11 +1554,11 @@ <div class="formal"> <div class="example" id="ex:callback"> - <p class="title"><a href="#a-607295148">Example 1</a>. &nbsp; Using a callback for value change notification</p> + <p class="title"><a href="#a-607072518">Example 1</a>. &nbsp; Using a callback for value change notification</p> <p>This example shows how to use a callback for notification of changes in a handle&#8217;s <code class="code"><span style="color:#036; font-weight:bold">VpiIntVal</span></code> property. When you no longer need this callback, you can tear it down using <code class="code">vpi_remove_cb(cb_handle)</code>.</p> <p>In this example, the handle being monitored is the <code class="code"><span style="color:#036; font-weight:bold">Counter</span>.count</code> signal from <a href="#fig:counter.v_decl">Example 3</a>.</p> @@ -1569,11 +1603,11 @@ <hr style="display: none"/> <div id="usage" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607334198">5</a> + Chapter <a href="#a-607149688">5</a> <br/><br/> <big>Usage</big> </h1> @@ -1581,11 +1615,11 @@ <hr style="display: none"/> <div id="usage.prototyping" class="section"> <h2 class="title"> - <a href="#a-607215298">5.1</a> + <a href="#a-607049328">5.1</a> &nbsp; Prototyping </h2> @@ -1623,11 +1657,11 @@ <hr style="display: none"/> <div id="How_does_prototyping_work_" class="section"> <h3 class="title"> - <a href="#a-607205498">5.1.2</a> + <a href="#a-607039268">5.1.2</a> &nbsp; How does prototyping work? </h3> @@ -1645,11 +1679,11 @@ <hr style="display: none"/> <div id="usage.debugger" class="section"> <h2 class="title"> - <a href="#a-607224358">5.2</a> + <a href="#a-607058778">5.2</a> &nbsp; Debugging </h2> @@ -1666,11 +1700,11 @@ <p> <hr style="display: none"/> <div id="usage.debugger.init" class="section"> <h3 class="title"> - <a href="#a-607219398">5.2.1</a> + <a href="#a-607053478">5.2.1</a> &nbsp; Advanced initialization </h3> @@ -1691,11 +1725,11 @@ <hr style="display: none"/> <div id="usage.test-runner" class="section"> <h2 class="title"> - <a href="#a-607246938">5.3</a> + <a href="#a-607082308">5.3</a> &nbsp; Test runner </h2> @@ -1721,11 +1755,11 @@ <p> <hr style="display: none"/> <div id="usage.test-runner.env-vars" class="section"> <h3 class="title"> - <a href="#a-607236808">5.3.1</a> + <a href="#a-607072228">5.3.1</a> &nbsp; Environment variables </h3> @@ -1768,11 +1802,11 @@ <div class="formal"> <div class="example" id="Running_a_test_with_environment_variables"> - <p class="title"><a href="#a-607232388">Example 2</a>. &nbsp; Running a test with environment variables</p> + <p class="title"><a href="#a-607065588">Example 2</a>. &nbsp; Running a test with environment variables</p> <p>Below, we enable the prototype and code coverage analysis: <pre>rake -f your_test_runner.rake PROTOTYPE=1 COVERAGE=1</pre></p> @@ -1792,11 +1826,11 @@ <hr style="display: none"/> <div id="usage.tools" class="section"> <h2 class="title"> - <a href="#a-607278778">5.4</a> + <a href="#a-607101458">5.4</a> &nbsp; Tools </h2> @@ -1828,11 +1862,11 @@ <p> <hr style="display: none"/> <div id="usage.tools.generate" class="section"> <h3 class="title"> - <a href="#a-607262938">5.4.1</a> + <a href="#a-607091638">5.4.1</a> &nbsp; Automated test generation </h3> @@ -1858,11 +1892,11 @@ <div class="admonition"> <div class="caution" id="Do_not_rename_generated_files"> <img src="images/tango/caution.png" alt="caution" class="icon"/> - <p class="title"><a href="#a-607250958">Caution 1</a>. &nbsp; Do not rename generated files</p> + <p class="title"><a href="#a-607085068">Caution 1</a>. &nbsp; Do not rename generated files</p> Ruby-VPI uses the convention described above to dynamically create a direct Ruby interface to the design under test, so <em>do not</em> rename the generated files arbitrarily. </div> </div> @@ -1877,11 +1911,11 @@ <div class="admonition"> <div class="tip" id="Using__kdiff3__with_the_automated_test_generator."> <img src="images/tango/tip.png" alt="tip" class="icon"/> - <p class="title"><a href="#a-607255718">Tip 3</a>. &nbsp; Using <strong>kdiff3</strong> with the automated test generator.</p> + <p class="title"><a href="#a-607087558">Tip 3</a>. &nbsp; Using <strong>kdiff3</strong> with the automated test generator.</p> <ol> <li>Create a file named <tt>merge2</tt> with the following content: <pre class="code"> <span style="color:#888">#!/bin/sh</span> <span style="color:#888"># args: old file, new file</span> @@ -1903,11 +1937,11 @@ <hr style="display: none"/> <div id="usage.tools.convert" class="section"> <h3 class="title"> - <a href="#a-607265448">5.4.2</a> + <a href="#a-607093928">5.4.2</a> &nbsp; Verilog to Ruby conversion </h3> @@ -1925,27 +1959,27 @@ <hr style="display: none"/> <div id="usage.examples" class="section"> <h2 class="title"> - <a href="#a-607282618">5.5</a> + <a href="#a-607103698">5.5</a> &nbsp; Sample tests </h2> - The <tt>samp</tt> directory (<a href="http://ruby-vpi.rubyforge.org/src/ruby-vpi//samp/">browse it online</a>) contains several sample tests which illustrate how Ruby-VPI can be used. Each sample has an associated <tt>Rakefile</tt> which simplifies the process of running it. Therefore, simply navigate into an example directory and run the <pre>rake</pre> command to get started. + The <tt>samp</tt> directory (<a href="http://ruby-vpi.rubyforge.org/code//samp/">browse it online</a>) contains several sample tests which illustrate how Ruby-VPI can be used. Each sample has an associated <tt>Rakefile</tt> which simplifies the process of running it. Therefore, simply navigate into an example directory and run the <pre>rake</pre> command to get started. </div> <hr style="display: none"/> <div id="usage.tutorial" class="section"> <h2 class="title"> - <a href="#a-607395798">5.6</a> + <a href="#a-606970248">5.6</a> &nbsp; Tutorial </h2> @@ -1964,11 +1998,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.declare-design" class="section"> <h3 class="title"> - <a href="#a-607290888">5.6.1</a> + <a href="#a-607111108">5.6.1</a> &nbsp; Start with a Verilog design </h3> @@ -1989,11 +2023,11 @@ <div class="formal"> <div class="example" id="fig:counter.v_decl"> - <p class="title"><a href="#a-607287308">Example 3</a>. &nbsp; Declaration of a simple up-counter with synchronous reset</p> + <p class="title"><a href="#a-607107598">Example 3</a>. &nbsp; Declaration of a simple up-counter with synchronous reset</p> <pre class="code" lang="verilog"> module counter #(parameter Size = 5) ( input clock, input reset, @@ -2013,11 +2047,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.generate-test" class="section"> <h3 class="title"> - <a href="#a-607305468">5.6.2</a> + <a href="#a-607121708">5.6.2</a> &nbsp; Generate a test </h3> @@ -2049,11 +2083,11 @@ <div class="formal"> <div class="example" id="fig:generate-test.RSpec"> - <p class="title"><a href="#a-607296778">Example 4</a>. &nbsp; Generating a test with specification in RSpec format</p> + <p class="title"><a href="#a-607114448">Example 4</a>. &nbsp; Generating a test with specification in RSpec format</p> <pre> $ ruby-vpi generate counter.v --RSpec module counter @@ -2071,11 +2105,11 @@ <div class="formal"> <div class="example" id="fig:generate-test.xUnit"> - <p class="title"><a href="#a-607299658">Example 5</a>. &nbsp; Generating a test with specification in xUnit format</p> + <p class="title"><a href="#a-607116908">Example 5</a>. &nbsp; Generating a test with specification in xUnit format</p> <pre> $ ruby-vpi generate counter.v --xUnit module counter @@ -2096,11 +2130,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.specification" class="section"> <h3 class="title"> - <a href="#a-607315968">5.6.3</a> + <a href="#a-607131808">5.6.3</a> &nbsp; Specify your expectations </h3> @@ -2124,11 +2158,11 @@ <div class="formal"> <div class="example" id="fig:RSpec_counter_spec.rb"> - <p class="title"><a href="#a-607308538">Example 6</a>. &nbsp; Specification implemented in RSpec format</p> + <p class="title"><a href="#a-607124618">Example 6</a>. &nbsp; Specification implemented in RSpec format</p> <pre class="code">require <span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">spec</span><span style="color:#710">'</span></span> <span style="color:#888"># lowest upper bound of counter's value</span> <span style="color:#036; font-weight:bold">LIMIT</span> = <span style="color:#00D; font-weight:bold">2</span> ** <span style="color:#036; font-weight:bold">Counter</span>::<span style="color:#036; font-weight:bold">Size</span> @@ -2176,11 +2210,11 @@ <div class="formal"> <div class="example" id="fig:xUnit_counter_spec.rb"> - <p class="title"><a href="#a-607310978">Example 7</a>. &nbsp; Specification implemented in xUnit format</p> + <p class="title"><a href="#a-607126978">Example 7</a>. &nbsp; Specification implemented in xUnit format</p> <pre class="code">require <span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">test/unit</span><span style="color:#710">'</span></span> <span style="color:#888"># lowest upper bound of counter's value</span> <span style="color:#036; font-weight:bold">LIMIT</span> = <span style="color:#00D; font-weight:bold">2</span> ** <span style="color:#036; font-weight:bold">Counter</span>::<span style="color:#036; font-weight:bold">Size</span> @@ -2236,11 +2270,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.implement-proto" class="section"> <h3 class="title"> - <a href="#a-607322378">5.6.4</a> + <a href="#a-607137798">5.6.4</a> &nbsp; Implement the prototype </h3> @@ -2253,11 +2287,11 @@ <div class="formal"> <div class="example" id="fig:counter_proto.rb"> - <p class="title"><a href="#a-607318638">Example 8</a>. &nbsp; Ruby prototype of our Verilog design</p> + <p class="title"><a href="#a-607134398">Example 8</a>. &nbsp; Ruby prototype of our Verilog design</p> <pre class="code"><span style="color:#888"># Ruby prototype of the design under test's Verilog implementation.</span> <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">feign!</span> <span style="color:#080; font-weight:bold">if</span> clock.posedge? <span style="color:#080; font-weight:bold">if</span> reset.high? @@ -2280,11 +2314,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.test-proto" class="section"> <h3 class="title"> - <a href="#a-607341078">5.6.5</a> + <a href="#a-607151048">5.6.5</a> &nbsp; Verify the prototype </h3> @@ -2300,11 +2334,11 @@ <div class="formal"> <div class="example" id="fig:test-proto.RSpec"> - <p class="title"><a href="#a-607325878">Example 9</a>. &nbsp; Running a test with specification in RSpec format</p> + <p class="title"><a href="#a-607140918">Example 9</a>. &nbsp; Running a test with specification in RSpec format</p> <pre> $ cd RSpec $ rake cver PROTOTYPE=1 @@ -2324,11 +2358,11 @@ <div class="formal"> <div class="example" id="fig:test-proto.unit-test"> - <p class="title"><a href="#a-607330448">Example 10</a>. &nbsp; Running a test with specification in xUnit format</p> + <p class="title"><a href="#a-607143418">Example 10</a>. &nbsp; Running a test with specification in xUnit format</p> <pre> $ cd xUnit $ rake cver PROTOTYPE=1 @@ -2348,11 +2382,11 @@ <div class="admonition"> <div class="tip" id="What_can_the_test_runner_do_"> <img src="images/tango/tip.png" alt="tip" class="icon"/> - <p class="title"><a href="#a-607335018">Tip 4</a>. &nbsp; What can the test runner do?</p> + <p class="title"><a href="#a-607145688">Tip 4</a>. &nbsp; What can the test runner do?</p> If you invoke the test runner (1) without any arguments or (2) with the <tt>--tasks</tt> option, it will show you a list of tasks that it can perform for you. </div> </div> </p> @@ -2364,11 +2398,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.implement-design" class="section"> <h3 class="title"> - <a href="#a-607349478">5.6.6</a> + <a href="#a-607157038">5.6.6</a> &nbsp; Implement the design </h3> @@ -2381,11 +2415,11 @@ <div class="formal"> <div class="example" id="fig:counter.v_impl"> - <p class="title"><a href="#a-607343828">Example 11</a>. &nbsp; Implementation of a simple up-counter with synchronous reset</p> + <p class="title"><a href="#a-607153638">Example 11</a>. &nbsp; Implementation of a simple up-counter with synchronous reset</p> <pre class="code" lang="verilog">/** A simple up-counter with synchronous reset. @param Size Number of bits used to represent the counter's value. @@ -2418,11 +2452,11 @@ <p> <hr style="display: none"/> <div id="usage.tutorial.test-design" class="section"> <h3 class="title"> - <a href="#a-607359608">5.6.7</a> + <a href="#a-606917698">5.6.7</a> &nbsp; Verify the design </h3> @@ -2438,11 +2472,11 @@ <div class="formal"> <div class="example" id="fig:test-design.RSpec"> - <p class="title"><a href="#a-607352688">Example 12</a>. &nbsp; Running a test with specification in RSpec format</p> + <p class="title"><a href="#a-607159998">Example 12</a>. &nbsp; Running a test with specification in RSpec format</p> <pre> $ cd RSpec $ rake cver @@ -2460,11 +2494,11 @@ <div class="formal"> <div class="example" id="fig:test-design.unit-test"> - <p class="title"><a href="#a-607355168">Example 13</a>. &nbsp; Running a test with specification in xUnit format</p> + <p class="title"><a href="#a-606910818">Example 13</a>. &nbsp; Running a test with specification in xUnit format</p> <pre> $ cd xUnit $ rake cver @@ -2489,11 +2523,11 @@ <hr style="display: none"/> <div id="hacking" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607351098">6</a> + Chapter <a href="#a-607168058">6</a> <br/><br/> <big>Hacking</big> </h1> @@ -2501,11 +2535,11 @@ <p> <hr style="display: none"/> <div id="hacking.scm" class="section"> <h2 class="title"> - <a href="#a-607337768">6.1</a> + <a href="#a-607153878">6.1</a> &nbsp; Getting the source code </h2> @@ -2522,11 +2556,11 @@ <p> <hr style="display: none"/> <div id="hacking.release-packages" class="section"> <h2 class="title"> - <a href="#a-607340498">6.2</a> + <a href="#a-607161228">6.2</a> &nbsp; Building release packages </h2> @@ -2550,11 +2584,11 @@ <p> <hr style="display: none"/> <div id="hacking.manual" class="section"> <h2 class="title"> - <a href="#a-607344628">6.3</a> + <a href="#a-607163458">6.3</a> &nbsp; Editing this manual </h2> @@ -2568,11 +2602,11 @@ <hr style="display: none"/> <div id="problems" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607417768">7</a> + Chapter <a href="#a-607224248">7</a> <br/><br/> <big>Known problems</big> </h1> @@ -2583,11 +2617,11 @@ <p> <hr style="display: none"/> <div id="problem.ivl" class="section"> <h2 class="title"> - <a href="#a-607385318">7.1</a> + <a href="#a-607196648">7.1</a> &nbsp; Icarus Verilog </h2> @@ -2598,11 +2632,11 @@ <p> <hr style="display: none"/> <div id="problems.ivl.vpi_handle_by_name.absolute-paths" class="section"> <h3 class="title"> - <a href="#a-607359978">7.1.1</a> + <a href="#a-607174028">7.1.1</a> &nbsp; Give full paths to Verilog objects </h3> @@ -2618,11 +2652,11 @@ <div class="formal"> <div class="example" id="ex:TestFoo"> - <p class="title"><a href="#a-607355728">Example 14</a>. &nbsp; Part of a bench which instantiates a Verilog design</p> + <p class="title"><a href="#a-607170868">Example 14</a>. &nbsp; Part of a bench which instantiates a Verilog design</p> <pre class="code" lang="verilog"> module TestFoo; reg clk_reg; Foo my_foo(.clk(clk_reg)); @@ -2637,11 +2671,11 @@ <hr style="display: none"/> <div id="problems.ivl.vpi_handle_by_name.connect-registers" class="section"> <h3 class="title"> - <a href="#a-607371468">7.1.2</a> + <a href="#a-607183718">7.1.2</a> &nbsp; Registers must be connected </h3> @@ -2660,11 +2694,11 @@ <div class="formal"> <div class="example" id="ex:TestFoo_bad"> - <p class="title"><a href="#a-607364178">Example 15</a>. &nbsp; Bad design with unconnected registers</p> + <p class="title"><a href="#a-607176928">Example 15</a>. &nbsp; Bad design with unconnected registers</p> Here the <code class="code">clk_reg</code> register is not connected to anything. <pre class="code" lang="verilog"> @@ -2680,11 +2714,11 @@ <div class="formal"> <div class="example" id="ex:TestFoo_fix"> - <p class="title"><a href="#a-607366888">Example 16</a>. &nbsp; Fixed design with wired registers</p> + <p class="title"><a href="#a-607179368">Example 16</a>. &nbsp; Fixed design with wired registers</p> Here the <code class="code">clk_reg</code> register is connected to the <code class="code">clk_wire</code> wire. <pre class="code" lang="verilog"> @@ -2703,11 +2737,11 @@ <hr style="display: none"/> <div id="problems.ivl.vpi_reset" class="section"> <h3 class="title"> - <a href="#a-607373948">7.1.3</a> + <a href="#a-607185968">7.1.3</a> &nbsp; Vpi::reset </h3> @@ -2722,11 +2756,11 @@ <hr style="display: none"/> <div id="problem.ncsim" class="section"> <h2 class="title"> - <a href="#a-607390998">7.2</a> + <a href="#a-607202038">7.2</a> &nbsp; Cadence NC-Sim </h2> @@ -2737,11 +2771,11 @@ <p> <hr style="display: none"/> <div id="problem.ncsim.vpiForceFlag" class="section"> <h3 class="title"> - <a href="#a-607387788">7.2.1</a> + <a href="#a-607199078">7.2.1</a> &nbsp; Cannot force values onto handles </h3> @@ -2764,11 +2798,11 @@ <hr style="display: none"/> <div id="glossary" class="chapter"> <h1 class="title"> - Chapter <a href="#a-607450218">8</a> + Chapter <a href="#a-607256698">8</a> <br/><br/> <big>Glossary</big> </h1> @@ -2776,11 +2810,11 @@ <hr style="display: none"/> <div id="glossary.test" class="section"> <h2 class="title"> - <a href="#a-607420598">8.1</a> + <a href="#a-607227078">8.1</a> &nbsp; Test </h2> @@ -2792,11 +2826,11 @@ <hr style="display: none"/> <div id="glossary.design" class="section"> <h2 class="title"> - <a href="#a-607423098">8.2</a> + <a href="#a-607229578">8.2</a> &nbsp; Design </h2> @@ -2808,11 +2842,11 @@ <hr style="display: none"/> <div id="glossary.specification" class="section"> <h2 class="title"> - <a href="#a-607425858">8.3</a> + <a href="#a-607232338">8.3</a> &nbsp; Specification </h2> @@ -2824,11 +2858,11 @@ <hr style="display: none"/> <div id="glossary.expectation" class="section"> <h2 class="title"> - <a href="#a-607428078">8.4</a> + <a href="#a-607234558">8.4</a> &nbsp; Expectation </h2> @@ -2840,11 +2874,11 @@ <hr style="display: none"/> <div id="glossary.handle" class="section"> <h2 class="title"> - <a href="#a-607430558">8.5</a> + <a href="#a-607237038">8.5</a> &nbsp; Handle </h2> @@ -2856,11 +2890,11 @@ <hr style="display: none"/> <div id="glossary.rake" class="section"> <h2 class="title"> - <a href="#a-607432818">8.6</a> + <a href="#a-607239298">8.6</a> &nbsp; Rake </h2> @@ -2877,11 +2911,11 @@ <hr style="display: none"/> <div id="glossary.RSpec" class="section"> <h2 class="title"> - <a href="#a-607435358">8.7</a> + <a href="#a-607241838">8.7</a> &nbsp; RSpec </h2> @@ -2896,11 +2930,11 @@ <hr style="display: none"/> <div id="glossary.TDD" class="section"> <h2 class="title"> - <a href="#a-607437618">8.8</a> + <a href="#a-607244098">8.8</a> &nbsp; Test driven development </h2> @@ -2915,11 +2949,11 @@ <hr style="display: none"/> <div id="glossary.BDD" class="section"> <h2 class="title"> - <a href="#a-607439878">8.9</a> + <a href="#a-607246358">8.9</a> &nbsp; Behavior driven development </h2> @@ -2935,52 +2969,52 @@ </div> <hr style="display: none"/> <div id="toc"> <h1 id="toc:contents">Contents</h1> - <ul><li><span class="hide">1 </span><a id="a-606440488" href="#Ruby-VPI_18.0.0_user_manual">Ruby-VPI 18.0.0 user manual</a><ul><li><span class="hide">1.1 </span><a id="a-606415398" href="#About_this_manual">About this manual</a></li><li><span class="hide">1.2 </span><a id="a-606424618" href="#Legal_notice">Legal notice</a></li></ul></li><li><span class="hide">2 </span><a id="a-607201618" href="#intro">Welcome</a><ul><li><span class="hide">2.1 </span><a id="a-605996598" href="#resources">Resources</a><ul><li><span class="hide">2.1.1 </span><a id="a-606452258" href="#Records">Records</a></li><li><span class="hide">2.1.2 </span><a id="a-606462328" href="#Documentation">Documentation</a></li><li><span class="hide">2.1.3 </span><a id="a-605931928" href="#Facilities">Facilities</a></li></ul></li><li><span class="hide">2.2 </span><a id="a-605842608" href="#intro.features">Features</a><ul><li><span class="hide">2.2.1 </span><a id="a-606012168" href="#Portable">Portable</a></li><li><span class="hide">2.2.2 </span><a id="a-606021388" href="#Agile">Agile</a></li><li><span class="hide">2.2.3 </span><a id="a-606032478" href="#Powerful">Powerful</a></li></ul></li><li><span class="hide">2.3 </span><a id="a-607160758" href="#intro.reqs">Requirements</a><ul><li><span class="hide">2.3.1 </span><a id="a-605864868" href="#Verilog_simulator">Verilog simulator</a></li><li><span class="hide">2.3.2 </span><a id="a-607153788" href="#Compilers">Compilers</a></li><li><span class="hide">2.3.3 </span><a id="a-607156088" href="#Libraries">Libraries</a></li></ul></li><li><span class="hide">2.4 </span><a id="a-607163318" href="#intro.applications">Applications</a></li><li><span class="hide">2.5 </span><a id="a-607165918" href="#intro.appetizers">Appetizers</a></li><li><span class="hide">2.6 </span><a id="a-607168788" href="#intro.license">License</a></li><li><span class="hide">2.7 </span><a id="a-607174178" href="#intro.related-works">Related works</a><ul><li><span class="hide">2.7.1 </span><a id="a-607171238" href="#intro.related-works.pli">Ye olde PLI</a></li></ul></li></ul></li><li><span class="hide">3 </span><a id="a-607242278" href="#setup">Setup</a><ul><li><span class="hide">3.1 </span><a id="a-607204808" href="#setup.manifest">Manifest</a></li><li><span class="hide">3.2 </span><a id="a-607210248" href="#setup.reqs">Requirements</a></li><li><span class="hide">3.3 </span><a id="a-607216418" href="#setup.recom">Recommendations</a><ul><li><span class="hide">3.3.1 </span><a id="a-607213078" href="#setup.recom.merger">Text merging tool</a></li></ul></li><li><span class="hide">3.4 </span><a id="a-607225558" href="#setup.inst">Installation</a><ul><li><span class="hide">3.4.1 </span><a id="a-607221498" href="#setup.inst.windows">Installing on Windows</a></li></ul></li><li><span class="hide">3.5 </span><a id="a-607227838" href="#setup.maintenance">Maintenance</a></li></ul></li><li><span class="hide">4 </span><a id="a-607196488" href="#organization">Organization</a><ul><li><span class="hide">4.1 </span><a id="a-607251168" href="#overview.relay">Ruby/Verilog interaction</a></li><li><span class="hide">4.2 </span><a id="a-607256738" href="#organization.tests">Tests</a></li><li><span class="hide">4.3 </span><a id="a-607326178" href="#VPI_in_Ruby">VPI in Ruby</a><ul><li><span class="hide">4.3.1 </span><a id="a-607265658" href="#Deviations_from_the_VPI_standard">Deviations from the VPI standard</a><ul><li><span class="hide">4.3.1.1 </span><a id="a-607259228" href="#Names_are_capitalized">Names are capitalized</a></li><li><span class="hide">4.3.1.2 </span><a id="a-607261728" href="#a_vprintf__is__printf_"><code class="code">vprintf</code> is <code class="code">printf</code></a></li></ul></li><li><span class="hide">4.3.2 </span><a id="a-607291198" href="#vpi.handles">Handles</a><ul><li><span class="hide">4.3.2.1 </span><a id="a-607268318" href="#Shortcuts_for_productivity">Shortcuts for productivity</a></li><li><span class="hide">4.3.2.2 </span><a id="a-607270878" href="#Accessing_a_handle_s_relatives">Accessing a handle&#8217;s relatives</a></li><li><span class="hide">4.3.2.3 </span><a id="a-607273818" href="#Accessing_a_handle_s_properties">Accessing a handle&#8217;s properties</a></li></ul></li><li><span class="hide">4.3.3 </span><a id="a-607299628" href="#vpi.callbacks">Callbacks</a></li></ul></li></ul></li><li><span class="hide">5 </span><a id="a-607334198" href="#usage">Usage</a><ul><li><span class="hide">5.1 </span><a id="a-607215298" href="#usage.prototyping">Prototyping</a><ul><li><span class="hide">5.1.1 </span><a id="a-607200928" href="#Getting_started">Getting started</a></li><li><span class="hide">5.1.2 </span><a id="a-607205498" href="#How_does_prototyping_work_">How does prototyping work?</a></li></ul></li><li><span class="hide">5.2 </span><a id="a-607224358" href="#usage.debugger">Debugging</a><ul><li><span class="hide">5.2.1 </span><a id="a-607219398" href="#usage.debugger.init">Advanced initialization</a></li></ul></li><li><span class="hide">5.3 </span><a id="a-607246938" href="#usage.test-runner">Test runner</a><ul><li><span class="hide">5.3.1 </span><a id="a-607236808" href="#usage.test-runner.env-vars">Environment variables</a><ul><li><span class="hide">5.3.1.1 </span><a id="a-607229738" href="#Variables_as_command-line_arguments">Variables as command-line arguments</a></li></ul></li></ul></li><li><span class="hide">5.4 </span><a id="a-607278778" href="#usage.tools">Tools</a><ul><li><span class="hide">5.4.1 </span><a id="a-607262938" href="#usage.tools.generate">Automated test generation</a></li><li><span class="hide">5.4.2 </span><a id="a-607265448" href="#usage.tools.convert">Verilog to Ruby conversion</a></li></ul></li><li><span class="hide">5.5 </span><a id="a-607282618" href="#usage.examples">Sample tests</a></li><li><span class="hide">5.6 </span><a id="a-607395798" href="#usage.tutorial">Tutorial</a><ul><li><span class="hide">5.6.1 </span><a id="a-607290888" href="#usage.tutorial.declare-design">Start with a Verilog design</a></li><li><span class="hide">5.6.2 </span><a id="a-607305468" href="#usage.tutorial.generate-test">Generate a test</a></li><li><span class="hide">5.6.3 </span><a id="a-607315968" href="#usage.tutorial.specification">Specify your expectations</a></li><li><span class="hide">5.6.4 </span><a id="a-607322378" href="#usage.tutorial.implement-proto">Implement the prototype</a></li><li><span class="hide">5.6.5 </span><a id="a-607341078" href="#usage.tutorial.test-proto">Verify the prototype</a></li><li><span class="hide">5.6.6 </span><a id="a-607349478" href="#usage.tutorial.implement-design">Implement the design</a></li><li><span class="hide">5.6.7 </span><a id="a-607359608" href="#usage.tutorial.test-design">Verify the design</a></li></ul></li></ul></li><li><span class="hide">6 </span><a id="a-607351098" href="#hacking">Hacking</a><ul><li><span class="hide">6.1 </span><a id="a-607337768" href="#hacking.scm">Getting the source code</a></li><li><span class="hide">6.2 </span><a id="a-607340498" href="#hacking.release-packages">Building release packages</a></li><li><span class="hide">6.3 </span><a id="a-607344628" href="#hacking.manual">Editing this manual</a></li></ul></li><li><span class="hide">7 </span><a id="a-607417768" href="#problems">Known problems</a><ul><li><span class="hide">7.1 </span><a id="a-607385318" href="#problem.ivl">Icarus Verilog</a><ul><li><span class="hide">7.1.1 </span><a id="a-607359978" href="#problems.ivl.vpi_handle_by_name.absolute-paths">Give full paths to Verilog objects</a></li><li><span class="hide">7.1.2 </span><a id="a-607371468" href="#problems.ivl.vpi_handle_by_name.connect-registers">Registers must be connected</a></li><li><span class="hide">7.1.3 </span><a id="a-607373948" href="#problems.ivl.vpi_reset">Vpi::reset</a></li></ul></li><li><span class="hide">7.2 </span><a id="a-607390998" href="#problem.ncsim">Cadence NC-Sim</a><ul><li><span class="hide">7.2.1 </span><a id="a-607387788" href="#problem.ncsim.vpiForceFlag">Cannot force values onto handles</a></li></ul></li></ul></li><li><span class="hide">8 </span><a id="a-607450218" href="#glossary">Glossary</a><ul><li><span class="hide">8.1 </span><a id="a-607420598" href="#glossary.test">Test</a></li><li><span class="hide">8.2 </span><a id="a-607423098" href="#glossary.design">Design</a></li><li><span class="hide">8.3 </span><a id="a-607425858" href="#glossary.specification">Specification</a></li><li><span class="hide">8.4 </span><a id="a-607428078" href="#glossary.expectation">Expectation</a></li><li><span class="hide">8.5 </span><a id="a-607430558" href="#glossary.handle">Handle</a></li><li><span class="hide">8.6 </span><a id="a-607432818" href="#glossary.rake">Rake</a></li><li><span class="hide">8.7 </span><a id="a-607435358" href="#glossary.RSpec">RSpec</a></li><li><span class="hide">8.8 </span><a id="a-607437618" href="#glossary.TDD">Test driven development</a></li><li><span class="hide">8.9 </span><a id="a-607439878" href="#glossary.BDD">Behavior driven development</a></li></ul></li></ul> + <ul><li><span class="hide">1 </span><a id="a-605815698" href="#Ruby-VPI_18.0.1_user_manual">Ruby-VPI 18.0.1 user manual</a><ul><li><span class="hide">1.1 </span><a id="a-605717698" href="#About_this_manual">About this manual</a></li><li><span class="hide">1.2 </span><a id="a-605744638" href="#Legal_notice">Legal notice</a></li></ul></li><li><span class="hide">2 </span><a id="a-606978988" href="#intro">Welcome</a><ul><li><span class="hide">2.1 </span><a id="a-606913148" href="#resources">Resources</a><ul><li><span class="hide">2.1.1 </span><a id="a-605838518" href="#Records">Records</a></li><li><span class="hide">2.1.2 </span><a id="a-605610268" href="#Documentation">Documentation</a></li><li><span class="hide">2.1.3 </span><a id="a-606907548" href="#Facilities">Facilities</a></li></ul></li><li><span class="hide">2.2 </span><a id="a-606925458" href="#intro.features">Features</a><ul><li><span class="hide">2.2.1 </span><a id="a-606915788" href="#Portable">Portable</a></li><li><span class="hide">2.2.2 </span><a id="a-606918188" href="#Agile">Agile</a></li><li><span class="hide">2.2.3 </span><a id="a-606920588" href="#Powerful">Powerful</a></li></ul></li><li><span class="hide">2.3 </span><a id="a-606937688" href="#intro.reqs">Requirements</a><ul><li><span class="hide">2.3.1 </span><a id="a-606928098" href="#Verilog_simulator">Verilog simulator</a></li><li><span class="hide">2.3.2 </span><a id="a-606930538" href="#Compilers">Compilers</a></li><li><span class="hide">2.3.3 </span><a id="a-606932858" href="#Libraries">Libraries</a></li></ul></li><li><span class="hide">2.4 </span><a id="a-606940248" href="#intro.applications">Applications</a></li><li><span class="hide">2.5 </span><a id="a-606942848" href="#intro.appetizers">Appetizers</a></li><li><span class="hide">2.6 </span><a id="a-606945718" href="#intro.license">License</a></li><li><span class="hide">2.7 </span><a id="a-606951108" href="#intro.related-works">Related works</a><ul><li><span class="hide">2.7.1 </span><a id="a-606948168" href="#intro.related-works.pli">Ye olde PLI</a></li></ul></li></ul></li><li><span class="hide">3 </span><a id="a-607019648" href="#setup">Setup</a><ul><li><span class="hide">3.1 </span><a id="a-606982178" href="#setup.manifest">Manifest</a></li><li><span class="hide">3.2 </span><a id="a-606987618" href="#setup.reqs">Requirements</a></li><li><span class="hide">3.3 </span><a id="a-606993788" href="#setup.recom">Recommendations</a><ul><li><span class="hide">3.3.1 </span><a id="a-606990448" href="#setup.recom.merger">Text merging tool</a></li></ul></li><li><span class="hide">3.4 </span><a id="a-607002928" href="#setup.inst">Installation</a><ul><li><span class="hide">3.4.1 </span><a id="a-606998868" href="#setup.inst.windows">Installing on Windows</a></li></ul></li><li><span class="hide">3.5 </span><a id="a-607005208" href="#setup.maintenance">Maintenance</a></li></ul></li><li><span class="hide">4 </span><a id="a-607025428" href="#organization">Organization</a><ul><li><span class="hide">4.1 </span><a id="a-607028538" href="#overview.relay">Ruby/Verilog interaction</a></li><li><span class="hide">4.2 </span><a id="a-607034108" href="#organization.tests">Tests</a></li><li><span class="hide">4.3 </span><a id="a-606948098" href="#VPI_in_Ruby">VPI in Ruby</a><ul><li><span class="hide">4.3.1 </span><a id="a-607043028" href="#Deviations_from_the_VPI_standard">Deviations from the VPI standard</a><ul><li><span class="hide">4.3.1.1 </span><a id="a-607036598" href="#Names_are_capitalized">Names are capitalized</a></li><li><span class="hide">4.3.1.2 </span><a id="a-607039098" href="#a_vprintf__is__printf_"><code class="code">vprintf</code> is <code class="code">printf</code></a></li></ul></li><li><span class="hide">4.3.2 </span><a id="a-607068568" href="#vpi.handles">Handles</a><ul><li><span class="hide">4.3.2.1 </span><a id="a-607045688" href="#Shortcuts_for_productivity">Shortcuts for productivity</a></li><li><span class="hide">4.3.2.2 </span><a id="a-607048248" href="#Accessing_a_handle_s_relatives">Accessing a handle&#8217;s relatives</a></li><li><span class="hide">4.3.2.3 </span><a id="a-607051188" href="#Accessing_a_handle_s_properties">Accessing a handle&#8217;s properties</a></li></ul></li><li><span class="hide">4.3.3 </span><a id="a-607076998" href="#vpi.callbacks">Callbacks</a></li></ul></li></ul></li><li><span class="hide">5 </span><a id="a-607149688" href="#usage">Usage</a><ul><li><span class="hide">5.1 </span><a id="a-607049328" href="#usage.prototyping">Prototyping</a><ul><li><span class="hide">5.1.1 </span><a id="a-607035478" href="#Getting_started">Getting started</a></li><li><span class="hide">5.1.2 </span><a id="a-607039268" href="#How_does_prototyping_work_">How does prototyping work?</a></li></ul></li><li><span class="hide">5.2 </span><a id="a-607058778" href="#usage.debugger">Debugging</a><ul><li><span class="hide">5.2.1 </span><a id="a-607053478" href="#usage.debugger.init">Advanced initialization</a></li></ul></li><li><span class="hide">5.3 </span><a id="a-607082308" href="#usage.test-runner">Test runner</a><ul><li><span class="hide">5.3.1 </span><a id="a-607072228" href="#usage.test-runner.env-vars">Environment variables</a><ul><li><span class="hide">5.3.1.1 </span><a id="a-607063028" href="#Variables_as_command-line_arguments">Variables as command-line arguments</a></li></ul></li></ul></li><li><span class="hide">5.4 </span><a id="a-607101458" href="#usage.tools">Tools</a><ul><li><span class="hide">5.4.1 </span><a id="a-607091638" href="#usage.tools.generate">Automated test generation</a></li><li><span class="hide">5.4.2 </span><a id="a-607093928" href="#usage.tools.convert">Verilog to Ruby conversion</a></li></ul></li><li><span class="hide">5.5 </span><a id="a-607103698" href="#usage.examples">Sample tests</a></li><li><span class="hide">5.6 </span><a id="a-606970248" href="#usage.tutorial">Tutorial</a><ul><li><span class="hide">5.6.1 </span><a id="a-607111108" href="#usage.tutorial.declare-design">Start with a Verilog design</a></li><li><span class="hide">5.6.2 </span><a id="a-607121708" href="#usage.tutorial.generate-test">Generate a test</a></li><li><span class="hide">5.6.3 </span><a id="a-607131808" href="#usage.tutorial.specification">Specify your expectations</a></li><li><span class="hide">5.6.4 </span><a id="a-607137798" href="#usage.tutorial.implement-proto">Implement the prototype</a></li><li><span class="hide">5.6.5 </span><a id="a-607151048" href="#usage.tutorial.test-proto">Verify the prototype</a></li><li><span class="hide">5.6.6 </span><a id="a-607157038" href="#usage.tutorial.implement-design">Implement the design</a></li><li><span class="hide">5.6.7 </span><a id="a-606917698" href="#usage.tutorial.test-design">Verify the design</a></li></ul></li></ul></li><li><span class="hide">6 </span><a id="a-607168058" href="#hacking">Hacking</a><ul><li><span class="hide">6.1 </span><a id="a-607153878" href="#hacking.scm">Getting the source code</a></li><li><span class="hide">6.2 </span><a id="a-607161228" href="#hacking.release-packages">Building release packages</a></li><li><span class="hide">6.3 </span><a id="a-607163458" href="#hacking.manual">Editing this manual</a></li></ul></li><li><span class="hide">7 </span><a id="a-607224248" href="#problems">Known problems</a><ul><li><span class="hide">7.1 </span><a id="a-607196648" href="#problem.ivl">Icarus Verilog</a><ul><li><span class="hide">7.1.1 </span><a id="a-607174028" href="#problems.ivl.vpi_handle_by_name.absolute-paths">Give full paths to Verilog objects</a></li><li><span class="hide">7.1.2 </span><a id="a-607183718" href="#problems.ivl.vpi_handle_by_name.connect-registers">Registers must be connected</a></li><li><span class="hide">7.1.3 </span><a id="a-607185968" href="#problems.ivl.vpi_reset">Vpi::reset</a></li></ul></li><li><span class="hide">7.2 </span><a id="a-607202038" href="#problem.ncsim">Cadence NC-Sim</a><ul><li><span class="hide">7.2.1 </span><a id="a-607199078" href="#problem.ncsim.vpiForceFlag">Cannot force values onto handles</a></li></ul></li></ul></li><li><span class="hide">8 </span><a id="a-607256698" href="#glossary">Glossary</a><ul><li><span class="hide">8.1 </span><a id="a-607227078" href="#glossary.test">Test</a></li><li><span class="hide">8.2 </span><a id="a-607229578" href="#glossary.design">Design</a></li><li><span class="hide">8.3 </span><a id="a-607232338" href="#glossary.specification">Specification</a></li><li><span class="hide">8.4 </span><a id="a-607234558" href="#glossary.expectation">Expectation</a></li><li><span class="hide">8.5 </span><a id="a-607237038" href="#glossary.handle">Handle</a></li><li><span class="hide">8.6 </span><a id="a-607239298" href="#glossary.rake">Rake</a></li><li><span class="hide">8.7 </span><a id="a-607241838" href="#glossary.RSpec">RSpec</a></li><li><span class="hide">8.8 </span><a id="a-607244098" href="#glossary.TDD">Test driven development</a></li><li><span class="hide">8.9 </span><a id="a-607246358" href="#glossary.BDD">Behavior driven development</a></li></ul></li></ul> <h1 id="toc:tip">Tips</h1> <ol> - <li><a href="#Add_support_for_your_Verilog_simulator" id="a-607207278">Add support for your Verilog simulator</a></li> - <li><a href="#Tuning_for_maximum_performance" id="a-607218968">Tuning for maximum performance</a></li> - <li><a href="#Using__kdiff3__with_the_automated_test_generator." id="a-607255718">Using <strong>kdiff3</strong> with the automated test generator.</a></li> - <li><a href="#What_can_the_test_runner_do_" id="a-607335018">What can the test runner do?</a></li> + <li><a href="#Add_support_for_your_Verilog_simulator" id="a-606984648">Add support for your Verilog simulator</a></li> + <li><a href="#Tuning_for_maximum_performance" id="a-606996338">Tuning for maximum performance</a></li> + <li><a href="#Using__kdiff3__with_the_automated_test_generator." id="a-607087558">Using <strong>kdiff3</strong> with the automated test generator.</a></li> + <li><a href="#What_can_the_test_runner_do_" id="a-607145688">What can the test runner do?</a></li> </ol> <h1 id="toc:caution">Cautions</h1> <ol> - <li><a href="#Do_not_rename_generated_files" id="a-607250958">Do not rename generated files</a></li> + <li><a href="#Do_not_rename_generated_files" id="a-607085068">Do not rename generated files</a></li> </ol> <h1 id="toc:figure">Figures</h1> <ol> - <li><a href="#fig:organization.detail" id="a-607244878">Where does Ruby-VPI fit in?</a></li> - <li><a href="#fig:ruby_relay" id="a-607247688">Interaction between Ruby and Verilog</a></li> - <li><a href="#fig:organization" id="a-607253638">Organization of a test in Ruby-VPI</a></li> - <li><a href="#fig:method_naming_format" id="a-607276618">Method naming format for accessing a handle&#8217;s properties</a></li> + <li><a href="#fig:organization.detail" id="a-607022248">Where does Ruby-VPI fit in?</a></li> + <li><a href="#fig:ruby_relay" id="a-607025058">Interaction between Ruby and Verilog</a></li> + <li><a href="#fig:organization" id="a-607031008">Organization of a test in Ruby-VPI</a></li> + <li><a href="#fig:method_naming_format" id="a-607053988">Method naming format for accessing a handle&#8217;s properties</a></li> </ol> <h1 id="toc:table">Tables</h1> <ol> - <li><a href="#tbl:accessors" id="a-607279048">Possible accessors and their implications</a></li> - <li><a href="#ex:properties" id="a-607281988">Examples of accessing a handle&#8217;s properties</a></li> + <li><a href="#tbl:accessors" id="a-607056418">Possible accessors and their implications</a></li> + <li><a href="#ex:properties" id="a-607059358">Examples of accessing a handle&#8217;s properties</a></li> </ol> <h1 id="toc:example">Examples</h1> <ol> - <li><a href="#ex:callback" id="a-607295148">Using a callback for value change notification</a></li> - <li><a href="#Running_a_test_with_environment_variables" id="a-607232388">Running a test with environment variables</a></li> - <li><a href="#fig:counter.v_decl" id="a-607287308">Declaration of a simple up-counter with synchronous reset</a></li> - <li><a href="#fig:generate-test.RSpec" id="a-607296778">Generating a test with specification in RSpec format</a></li> - <li><a href="#fig:generate-test.xUnit" id="a-607299658">Generating a test with specification in xUnit format</a></li> - <li><a href="#fig:RSpec_counter_spec.rb" id="a-607308538">Specification implemented in RSpec format</a></li> - <li><a href="#fig:xUnit_counter_spec.rb" id="a-607310978">Specification implemented in xUnit format</a></li> - <li><a href="#fig:counter_proto.rb" id="a-607318638">Ruby prototype of our Verilog design</a></li> - <li><a href="#fig:test-proto.RSpec" id="a-607325878">Running a test with specification in RSpec format</a></li> - <li><a href="#fig:test-proto.unit-test" id="a-607330448">Running a test with specification in xUnit format</a></li> - <li><a href="#fig:counter.v_impl" id="a-607343828">Implementation of a simple up-counter with synchronous reset</a></li> - <li><a href="#fig:test-design.RSpec" id="a-607352688">Running a test with specification in RSpec format</a></li> - <li><a href="#fig:test-design.unit-test" id="a-607355168">Running a test with specification in xUnit format</a></li> - <li><a href="#ex:TestFoo" id="a-607355728">Part of a bench which instantiates a Verilog design</a></li> - <li><a href="#ex:TestFoo_bad" id="a-607364178">Bad design with unconnected registers</a></li> - <li><a href="#ex:TestFoo_fix" id="a-607366888">Fixed design with wired registers</a></li> + <li><a href="#ex:callback" id="a-607072518">Using a callback for value change notification</a></li> + <li><a href="#Running_a_test_with_environment_variables" id="a-607065588">Running a test with environment variables</a></li> + <li><a href="#fig:counter.v_decl" id="a-607107598">Declaration of a simple up-counter with synchronous reset</a></li> + <li><a href="#fig:generate-test.RSpec" id="a-607114448">Generating a test with specification in RSpec format</a></li> + <li><a href="#fig:generate-test.xUnit" id="a-607116908">Generating a test with specification in xUnit format</a></li> + <li><a href="#fig:RSpec_counter_spec.rb" id="a-607124618">Specification implemented in RSpec format</a></li> + <li><a href="#fig:xUnit_counter_spec.rb" id="a-607126978">Specification implemented in xUnit format</a></li> + <li><a href="#fig:counter_proto.rb" id="a-607134398">Ruby prototype of our Verilog design</a></li> + <li><a href="#fig:test-proto.RSpec" id="a-607140918">Running a test with specification in RSpec format</a></li> + <li><a href="#fig:test-proto.unit-test" id="a-607143418">Running a test with specification in xUnit format</a></li> + <li><a href="#fig:counter.v_impl" id="a-607153638">Implementation of a simple up-counter with synchronous reset</a></li> + <li><a href="#fig:test-design.RSpec" id="a-607159998">Running a test with specification in RSpec format</a></li> + <li><a href="#fig:test-design.unit-test" id="a-606910818">Running a test with specification in xUnit format</a></li> + <li><a href="#ex:TestFoo" id="a-607170868">Part of a bench which instantiates a Verilog design</a></li> + <li><a href="#ex:TestFoo_bad" id="a-607176928">Bad design with unconnected registers</a></li> + <li><a href="#ex:TestFoo_fix" id="a-607179368">Fixed design with wired registers</a></li> </ol> </div> </body> </html>