ruby-vpi 11.1.1 → 12.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/bin/generate_test.rb +12 -11
  2. data/bin/generate_test_tpl/bench.rb +0 -4
  3. data/bin/generate_test_tpl/bench.v +3 -6
  4. data/bin/generate_test_tpl/runner.rake +20 -4
  5. data/bin/generate_test_tpl/spec.rb +5 -7
  6. data/doc/common.css +110 -95
  7. data/doc/common.tpl +16 -17
  8. data/doc/history.html +350 -330
  9. data/doc/history.yml +49 -0
  10. data/doc/intro.inc +18 -4
  11. data/doc/lib/doc_proxy.rb +22 -32
  12. data/doc/manual.erb +90 -83
  13. data/doc/manual.html +298 -266
  14. data/doc/memo.html +31 -10
  15. data/doc/readme.html +26 -6
  16. data/ext/relay.c +24 -28
  17. data/ext/vlog.c +4 -15
  18. data/lib/ruby-vpi/rspec.rb +1 -1
  19. data/lib/ruby-vpi/runner.rb +12 -10
  20. data/lib/ruby-vpi/runner_proxy.rb +17 -6
  21. data/lib/ruby-vpi/verilog_parser.rb +11 -7
  22. data/lib/ruby-vpi/vpi.rb +11 -1
  23. data/lib/ruby-vpi.rb +4 -0
  24. data/ref/c/annotated.html +2 -2
  25. data/ref/c/common_8h.html +1 -1
  26. data/ref/c/files.html +1 -1
  27. data/ref/c/functions.html +1 -1
  28. data/ref/c/functions_vars.html +1 -1
  29. data/ref/c/globals.html +1 -1
  30. data/ref/c/globals_0x63.html +1 -1
  31. data/ref/c/globals_0x65.html +1 -1
  32. data/ref/c/globals_0x66.html +1 -1
  33. data/ref/c/globals_0x70.html +1 -1
  34. data/ref/c/globals_0x72.html +1 -1
  35. data/ref/c/globals_0x73.html +1 -1
  36. data/ref/c/globals_0x74.html +1 -1
  37. data/ref/c/globals_0x76.html +2 -2
  38. data/ref/c/globals_0x78.html +1 -1
  39. data/ref/c/globals_defs.html +1 -1
  40. data/ref/c/globals_defs_0x65.html +1 -1
  41. data/ref/c/globals_defs_0x70.html +1 -1
  42. data/ref/c/globals_defs_0x76.html +2 -2
  43. data/ref/c/globals_defs_0x78.html +1 -1
  44. data/ref/c/globals_enum.html +1 -1
  45. data/ref/c/globals_eval.html +1 -1
  46. data/ref/c/globals_func.html +2 -2
  47. data/ref/c/globals_type.html +1 -1
  48. data/ref/c/globals_vars.html +1 -1
  49. data/ref/c/index.html +1 -1
  50. data/ref/c/relay_8c.html +2 -1
  51. data/ref/c/relay_8h.html +1 -1
  52. data/ref/c/structrelay____RubyOptions____def.html +8 -2
  53. data/ref/c/structt__cb__data.html +1 -1
  54. data/ref/c/structt__vpi__delay.html +1 -1
  55. data/ref/c/structt__vpi__error__info.html +1 -1
  56. data/ref/c/structt__vpi__strengthval.html +1 -1
  57. data/ref/c/structt__vpi__systf__data.html +1 -1
  58. data/ref/c/structt__vpi__time.html +1 -1
  59. data/ref/c/structt__vpi__value.html +1 -1
  60. data/ref/c/structt__vpi__vecval.html +1 -1
  61. data/ref/c/structt__vpi__vlog__info.html +1 -1
  62. data/ref/c/swig_8c.html +1 -1
  63. data/ref/c/swig_8h.html +1 -1
  64. data/ref/c/verilog_8h.html +1 -1
  65. data/ref/c/vlog_8c.html +15 -15
  66. data/ref/c/vlog_8h.html +1 -1
  67. data/ref/c/vpi__user_8h.html +1 -1
  68. data/ref/ruby/classes/OutputInfo.html +1 -1
  69. data/ref/ruby/classes/OutputInfo.src/M000030.html +30 -30
  70. data/ref/ruby/classes/RDoc.html +5 -5
  71. data/ref/ruby/classes/RDoc.src/{M000097.html → M000099.html} +0 -0
  72. data/ref/ruby/classes/RubyVpi.src/M000085.html +43 -39
  73. data/ref/ruby/classes/String.src/M000033.html +26 -26
  74. data/ref/ruby/classes/String.src/M000034.html +4 -4
  75. data/ref/ruby/classes/Template.src/M000032.html +4 -4
  76. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000011.html +5 -5
  77. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +7 -7
  78. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +4 -4
  79. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000009.html +4 -4
  80. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000010.html +4 -4
  81. data/ref/ruby/classes/VerilogParser/Module.src/M000006.html +15 -11
  82. data/ref/ruby/classes/Vpi/Handle/Property.html +5 -5
  83. data/ref/ruby/classes/Vpi/Handle/Property.src/{M000096.html → M000098.html} +61 -61
  84. data/ref/ruby/classes/Vpi/Handle.html +78 -43
  85. data/ref/ruby/classes/Vpi/Handle.src/M000088.html +3 -3
  86. data/ref/ruby/classes/Vpi/Handle.src/M000089.html +4 -8
  87. data/ref/ruby/classes/Vpi/Handle.src/M000090.html +5 -31
  88. data/ref/ruby/classes/Vpi/Handle.src/M000091.html +9 -74
  89. data/ref/ruby/classes/Vpi/Handle.src/M000092.html +31 -17
  90. data/ref/ruby/classes/Vpi/Handle.src/M000093.html +74 -11
  91. data/ref/ruby/classes/Vpi/Handle.src/M000094.html +30 -0
  92. data/ref/ruby/classes/Vpi/Handle.src/M000095.html +11 -55
  93. data/ref/ruby/classes/Vpi/Handle.src/M000097.html +68 -0
  94. data/ref/ruby/created.rid +1 -1
  95. data/ref/ruby/files/bin/generate_test_rb.html +8 -11
  96. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +4 -4
  97. data/ref/ruby/files/bin/generate_test_rb.src/M000002.html +22 -24
  98. data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
  99. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
  100. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
  101. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
  102. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  103. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +2 -2
  104. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000003.html +10 -10
  105. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000004.html +12 -12
  106. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
  107. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  108. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -1
  109. data/ref/ruby/fr_method_index.html +20 -18
  110. data/samp/counter/counter_rspec_bench.v +3 -6
  111. data/samp/counter/counter_rspec_design.rb +2 -1
  112. data/samp/counter/counter_rspec_runner.rake +20 -4
  113. data/samp/counter/counter_rspec_spec.rb +4 -4
  114. data/samp/counter/counter_xunit_bench.v +3 -6
  115. data/samp/counter/counter_xunit_design.rb +2 -1
  116. data/samp/counter/counter_xunit_runner.rake +20 -4
  117. data/samp/pipelined_alu/hw5_unit_test_bench.v +3 -6
  118. data/samp/pipelined_alu/hw5_unit_test_runner.rake +20 -4
  119. metadata +21 -20
  120. data/doc/manual.rb +0 -5
data/doc/manual.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <title>Ruby-VPI user manual</title>
8
8
  </head>
9
9
  <body>
10
-
10
+
11
11
  <div id="navigation">
12
12
  <p><a href="readme.html"><img src="images/home.png" title="project home" alt="project home" /></a></p>
13
13
 
@@ -20,11 +20,18 @@
20
20
  </li>
21
21
  <li><a href="#intro">Introduction</a>
22
22
  <ul>
23
- <li><a href="#intro.features">Features</a></li>
23
+ <li><a href="#intro.features">Features</a>
24
+ <ul>
25
+ <li><a href="#intro.applications">Applications</a></li>
24
26
  <li><a href="#intro.appetizers">Appetizers</a></li>
27
+ </ul>
28
+ </li>
25
29
  <li><a href="#intro.license">License</a></li>
26
- <li><a href="#intro.related-works">Related works</a></li>
27
- <li><a href="#intro.related-works.pli">Ye olde <span class="caps">PLI</span></a></li>
30
+ <li><a href="#intro.related-works">Related works</a>
31
+ <ul>
32
+ <li><a href="#intro.related-works.pli">Ye olde <span class="caps">PLI</span></a></li>
33
+ </ul>
34
+ </li>
28
35
  </ul>
29
36
  </li>
30
37
  <li><a href="#background">Background</a>
@@ -121,21 +128,85 @@
121
128
  <li><a href="#glossary">Glossary</a>
122
129
  <ul>
123
130
  <li><a href="#glossary.bench">Bench</a></li>
124
- <li><a href="#glossary.BDD"><span class="caps">BDD</span></a></li>
131
+ <li><a href="#glossary.BDD" title="BDD">Behavior driven development</a></li>
125
132
  <li><a href="#glossary.design">Design</a></li>
126
133
  <li><a href="#glossary.expectation">Expectation</a></li>
127
134
  <li><a href="#glossary.handle">Handle</a></li>
128
135
  <li><a href="#glossary.rake">Rake</a></li>
129
136
  <li><a href="#glossary.rspec">rSpec</a></li>
130
137
  <li><a href="#glossary.specification">Specification</a></li>
131
- <li><a href="#glossary.TDD"><span class="caps">TDD</span></a></li>
138
+ <li><a href="#glossary.TDD" title="TDD">Test driven development</a></li>
132
139
  <li><a href="#glossary.test">Test</a></li>
133
140
  <li><a href="#glossary.test_bench">Test bench</a></li>
134
141
  </ul></li>
135
142
  </ul>
136
143
 
137
- <h2>Examples</h2>
138
- <ol>
144
+
145
+ <h1>Admonitions</h1>
146
+
147
+
148
+
149
+ <h2>Tips</h2>
150
+ <ol>
151
+ <li><a href="#tip1">Add support for your Verilog simulator</a></li>
152
+ <li><a href="#tip2">Using <strong>kdiff3</strong> with the automated test generator.</a></li>
153
+ <li><a href="#tip3">What can the test runner do?</a></li>
154
+ <li><a href="#tip4">Running multiple tests at once.</a></li>
155
+ </ol>
156
+
157
+
158
+
159
+ <h2>Notes</h2>
160
+ <ol>
161
+ <li><a href="#note1">note1</a></li>
162
+ <li><a href="#note2">Undefined symbols in Windows</a></li>
163
+ <li><a href="#note3">note3</a></li>
164
+ <li><a href="#note4">note4</a></li>
165
+ <li><a href="#note5">Fixed in 2.0.0.</a></li>
166
+ <li><a href="#note6">Fixed in 2.0.0.</a></li>
167
+ <li><a href="#note7">Fixed in 2.0.0.</a></li>
168
+ </ol>
169
+
170
+
171
+
172
+ <h2>Importants</h2>
173
+ <ol>
174
+ <li><a href="#important1">Before we continue&#8230;</a></li>
175
+ <li><a href="#important2">Before we continue&#8230;</a></li>
176
+ <li><a href="#important3">Before we continue&#8230;</a></li>
177
+ <li><a href="#important4">Before we continue&#8230;</a></li>
178
+ </ol>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ <h1>Formals</h1>
187
+
188
+
189
+
190
+ <h2>Figures</h2>
191
+ <ol>
192
+ <li><a href="#fig..organization">Overall organization of a test</a></li>
193
+ <li><a href="#fig..organization.detail">Detailed organization of a test</a></li>
194
+ <li><a href="#figure3">Parts of speech for accessing a handle&#8217;s <span class="caps">VPI</span> properties</a></li>
195
+ <li><a href="#fig..ruby_init">Initialization of a test</a></li>
196
+ <li><a href="#fig..ruby_relay">Execution of a test</a></li>
197
+ </ol>
198
+
199
+
200
+
201
+ <h2>Tables</h2>
202
+ <ol>
203
+ <li><a href="#table1">Possible accessors and their implications</a></li>
204
+ </ol>
205
+
206
+
207
+
208
+ <h2>Examples</h2>
209
+ <ol>
139
210
  <li><a href="#example1">Examples of accessing a handle&#8217;s <span class="caps">VPI</span> properties</a></li>
140
211
  <li><a href="#fig..counter.v_decl">Declaration of a simple up-counter with synchronous reset</a></li>
141
212
  <li><a href="#fig..generate-test.rspec">Generating a test with specification in rSpec format</a></li>
@@ -152,114 +223,15 @@
152
223
  <li><a href="#ex..TestFoo_bad">Bad design with unconnected registers</a></li>
153
224
  <li><a href="#ex..TestFoo_fix">Fixed design with wired registers</a></li>
154
225
  </ol>
155
-
156
- <h2>Figures</h2>
157
- <ol>
158
- <li><a href="#fig..organization">Overall organization of a test</a></li>
159
- <li><a href="#fig..organization.detail">Detailed organization of a test</a></li>
160
- <li><a href="#figure3">Parts of speech for accessing a handle&#8217;s <span class="caps">VPI</span> properties</a></li>
161
- <li><a href="#fig..ruby_init">Initialization of a test</a></li>
162
- <li><a href="#fig..ruby_relay">Execution of a test</a></li>
163
- </ol>
164
-
165
- <h2>Importants</h2>
166
- <ol>
167
- <li><a href="#important1">Before we continue&#8230;</a></li>
168
- <li><a href="#important2">Before we continue&#8230;</a></li>
169
- <li><a href="#important3">Before we continue&#8230;</a></li>
170
- <li><a href="#important4">Before we continue&#8230;</a></li>
171
- </ol>
172
-
173
- <h2>Notes</h2>
174
- <ol>
175
- <li><a href="#note1">Fixed in 2.0.0.</a></li>
176
- <li><a href="#note2">note2</a></li>
177
- <li><a href="#note3">note3</a></li>
178
- </ol>
179
-
180
- <h2>Sections</h2>
181
- <ol>
182
- <li><a href="#anchor0">Ruby-VPI user manual</a></li>
183
- <li><a href="#terms">Terms</a></li>
184
- <li><a href="#intro">Introduction</a></li>
185
- <li><a href="#intro.features">Features</a></li>
186
- <li><a href="#intro.appetizers">Appetizers</a></li>
187
- <li><a href="#intro.license">License</a></li>
188
- <li><a href="#intro.related-works">Related works</a></li>
189
- <li><a href="#intro.related-works.pli">Ye olde <span class="caps">PLI</span></a></li>
190
- <li><a href="#background">Background</a></li>
191
- <li><a href="#background.methodology">Methodology</a></li>
192
- <li><a href="#background.vocab">Terminology</a></li>
193
- <li><a href="#background.org">Organization</a></li>
194
- <li><a href="#background.org.vpi">Interface to <span class="caps">VPI</span></a></li>
195
- <li><a href="#background.org.vpi.util"><span class="caps">VPI</span> utility layer</a></li>
196
- <li><a href="#background.running-tests">Running a test</a></li>
197
- <li><a href="#background.running-tests.init">Initialization</a></li>
198
- <li><a href="#background.running-tests.exec">Execution</a></li>
199
- <li><a href="#setup">Setup</a></li>
200
- <li><a href="#setup.manifest">Manifest</a></li>
201
- <li><a href="#setup.reqs">Requirements</a></li>
202
- <li><a href="#setup.recom">Recommendations</a></li>
203
- <li><a href="#setup.recom.merger">Text merging tool</a></li>
204
- <li><a href="#setup.installation">Installation</a></li>
205
- <li><a href="#setup.installation.windows">Installing on Windows</a></li>
206
- <li><a href="#setup.maintenance">Maintenance</a></li>
207
- <li><a href="#usage">Usage</a></li>
208
- <li><a href="#usage.tools">Tools</a></li>
209
- <li><a href="#usage.tools.generate-test">Automated test generation</a></li>
210
- <li><a href="#usage.tools.verilog-ruby-conv">Verilog to Ruby conversion</a></li>
211
- <li><a href="#usage.tutorial">Tutorial</a></li>
212
- <li><a href="#usage.tutorial.declare-design">Start with a design</a></li>
213
- <li><a href="#usage.tutorial.generate-test">Generate a test</a></li>
214
- <li><a href="#usage.tutorial.specification">Specify your expectations</a></li>
215
- <li><a href="#usage.tutorial.implement-proto">Implement the prototype</a></li>
216
- <li><a href="#usage.tutorial.test-proto">Verify the prototype</a></li>
217
- <li><a href="#usage.tutorial.implement-design">Implement the design</a></li>
218
- <li><a href="#usage.tutorial.test-design">Verify the design</a></li>
219
- <li><a href="#usage.examples">Examples</a></li>
220
- <li><a href="#hacking">Hacking</a></li>
221
- <li><a href="#hacking.release-packages">Building release packages</a></li>
222
- <li><a href="#problems">Known problems</a></li>
223
- <li><a href="#problems.ruby">Ruby</a></li>
224
- <li><a href="#problems.ruby.SystemStackError">SystemStackError</a></li>
225
- <li><a href="#problems.ruby.xUnit">test/unit</a></li>
226
- <li><a href="#problem.ivl">Icarus Verilog</a></li>
227
- <li><a href="#problems.ivl.vpi_handle_by_name">Vpi::vpi_handle_by_name</a></li>
228
- <li><a href="#problems.ivl.vpi_handle_by_name.absolute-paths">Give full paths to Verilog objects</a></li>
229
- <li><a href="#problems.ivl.vpi_handle_by_name.connect-registers">Registers must be connected</a></li>
230
- <li><a href="#problems.ivl.vpi_reset">Vpi::reset</a></li>
231
- <li><a href="#problems.vsim">Mentor Modelsim</a></li>
232
- <li><a href="#problems.vsim.ruby_run">ruby_run();</a></li>
233
- <li><a href="#glossary">Glossary</a></li>
234
- <li><a href="#glossary.bench">Bench</a></li>
235
- <li><a href="#glossary.BDD"><span class="caps">BDD</span></a></li>
236
- <li><a href="#glossary.design">Design</a></li>
237
- <li><a href="#glossary.expectation">Expectation</a></li>
238
- <li><a href="#glossary.handle">Handle</a></li>
239
- <li><a href="#glossary.rake">Rake</a></li>
240
- <li><a href="#glossary.rspec">rSpec</a></li>
241
- <li><a href="#glossary.specification">Specification</a></li>
242
- <li><a href="#glossary.TDD"><span class="caps">TDD</span></a></li>
243
- <li><a href="#glossary.test">Test</a></li>
244
- <li><a href="#glossary.test_bench">Test bench</a></li>
245
- </ol>
246
-
247
- <h2>Tables</h2>
248
- <ol>
249
- <li><a href="#table1">Possible accessors and their implications</a></li>
250
- </ol>
251
-
252
- <h2>Tips</h2>
253
- <ol>
254
- <li><a href="#tip1">tip1</a></li>
255
- <li><a href="#tip2">Using <strong>kdiff3</strong> with the automated test generator.</a></li>
256
- <li><a href="#tip3">Reuse your specification.</a></li>
257
- <li><a href="#tip4">What can the test runner do?</a></li>
258
- <li><a href="#tip5">Running multiple tests at once.</a></li>
259
- </ol>
260
-
226
+
227
+
228
+
229
+
230
+
231
+
232
+
261
233
  </div>
262
-
234
+
263
235
  <div class="cover-page">
264
236
 
265
237
  <h1 id="anchor0">Ruby-VPI user manual</h1>
@@ -268,7 +240,7 @@
268
240
  <p>Suraj N. Kurapati</p>
269
241
 
270
242
 
271
- <p>Wed Nov 15 19:34:23 <span class="caps">PST 2006</span></p>
243
+ <p>Thu Dec 07 15:09:49 <span class="caps">PST 2006</span></p>
272
244
 
273
245
 
274
246
  </div>
@@ -299,12 +271,15 @@
299
271
 
300
272
 
301
273
  <ul>
302
- <li>Works with all <a href="manual.html#setup.reqs">major Verilog simulators</a> available today.</li>
274
+ <li>Works with all <a href="manual.html#setup.reqs">major Verilog simulators</a> available today.
275
+ <ul>
276
+ <li>Compile <em>once</em> (during <a href="manual.html#setup.installation">installation</a>) and use forever!</li>
277
+ </ul></li>
303
278
  </ul>
304
279
 
305
280
 
306
281
  <ul>
307
- <li>Enables <a href="http://www.agilealliance.org/intro">agile practices</a> such as
282
+ <li>Enables <a href="http://agilemanifesto.org/">agile practices</a> such as
308
283
  <ul>
309
284
  <li><a href="http://www.testdriven.com">test-driven</a> development</li>
310
285
  <li><a href="http://behaviour-driven.org">behavior-driven</a> development</li>
@@ -329,7 +304,7 @@
329
304
  <li>Regular expressions</li>
330
305
  <li>Multi-threading</li>
331
306
  <li>System calls and I/O</li>
332
- <li><a href="http://rubyforge.org"><em>ad infinium</em></a></li>
307
+ <li><a href="http://rubyforge.org"><em>ad infinitum</em></a></li>
333
308
  </ul></li>
334
309
  </ul>
335
310
 
@@ -339,10 +314,27 @@
339
314
  </ul>
340
315
 
341
316
 
342
- <h2 id="intro.appetizers">Appetizers</h2>
317
+ <h3 id="intro.applications">Applications</h3>
343
318
 
344
319
 
345
- <p>Here is a modest sampling to whet your appetite.</p>
320
+ <p>Here is a modest sampling of tasks, paraphrased from <a href="http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/">Pin Hong</a>, that Ruby-VPI can be used to perform.</p>
321
+
322
+
323
+ <ul>
324
+ <li>Writing hardware models in Ruby</li>
325
+ <li>Dumping/processing netlist data from Verilog database</li>
326
+ <li>Dumping/processing simulation data</li>
327
+ <li>Feeding dynamic simulation stimuli</li>
328
+ <li>Back-annotating delay information</li>
329
+ <li>Interactive logic simulation</li>
330
+ <li>Building a distributed simulation</li>
331
+ </ul>
332
+
333
+
334
+ <h3 id="intro.appetizers">Appetizers</h3>
335
+
336
+
337
+ <p>Here is a modest sampling of code to whet your appetite.</p>
346
338
 
347
339
 
348
340
  <ul>
@@ -403,7 +395,7 @@
403
395
  </ul>
404
396
 
405
397
 
406
- <h2 id="intro.related-works.pli">Ye olde <span class="caps">PLI</span></h2>
398
+ <h3 id="intro.related-works.pli">Ye olde <span class="caps">PLI</span></h3>
407
399
 
408
400
 
409
401
  <p>The following projects utilize the archaic <strong>tf</strong> and <strong>acc</strong> PLI interfaces, which have been officially deprecated in <span class="caps">IEEE</span> Std 1364-2005.</p>
@@ -425,7 +417,7 @@
425
417
  <h2 id="background.methodology">Methodology</h2>
426
418
 
427
419
 
428
- <p>Ruby-VPI presents an open-ended interface to <span class="caps">VPI</span>. Thus, you can use any methodology you wish when writing tests.</p>
420
+ <p>Ruby-VPI presents an open-ended interface to <span class="caps">VPI</span>. Thus, you can use any methodology you wish when writing tests. However, being an agile language, Ruby makes it <em>very</em> easy to use agile development practies such as <a href="#glossary.TDD"><span class="caps">TDD</span></a> and <a href="#glossary.BDD"><span class="caps">BDD</span></a>.</p>
429
421
 
430
422
 
431
423
  <h2 id="background.vocab">Terminology</h2>
@@ -433,12 +425,12 @@
433
425
 
434
426
  <div class="admonition">
435
427
 
436
- <div class="tip" id="tip1">
428
+ <div class="note" id="note1">
437
429
 
438
- <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
430
+ <p style="float:left"><img src="images/note.png" title="note" alt="note" /></p>
439
431
 
440
432
 
441
- <p class="title">Tip:</p>
433
+ <p class="title">Note:</p>
442
434
 
443
435
 
444
436
  <p>Have a look at the <a href="#glossary">glossary</a> for definitions of terms used in this manual.</p>
@@ -448,13 +440,13 @@
448
440
 
449
441
  </div>
450
442
 
451
- <p>As a newcomer into the world of Verilog, I often heard the term <strong>test bench</strong>: &#8220;I ran the test bench, but it didn&#8217;t work!&#8221; or &#8220;Are you crazy?!! You <em>still</em> haven&#8217;t written the test bench?&#8221;, for example. I flipped through my textbook and surfed the Internet for a definition of the term, but it was to no avail. Instead, both resources nonchalantly employed the term <em>throughout</em> their being, as if mocking my ignorance of what seems to be universal knowledge.</p>
443
+ <p>As a newcomer into the world of Verilog, I often heard the term <strong>test bench</strong>: &#8220;I ran the test bench, but it didn&#8217;t work!&#8221; or &#8220;Are you crazy?!! You <em>still</em> haven&#8217;t written the test bench?&#8221;, for example. I poured through my textbook for a definition of the term, but it was to no avail. Instead, it nonchalantly employed the term <em>throughout</em> its being, as if mocking my ignorance of what seems to be universal knowledge.</p>
452
444
 
453
445
 
454
446
  <p>Defeated, I turned to my inner faculties to determine the answer. Let&#8217;s see, the term <em>test bench</em> has the word <em>test</em>&mdash;so it has something to do with testing&mdash;and it has the word <em>bench</em>&mdash;so maybe it&#8217;s referring to a table where the testing should occur. This reasoning grew increasingly familiar as my mind rummaged through towering stores of obsolescence and ultimately revealed dreaded memories of sleepless anguish: debugging electronics in the robotics laboratory.</p>
455
447
 
456
448
 
457
- <p>Aha! I exclaimed hesitantly, trying to dismiss the past. The term has its roots in the testing of electronic devices, where an engineer would sit at a bench in an electronics laboratory and verify that an electronic component satisfies some criteria. The bench would be furnished with tools of measurement and manipulation&mdash;such as oscilloscopes, voltmeters, soldering irons, and so on&mdash;which help the engineer to verify the electronic component or locate the sources of defects in the component.</p>
449
+ <p>Aha! I exclaimed, hesitantly, rushing to dismiss the past. The term has its roots in the testing of electronic devices, where an engineer would sit at a bench in an electronics laboratory and verify that an electronic component satisfies some criteria. The bench would be furnished with tools of measurement and manipulation&mdash;such as oscilloscopes, voltmeters, soldering irons, and so on&mdash;which help the engineer to verify the electronic component or locate the sources of defects in the component.</p>
458
450
 
459
451
 
460
452
  <p>Alright, now I remember what a laboratory bench is, but how does that compare with the term test bench? Surely they cannot have the same meaning, because it doesn&#8217;t make sense to <em>run</em> a laboratory bench or to <em>write</em> one. Thus, to avoid propagating such confusion into this manual, I have attempted to clarify the terminology by <a href="#glossary">simplifying and reintroducing it in a new light</a>.</p>
@@ -477,7 +469,10 @@
477
469
 
478
470
  </div>
479
471
 
480
- <p>As <a href="#fig..organization">the figure named &ldquo;Overall organization of a test&rdquo;</a> shows, a test is composed of a bench, a design, and a specification. To extend the <a href="#background.vocab">analogy of an electronics laboratory</a>, the first acts as the laboratory bench which provides measurement and manipulation tools. The second acts as the electronic component being verified by the engineer. And the third acts as the engineer who measures, manipulates, and verifies the electronic component.</p>
472
+ <p>As <a href="#fig..organization">the figure named &ldquo;Overall organization of a test&rdquo;</a> shows, a <a href="#glossary.test">test</a> is composed of a <a href="#glossary.bench">bench</a>, a <a href="#glossary.design">design</a>, and a <a href="#glossary.specification">specification</a>.</p>
473
+
474
+
475
+ <p>To extend the <a href="#background.vocab">analogy of an electronics laboratory</a>, the <em>bench</em> acts as the laboratory bench which provides measurement and manipulation tools. The <em>design</em> acts as the electronic component being verified by the engineer. And the <em>specification</em> acts as the engineer who measures, manipulates, and verifies the electronic component.</p>
481
476
 
482
477
 
483
478
  <h3 id="background.org.vpi">Interface to <span class="caps">VPI</span></h3>
@@ -497,7 +492,10 @@
497
492
 
498
493
  </div>
499
494
 
500
- <p>In <a href="#fig..organization.detail">the figure named &ldquo;Detailed organization of a test&rdquo;</a>, Ruby-VPI acts as the bench, a Verilog simulator encapsulates the design, and a Ruby interpreter encapsulates the specification. Notice that Ruby-VPI encapsulates all communication between the Ruby interpreter and <span class="caps">VPI</span>. This allows the specification, or any Ruby program in general, to access <span class="caps">VPI</span> using nothing more than the Ruby language! Thus, Ruby-VPI removes the burden of having to write C programs in order to access <span class="caps">VPI</span>.</p>
495
+ <p>In <a href="#fig..organization.detail">the figure named &ldquo;Detailed organization of a test&rdquo;</a>, Ruby-VPI acts as the <em>bench</em>, a Verilog simulator encapsulates the <em>design</em>, and a Ruby interpreter encapsulates the <em>specification</em>.</p>
496
+
497
+
498
+ <p>Notice that Ruby-VPI encapsulates all communication between the Ruby interpreter and <span class="caps">VPI</span>. This allows the specification, or any Ruby program in general, to access <span class="caps">VPI</span> using nothing more than the Ruby language! Thus, Ruby-VPI removes the burden of having to write C programs in order to access <span class="caps">VPI</span>.</p>
501
499
 
502
500
 
503
501
  <p>Furthermore, Ruby-VPI presents the <em>entire</em> IEEE Std 1364-2005 <span class="caps">VPI</span> interface to the Ruby interpreter, but with the following minor changes.</p>
@@ -527,10 +525,10 @@
527
525
  <h4 id="background.org.vpi.util"><span class="caps">VPI</span> utility layer</h4>
528
526
 
529
527
 
530
- <p>From a user&#8217;s perspective, the <span class="caps">VPI</span> utility layer greatly enhances the ability to interact with handles. One simply invokes a handle&#8217;s methods, which are carefully named in the following manner, to access either (1) its children or (2) its <span class="caps">VPI</span> properties.</p>
528
+ <p>From a user&#8217;s perspective, the <span class="caps">VPI</span> utility layer (see <a href="#fig..organization.detail">the figure named &ldquo;Detailed organization of a test&rdquo;</a>) greatly enhances the ability to interact with <a href="#glossary.handle">handles</a>. One simply invokes a handle&#8217;s methods, which are carefully named in the following manner, to access either (1) its children or (2) its <span class="caps">VPI</span> properties.</p>
531
529
 
532
530
 
533
- <p>The children of a handle are simply the handles that are immediately contained within it in. For example, suppose that you had a Verilog module that contains some registers. The children, of a handle to the module, would be handles to the registers.</p>
531
+ <p>The children of a handle are simply the handles that are <em>immediately</em> contained within it in. For example, suppose that you had a Verilog module that contains some registers. The children of a handle to that module would be handles to that module&#8217;s registers.</p>
534
532
 
535
533
 
536
534
  <p>In the event that a child handle has the same name as a <span class="caps">VPI</span> property, the child is given priority. However, you can always access <span class="caps">VPI</span> properties explicitly via the <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.get_value</code> and <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.put_value</code> methods.</p>
@@ -968,7 +966,7 @@
968
966
  <h2 id="background.running-tests">Running a test</h2>
969
967
 
970
968
 
971
- <p>Unlike an engineer who can verify an electronic component in real-time, the Verilog simulator and the Ruby interpreter (see <a href="#fig..organization.detail">the figure named &ldquo;Detailed organization of a test&rdquo;</a>) take turns working with objects in a simulation when a test is run. In particular, they take turns manipulating the design and transfer control to each other when appropriate.</p>
969
+ <p>Unlike an engineer who can verify an electronic component in real-time, the Verilog simulator and the Ruby interpreter (see <a href="#fig..organization.detail">the figure named &ldquo;Detailed organization of a test&rdquo;</a>) take turns working with <a href="#glossary.handle">handles</a> when a <a href="#glossary.test">test</a> is run. In particular, they take turns manipulating the Verilog <a href="#glossary.design">design</a> and transfer control to each other when appropriate.</p>
972
970
 
973
971
 
974
972
  <p>The situation is similar to a pair of friends playing catch. One friend throws a ball to the other, and the other throws it back. Either is able to inspect and modify the ball, but only when it is in hand.</p>
@@ -977,6 +975,9 @@
977
975
  <h3 id="background.running-tests.init">Initialization</h3>
978
976
 
979
977
 
978
+ <p>A <a href="#glossary.test">test</a> is first initialized before it is <a href="#background.running-tests.exec">executed</a>. This process is illustrated by <a href="#fig..ruby_init">the figure named &ldquo;Initialization of a test&rdquo;</a>.</p>
979
+
980
+
980
981
  <div class="formal">
981
982
 
982
983
  <div class="figure" id="fig..ruby_init">
@@ -987,13 +988,6 @@
987
988
  <p><img src="figures/ruby_init.png" alt="" /></p>
988
989
 
989
990
 
990
- </div>
991
-
992
- </div>
993
-
994
- <p>A test is first initialized before it is <a href="#background.running-tests.exec">executed</a>. <a href="#fig..ruby_init">the figure named &ldquo;Initialization of a test&rdquo;</a> illustrates the initialization process <a href="#proc..ruby_init">described below</a>.</p>
995
-
996
-
997
991
  <ol>
998
992
  <li>The Verilog simulator initializes the Ruby interpreter by invoking the <code class="code"><span style="color:#d70; font-weight:bold">$ruby_init</span>;</code> system task/function, whose parameters represent the command-line invocation of the Ruby interpreter. For example, one would specify <code class="code"><span style="color:#d70; font-weight:bold">$ruby_init</span>(<span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">ruby</span><span style="color:#710">&quot;</span></span>, <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">-w</span><span style="color:#710">&quot;</span></span>);</code> in Verilog to achieve the same effect as running <pre>ruby -w</pre> at a command-prompt.</li>
999
993
  <li>The Verilog simulator is paused and the Ruby interpreter is initialized with the arguments of the <code class="code"><span style="color:#d70; font-weight:bold">$ruby_init</span>;</code> system task/function.</li>
@@ -1001,10 +995,14 @@
1001
995
  </ol>
1002
996
 
1003
997
 
998
+ </div>
999
+
1000
+ </div>
1001
+
1004
1002
  <h3 id="background.running-tests.exec">Execution</h3>
1005
1003
 
1006
1004
 
1007
- <p>After a test is <a href="#background.running-tests.init">initialized</a>, it is executed such that the design is verified against the specification. <a href="#fig..ruby_relay">the figure named &ldquo;Execution of a test&rdquo;</a> illustrates the execution process <a href="#proc..ruby_relay">described below</a>.</p>
1005
+ <p>After a <a href="#glossary.test">test</a> is <a href="#background.running-tests.init">initialized</a>, it is executed such that the design is verified against the <a href="#glossary.specification">specification</a>. This process is illustrated by <a href="#fig..ruby_relay">the figure named &ldquo;Execution of a test&rdquo;</a>.</p>
1008
1006
 
1009
1007
 
1010
1008
  <div class="formal">
@@ -1017,10 +1015,6 @@
1017
1015
  <p><img src="figures/ruby_relay.png" alt="" /></p>
1018
1016
 
1019
1017
 
1020
- </div>
1021
-
1022
- </div>
1023
-
1024
1018
  <ol>
1025
1019
  <li>The Verilog simulator transfers control to the Ruby interpreter by invoking the <code class="code"><span style="color:#d70; font-weight:bold">$ruby_relay</span>;</code> system task/function.</li>
1026
1020
  <li>The Verilog simulator is paused and the Ruby interpreter is given control.</li>
@@ -1028,6 +1022,10 @@
1028
1022
  </ol>
1029
1023
 
1030
1024
 
1025
+ </div>
1026
+
1027
+ </div>
1028
+
1031
1029
  <h1 id="setup">Setup</h1>
1032
1030
 
1033
1031
 
@@ -1060,7 +1058,7 @@
1060
1058
  <li><a href="http://www.pragmatic-c.com/gpl-cver/"><span class="caps">GPL</span> Cver</a>
1061
1059
  &#8211; version 2.11a or newer is acceptable.</li>
1062
1060
  <li><a href="http://www.icarus.com/eda/Verilog/">Icarus Verilog</a>
1063
- &#8211; version 0.8 or newer is acceptable.</li>
1061
+ &#8211; version 0.8 is <em>mostly</em> acceptable&#8212;you <strong>will not</strong> be able to <a href="#background.org.vpi.util">access child handles through method calls</a>. The reason for this limitation is explained in <a href="#problems.ivl.vpi_handle_by_name.absolute-paths">the section named &ldquo;Give full paths to Verilog objects&rdquo;</a>.</li>
1064
1062
  <li><a href="http://www.synopsys.com/products/simulation/simulation.html">Synopsys <span class="caps">VCS</span></a>
1065
1063
  &#8211; any version that supports the <tt>-load</tt> option is acceptable.</li>
1066
1064
  <li><a href="http://www.model.com">Mentor Modelsim</a>
@@ -1069,6 +1067,23 @@
1069
1067
  </ul>
1070
1068
 
1071
1069
 
1070
+ <div class="admonition">
1071
+
1072
+ <div class="tip" id="tip1">
1073
+
1074
+ <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
1075
+
1076
+
1077
+ <p class="title">Tip: Add support for your Verilog simulator</p>
1078
+
1079
+
1080
+ <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 we will add support for your simulator in the next release!</p>
1081
+
1082
+
1083
+ </div>
1084
+
1085
+ </div>
1086
+
1072
1087
  <ul>
1073
1088
  <li><strong>make</strong>
1074
1089
  &#8211; any distribution should be acceptable.</li>
@@ -1140,20 +1155,6 @@ $ ls -d /usr/lib/ruby/gems/1.8/gems/ruby-vpi*
1140
1155
  </ul>
1141
1156
 
1142
1157
 
1143
- <ul>
1144
- <li>Search for object files whose names end with <tt>.so</tt>, <tt>.o</tt>, or <tt>.dll</tt> in your Verilog simulator&#8217;s installation directory.</li>
1145
- </ul>
1146
-
1147
-
1148
- <ul>
1149
- <li>Determine which object files, among those found in the previous step, contain symbols whose names begin with &#8220;_vpi&#8221; by running the <pre>for x in *.{o,so,dll}; do nm $x | grep -q '[Tt] _vpi' &gt; /dev/null &#38;&#38; echo $x; done</pre> command in Cygwin.
1150
- <ul>
1151
- <li>If you are using Mentor Modelsim, the desired object file can be found at a path similar to <tt>C:\Modeltech\win32\libvsim.dll</tt>.</li>
1152
- <li>If you are using <span class="caps">GPL</span> Cver, the desired object file can be found at a path similar to <tt>C:\gplcver\objs\v_vpi.o</tt>.</li>
1153
- </ul></li>
1154
- </ul>
1155
-
1156
-
1157
1158
  <div class="admonition">
1158
1159
 
1159
1160
  <div class="note" id="note2">
@@ -1161,16 +1162,33 @@ $ ls -d /usr/lib/ruby/gems/1.8/gems/ruby-vpi*
1161
1162
  <p style="float:left"><img src="images/note.png" title="note" alt="note" /></p>
1162
1163
 
1163
1164
 
1164
- <p class="title">Note:</p>
1165
+ <p class="title">Note: Undefined symbols in Windows</p>
1166
+
1165
1167
 
1168
+ <p>After Ruby-VPI is compiled, it is linked to symbols whose names begin with <tt>_vpi</tt>. In <span class="caps">GNU</span>/Linux and similar operating systems, these symbols are allowed to be undefined. However, one <a href="http://sourceware.org/ml/cygwin/2001-12/msg01293.html">cannot compile a shared object file with references to undefined symbols in Windows</a>.</p>
1166
1169
 
1167
- <p>Since Ruby-VPI makes use of the <span class="caps">VPI C</span>-language interface, it links to symbols whose names begin with &#8220;_vpi&#8221;. It is possible for these symbols to be undefined when Ruby-VPI is compiled under <span class="caps">GNU</span>/Linux and similar operating systems. In contrast, one <a href="http://sourceware.org/ml/cygwin/2001-12/msg01293.html">cannot compile a shared object file with references to undefined symbols under Windows</a>. Thus, we must find a Verilog simulator&#8217;s shared object file, which contains definitions of all <span class="caps">VPI</span> symbols, and give this file to the linker when compiling Ruby-VPI.</p>
1170
+
1171
+ <p>One solution is to supply the Verilog simulator&#8217;s <span class="caps">VPI</span> object file, which contains definitions of all <span class="caps">VPI</span> symbols, to the linker. The following steps illustrate this process.</p>
1168
1172
 
1169
1173
 
1170
1174
  </div>
1171
1175
 
1172
1176
  </div>
1173
1177
 
1178
+ <ul>
1179
+ <li>Search for object files whose names end with <tt>.so</tt>, <tt>.o</tt>, or <tt>.dll</tt> in your Verilog simulator&#8217;s installation directory.</li>
1180
+ </ul>
1181
+
1182
+
1183
+ <ul>
1184
+ <li>Determine which object files, among those found in the previous step, contain symbols whose names begin with &#8220;_vpi&#8221; by running the <pre>for x in *.{o,so,dll}; do nm $x | grep -q '[Tt] _vpi' &#38;&#38; echo $x; done</pre> command in Cygwin.
1185
+ <ul>
1186
+ <li>If you are using Mentor Modelsim, the desired object file can be found at a path similar to <tt>C:\Modeltech\win32\libvsim.dll</tt>.</li>
1187
+ <li>If you are using <span class="caps">GPL</span> Cver, the desired object file can be found at a path similar to <tt>C:\gplcver\objs\v_vpi.o</tt>.</li>
1188
+ </ul></li>
1189
+ </ul>
1190
+
1191
+
1174
1192
  <ul>
1175
1193
  <li>Assign the path of the object file (determined in the previous step) to the <code class="code"><span style="color:#036; font-weight:bold">LDFLAGS</span></code> environment variable. For example, if the object file&#8217;s path is <tt>/foo/bar/vpi.so</tt>, then you would run the <pre>export LDFLAGS=/foo/bar/vpi.so</pre> command in Cygwin.</li>
1176
1194
  </ul>
@@ -1213,7 +1231,7 @@ $ ls -d /usr/lib/ruby/gems/1.8/gems/ruby-vpi*
1213
1231
  <h2 id="usage.tools">Tools</h2>
1214
1232
 
1215
1233
 
1216
- <p>The <tt>bin</tt> directory contains various utilities which ease the process of writing tests. Each tool provides help and usage information invoked with the <tt>&#8212;help</tt> option.</p>
1234
+ <p>The <tt>bin</tt> directory contains various utilities which ease the process of writing tests. Each tool provides help and usage information invoked with the <tt>-h</tt> option.</p>
1217
1235
 
1218
1236
 
1219
1237
  <h3 id="usage.tools.generate-test">Automated test generation</h3>
@@ -1224,7 +1242,7 @@ $ ls -d /usr/lib/ruby/gems/1.8/gems/ruby-vpi*
1224
1242
 
1225
1243
  <ul>
1226
1244
  <li>Runner
1227
- &#8211; written in Rake, this file builds and runs the test.</li>
1245
+ &#8211; written in <a href="#glossary.rake">Rake</a>, this file builds and runs the test.</li>
1228
1246
  <li>Bench
1229
1247
  &#8211; written in Verilog and Ruby, these files define the testing environment.</li>
1230
1248
  <li>Design
@@ -1236,7 +1254,7 @@ $ ls -d /usr/lib/ruby/gems/1.8/gems/ruby-vpi*
1236
1254
  </ul>
1237
1255
 
1238
1256
 
1239
- <p>The reason for dividing a single test into these parts is mainly to decouple the design from the specification. This allows you to focus on writing the specification while the remainder is automatically generated by the tool. For example, when the interface of a Verilog module changes, you would simply re-run this tool and incorporate those changes (using a <a href="#setup.recom">text merging tool</a>) into the test without diverting your focus from the specification.</p>
1257
+ <p>The reason for dividing a single test into these parts is mainly to decouple the design from the specification. This allows you to focus on writing the specification while the remainder is automatically generated by the tool. For example, when the interface of a Verilog module changes, you would simply re-run this tool and incorporate those changes (using a <a href="#setup.recom.merger">text merging tool</a>) into the test without diverting your focus from the specification.</p>
1240
1258
 
1241
1259
 
1242
1260
  <div class="admonition">
@@ -1261,7 +1279,7 @@ kdiff3 --auto --output <span style="background-color:#fff0f0"><span style="color
1261
1279
  </ol>
1262
1280
 
1263
1281
 
1264
- <p>From now on, <strong>kdiff3</strong> will be invoked to help you transfer your changes between generated files. When you are finished transferring changes, simply issue the &#8220;save the file&#8221; command and terminate <strong>kdiff3</strong>. Or, if you do not want to transfer any changes, simply terminate <strong>kdiff3</strong>.</p>
1282
+ <p>From now on, <strong>kdiff3</strong> will be invoked to help you transfer your changes between generated files. When you are finished transferring changes, simply issue the &#8220;save the file&#8221; command and quit <strong>kdiff3</strong>. Or, if you do not want to transfer any changes, simply quit <strong>kdiff3</strong> <em>without</em> saving the file.</p>
1265
1283
 
1266
1284
 
1267
1285
  </div>
@@ -1274,6 +1292,9 @@ kdiff3 --auto --output <span style="background-color:#fff0f0"><span style="color
1274
1292
  <p>The <strong>header_to_ruby.rb</strong> tool can be used to convert Verilog header files into Ruby. You can try it by running the <pre>header_to_ruby.rb --help</pre> command.</p>
1275
1293
 
1276
1294
 
1295
+ <p>By converting Verilog header files into Ruby, your <a href="#glossary.test">test</a> can utilize the same <code class="code"><span style="background-color:#f0fff0"><span style="color:#161">`</span><span style="color:#2B2">define</span></span></code> constants that are used in the Verilog <a href="#glossary.design">design</a>.</p>
1296
+
1297
+
1277
1298
  <h2 id="usage.tutorial">Tutorial</h2>
1278
1299
 
1279
1300
 
@@ -1353,10 +1374,24 @@ Each format represents a different software development methodology:
1353
1374
  </ul>
1354
1375
 
1355
1376
 
1356
- <p>Both rSpec and xUnit are presented in this tutorial.</p>
1377
+ <div class="admonition">
1378
+
1379
+ <div class="note" id="note4">
1380
+
1381
+ <p style="float:left"><img src="images/note.png" title="note" alt="note" /></p>
1382
+
1383
+
1384
+ <p class="title">Note:</p>
1385
+
1386
+
1387
+ <p>Both rSpec and xUnit formats are presented in this tutorial.</p>
1388
+
1389
+
1390
+ </div>
1357
1391
 
1392
+ </div>
1358
1393
 
1359
- <p>Once we have decided how we want to implement our specification, we can proceed to generate a test for our design. <a href="#fig..generate-test.rspec">the example named &ldquo;Generating a test with specification in rSpec format&rdquo;</a> and <a href="#fig..generate-test.unit-test">the example named &ldquo;Generating a test with specification in xUnit format&rdquo;</a> illustrate this process.</p>
1394
+ <p>Once we have decided how we want to implement our specification, we can proceed to generate a test for our design. This process is illustrated by <a href="#fig..generate-test.rspec">the example named &ldquo;Generating a test with specification in rSpec format&rdquo;</a> and <a href="#fig..generate-test.unit-test">the example named &ldquo;Generating a test with specification in xUnit format&rdquo;</a>.</p>
1360
1395
 
1361
1396
 
1362
1397
  <div class="formal">
@@ -1419,7 +1454,7 @@ Here are some reasonable expectations for our simple counter:
1419
1454
  </ul>
1420
1455
 
1421
1456
 
1422
- <p>Now that we have identified a set of expectations for our design, we are ready to implement them in our specification. <a href="#fig..counter_rspec_spec.rb">the example named &ldquo;Specification implemented in rSpec format&rdquo;</a> and <a href="#fig..counter_xunit_spec.rb">the example named &ldquo;Specification implemented in xUnit format&rdquo;</a> illustrate this process. Note the striking similarities between our expectations and their implementation.</p>
1457
+ <p>Now that we have identified a set of expectations for our design, we are ready to implement them in our specification. This process is illustrated by <a href="#fig..counter_rspec_spec.rb">the example named &ldquo;Specification implemented in rSpec format&rdquo;</a> and <a href="#fig..counter_xunit_spec.rb">the example named &ldquo;Specification implemented in xUnit format&rdquo;</a>.</p>
1423
1458
 
1424
1459
 
1425
1460
  <div class="formal">
@@ -1443,12 +1478,12 @@ context <span style="background-color:#fff0f0"><span style="color:#710">&quot;</
1443
1478
  <span style="color:#080; font-weight:bold">end</span>
1444
1479
 
1445
1480
  specify <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">should be zero</span><span style="color:#710">&quot;</span></span> <span style="color:#080; font-weight:bold">do</span>
1446
- <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should_equal <span style="color:#00D; font-weight:bold">0</span>
1481
+ <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should == <span style="color:#00D; font-weight:bold">0</span>
1447
1482
  <span style="color:#080; font-weight:bold">end</span>
1448
1483
 
1449
1484
  specify <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">should increment by one count upon each rising clock edge</span><span style="color:#710">&quot;</span></span> <span style="color:#080; font-weight:bold">do</span>
1450
1485
  <span style="color:#036; font-weight:bold">LIMIT</span>.times <span style="color:#080; font-weight:bold">do</span> |i|
1451
- <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should_equal i
1486
+ <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should == i
1452
1487
  relay_verilog <span style="color:#888"># increment the counter</span>
1453
1488
  <span style="color:#080; font-weight:bold">end</span>
1454
1489
  <span style="color:#080; font-weight:bold">end</span>
@@ -1460,12 +1495,12 @@ context <span style="background-color:#fff0f0"><span style="color:#710">&quot;</
1460
1495
 
1461
1496
  <span style="color:#888"># increment the counter to maximum value</span>
1462
1497
  <span style="color:#036; font-weight:bold">MAX</span>.times {relay_verilog}
1463
- <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should_equal <span style="color:#036; font-weight:bold">MAX</span>
1498
+ <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should == <span style="color:#036; font-weight:bold">MAX</span>
1464
1499
  <span style="color:#080; font-weight:bold">end</span>
1465
1500
 
1466
1501
  specify <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">should overflow upon increment</span><span style="color:#710">&quot;</span></span> <span style="color:#080; font-weight:bold">do</span>
1467
1502
  relay_verilog <span style="color:#888"># increment the counter</span>
1468
- <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should_equal <span style="color:#00D; font-weight:bold">0</span>
1503
+ <span style="color:#036; font-weight:bold">Counter</span>.count.intVal.should == <span style="color:#00D; font-weight:bold">0</span>
1469
1504
  <span style="color:#080; font-weight:bold">end</span>
1470
1505
  <span style="color:#080; font-weight:bold">end</span>
1471
1506
  </pre>
@@ -1539,13 +1574,13 @@ context <span style="background-color:#fff0f0"><span style="color:#710">&quot;</
1539
1574
  <ol>
1540
1575
  <li>Replace the contents of the file named <tt>counter_rspec_spec.rb</tt> with the source code shown in <a href="#fig..counter_rspec_spec.rb">the example named &ldquo;Specification implemented in rSpec format&rdquo;</a>.</li>
1541
1576
  <li>Replace the contents of the file named <tt>counter_xunit_spec.rb</tt> with the source code shown in <a href="#fig..counter_xunit_spec.rb">the example named &ldquo;Specification implemented in xUnit format&rdquo;</a>.</li>
1542
- <li>Replace the contents of the files named <tt>counter_rspec_design.rb</tt> and <tt>counter_xunit_design.rb</tt> with the following code. This code defines the reset! method which resets our Verilog design. <pre class="code">
1577
+ <li>Replace the contents of the files named <tt>counter_rspec_design.rb</tt> and <tt>counter_xunit_design.rb</tt> with the following code. <pre class="code"><span style="color:#888"># This is a Ruby interface to the design under test.</span>
1578
+
1579
+ <span style="color:#888"># This method resets the design under test.</span>
1543
1580
  <span style="color:#080; font-weight:bold">def</span> <span style="color:#036; font-weight:bold">Counter</span>.reset!
1581
+ <span style="color:#888"># assert the reset signal for five clock cycles</span>
1544
1582
  reset.intVal = <span style="color:#00D; font-weight:bold">1</span>
1545
-
1546
- <span style="color:#888"># simulate one clock cycle</span>
1547
- relay_verilog
1548
-
1583
+ <span style="color:#00D; font-weight:bold">5</span>.times {relay_verilog}
1549
1584
  reset.intVal = <span style="color:#00D; font-weight:bold">0</span>
1550
1585
  <span style="color:#080; font-weight:bold">end</span>
1551
1586
  </pre></li>
@@ -1559,7 +1594,7 @@ context <span style="background-color:#fff0f0"><span style="color:#710">&quot;</
1559
1594
  <h3 id="usage.tutorial.implement-proto">Implement the prototype</h3>
1560
1595
 
1561
1596
 
1562
- <p>Now that we have a <a href="#glossary.specification">specification</a> against which to verify our <a href="#glossary.design">design</a>, let us build a prototype of our design. By doing so, we exercise our specification, experience potential problems that may arise when we later implement our design in Verilog, and gain confidence in our work. <a href="#fig..counter_proto.rb">the example named &ldquo;Ruby prototype of our Verilog design&rdquo;</a> shows the completed prototype for our design.</p>
1597
+ <p>Now that we have a <a href="#glossary.specification">specification</a> against which to verify our <a href="#glossary.design">design</a>, let us build a prototype of our design. By doing so, we exercise our specification, experience potential problems that may arise when we later implement our design in Verilog, and gain confidence in our work. The result of this proceess is illustrated by <a href="#fig..counter_proto.rb">the example named &ldquo;Ruby prototype of our Verilog design&rdquo;</a>.</p>
1563
1598
 
1564
1599
 
1565
1600
  <div class="formal">
@@ -1603,45 +1638,8 @@ context <span style="background-color:#fff0f0"><span style="color:#710">&quot;</
1603
1638
  <h3 id="usage.tutorial.test-proto">Verify the prototype</h3>
1604
1639
 
1605
1640
 
1606
- <p>Now that we have implemented our prototype, we are ready to verify it against our <a href="#glossary.specification">specification</a> by running the <a href="#glossary.test">test</a>. <a href="#fig..test-proto.rspec">the example named &ldquo;Running a test with specification in rSpec format&rdquo;</a> and <a href="#fig..test-proto.unit-test">the example named &ldquo;Running a test with specification in xUnit format&rdquo;</a> illustrate this process.</p>
1607
-
1608
-
1609
- <div class="admonition">
1610
-
1611
- <div class="tip" id="tip3">
1612
-
1613
- <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
1614
-
1615
-
1616
- <p class="title">Tip: Reuse your specification.</p>
1617
-
1641
+ <p>Now that we have implemented our prototype, we are ready to verify it against our <a href="#glossary.specification">specification</a> by running the <a href="#glossary.test">test</a>. This process is illustrated by <a href="#fig..test-proto.rspec">the example named &ldquo;Running a test with specification in rSpec format&rdquo;</a> and <a href="#fig..test-proto.unit-test">the example named &ldquo;Running a test with specification in xUnit format&rdquo;</a>.</p>
1618
1642
 
1619
- <p>The <em>same</em> specification can be used to verify both prototype and design.</p>
1620
-
1621
-
1622
- </div>
1623
-
1624
- </div>
1625
-
1626
- <p>Here, the <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code> environment variable is assigned a non-empty value while running the test, so that, instead of our design, our prototype is verified against our specification. You can also assign a value to <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code> before running the test, by using your shell&#8217;s <strong>export</strong> or <strong>setenv</strong> command. Finally, the Icarus Verilog simulator, denoted by <em>cver</em>, is used to run the simulation.</p>
1627
-
1628
-
1629
- <div class="admonition">
1630
-
1631
- <div class="tip" id="tip4">
1632
-
1633
- <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
1634
-
1635
-
1636
- <p class="title">Tip: What can the test runner do?</p>
1637
-
1638
-
1639
- <p>If you invoke the test runner (1) without any arguments or (2) with the <tt>-T</tt> option, it will show you a list of tasks that it can perform for you.</p>
1640
-
1641
-
1642
- </div>
1643
-
1644
- </div>
1645
1643
 
1646
1644
  <div class="formal">
1647
1645
 
@@ -1691,6 +1689,26 @@ Finished in 0.040668 seconds.
1691
1689
  3 tests, 35 assertions, 0 failures, 0 errors
1692
1690
  </pre>
1693
1691
 
1692
+ </div>
1693
+
1694
+ </div>
1695
+
1696
+ <p>In these examples, the <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code> environment variable is assigned a non-empty value while running the test so that, instead of our design, our prototype is verified against our specification. You can also assign a value to <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code> before running the test, by using your shell&#8217;s <strong>export</strong> or <strong>setenv</strong> command. Finally, the <a href="#setup.reqs"><span class="caps">GPL</span> Cver simulator</a>, denoted by <em>cver</em>, is used to run the simulation.</p>
1697
+
1698
+
1699
+ <div class="admonition">
1700
+
1701
+ <div class="tip" id="tip3">
1702
+
1703
+ <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
1704
+
1705
+
1706
+ <p class="title">Tip: What can the test runner do?</p>
1707
+
1708
+
1709
+ <p>If you invoke the test runner (1) without any arguments or (2) with the <tt>-T</tt> option, it will show you a list of tasks that it can perform for you.</p>
1710
+
1711
+
1694
1712
  </div>
1695
1713
 
1696
1714
  </div>
@@ -1698,7 +1716,7 @@ Finished in 0.040668 seconds.
1698
1716
  <h3 id="usage.tutorial.implement-design">Implement the design</h3>
1699
1717
 
1700
1718
 
1701
- <p>Now that we have implemented and verified our prototype, we are ready to implement our <a href="#glossary.design">design</a>. This is often quite simple because we translate <em>existing</em> code from Ruby (our prototype) into Verilog (our design). <a href="#fig..counter.v_impl">the example named &ldquo;Implementation of a simple up-counter with synchronous reset&rdquo;</a> illustrates the result of this process. Once again, note the striking similarities between the implementation of our prototype and design.</p>
1719
+ <p>Now that we have implemented and verified our prototype, we are ready to implement our <a href="#glossary.design">design</a>. This is often quite simple because we translate <em>existing</em> code from Ruby (our prototype) into Verilog (our design). The result of this process is illustrated by <a href="#fig..counter.v_impl">the example named &ldquo;Implementation of a simple up-counter with synchronous reset&rdquo;</a>.</p>
1702
1720
 
1703
1721
 
1704
1722
  <div class="formal">
@@ -1757,34 +1775,6 @@ endmodule
1757
1775
  <p>Now that we have implemented our <a href="#glossary.design">design</a>, we are ready to verify it against our <a href="#glossary.specification">specification</a> by running the <a href="#glossary.test">test</a>. <a href="#fig..test-design.rspec">the example named &ldquo;Running a test with specification in rSpec format&rdquo;</a> and <a href="#fig..test-design.unit-test">the example named &ldquo;Running a test with specification in xUnit format&rdquo;</a> illustrate this process.</p>
1758
1776
 
1759
1777
 
1760
- <p>Here, the <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code> environment variable is <em>not</em> specified while running the test, so that our design, instead of our prototype, is verified against our specification. You can also achieve this effect by assigning an empty value to <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code>, or by using your shell&#8217;s <strong>unset</strong> command. Finally, the <span class="caps">GPL</span> Cver Verilog simulator, denoted by <em>cver</em>, is used to run the simulation.</p>
1761
-
1762
-
1763
- <div class="admonition">
1764
-
1765
- <div class="tip" id="tip5">
1766
-
1767
- <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
1768
-
1769
-
1770
- <p class="title">Tip: Running multiple tests at once.</p>
1771
-
1772
-
1773
- <p>Create a file named <tt>Rakefile</tt> containing the following line.</p>
1774
-
1775
-
1776
- <blockquote>
1777
- <p><code class="code">require <span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">ruby-vpi/runner_proxy</span><span style="color:#710">'</span></span></code></p>
1778
- </blockquote>
1779
-
1780
-
1781
- <p>Now you can invoke all test runners in the current directory simply by executing <pre>rake cver</pre> (where <em>cver</em> denotes the <span class="caps">GPL</span> Cver simulator).</p>
1782
-
1783
-
1784
- </div>
1785
-
1786
- </div>
1787
-
1788
1778
  <div class="formal">
1789
1779
 
1790
1780
  <div class="example" id="fig..test-design.rspec">
@@ -1833,13 +1823,38 @@ Finished in 0.006766 seconds.
1833
1823
 
1834
1824
  </div>
1835
1825
 
1836
- <h2 id="usage.examples">Examples</h2>
1826
+ <p>In these examples, the <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code> environment variable is <em>not</em> specified while running the test, so that our design, instead of our prototype, is verified against our specification. You can also achieve this effect by assigning an empty value to <code class="code"><span style="color:#036; font-weight:bold">PROTOTYPE</span></code>, or by using your shell&#8217;s <strong>unset</strong> command. Finally, the <a href="#setup.reqs"><span class="caps">GPL</span> Cver simulator</a>, denoted by <em>cver</em>, is used to run the simulation.</p>
1837
1827
 
1838
1828
 
1839
- <p>The <tt>samp</tt> directory contains several example tests which illustrate how Ruby-VPI can be used. Each example 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.</p>
1829
+ <div class="admonition">
1830
+
1831
+ <div class="tip" id="tip4">
1832
+
1833
+ <p style="float:left"><img src="images/tip.png" title="tip" alt="tip" /></p>
1834
+
1835
+
1836
+ <p class="title">Tip: Running multiple tests at once.</p>
1837
+
1838
+
1839
+ <p>Create a file named <tt>Rakefile</tt> containing the following line.</p>
1840
1840
 
1841
1841
 
1842
- <p>Also, some example specifications make use of <span class="caps">BDD</span> through the rSpec library. See <a href="#background.methodology">the section named &ldquo;Methodology&rdquo;</a> for a discussion of rSpec.</p>
1842
+ <blockquote>
1843
+ <p><code class="code">require <span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">ruby-vpi/runner_proxy</span><span style="color:#710">'</span></span></code></p>
1844
+ </blockquote>
1845
+
1846
+
1847
+ <p>Now you can invoke all test runners in the current directory simply by executing <pre>rake cver</pre> (where <em>cver</em> denotes the <a href="#setup.reqs"><span class="caps">GPL</span> Cver simulator</a>).</p>
1848
+
1849
+
1850
+ </div>
1851
+
1852
+ </div>
1853
+
1854
+ <h2 id="usage.examples">Examples</h2>
1855
+
1856
+
1857
+ <p>The <tt>samp</tt> directory contains several example tests which illustrate how Ruby-VPI can be used. Each example 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.</p>
1843
1858
 
1844
1859
 
1845
1860
  <h1 id="hacking">Hacking</h1>
@@ -1848,7 +1863,7 @@ Finished in 0.006766 seconds.
1848
1863
  <h2 id="hacking.release-packages">Building release packages</h2>
1849
1864
 
1850
1865
 
1851
- <p>In addition to the <a href="./doc/usage.requirements.html">normal requirements</a>, you need the following software to build release packages:</p>
1866
+ <p>In addition to the <a href="#setup.reqs">normal requirements</a>, you need the following software to build release packages:</p>
1852
1867
 
1853
1868
 
1854
1869
  <ul>
@@ -1875,7 +1890,7 @@ Finished in 0.006766 seconds.
1875
1890
 
1876
1891
  <div class="admonition">
1877
1892
 
1878
- <div class="note" id="note1">
1893
+ <div class="note" id="note5">
1879
1894
 
1880
1895
  <p style="float:left"><img src="images/note.png" title="note" alt="note" /></p>
1881
1896
 
@@ -1883,6 +1898,9 @@ Finished in 0.006766 seconds.
1883
1898
  <p class="title">Note: Fixed in 2.0.0.</p>
1884
1899
 
1885
1900
 
1901
+ <p>This problem was fixed in release 2.0.0 (2006-04-17).</p>
1902
+
1903
+
1886
1904
  </div>
1887
1905
 
1888
1906
  </div>
@@ -1895,7 +1913,7 @@ Finished in 0.006766 seconds.
1895
1913
 
1896
1914
  <div class="admonition">
1897
1915
 
1898
- <div class="note" id="note1">
1916
+ <div class="note" id="note6">
1899
1917
 
1900
1918
  <p style="float:left"><img src="images/note.png" title="note" alt="note" /></p>
1901
1919
 
@@ -1903,6 +1921,9 @@ Finished in 0.006766 seconds.
1903
1921
  <p class="title">Note: Fixed in 2.0.0.</p>
1904
1922
 
1905
1923
 
1924
+ <p>This problem was fixed in release 2.0.0 (2006-04-17).</p>
1925
+
1926
+
1906
1927
  </div>
1907
1928
 
1908
1929
  </div>
@@ -1919,10 +1940,10 @@ Finished in 0.006766 seconds.
1919
1940
  <h4 id="problems.ivl.vpi_handle_by_name.absolute-paths">Give full paths to Verilog objects</h4>
1920
1941
 
1921
1942
 
1922
- <p>In version 0.8 and snapshot 20061009 of Icarus Verilog, the <code class="code">vpi_handle_by_name</code> function requires an <em>absolute</em> path (including the name of the bench which instantiates the design) to a Verilog object. In addition, <code class="code">vpi_handle_by_name</code> is unable to retrieve the handle for a module parameter.</p>
1943
+ <p>In version 0.8 and snapshot 20061009 of Icarus Verilog, the <code class="code">vpi_handle_by_name</code> function requires an <em>absolute</em> path (including the name of the bench which instantiates the design) to a Verilog object. In addition, <code class="code">vpi_handle_by_name</code> always returns <code class="code"><span style="color:#038; font-weight:bold">nil</span></code> when its second parameter is specified.</p>
1923
1944
 
1924
1945
 
1925
- <p>For example, consider <a href="#ex..TestFoo">the example named &ldquo;Part of a bench which instantiates a Verilog design&rdquo;</a> Here, one needs to specify <code class="code"><span style="color:#036; font-weight:bold">TestFoo</span>.my_foo.clk</code> instead of <code class="code">my_foo.clk</code> in order to access the clk input of the my_foo module instance.</p>
1946
+ <p>For example, consider <a href="#ex..TestFoo">the example named &ldquo;Part of a bench which instantiates a Verilog design&rdquo;</a>. Here, one must write <code class="code">vpi_handle_by_name(<span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">TestFoo.my_foo.clk</span><span style="color:#710">&quot;</span></span>, <span style="color:#038; font-weight:bold">nil</span>)</code> instead of <code class="code">vpi_handle_by_name(<span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">my_foo.clk</span><span style="color:#710">&quot;</span></span>, <span style="color:#036; font-weight:bold">TestFoo</span>)</code> in order to access the <code class="code">clk</code> input of the <code class="code">my_foo</code> module instance.</p>
1926
1947
 
1927
1948
 
1928
1949
  <div class="formal">
@@ -2013,7 +2034,7 @@ endmodule
2013
2034
 
2014
2035
  <div class="admonition">
2015
2036
 
2016
- <div class="note" id="note1">
2037
+ <div class="note" id="note7">
2017
2038
 
2018
2039
  <p style="float:left"><img src="images/note.png" title="note" alt="note" /></p>
2019
2040
 
@@ -2021,6 +2042,9 @@ endmodule
2021
2042
  <p class="title">Note: Fixed in 2.0.0.</p>
2022
2043
 
2023
2044
 
2045
+ <p>This problem was fixed in release 2.0.0 (2006-04-17).</p>
2046
+
2047
+
2024
2048
  </div>
2025
2049
 
2026
2050
  </div>
@@ -2037,19 +2061,19 @@ endmodule
2037
2061
  <p>An environment in which a <a href="#glossary.design">design</a> is verified against a <a href="#glossary.specification">specification</a>. Often, it is used to emulate conditions in which the design will be eventually deployed.</p>
2038
2062
 
2039
2063
 
2040
- <h2 id="glossary.BDD"><span class="caps">BDD</span></h2>
2064
+ <h2 id="glossary.BDD">Behavior driven development (BDD)</h2>
2041
2065
 
2042
2066
 
2043
- <p>Behavior driven development.</p>
2067
+ <p>An <a href="http://agilemanifesto.org/">agile software development methodology</a> which emphasizes thinking in terms of behavior when designing, implementing, and verifying software.</p>
2044
2068
 
2045
2069
 
2046
- <p>A software development methodology which emphasizes thinking in terms of behavior when designing, implementing, and verifying software. See the <a href="http://behaviour-driven.org/">official wiki</a> for more information.</p>
2070
+ <p>See the <a href="http://behaviour-driven.org/">official wiki</a> for more information.</p>
2047
2071
 
2048
2072
 
2049
2073
  <h2 id="glossary.design">Design</h2>
2050
2074
 
2051
2075
 
2052
- <p>An idea or entity that is verified against a <a href="#glossary.specification">specification</a> in order to ensure correctness or soundness of its being. In other words, it is the thing being checked: does it work or not?</p>
2076
+ <p>A Verilog module that is verified against a <a href="#glossary.specification">specification</a> in order to ensure correctness or soundness of its being. In other words, it is the thing being checked: does it work or not?</p>
2053
2077
 
2054
2078
 
2055
2079
  <h2 id="glossary.expectation">Expectation</h2>
@@ -2061,36 +2085,44 @@ endmodule
2061
2085
  <h2 id="glossary.handle">Handle</h2>
2062
2086
 
2063
2087
 
2064
- <p>An object in a Verilog simulation. For example, a handle can represent a wire, register, module, if-statement, expression, and so on.</p>
2088
+ <p>A reference to an object inside the Verilog simulation that was obtained through the <code class="code">vpi_handle_by_name</code> function.</p>
2065
2089
 
2066
2090
 
2067
2091
  <h2 id="glossary.rake">Rake</h2>
2068
2092
 
2069
2093
 
2070
2094
  <blockquote>
2071
- <p>Rake is a build tool, written in Ruby, using Ruby as a build language. Rake is similar to make in scope and purpose. &#8212;<a href="http://docs.rubyrake.org">Rake documentation</a></p>
2095
+ <p>Rake is a build tool, written in Ruby, using Ruby as a build language. Rake is similar to <strong>make</strong> in scope and purpose.</p>
2072
2096
  </blockquote>
2073
2097
 
2074
2098
 
2075
- <p>See the <a href="http://rake.rubyforge.org">Rake website</a> for more information.</p>
2099
+ <blockquote>
2100
+ <p style="text-align:right;">&#8212;<a href="http://docs.rubyrake.org">Rake documentation</a></p>
2101
+ </blockquote>
2076
2102
 
2077
2103
 
2078
2104
  <h2 id="glossary.rspec">rSpec</h2>
2079
2105
 
2080
2106
 
2081
- <p>Ruby framework for <span class="caps">BDD</span>. See the <a href="http://rspec.rubyforge.org">rSpec website</a> and <a href="http://rspec.rubyforge.org/tutorials/index.html">tutorial</a> for more information.</p>
2107
+ <p>The <a href="#glossary.BDD"><span class="caps">BDD</span></a> framework for Ruby.</p>
2108
+
2109
+
2110
+ <p>See the <a href="http://rspec.rubyforge.org">rSpec website</a> and <a href="http://rspec.rubyforge.org/tutorials/index.html">tutorial</a> for more information.</p>
2082
2111
 
2083
2112
 
2084
2113
  <h2 id="glossary.specification">Specification</h2>
2085
2114
 
2086
2115
 
2087
- <p>A set of <a href="#glossary.expectations">expectation</a> which define the desired behavior of a <a href="#glossary.design">design</a> when it is subjected to certain conditions.</p>
2116
+ <p>A set of <a href="#glossary.expectations">expectations</a> which define the desired behavior of a <a href="#glossary.design">design</a> when it is subjected to certain stimulus.</p>
2117
+
2118
+
2119
+ <h2 id="glossary.TDD">Test driven development (TDD)</h2>
2088
2120
 
2089
2121
 
2090
- <h2 id="glossary.TDD"><span class="caps">TDD</span></h2>
2122
+ <p>An <a href="http://agilemanifesto.org/">agile software development methodology</a> which emphasizes (1) testing functionality before implementing it and (2) refactoring.</p>
2091
2123
 
2092
2124
 
2093
- <p>Test Driven Development.</p>
2125
+ <p>See <a href="http://www.agiledata.org/essays/tdd.html">this introductory article</a> for more information.</p>
2094
2126
 
2095
2127
 
2096
2128
  <h2 id="glossary.test">Test</h2>