ruby-vpi 7.2.0 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. data/HEADER +4 -5
  2. data/HISTORY +18 -2
  3. data/MEMO +10 -6
  4. data/Rakefile +11 -14
  5. data/bin/generate_test.rb +7 -58
  6. data/bin/generate_test_tpl/bench.v +15 -19
  7. data/bin/generate_test_tpl/design.rb +8 -8
  8. data/bin/generate_test_tpl/spec.rb +2 -2
  9. data/bin/header_to_ruby.rb +2 -27
  10. data/doc/xhtml/background.organization.html +1 -1
  11. data/doc/xhtml/index.html +2 -2
  12. data/header.html +3 -6
  13. data/header.part.html +3 -6
  14. data/history.html +35 -8
  15. data/history.part.html +32 -2
  16. data/lib/ruby-vpi/verilog_parser.rb +136 -0
  17. data/lib/ruby-vpi/vpi_util.rb +10 -0
  18. data/memo.html +19 -17
  19. data/memo.part.html +16 -11
  20. data/readme.html +3 -6
  21. data/ref/c/annotated.html +1 -1
  22. data/ref/c/common_8h.html +1 -1
  23. data/ref/c/files.html +1 -1
  24. data/ref/c/functions.html +1 -1
  25. data/ref/c/functions_vars.html +1 -1
  26. data/ref/c/globals.html +1 -1
  27. data/ref/c/globals_0x63.html +1 -1
  28. data/ref/c/globals_0x65.html +1 -1
  29. data/ref/c/globals_0x66.html +1 -1
  30. data/ref/c/globals_0x70.html +1 -1
  31. data/ref/c/globals_0x72.html +1 -1
  32. data/ref/c/globals_0x73.html +1 -1
  33. data/ref/c/globals_0x74.html +1 -1
  34. data/ref/c/globals_0x76.html +1 -1
  35. data/ref/c/globals_0x78.html +1 -1
  36. data/ref/c/globals_defs.html +1 -1
  37. data/ref/c/globals_defs_0x65.html +1 -1
  38. data/ref/c/globals_defs_0x70.html +1 -1
  39. data/ref/c/globals_defs_0x76.html +1 -1
  40. data/ref/c/globals_defs_0x78.html +1 -1
  41. data/ref/c/globals_enum.html +1 -1
  42. data/ref/c/globals_eval.html +1 -1
  43. data/ref/c/globals_func.html +1 -1
  44. data/ref/c/globals_type.html +1 -1
  45. data/ref/c/globals_vars.html +1 -1
  46. data/ref/c/hierarchy.html +1 -1
  47. data/ref/c/index.html +1 -1
  48. data/ref/c/relay_8cin.html +1 -1
  49. data/ref/c/relay_8hin.html +1 -1
  50. data/ref/c/ruby-vpi_8c.html +1 -1
  51. data/ref/c/structrelay____RubyOptions____def.html +1 -1
  52. data/ref/c/structt__cb__data.html +1 -1
  53. data/ref/c/structt__vpi__delay.html +1 -1
  54. data/ref/c/structt__vpi__error__info.html +1 -1
  55. data/ref/c/structt__vpi__strengthval.html +1 -1
  56. data/ref/c/structt__vpi__systf__data.html +1 -1
  57. data/ref/c/structt__vpi__time.html +1 -1
  58. data/ref/c/structt__vpi__value.html +1 -1
  59. data/ref/c/structt__vpi__vecval.html +1 -1
  60. data/ref/c/structt__vpi__vlog__info.html +1 -1
  61. data/ref/c/swig_8cin.html +1 -1
  62. data/ref/c/swig_8hin.html +1 -1
  63. data/ref/c/verilog_8h.html +1 -1
  64. data/ref/c/vlog_8cin.html +1 -1
  65. data/ref/c/vlog_8hin.html +1 -1
  66. data/ref/c/vpi__user_8h.html +1 -1
  67. data/ref/ruby/classes/ERB.html +5 -5
  68. data/ref/ruby/classes/ERB.src/{M000011.html → M000018.html} +0 -0
  69. data/ref/ruby/classes/FileUtils.html +10 -10
  70. data/ref/ruby/classes/FileUtils.src/{M000065.html → M000073.html} +0 -0
  71. data/ref/ruby/classes/FileUtils.src/{M000066.html → M000074.html} +0 -0
  72. data/ref/ruby/classes/OutputInfo.html +5 -5
  73. data/ref/ruby/classes/OutputInfo.src/{M000007.html → M000014.html} +37 -37
  74. data/ref/ruby/classes/RDoc.html +5 -5
  75. data/ref/ruby/classes/RDoc.src/{M000069.html → M000077.html} +0 -0
  76. data/ref/ruby/classes/RubyVPI.html +10 -10
  77. data/ref/ruby/classes/RubyVPI.src/{M000067.html → M000075.html} +0 -0
  78. data/ref/ruby/classes/RubyVPI.src/{M000068.html → M000076.html} +0 -0
  79. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +72 -35
  80. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000065.html +18 -0
  81. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000066.html +18 -0
  82. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000059.html → M000067.html} +8 -8
  83. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000060.html → M000068.html} +29 -29
  84. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000061.html → M000069.html} +63 -63
  85. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000062.html → M000070.html} +106 -106
  86. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000063.html → M000071.html} +12 -12
  87. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000064.html → M000072.html} +4 -4
  88. data/ref/ruby/classes/String.html +27 -9
  89. data/ref/ruby/classes/String.src/M000016.html +41 -0
  90. data/ref/ruby/classes/String.src/M000017.html +18 -0
  91. data/ref/ruby/classes/Table.html +20 -20
  92. data/ref/ruby/classes/Table.src/{M000003.html → M000010.html} +0 -0
  93. data/ref/ruby/classes/Table.src/{M000004.html → M000011.html} +0 -0
  94. data/ref/ruby/classes/Table.src/{M000005.html → M000012.html} +0 -0
  95. data/ref/ruby/classes/Table.src/{M000006.html → M000013.html} +0 -0
  96. data/ref/ruby/classes/Template.html +5 -5
  97. data/ref/ruby/classes/Template.src/{M000010.html → M000015.html} +0 -0
  98. data/ref/ruby/classes/VerilogParser/Module/Parameter.html +160 -0
  99. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000009.html +21 -0
  100. data/ref/ruby/classes/VerilogParser/Module/Port.html +207 -0
  101. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +21 -0
  102. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +18 -0
  103. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +18 -0
  104. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +18 -0
  105. data/ref/ruby/classes/VerilogParser/Module.html +172 -0
  106. data/ref/ruby/classes/VerilogParser/Module.src/M000004.html +29 -0
  107. data/ref/ruby/classes/{ModuleInfo.html → VerilogParser.html} +38 -50
  108. data/ref/ruby/classes/VerilogParser.src/M000003.html +34 -0
  109. data/ref/ruby/classes/XX/Document.html +45 -45
  110. data/ref/ruby/classes/XX/Document.src/M000056.html +9 -8
  111. data/ref/ruby/classes/XX/Document.src/M000057.html +7 -21
  112. data/ref/ruby/classes/XX/Document.src/M000058.html +7 -85
  113. data/ref/ruby/classes/XX/Document.src/{M000053.html → M000059.html} +0 -0
  114. data/ref/ruby/classes/XX/Document.src/{M000054.html → M000060.html} +0 -0
  115. data/ref/ruby/classes/XX/Document.src/{M000055.html → M000061.html} +0 -0
  116. data/ref/ruby/classes/XX/Document.src/M000062.html +21 -0
  117. data/ref/ruby/classes/XX/Document.src/M000063.html +34 -0
  118. data/ref/ruby/classes/XX/Document.src/M000064.html +98 -0
  119. data/ref/ruby/classes/XX/HTML4/Strict.html +5 -5
  120. data/ref/ruby/classes/XX/HTML4/Strict.src/{M000016.html → M000022.html} +0 -0
  121. data/ref/ruby/classes/XX/HTML4/Transitional.html +5 -5
  122. data/ref/ruby/classes/XX/HTML4/Transitional.src/{M000015.html → M000021.html} +0 -0
  123. data/ref/ruby/classes/XX/HTML4.html +5 -5
  124. data/ref/ruby/classes/XX/HTML4.src/{M000014.html → M000020.html} +0 -0
  125. data/ref/ruby/classes/XX/Markup/ClassMethods.html +40 -40
  126. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000028.html +9 -14
  127. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000029.html +7 -9
  128. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000024.html → M000030.html} +0 -0
  129. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000025.html → M000031.html} +0 -0
  130. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000026.html → M000032.html} +0 -0
  131. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000027.html → M000033.html} +0 -0
  132. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000034.html +27 -0
  133. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000035.html +22 -0
  134. data/ref/ruby/classes/XX/Markup/InstanceMethods.html +100 -100
  135. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000036.html +43 -19
  136. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000037.html +20 -19
  137. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000038.html +18 -15
  138. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000039.html +35 -10
  139. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000040.html +7 -13
  140. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000041.html +18 -7
  141. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000042.html +19 -7
  142. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000043.html +19 -7
  143. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000044.html +15 -7
  144. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000045.html +10 -7
  145. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000046.html +13 -8
  146. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000047.html +7 -7
  147. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000048.html +7 -7
  148. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000049.html +7 -7
  149. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000050.html +20 -0
  150. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000051.html +20 -0
  151. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000052.html +21 -0
  152. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000053.html +20 -0
  153. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000054.html +20 -0
  154. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000055.html +20 -0
  155. data/ref/ruby/classes/XX/Markup.html +5 -5
  156. data/ref/ruby/classes/XX/Markup.src/{M000021.html → M000027.html} +0 -0
  157. data/ref/ruby/classes/XX/XHTML/Strict.html +5 -5
  158. data/ref/ruby/classes/XX/XHTML/Strict.src/{M000020.html → M000026.html} +0 -0
  159. data/ref/ruby/classes/XX/XHTML/Transitional.html +5 -5
  160. data/ref/ruby/classes/XX/XHTML/Transitional.src/{M000019.html → M000025.html} +0 -0
  161. data/ref/ruby/classes/XX/XHTML.html +5 -5
  162. data/ref/ruby/classes/XX/XHTML.src/{M000018.html → M000024.html} +0 -0
  163. data/ref/ruby/classes/XX/XML.html +5 -5
  164. data/ref/ruby/classes/XX/XML.src/{M000013.html → M000019.html} +0 -0
  165. data/ref/ruby/classes/XX/XMLish.html +5 -5
  166. data/ref/ruby/classes/XX/XMLish.src/{M000017.html → M000023.html} +0 -0
  167. data/ref/ruby/created.rid +1 -1
  168. data/ref/ruby/files/bin/generate_test_rb.html +2 -1
  169. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +15 -15
  170. data/ref/ruby/files/bin/header_to_ruby_rb.html +2 -1
  171. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
  172. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
  173. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
  174. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  175. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
  176. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  177. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
  178. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +107 -0
  179. data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
  180. data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +1 -1
  181. data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
  182. data/ref/ruby/fr_class_index.html +4 -1
  183. data/ref/ruby/fr_file_index.html +1 -0
  184. data/ref/ruby/fr_method_index.html +75 -67
  185. data/samp/counter/counter_rspecTest_bench.v +4 -5
  186. data/samp/counter/counter_unitTest_bench.v +6 -5
  187. data/samp/pipelined_alu/Hw5UnitModel.rb +4 -4
  188. data/samp/pipelined_alu/hw5_unit.v +15 -23
  189. data/samp/pipelined_alu/hw5_unit_test_bench.rb +9 -0
  190. data/samp/pipelined_alu/hw5_unit_test_bench.v +39 -0
  191. data/samp/pipelined_alu/hw5_unit_test_design.rb +88 -0
  192. data/samp/pipelined_alu/hw5_unit_test_proto.rb +8 -0
  193. data/samp/pipelined_alu/hw5_unit_test_runner.rake +28 -0
  194. data/samp/pipelined_alu/hw5_unit_test_spec.rb +88 -0
  195. metadata +82 -63
  196. data/ref/ruby/classes/ModuleInfo.src/M000008.html +0 -44
  197. data/ref/ruby/classes/ModuleInfo.src/M000009.html +0 -26
  198. data/ref/ruby/classes/String.src/M000012.html +0 -37
  199. data/ref/ruby/classes/XX/Document.src/M000050.html +0 -22
  200. data/ref/ruby/classes/XX/Document.src/M000051.html +0 -20
  201. data/ref/ruby/classes/XX/Document.src/M000052.html +0 -20
  202. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000022.html +0 -22
  203. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000023.html +0 -20
  204. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000030.html +0 -56
  205. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000031.html +0 -33
  206. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000032.html +0 -31
  207. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000033.html +0 -48
  208. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000034.html +0 -20
  209. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000035.html +0 -31
  210. data/samp/pipelined_alu/hw5_unit_bench.rb +0 -8
  211. data/samp/pipelined_alu/hw5_unit_bench.v +0 -45
  212. data/samp/pipelined_alu/hw5_unit_design.rb +0 -18
  213. data/samp/pipelined_alu/hw5_unit_runner.rake +0 -10
  214. data/samp/pipelined_alu/hw5_unit_spec.rb +0 -123
data/HEADER CHANGED
@@ -8,12 +8,11 @@ Ruby-VPI is a "Ruby interface":http://ruby-lang.org to "Verilog VPI":http://ieee
8
8
 
9
9
  h2. Features
10
10
 
11
- * Apply "agile techniques":http://www.martinfowler.com/articles/newMethodology.html to develop hardware.
12
- ** Rapidly prototype and verify your designs using "BDD(behavior-driven development)":http://behaviour-driven.org/, "TDD(test-driven development)":http://www.agiledata.org/essays/tdd.html, and more.
13
- ** Consolidate your requirements and verification efforts through executable specifications.
14
- ** Reuse the _same_ specification to verify both prototype and design.
11
+ * Prototype and verify designs _quickly_ using "BDD(behavior-driven development)":http://behaviour-driven.org/, "TDD(test-driven development)":http://www.agiledata.org/essays/tdd.html, and more.
12
+ * Specifications are executable _and_ human-readable. (See this <a href="./doc/usage.tutorial.html#fig..counter_rspecTest_spec.rb">example specification</a> and its <a href="./doc/usage.tutorial.html#fig..test-proto.rspec">boss-friendly output</a>.)
13
+ * Reuse the _same_ specification to verify both prototype and design.
15
14
 
16
- * Utilize Ruby's power and elegance ("Why choose Ruby?":http://www.ruby-doc.org/whyruby).
15
+ * Utilize Ruby's power and elegance. ("Why choose Ruby?":http://www.ruby-doc.org/whyruby)
17
16
  ** Built-in support for unlimited length integers, regular expressions, networking, multi-threading, system calls, _ad infinium_!
18
17
  ** Easy to use; doesn't get in your way.
19
18
  ** Makes programming _fun_ again!
data/HISTORY CHANGED
@@ -5,13 +5,29 @@ This is a record of important changes that have occurred with each release of "R
5
5
  h2. Version numbering system
6
6
 
7
7
  We _strictly_ follow the RubyGems project's "rational versioning policy":http://www.rubygems.org/read/chapter/7 since release 6.3.0. To summarize[1] this "major.minor.build" numbering policy,
8
- * an increase in the _major_ number indicates that _functionally incompatible_ have occurred. Thus, what may have worked in the previous version may not work in the new one.
8
+ * an increase in the _major_ number indicates that _functionally incompatible_ changes have occurred. Thus, what may have worked in the previous version may not work in the new one.
9
9
  * an increase in the _minor_ number indicates that _functionally compatible_ changes have occurred. Thus, what worked in the previous version will work in the new one.
10
10
  * an increase in the _build_ number indicates that the _underlying implementation_ has changed. The functionality has not changed and no features have been added. Thus, what worked in the previous version will work in the new one.
11
11
 
12
12
  fn1. C. Gross, "Explaining Open Source Version Numbers", [Online document], 2005 Nov 28, [cited 2006 Aug 27], Available HTTP: "http://ablog.apress.com/?p=738":http://ablog.apress.com/?p=738
13
13
 
14
14
 
15
+ h1. Version 7.3.0 (2006-09-30)
16
+
17
+ h2. Summary
18
+
19
+ This release fixes a bug in generated Verilog benches and adds parsed constants to generated Verilog benches and Ruby designs.
20
+
21
+ h2. Details
22
+
23
+ * Module instantiation code in generated Verilog benches has been fixed. Whitespace between the module type and instance variable was missing.
24
+
25
+ * The test generator tool now provides parsed Verilog constants and include-directives in generated Verilog benches; and parsed Verilog constants in generated Ruby designs.
26
+ ** The pipelined ALU example has been revised accordingly.
27
+
28
+ * A library for parsing Verilog source code has been added as @lib/ruby-vpi/verilog_parser.rb@.
29
+
30
+
15
31
  h1. Version 7.2.0 (2006-09-15)
16
32
 
17
33
  h2. Summary
@@ -432,6 +448,6 @@ This is Kazuhiro HIWADA's initial testing release of Ruby-VPI. See its "original
432
448
 
433
449
  h2. Details
434
450
 
435
- * Added ability to relay control from Verilog test bench to Ruby (using @$ruby_callback@) and vice versa (using @PLI::relay_verilog@).
451
+ * Added ability to relay control from Verilog test bench to Ruby (using @$ruby_callback@) and vice versa (using @PLI::relay_Verilog@).
436
452
 
437
453
  * Tested and developed using Ruby 1.4 and Verilog-XL from Cadence systems, on a SPARC machine running Solaris 2.6.
data/MEMO CHANGED
@@ -2,21 +2,20 @@ h1. Notes
2
2
 
3
3
  * When within Rake, rubygems is automatically available for use. no need to require() it again
4
4
 
5
+
5
6
  h1. Pending tasks
6
7
 
7
- * integrate RCov for coverage statistics
8
+ * add support for reading & writing vpi_delay values
8
9
 
9
10
  * define handled methods in Vpi::method_missing for faster response
10
11
  ** this has been verified as bottleneck from profiling data
11
12
 
12
- * file bug report for Icarus 0.8 (l0_dcache)
13
- ** try new icarus snapshot
14
-
15
13
  * GHDL simulator supports VPI
16
14
  ** need way to invoke VPI tasks from VHDL, like @$ruby_init();@
17
15
 
18
16
  * smarter test generation, which adjusts to user modifications in previously generated output
19
17
 
18
+
20
19
  h1. Finished tasks
21
20
 
22
21
  * add support for ESL prototyping (like SystemC)
@@ -27,12 +26,17 @@ h1. Finished tasks
27
26
 
28
27
  * add support for GPL Cver in the test runner template
29
28
 
30
- * build ruby-vpi once to generate all *.so files
29
+ * build ruby-vpi once to generate all .so files
31
30
  ** test runner should not rebuild ruby-vpi every time
32
31
 
33
32
  * distribute as a GEM, binary, and source
34
33
  ** use RUBYLIB to bypass rubygems site installation for local testing. otherwise have to build & install gem _every_ time!
35
- ** put lib/* into lib/ruby-vpi/*
34
+ ** move stuff from lib/ into lib/ruby-vpi/
35
+
36
+ * integrate RCov for code-coverage statistics
37
+
36
38
 
37
39
  h1. Obsolete tasks
38
40
 
41
+ * file bug report for Icarus 0.8 (l0_dcache)
42
+ ** try new icarus snapshot
data/Rakefile CHANGED
@@ -36,6 +36,7 @@ PROJECT_DETAIL = "#{PROJECT_NAME} is a #{PROJECT_SUMMARY}. It lets you create co
36
36
  PROJECT_SSH_URL = "snk@rubyforge.org:/var/www/gforge-projects/#{PROJECT_ID}"
37
37
 
38
38
 
39
+
39
40
  # Returns a temporary, unique path ready for use. No file exists at the returned path.
40
41
  def generate_temp_path
41
42
  rm_f path = Tempfile.new($$).path
@@ -62,6 +63,7 @@ def upload_without_svn aDestUrl, *aSources
62
63
  end
63
64
 
64
65
 
66
+
65
67
  task :default => :build
66
68
 
67
69
  task :clobber do |t|
@@ -76,9 +78,7 @@ end
76
78
 
77
79
 
78
80
 
79
- ##
80
- # extension
81
- #
81
+ ## extension
82
82
 
83
83
  desc "Builds object files for all simulators."
84
84
  task :build
@@ -127,9 +127,7 @@ end
127
127
 
128
128
 
129
129
 
130
- ##
131
- # documentation
132
- #
130
+ ## documentation
133
131
 
134
132
  desc 'Generate documentation.'
135
133
  task 'doc' => 'ref' do |t|
@@ -177,9 +175,7 @@ end
177
175
 
178
176
 
179
177
 
180
- ##
181
- # distribution
182
- #
178
+ ## distribution
183
179
 
184
180
  DIST_INFO_HEADER = 'HEADER'
185
181
 
@@ -270,7 +266,7 @@ task :pkg => ['HISTORY', 'gem_extconf.rb'] do |t|
270
266
 
271
267
  s.files = FileList['**/*']
272
268
  s.autorequire = PROJECT_ID
273
- s.executables = FileList['bin/*'].select {|f| File.executable?(f) && File.file?(f)}.map {|f| File.basename f}
269
+ s.executables = FileList['bin/*'].select {|f| File.executable?( f ) && File.file?( f )}.map {|f| File.basename f}
274
270
  s.extensions << t.prerequisites[1]
275
271
  end
276
272
 
@@ -286,7 +282,7 @@ end
286
282
 
287
283
  desc "Configures the gem during installation."
288
284
  task :config_gem_install => 'readme.html' do |t|
289
- # makes documentation available to gem_server
285
+ # make documentation available to gem_server
290
286
  gemDir = File.dirname(__FILE__)
291
287
  gemName = File.basename(gemDir)
292
288
  docDir = File.join('..', '..', 'doc', gemName)
@@ -300,12 +296,13 @@ end
300
296
 
301
297
 
302
298
 
303
- ##
304
- # testing
305
- #
299
+ ## testing
306
300
 
307
301
  desc "Ensure that examples work with $SIMULATOR"
308
302
  task :test => :build do
303
+ # ensures that current sources are tested instead of the installed gem
304
+ ENV['RUBYLIB'] = File.join(File.dirname(__FILE__), 'lib')
305
+
309
306
  FileList['samp/*/'].each do |s|
310
307
  cd s do
311
308
  sh 'rake', ENV['SIMULATOR'] || 'cver'
data/bin/generate_test.rb CHANGED
@@ -42,6 +42,7 @@
42
42
  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
43
43
  =end
44
44
 
45
+ require 'ruby-vpi/verilog_parser'
45
46
 
46
47
 
47
48
  require 'fileutils'
@@ -63,7 +64,6 @@ def write_file aPath, aContent
63
64
  end
64
65
 
65
66
 
66
-
67
67
  require 'ruby-vpi/erb'
68
68
 
69
69
  # Template used for generating output.
@@ -77,56 +77,6 @@ end
77
77
 
78
78
 
79
79
 
80
- # Holds information about a parsed Verilog module.
81
- class ModuleInfo
82
- attr_reader :name, :portNames, :paramNames, :portDecls, :paramDecls, :inputPortNames
83
-
84
- def initialize aDecl
85
- aDecl =~ %r{module\s+(\w+)\s*(\#\((.*?)\))?\s*\((.*?)\)\s*;}m
86
- @name, paramDecl, portDecl = $1, $3 || '', $4
87
-
88
- # parse configuration parameters
89
- paramDecl.gsub! %r{\bparameter\b}, ''
90
- paramDecl.strip!
91
-
92
- @paramDecls = paramDecl.split(/,/)
93
-
94
- @paramNames = paramDecls.inject([]) do |acc, decl|
95
- acc << decl.scan(%r{\w+}).first
96
- end
97
-
98
- # parse signal parameters
99
- portDecl.gsub! %r{\breg\b}, ''
100
- portDecl.strip!
101
-
102
- @portDecls = portDecl.split(/,/)
103
-
104
- @inputPortNames = []
105
-
106
- @portNames = portDecls.inject([]) do |acc, decl|
107
- name = decl.scan(%r{\w+}).last
108
- @inputPortNames << name if decl =~ /\binput\b/
109
-
110
- acc << name
111
- end
112
- end
113
-
114
- # Parses and returns Verilog 2001 module declarations from the given input.
115
- def self.parse_declarations aInput
116
- input = aInput.dup
117
-
118
- # remove single-line comments
119
- input.gsub! %r{//.*$}, ''
120
-
121
- # remove multi-line comments
122
- input.gsub! %r{/\*.*?\*/}m, ''
123
-
124
- input.scan %r{module.*?;}m
125
- end
126
- end
127
-
128
-
129
-
130
80
  # Holds information about the output destinations of a parsed Verilog module.
131
81
  class OutputInfo
132
82
  RUBY_EXT = '.rb'
@@ -168,9 +118,9 @@ class OutputInfo
168
118
  @specName = aModuleName + @specSuffix
169
119
  @specPath = @specName + RUBY_EXT
170
120
 
171
- @designClassName = aModuleName.capitalize
121
+ @designClassName = aModuleName.to_ruby_const_name
172
122
  @protoClassName = @designClassName + 'Proto'
173
- @specClassName = @specName.capitalize
123
+ @specClassName = @specName.to_ruby_const_name
174
124
 
175
125
  @runnerName = aModuleName + @runnerSuffix
176
126
  @runnerPath = @runnerName + RUNNER_EXT
@@ -224,16 +174,15 @@ if File.basename($0) == File.basename(__FILE__)
224
174
  puts "Using #{optSpecFmt} specification format."
225
175
 
226
176
 
227
- ModuleInfo.parse_declarations(ARGF.read).each do |moduleDecl|
228
- puts
177
+ v = VerilogParser.new(ARGF.read)
229
178
 
230
- m = ModuleInfo.new(moduleDecl).freeze
231
- puts "Parsed module: #{m.name}"
179
+ v.modules.each do |m|
180
+ puts '', "Parsed module: #{m.name}"
232
181
 
233
182
  o = OutputInfo.new(m.name, optSpecFmt, optTestName, File.dirname(File.dirname(__FILE__))).freeze
234
183
 
235
184
  # generate output
236
- aModuleInfo, aOutputInfo = m, o
185
+ aParseInfo, aModuleInfo, aOutputInfo = v, m, o
237
186
 
238
187
  write_file o.runnerPath, RUNNER_TEMPLATE.result(binding)
239
188
  puts "- Generated runner: #{o.runnerPath}"
@@ -1,39 +1,35 @@
1
1
  <%
2
2
  # Returns a comma-separated string of parameter declarations in Verilog module instantiation format.
3
- def make_inst_param_decl(paramNames)
4
- paramNames.inject([]) {|acc, param| acc << ".#{param}(#{param})"}.join(', ')
3
+ def make_inst_param_decl aParams
4
+ aParams.map do |param|
5
+ ".#{param.name}(#{param.name})"
6
+ end.join(', ')
5
7
  end
6
8
 
7
- clockSignal = aModuleInfo.portNames.first
9
+ clockSignal = aModuleInfo.ports.first.name
8
10
  %>
9
11
  /* This is the Verilog side of the bench. */
10
12
 
13
+ <%= (aParseInfo.includes + aParseInfo.constants).map {|v| v.decl}.join "\n" %>
14
+
11
15
  module <%= aOutputInfo.verilogBenchName %>;
12
16
 
13
17
  // instantiate the design under test
14
- <% aModuleInfo.paramDecls.each do |decl| %>
15
- parameter <%= decl %>;
18
+ <% aModuleInfo.parameters.each do |param| %>
19
+ <%= param.decl %>;
20
+ <% end %>
21
+ <% aModuleInfo.ports.each do |port| %>
22
+ <%= port.input? ? 'reg' : 'wire' %> <%= port.size %> <%= port.name %>;
16
23
  <% end %>
17
24
 
18
- <%
19
- aModuleInfo.portDecls.each do |decl|
20
- { 'input' => 'reg', 'output' => 'wire' }.each_pair do |key, val|
21
- decl.sub! %r{\b#{key}\b(.*?)$}, "#{val}\\1;"
22
- end
23
- %>
24
- <%= decl.strip %>
25
- <%
26
- end
27
- %>
28
-
29
- <%= aModuleInfo.name %><%
30
- instConfigDecl = make_inst_param_decl(aModuleInfo.paramNames)
25
+ <%= aModuleInfo.name %> <%
26
+ instConfigDecl = make_inst_param_decl(aModuleInfo.parameters)
31
27
 
32
28
  unless instConfigDecl.empty?
33
29
  %>#(<%= instConfigDecl %>)<%
34
30
  end
35
31
 
36
- %><%= aOutputInfo.verilogBenchName + aOutputInfo.designSuffix %>(<%= make_inst_param_decl(aModuleInfo.portNames) %>);
32
+ %><%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
37
33
 
38
34
  // connect to the Ruby side of this bench
39
35
  initial begin
@@ -2,25 +2,25 @@
2
2
  class <%= aOutputInfo.designClassName %>
3
3
  include Vpi
4
4
 
5
- <% aModuleInfo.paramDecls.each do |decl| %>
6
- <%= decl.strip.capitalize %>
5
+ <% (aParseInfo.constants + aModuleInfo.parameters).each do |var| %>
6
+ <%= var.name.to_ruby_const_name %> = <%= var.value.verilog_to_ruby %>
7
7
  <% end %>
8
8
 
9
9
  attr_reader <%=
10
- aModuleInfo.portNames.inject([]) do |acc, port|
11
- acc << ":#{port}"
10
+ aModuleInfo.ports.map do |port|
11
+ ":#{port.name}"
12
12
  end.join(', ')
13
13
  %>
14
14
 
15
15
  def initialize
16
- <% aModuleInfo.portNames.each do |port| %>
17
- @<%= port %> = vpi_handle_by_name("<%= aOutputInfo.verilogBenchName %>.<%= port %>", nil)
16
+ <% aModuleInfo.ports.each do |port| %>
17
+ @<%= port.name %> = vpi_handle_by_name("<%= aOutputInfo.verilogBenchName %>.<%= port.name %>", nil)
18
18
  <% end %>
19
19
  end
20
20
 
21
21
  def reset!
22
- <% aModuleInfo.inputPortNames[1..-1].each do |port| %>
23
- @<%= port %>.hexStrVal = 'x'
22
+ <% aModuleInfo.ports.select { |p| p.input? }[1..-1].each do |port| %>
23
+ @<%= port.name %>.hexStrVal = 'x'
24
24
  <% end %>
25
25
  end
26
26
  end
@@ -10,9 +10,9 @@ class <%= aOutputInfo.specClassName %> < Test::Unit::TestCase
10
10
  def setup
11
11
  @design = <%= aOutputInfo.designClassName %>.new
12
12
  end
13
- <% aModuleInfo.portNames.each do |param| %>
13
+ <% aModuleInfo.ports.each do |port| %>
14
14
 
15
- def test_<%= param %>
15
+ def test_<%= port.name %>
16
16
  end
17
17
  <% end %>
18
18
  end
@@ -23,32 +23,6 @@
23
23
  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
24
  =end
25
25
 
26
- class String
27
- # Converts this Verilog header content into Ruby syntax.
28
- def to_ruby
29
- content = self.dup
30
-
31
- # remove single-line comments
32
- content.gsub! %r{//(.*)$}, '#\1'
33
-
34
- # remove multi-line comments
35
- content.gsub! %r{/\*.*?\*/}m, "\n=begin\n\\0\n=end\n"
36
-
37
- # remove preprocessor directives
38
- content.gsub! %r{`include}, '#\0'
39
- content.gsub! %r{`define\s+(\w+)\s+(.+)}, '\1 = \2'
40
- content.gsub! %r{`+}, ''
41
-
42
- # change numbers
43
- content.gsub! %r{\d*\'([dohb]\w+)}, '0\1'
44
-
45
- # change ranges
46
- content.gsub! %r{(\S)\s*:\s*(\S)}, '\1..\2'
47
-
48
- content
49
- end
50
- end
51
-
52
26
  if File.basename($0) == File.basename(__FILE__)
53
27
  # parse command-line options
54
28
  require 'optparse'
@@ -66,5 +40,6 @@ if File.basename($0) == File.basename(__FILE__)
66
40
 
67
41
  opts.parse! ARGV
68
42
 
69
- puts ARGF.read.to_ruby
43
+ require 'ruby-vpi/verilog_parser'
44
+ puts ARGF.read.verilog_to_ruby
70
45
  end
@@ -7,4 +7,4 @@
7
7
  <span class="type">va_list</span> *<code class="varname">p</code> = &amp;<code class="varname">ap</code>;
8
8
  }
9
9
  </pre></li></ul></div><p>
10
- </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="organization.vpi.util"></a><span class="acronym">VPI</span> utility layer</h4></div></div></div><p>From a user's perspective, the <span class="acronym">VPI</span> utility layer greatly enhances the ability to interact with handles. One simply invokes a handle's methods, which are carefully named in the following manner, to access its <span class="acronym">VPI</span> properties.</p><div class="table"><a id="table..handle-property-accessor-naming-format"></a><p class="title"><b>Table 2.1. Naming format for accessing a handle's <span class="acronym">VPI</span> properties</b></p><table summary="Naming format for accessing a handle's VPI properties" border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th>Operation</th><th>_</th><th>Property</th><th>_</th><th>Accessor</th><th>Addendum</th></tr></thead><tbody><tr><td colspan="2">optional</td><td>required</td><td colspan="2">optional</td><td>optional</td></tr></tbody></table></div><div class="variablelist"><dl><dt><span class="term">Operation</span></dt><dd><p>This parameter suggests a method that should be invoked in the context of the Property parameter.</p></dd><dt><span class="term">Property</span></dt><dd><p>This parameter suggests which <span class="acronym">VPI</span> property should be accessed. The first letter of this parameter's value should be lower case, and the <span class="emphasis"><em>vpi</em></span> prefix—common to all <span class="acronym">VPI</span> properties—can be omitted.</p><p>For example, the <span class="acronym">VPI</span> property <span class="emphasis"><em>vpiFullName</em></span> is considered equivalent to <span class="emphasis"><em>fullName</em></span> but not equivalent to either <span class="emphasis"><em>FullName</em></span> or <span class="emphasis"><em>full_name</em></span>.</p></dd><dt><span class="term">Accessor</span></dt><dd><p>This parameter suggests which <span class="acronym">VPI</span> function should be used to access the <span class="acronym">VPI</span> property. When this parameter is not specified, the <span class="acronym">VPI</span> utility layer will attempt to <span class="emphasis"><em>guess</em></span> the value of this parameter (<a href="../../ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html" target="_top">see the source code</a> of the <code class="code"><code class="constant">SWIG</code>::<code class="constant">TYPE_p_unsigned_int</code>#<code class="function">method_missing</code></code> method for details).</p><div class="table"><a id="id2482977"></a><p class="title"><b>Table 2.2. Possible accessors and their implications</b></p><table summary="Possible accessors and their implications" border="1"><colgroup></colgroup><thead><tr><th>Accessor</th><th>Kind of value accessed</th><th><span class="acronym">VPI</span> functions used to access the value</th></tr></thead><tbody><tr><td>d</td><td>delay</td><td><code class="function">vpi_get_delays</code>, <code class="function">vpi_put_delays</code></td></tr><tr><td>l</td><td>logic</td><td><code class="function">vpi_get_value</code>, <code class="function">vpi_put_value</code></td></tr><tr><td>i</td><td>integer</td><td><code class="function">vpi_get</code></td></tr><tr><td>b</td><td>boolean</td><td><code class="function">vpi_get</code></td></tr><tr><td>s</td><td>string</td><td><code class="function">vpi_get_str</code></td></tr><tr><td>h</td><td>handle</td><td><code class="function">vpi_handle</code></td></tr></tbody></table></div></dd><dt><span class="term">Addendum</span></dt><dd><p>When this parameter is a question mark (<span class="emphasis"><em>?</em></span>), it suggests that the specified <span class="acronym">VPI</span> property should be queried as a boolean value. This produces the same effect as specifying <span class="emphasis"><em>b</em></span> for the Accessor parameter.</p><p>When this parameter is an equal sign (<span class="emphasis"><em>=</em></span>), it suggests that the specified <span class="acronym">VPI</span> property should be written to.</p></dd></dl></div><div class="example"><a id="ex..handle-property-accessor-naming-format"></a><p class="title"><b>Example 2.1. Accessing a handle's <span class="acronym">VPI</span> properties</b></p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th rowspan="2">Ruby expression</th><th colspan="6">Naming format</th><th rowspan="2">Description</th></tr><tr><th>Operation</th><th>_</th><th>Property</th><th>_</th><th>Accessor</th><th>Addendum</th></tr></thead><tbody><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">each_vpiNet</code> {|<code class="varname">net</code>| <code class="function">puts</code> <code class="varname">net</code>.<code class="function">fullName</code>}</code></td><td>each</td><td>_</td><td>vpiNet</td><td> </td><td> </td><td> </td><td rowspan="2">These expressions print the full name of each <code class="constant">vpiNet</code> object associated with the handle.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">each_net</code> {|<code class="varname">net</code>| <code class="function">puts</code> <code class="varname">net</code>.<code class="function">fullName</code>}</code></td><td>each</td><td>_</td><td>net</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the logic value of the handle's <code class="constant">vpiIntVal</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal_l</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td>_</td><td>l</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal</code></code></td><td> </td><td> </td><td>intVal</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal_l</code></code></td><td> </td><td> </td><td>intVal</td><td>_</td><td>l</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal</code> = <code class="literal">15</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td> </td><td> </td><td>=</td><td rowspan="4">These expressions assign the number 15 to the logic value of the handle's <code class="constant">vpiIntVal</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal_l</code> = <code class="literal">15</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td>_</td><td>l</td><td>=</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal</code> = <code class="literal">15</code></code></td><td> </td><td> </td><td>intVal</td><td> </td><td> </td><td>=</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal</code>_l = <code class="literal">15</code></code></td><td> </td><td> </td><td>intVal</td><td>_</td><td>l</td><td>=</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiType</code></code></td><td> </td><td> </td><td>vpiType</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the integer value of the handle's <code class="constant">vpiType</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiType_i</code></code></td><td> </td><td> </td><td>vpiType</td><td>_</td><td>i</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">type</code></code></td><td> </td><td> </td><td>type</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">type_i</code></code></td><td> </td><td> </td><td>type</td><td>_</td><td>i</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiProtected</code></code></td><td> </td><td> </td><td>vpiProtected</td><td> </td><td> </td><td> </td><td rowspan="6">These expressions access the boolean value of the handle's <code class="constant">vpiProtected</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiProtected_b</code></code></td><td> </td><td> </td><td>vpiProtected</td><td>_</td><td>b</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiProtected?</code></code></td><td> </td><td> </td><td>vpiProtected</td><td> </td><td> </td><td>?</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">protected</code></code></td><td> </td><td> </td><td>protected</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">protected_b</code></code></td><td> </td><td> </td><td>protected</td><td>_</td><td>b</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">protected?</code></code></td><td> </td><td> </td><td>protected</td><td> </td><td> </td><td>?</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiFullName</code></code></td><td> </td><td> </td><td>vpiFullName</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the string value of the handle's <code class="constant">vpiFullName</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiFullName_s</code></code></td><td> </td><td> </td><td>vpiFullName</td><td>_</td><td>s</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">fullName</code></code></td><td> </td><td> </td><td>fullName</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">fullName_s</code></code></td><td> </td><td> </td><td>fullName</td><td>_</td><td>s</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiParent</code></code></td><td> </td><td> </td><td>vpiParent</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the handle value of the handle's <code class="constant">vpiParent</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiParent_h</code></code></td><td> </td><td> </td><td>vpiParent</td><td>_</td><td>h</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">parent</code></code></td><td> </td><td> </td><td>parent</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">parent_h</code></code></td><td> </td><td> </td><td>parent</td><td>_</td><td>h</td><td> </td></tr></tbody></table></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="background.terminology.html"><img src="images/prev.png" alt="Prev" /></a> </td><td width="20%" align="center"><a accesskey="u" href="background.html"><img src="images/up.png" alt="Up" /></a></td><td width="40%" align="right"> <a accesskey="n" href="background.running-tests.html"><img src="images/next.png" alt="Next" /></a></td></tr><tr><td width="40%" align="left" valign="top">Terminology </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home" /></a></td><td width="40%" align="right" valign="top"> Running a test</td></tr></table></div></body></html>
10
+ </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="organization.vpi.util"></a><span class="acronym">VPI</span> utility layer</h4></div></div></div><p>From a user's perspective, the <span class="acronym">VPI</span> utility layer greatly enhances the ability to interact with handles. One simply invokes a handle's methods, which are carefully named in the following manner, to access its <span class="acronym">VPI</span> properties.</p><div class="table"><a id="table..handle-property-accessor-naming-format"></a><p class="title"><b>Table 2.1. Naming format for accessing a handle's <span class="acronym">VPI</span> properties</b></p><table summary="Naming format for accessing a handle's VPI properties" border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th>Operation</th><th>_</th><th>Property</th><th>_</th><th>Accessor</th><th>Addendum</th></tr></thead><tbody><tr><td colspan="2">optional</td><td>required</td><td colspan="2">optional</td><td>optional</td></tr></tbody></table></div><div class="variablelist"><dl><dt><span class="term">Operation</span></dt><dd><p>This parameter suggests a method that should be invoked in the context of the Property parameter.</p></dd><dt><span class="term">Property</span></dt><dd><p>This parameter suggests which <span class="acronym">VPI</span> property should be accessed. The first letter of this parameter's value should be lower case, and the <span class="emphasis"><em>vpi</em></span> prefix—common to all <span class="acronym">VPI</span> properties—can be omitted.</p><p>For example, the <span class="acronym">VPI</span> property <span class="emphasis"><em>vpiFullName</em></span> is considered equivalent to <span class="emphasis"><em>fullName</em></span> but not equivalent to either <span class="emphasis"><em>FullName</em></span> or <span class="emphasis"><em>full_name</em></span>.</p></dd><dt><span class="term">Accessor</span></dt><dd><p>This parameter suggests which <span class="acronym">VPI</span> function should be used to access the <span class="acronym">VPI</span> property. When this parameter is not specified, the <span class="acronym">VPI</span> utility layer will attempt to <span class="emphasis"><em>guess</em></span> the value of this parameter (<a href="../../ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html" target="_top">see the source code</a> of the <code class="code"><code class="constant">SWIG</code>::<code class="constant">TYPE_p_unsigned_int</code>#<code class="function">method_missing</code></code> method for details).</p><div class="table"><a id="id2482976"></a><p class="title"><b>Table 2.2. Possible accessors and their implications</b></p><table summary="Possible accessors and their implications" border="1"><colgroup></colgroup><thead><tr><th>Accessor</th><th>Kind of value accessed</th><th><span class="acronym">VPI</span> functions used to access the value</th></tr></thead><tbody><tr><td>d</td><td>delay</td><td><code class="function">vpi_get_delays</code>, <code class="function">vpi_put_delays</code></td></tr><tr><td>l</td><td>logic</td><td><code class="function">vpi_get_value</code>, <code class="function">vpi_put_value</code></td></tr><tr><td>i</td><td>integer</td><td><code class="function">vpi_get</code></td></tr><tr><td>b</td><td>boolean</td><td><code class="function">vpi_get</code></td></tr><tr><td>s</td><td>string</td><td><code class="function">vpi_get_str</code></td></tr><tr><td>h</td><td>handle</td><td><code class="function">vpi_handle</code></td></tr></tbody></table></div></dd><dt><span class="term">Addendum</span></dt><dd><p>When this parameter is a question mark (<span class="emphasis"><em>?</em></span>), it suggests that the specified <span class="acronym">VPI</span> property should be queried as a boolean value. This produces the same effect as specifying <span class="emphasis"><em>b</em></span> for the Accessor parameter.</p><p>When this parameter is an equal sign (<span class="emphasis"><em>=</em></span>), it suggests that the specified <span class="acronym">VPI</span> property should be written to.</p></dd></dl></div><div class="example"><a id="ex..handle-property-accessor-naming-format"></a><p class="title"><b>Example 2.1. Accessing a handle's <span class="acronym">VPI</span> properties</b></p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th rowspan="2">Ruby expression</th><th colspan="6">Naming format</th><th rowspan="2">Description</th></tr><tr><th>Operation</th><th>_</th><th>Property</th><th>_</th><th>Accessor</th><th>Addendum</th></tr></thead><tbody><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">each_vpiNet</code> {|<code class="varname">net</code>| <code class="function">puts</code> <code class="varname">net</code>.<code class="function">fullName</code>}</code></td><td>each</td><td>_</td><td>vpiNet</td><td> </td><td> </td><td> </td><td rowspan="2">These expressions print the full name of each <code class="constant">vpiNet</code> object associated with the handle.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">each_net</code> {|<code class="varname">net</code>| <code class="function">puts</code> <code class="varname">net</code>.<code class="function">fullName</code>}</code></td><td>each</td><td>_</td><td>net</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the logic value of the handle's <code class="constant">vpiIntVal</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal_l</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td>_</td><td>l</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal</code></code></td><td> </td><td> </td><td>intVal</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal_l</code></code></td><td> </td><td> </td><td>intVal</td><td>_</td><td>l</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal</code> = <code class="literal">15</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td> </td><td> </td><td>=</td><td rowspan="4">These expressions assign the number 15 to the logic value of the handle's <code class="constant">vpiIntVal</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiIntVal_l</code> = <code class="literal">15</code></code></td><td> </td><td> </td><td>vpiIntVal</td><td>_</td><td>l</td><td>=</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal</code> = <code class="literal">15</code></code></td><td> </td><td> </td><td>intVal</td><td> </td><td> </td><td>=</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">intVal</code>_l = <code class="literal">15</code></code></td><td> </td><td> </td><td>intVal</td><td>_</td><td>l</td><td>=</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiType</code></code></td><td> </td><td> </td><td>vpiType</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the integer value of the handle's <code class="constant">vpiType</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiType_i</code></code></td><td> </td><td> </td><td>vpiType</td><td>_</td><td>i</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">type</code></code></td><td> </td><td> </td><td>type</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">type_i</code></code></td><td> </td><td> </td><td>type</td><td>_</td><td>i</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiProtected</code></code></td><td> </td><td> </td><td>vpiProtected</td><td> </td><td> </td><td> </td><td rowspan="6">These expressions access the boolean value of the handle's <code class="constant">vpiProtected</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiProtected_b</code></code></td><td> </td><td> </td><td>vpiProtected</td><td>_</td><td>b</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiProtected?</code></code></td><td> </td><td> </td><td>vpiProtected</td><td> </td><td> </td><td>?</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">protected</code></code></td><td> </td><td> </td><td>protected</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">protected_b</code></code></td><td> </td><td> </td><td>protected</td><td>_</td><td>b</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">protected?</code></code></td><td> </td><td> </td><td>protected</td><td> </td><td> </td><td>?</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiFullName</code></code></td><td> </td><td> </td><td>vpiFullName</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the string value of the handle's <code class="constant">vpiFullName</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiFullName_s</code></code></td><td> </td><td> </td><td>vpiFullName</td><td>_</td><td>s</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">fullName</code></code></td><td> </td><td> </td><td>fullName</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">fullName_s</code></code></td><td> </td><td> </td><td>fullName</td><td>_</td><td>s</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiParent</code></code></td><td> </td><td> </td><td>vpiParent</td><td> </td><td> </td><td> </td><td rowspan="4">These expressions access the handle value of the handle's <code class="constant">vpiParent</code> property.</td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">vpiParent_h</code></code></td><td> </td><td> </td><td>vpiParent</td><td>_</td><td>h</td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">parent</code></code></td><td> </td><td> </td><td>parent</td><td> </td><td> </td><td> </td></tr><tr><td><code class="code"><code class="varname">handle</code>.<code class="function">parent_h</code></code></td><td> </td><td> </td><td>parent</td><td>_</td><td>h</td><td> </td></tr></tbody></table></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="background.terminology.html"><img src="images/prev.png" alt="Prev" /></a> </td><td width="20%" align="center"><a accesskey="u" href="background.html"><img src="images/up.png" alt="Up" /></a></td><td width="40%" align="right"> <a accesskey="n" href="background.running-tests.html"><img src="images/next.png" alt="Next" /></a></td></tr><tr><td width="40%" align="left" valign="top">Terminology </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home" /></a></td><td width="40%" align="right" valign="top"> Running a test</td></tr></table></div></body></html>
data/doc/xhtml/index.html CHANGED
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Ruby-VPI user manual</title><link rel="stylesheet" href="styles/manual.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.68.1" /><meta name="description" content="This manual explains how to use Ruby-VPI. You can find the newest version of this manual at the Ruby-VPI website." /><link rel="start" href="index.html" title="Ruby-VPI user manual" /><link rel="next" href="introduction.html" title="Chapter 1. Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="application">Ruby-VPI</span> user manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="introduction.html"><img src="images/next.png" alt="Next" /></a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="id2467210"></a><span class="application">Ruby-VPI</span> user manual</h1></div><div><p class="copyright">Copyright © 2006 Suraj N. Kurapati</p></div><div><p class="copyright">Copyright © 2005, 2006 <a href="http://tango.freedesktop.org" target="_top">Tango Desktop Project</a> <em><span class="remark">for admonition and navigation graphics released under <a href="images/COPYING" target="_top">this license</a>.</span></em></p></div><div><p class="copyright">Copyright © 1999, 2000, 2001 Norman Walsh <em><span class="remark">for DocBook graphics released under <a href="images/copyright" target="_top">this license</a>.</span></em></p></div><div><div class="legalnotice"><a id="id2511299"></a><p>Permission is granted to copy, distribute and/or modify this document under the terms of the <span class="acronym">GNU</span> Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "<span class="acronym">GNU</span> Free Documentation License".</p></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This manual explains how to use <span class="application">Ruby-VPI</span>. You can find the newest version of this manual at the <a href="http://ruby-vpi.rubyforge.org" target="_top"><span class="application">Ruby-VPI</span> website</a>.</p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="introduction.html">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.license.html">License</a></span></dt><dt><span class="section"><a href="introduction.manifest.html">Manifest</a></span></dt><dt><span class="section"><a href="introduction.resources.html">Resources</a></span></dt><dt><span class="section"><a href="introduction.related-works.html">Related works</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.related-works.html#introduction.related-works.pli">Ye olde PLI</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="background.html">2. Background</a></span></dt><dd><dl><dt><span class="section"><a href="background.methodology.html">Methodology</a></span></dt><dt><span class="section"><a href="background.terminology.html">Terminology</a></span></dt><dt><span class="section"><a href="background.organization.html">Organization</a></span></dt><dd><dl><dt><span class="section"><a href="background.organization.html#organization.vpi">Interface to <span class="acronym">VPI</span></a></span></dt></dl></dd><dt><span class="section"><a href="background.running-tests.html">Running a test</a></span></dt><dd><dl><dt><span class="section"><a href="background.running-tests.html#background.running-tests.init">Initialization</a></span></dt><dt><span class="section"><a href="background.running-tests.html#background.running-tests.exec">Execution</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="usage.html">3. Usage</a></span></dt><dd><dl><dt><span class="section"><a href="usage.requirements.html">Requirements</a></span></dt><dt><span class="section"><a href="usage.installation.html">Installation and maintenance</a></span></dt><dt><span class="section"><a href="usage.tools.html">Tools</a></span></dt><dd><dl><dt><span class="section"><a href="usage.tools.html#usage.tools.generate-test">Automated test generation</a></span></dt><dt><span class="section"><a href="usage.tools.html#usage.tools.verilog-ruby-conv">Verilog to Ruby conversion</a></span></dt></dl></dd><dt><span class="section"><a href="usage.examples.html">Examples</a></span></dt><dt><span class="section"><a href="usage.tutorial.html">Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.declare-design">Start with a design</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.generate-test">Generate a test</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.specification">Specify your expectations</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.implement-proto">Implement the prototype</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.test-proto">Verify the prototype</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.implement-design">Implement the design</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.test-design">Verify the design</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="problems.html">4. Known problems</a></span></dt><dd><dl><dt><span class="section"><a href="problems.ruby.html">Ruby</a></span></dt><dd><dl><dt><span class="section"><a href="problems.ruby.html#problems.ruby.SystemStackError">SystemStackError</a></span></dt><dt><span class="section"><a href="problems.ruby.html#problems.ruby.TestUnit">test/unit</a></span></dt></dl></dd><dt><span class="section"><a href="problem.ivl.html">Icarus Verilog</a></span></dt><dd><dl><dt><span class="section"><a href="problem.ivl.html#problems.ivl.vpi_handle_by_name">vpi_handle_by_name</a></span></dt><dt><span class="section"><a href="problem.ivl.html#problems.ivl.vpi_reset">Vpi::reset</a></span></dt></dl></dd><dt><span class="section"><a href="problems.vsim.html">Mentor Modelsim</a></span></dt><dd><dl><dt><span class="section"><a href="problems.vsim.html#problems.vsim.ruby_run">ruby_run()</a></span></dt></dl></dd></dl></dd><dt><span class="glossary"><a href="glossary.html">Glossary</a></span></dt><dt><span class="appendix"><a href="gfdl.html">A. GNU Free Documentation License</a></span></dt><dd><dl><dt><span class="section"><a href="gfdl-0.html">PREAMBLE</a></span></dt><dt><span class="section"><a href="gfdl-1.html">APPLICABILITY AND DEFINITIONS</a></span></dt><dt><span class="section"><a href="gfdl-2.html">VERBATIM COPYING</a></span></dt><dt><span class="section"><a href="gfdl-3.html">COPYING IN QUANTITY</a></span></dt><dt><span class="section"><a href="gfdl-4.html">MODIFICATIONS</a></span></dt><dt><span class="section"><a href="gfdl-5.html">COMBINING DOCUMENTS</a></span></dt><dt><span class="section"><a href="gfdl-6.html">COLLECTIONS OF DOCUMENTS</a></span></dt><dt><span class="section"><a href="gfdl-7.html">AGGREGATION WITH INDEPENDENT WORKS</a></span></dt><dt><span class="section"><a href="gfdl-8.html">TRANSLATION</a></span></dt><dt><span class="section"><a href="gfdl-9.html">TERMINATION</a></span></dt><dt><span class="section"><a href="gfdl-10.html">FUTURE REVISIONS OF THIS LICENSE</a></span></dt><dt><span class="section"><a href="gfdl-addendum.html">ADDENDUM: How to use this License for
4
- your documents</a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>2.1. <a href="background.organization.html#fig..organization">Overall organization of a test</a></dt><dt>2.2. <a href="background.organization.html#fig..organization.detail">Detailed organization of a test</a></dt><dt>2.3. <a href="background.running-tests.html#fig..ruby_init">Initialization of a test</a></dt><dt>2.4. <a href="background.running-tests.html#fig..ruby_relay">Execution of a test</a></dt><dt>3.1. <a href="usage.tutorial.html#fig..counter.v_decl">Declaration of a simple up-counter with synchronous reset</a></dt><dt>3.2. <a href="usage.tutorial.html#fig..generate-test.rspec">Generating a test with specification in RSpec format</a></dt><dt>3.3. <a href="usage.tutorial.html#fig..generate-test.unit-test">Generating a test with specification in unit test format</a></dt><dt>3.4. <a href="usage.tutorial.html#fig..counter_rspecTest_spec.rb">Specification implemented in RSpec format</a></dt><dt>3.5. <a href="usage.tutorial.html#fig..counter_unitTest_spec.rb">Specification implemented in unit test format</a></dt><dt>3.6. <a href="usage.tutorial.html#fig..counter_proto.rb">Ruby prototype of our Verilog design</a></dt><dt>3.7. <a href="usage.tutorial.html#fig..test-proto.rspec">Running a test with specification in RSpec format</a></dt><dt>3.8. <a href="usage.tutorial.html#fig..test-proto.unit-test">Running a test with specification in unit test format</a></dt><dt>3.9. <a href="usage.tutorial.html#fig..counter.v_impl">Implementation of a simple up-counter with synchronous reset</a></dt><dt>3.10. <a href="usage.tutorial.html#fig..test-design.rspec">Running a test with specification in RSpec format</a></dt><dt>3.11. <a href="usage.tutorial.html#fig..test-design.unit-test">Running a test with specification in unit test format</a></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>2.1. <a href="background.organization.html#table..handle-property-accessor-naming-format">Naming format for accessing a handle's <span class="acronym">VPI</span> properties</a></dt><dt>2.2. <a href="background.organization.html#id2482977">Possible accessors and their implications</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="background.organization.html#ex..handle-property-accessor-naming-format">Accessing a handle's <span class="acronym">VPI</span> properties</a></dt><dt>4.1. <a href="problem.ivl.html#ex..TestFoo">Part of a bench which instantiates a Verilog design</a></dt><dt>4.2. <a href="problem.ivl.html#ex..TestFoo_bad">Bad design with unconnected registers</a></dt><dt>4.3. <a href="problem.ivl.html#ex..TestFoo_fix">Fixed design with wired registers</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="introduction.html"><img src="images/next.png" alt="Next" /></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Introduction</td></tr></table></div></body></html>
3
+ <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Ruby-VPI user manual</title><link rel="stylesheet" href="styles/manual.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.68.1" /><meta name="description" content="This manual explains how to use Ruby-VPI. You can find the newest version of this manual at the Ruby-VPI website." /><link rel="start" href="index.html" title="Ruby-VPI user manual" /><link rel="next" href="introduction.html" title="Chapter 1. Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="application">Ruby-VPI</span> user manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="introduction.html"><img src="images/next.png" alt="Next" /></a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="id2467206"></a><span class="application">Ruby-VPI</span> user manual</h1></div><div><p class="copyright">Copyright © 2006 Suraj N. Kurapati</p></div><div><p class="copyright">Copyright © 2005, 2006 <a href="http://tango.freedesktop.org" target="_top">Tango Desktop Project</a> <em><span class="remark">for admonition and navigation graphics released under <a href="images/COPYING" target="_top">this license</a>.</span></em></p></div><div><p class="copyright">Copyright © 1999, 2000, 2001 Norman Walsh <em><span class="remark">for DocBook graphics released under <a href="images/copyright" target="_top">this license</a>.</span></em></p></div><div><div class="legalnotice"><a id="id2511299"></a><p>Permission is granted to copy, distribute and/or modify this document under the terms of the <span class="acronym">GNU</span> Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "<span class="acronym">GNU</span> Free Documentation License".</p></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This manual explains how to use <span class="application">Ruby-VPI</span>. You can find the newest version of this manual at the <a href="http://ruby-vpi.rubyforge.org" target="_top"><span class="application">Ruby-VPI</span> website</a>.</p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="introduction.html">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.license.html">License</a></span></dt><dt><span class="section"><a href="introduction.manifest.html">Manifest</a></span></dt><dt><span class="section"><a href="introduction.resources.html">Resources</a></span></dt><dt><span class="section"><a href="introduction.related-works.html">Related works</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.related-works.html#introduction.related-works.pli">Ye olde PLI</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="background.html">2. Background</a></span></dt><dd><dl><dt><span class="section"><a href="background.methodology.html">Methodology</a></span></dt><dt><span class="section"><a href="background.terminology.html">Terminology</a></span></dt><dt><span class="section"><a href="background.organization.html">Organization</a></span></dt><dd><dl><dt><span class="section"><a href="background.organization.html#organization.vpi">Interface to <span class="acronym">VPI</span></a></span></dt></dl></dd><dt><span class="section"><a href="background.running-tests.html">Running a test</a></span></dt><dd><dl><dt><span class="section"><a href="background.running-tests.html#background.running-tests.init">Initialization</a></span></dt><dt><span class="section"><a href="background.running-tests.html#background.running-tests.exec">Execution</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="usage.html">3. Usage</a></span></dt><dd><dl><dt><span class="section"><a href="usage.requirements.html">Requirements</a></span></dt><dt><span class="section"><a href="usage.installation.html">Installation and maintenance</a></span></dt><dt><span class="section"><a href="usage.tools.html">Tools</a></span></dt><dd><dl><dt><span class="section"><a href="usage.tools.html#usage.tools.generate-test">Automated test generation</a></span></dt><dt><span class="section"><a href="usage.tools.html#usage.tools.verilog-ruby-conv">Verilog to Ruby conversion</a></span></dt></dl></dd><dt><span class="section"><a href="usage.examples.html">Examples</a></span></dt><dt><span class="section"><a href="usage.tutorial.html">Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.declare-design">Start with a design</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.generate-test">Generate a test</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.specification">Specify your expectations</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.implement-proto">Implement the prototype</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.test-proto">Verify the prototype</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.implement-design">Implement the design</a></span></dt><dt><span class="section"><a href="usage.tutorial.html#usage.tutorial.test-design">Verify the design</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="problems.html">4. Known problems</a></span></dt><dd><dl><dt><span class="section"><a href="problems.ruby.html">Ruby</a></span></dt><dd><dl><dt><span class="section"><a href="problems.ruby.html#problems.ruby.SystemStackError">SystemStackError</a></span></dt><dt><span class="section"><a href="problems.ruby.html#problems.ruby.TestUnit">test/unit</a></span></dt></dl></dd><dt><span class="section"><a href="problem.ivl.html">Icarus Verilog</a></span></dt><dd><dl><dt><span class="section"><a href="problem.ivl.html#problems.ivl.vpi_handle_by_name">vpi_handle_by_name</a></span></dt><dt><span class="section"><a href="problem.ivl.html#problems.ivl.vpi_reset">Vpi::reset</a></span></dt></dl></dd><dt><span class="section"><a href="problems.vsim.html">Mentor Modelsim</a></span></dt><dd><dl><dt><span class="section"><a href="problems.vsim.html#problems.vsim.ruby_run">ruby_run()</a></span></dt></dl></dd></dl></dd><dt><span class="glossary"><a href="glossary.html">Glossary</a></span></dt><dt><span class="appendix"><a href="gfdl.html">A. GNU Free Documentation License</a></span></dt><dd><dl><dt><span class="section"><a href="gfdl-0.html">PREAMBLE</a></span></dt><dt><span class="section"><a href="gfdl-1.html">APPLICABILITY AND DEFINITIONS</a></span></dt><dt><span class="section"><a href="gfdl-2.html">VERBATIM COPYING</a></span></dt><dt><span class="section"><a href="gfdl-3.html">COPYING IN QUANTITY</a></span></dt><dt><span class="section"><a href="gfdl-4.html">MODIFICATIONS</a></span></dt><dt><span class="section"><a href="gfdl-5.html">COMBINING DOCUMENTS</a></span></dt><dt><span class="section"><a href="gfdl-6.html">COLLECTIONS OF DOCUMENTS</a></span></dt><dt><span class="section"><a href="gfdl-7.html">AGGREGATION WITH INDEPENDENT WORKS</a></span></dt><dt><span class="section"><a href="gfdl-8.html">TRANSLATION</a></span></dt><dt><span class="section"><a href="gfdl-9.html">TERMINATION</a></span></dt><dt><span class="section"><a href="gfdl-10.html">FUTURE REVISIONS OF THIS LICENSE</a></span></dt><dt><span class="section"><a href="gfdl-addendum.html">ADDENDUM: How to use this License for
4
+ your documents</a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>2.1. <a href="background.organization.html#fig..organization">Overall organization of a test</a></dt><dt>2.2. <a href="background.organization.html#fig..organization.detail">Detailed organization of a test</a></dt><dt>2.3. <a href="background.running-tests.html#fig..ruby_init">Initialization of a test</a></dt><dt>2.4. <a href="background.running-tests.html#fig..ruby_relay">Execution of a test</a></dt><dt>3.1. <a href="usage.tutorial.html#fig..counter.v_decl">Declaration of a simple up-counter with synchronous reset</a></dt><dt>3.2. <a href="usage.tutorial.html#fig..generate-test.rspec">Generating a test with specification in RSpec format</a></dt><dt>3.3. <a href="usage.tutorial.html#fig..generate-test.unit-test">Generating a test with specification in unit test format</a></dt><dt>3.4. <a href="usage.tutorial.html#fig..counter_rspecTest_spec.rb">Specification implemented in RSpec format</a></dt><dt>3.5. <a href="usage.tutorial.html#fig..counter_unitTest_spec.rb">Specification implemented in unit test format</a></dt><dt>3.6. <a href="usage.tutorial.html#fig..counter_proto.rb">Ruby prototype of our Verilog design</a></dt><dt>3.7. <a href="usage.tutorial.html#fig..test-proto.rspec">Running a test with specification in RSpec format</a></dt><dt>3.8. <a href="usage.tutorial.html#fig..test-proto.unit-test">Running a test with specification in unit test format</a></dt><dt>3.9. <a href="usage.tutorial.html#fig..counter.v_impl">Implementation of a simple up-counter with synchronous reset</a></dt><dt>3.10. <a href="usage.tutorial.html#fig..test-design.rspec">Running a test with specification in RSpec format</a></dt><dt>3.11. <a href="usage.tutorial.html#fig..test-design.unit-test">Running a test with specification in unit test format</a></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>2.1. <a href="background.organization.html#table..handle-property-accessor-naming-format">Naming format for accessing a handle's <span class="acronym">VPI</span> properties</a></dt><dt>2.2. <a href="background.organization.html#id2482976">Possible accessors and their implications</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="background.organization.html#ex..handle-property-accessor-naming-format">Accessing a handle's <span class="acronym">VPI</span> properties</a></dt><dt>4.1. <a href="problem.ivl.html#ex..TestFoo">Part of a bench which instantiates a Verilog design</a></dt><dt>4.2. <a href="problem.ivl.html#ex..TestFoo_bad">Bad design with unconnected registers</a></dt><dt>4.3. <a href="problem.ivl.html#ex..TestFoo_fix">Fixed design with wired registers</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="introduction.html"><img src="images/next.png" alt="Next" /></a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Introduction</td></tr></table></div></body></html>