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
@@ -1,48 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xx_with_doc_in_effect (XX::Markup::InstanceMethods)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/xx.rb, line 283</span>
14
- 283: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xx_with_doc_in_effect</span> <span class="ruby-operator">*</span><span class="ruby-identifier">a</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>
15
- 284: <span class="ruby-comment cmt">#--{{{</span>
16
- 285: <span class="ruby-ivar">@xx_docs</span> <span class="ruby-operator">||=</span> []
17
- 286: <span class="ruby-identifier">doc</span> = <span class="ruby-operator">::</span><span class="ruby-constant">XX</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)
18
- 287: <span class="ruby-identifier">ddoc</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">doc</span>
19
- 288: <span class="ruby-keyword kw">begin</span>
20
- 289: <span class="ruby-ivar">@xx_docs</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">doc</span>
21
- 290: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">call</span> <span class="ruby-identifier">doc</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>
22
- 291:
23
- 292: <span class="ruby-identifier">doctype</span> = <span class="ruby-identifier">xx_config_for</span> <span class="ruby-value str">&quot;doctype&quot;</span>, <span class="ruby-identifier">xx_which</span>
24
- 293: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">doctype</span>
25
- 294: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ddoc</span>.<span class="ruby-identifier">doctype</span>
26
- 295: <span class="ruby-identifier">doctype</span> = <span class="ruby-operator">::</span><span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">DocType</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span> <span class="ruby-identifier">doctype</span> <span class="ruby-keyword kw">unless</span>
27
- 296: <span class="ruby-operator">::</span><span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">DocType</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">doctype</span>
28
- 297: <span class="ruby-identifier">ddoc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">doctype</span>
29
- 298: <span class="ruby-keyword kw">end</span>
30
- 299: <span class="ruby-keyword kw">end</span>
31
- 300:
32
- 301: <span class="ruby-identifier">xmldecl</span> = <span class="ruby-identifier">xx_config_for</span> <span class="ruby-value str">&quot;xmldecl&quot;</span>, <span class="ruby-identifier">xx_which</span>
33
- 302: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">xmldecl</span>
34
- 303: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ddoc</span>.<span class="ruby-identifier">xml_decl</span> <span class="ruby-operator">==</span> <span class="ruby-operator">::</span><span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XMLDecl</span><span class="ruby-operator">::</span><span class="ruby-identifier">default</span>
35
- 304: <span class="ruby-identifier">xmldecl</span> = <span class="ruby-operator">::</span><span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XMLDecl</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span> <span class="ruby-identifier">xmldecl</span> <span class="ruby-keyword kw">unless</span>
36
- 305: <span class="ruby-operator">::</span><span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">XMLDecl</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">xmldecl</span>
37
- 306: <span class="ruby-identifier">ddoc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">xmldecl</span>
38
- 307: <span class="ruby-keyword kw">end</span>
39
- 308: <span class="ruby-keyword kw">end</span>
40
- 309:
41
- 310: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
42
- 311: <span class="ruby-keyword kw">ensure</span>
43
- 312: <span class="ruby-ivar">@xx_docs</span>.<span class="ruby-identifier">pop</span>
44
- 313: <span class="ruby-keyword kw">end</span>
45
- 314: <span class="ruby-comment cmt">#--}}}</span>
46
- 315: <span class="ruby-keyword kw">end</span></pre>
47
- </body>
48
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xx_doc (XX::Markup::InstanceMethods)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/xx.rb, line 316</span>
14
- 316: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xx_doc</span>
15
- 317: <span class="ruby-comment cmt">#--{{{</span>
16
- 318: <span class="ruby-ivar">@xx_docs</span>.<span class="ruby-identifier">last</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;no xx_doc in effect!&quot;</span>
17
- 319: <span class="ruby-comment cmt">#--}}}</span>
18
- 320: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,31 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>xx_text_ (XX::Markup::InstanceMethods)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/xx.rb, line 321</span>
14
- 321: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xx_text_</span> <span class="ruby-operator">*</span><span class="ruby-identifier">objects</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>
15
- 322: <span class="ruby-comment cmt">#--{{{</span>
16
- 323: <span class="ruby-identifier">doc</span> = <span class="ruby-identifier">xx_doc</span>
17
- 324:
18
- 325: <span class="ruby-identifier">text</span> =
19
- 326: <span class="ruby-operator">::</span><span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Text</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;&quot;</span>,
20
- 327: <span class="ruby-identifier">respect_whitespace</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">parent</span>=<span class="ruby-keyword kw">nil</span>
21
- 328: )
22
- 329:
23
- 330: <span class="ruby-identifier">objects</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">object</span><span class="ruby-operator">|</span>
24
- 331: <span class="ruby-identifier">text</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object</span>
25
- 332: <span class="ruby-keyword kw">end</span>
26
- 333:
27
- 334: <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">create</span> <span class="ruby-identifier">text</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>
28
- 335: <span class="ruby-comment cmt">#--}}}</span>
29
- 336: <span class="ruby-keyword kw">end</span></pre>
30
- </body>
31
- </html>
@@ -1,8 +0,0 @@
1
-
2
- require 'hw5_unit_spec.rb'
3
-
4
- # service the $ruby_init() callback
5
- Vpi::relay_verilog
6
-
7
- # service the $ruby_relay() callback
8
- # UnitTest will take control from here.
@@ -1,45 +0,0 @@
1
- `define WIDTH 32
2
- `define DATABITS 7
3
- `define OP_NOP 0
4
- `define OP_ADD 1
5
- `define OP_SUB 2
6
- `define OP_MULT 3
7
-
8
- module hw5_unit_bench;
9
-
10
- // configuration for the design under test
11
-
12
-
13
- // accessors for the design under test
14
- reg clk ;
15
- reg reset ;
16
- reg [`DATABITS-1:0] in_databits ;
17
- reg [`WIDTH-1:0] a ;
18
- reg [`WIDTH-1:0] b ;
19
- reg [1:0] in_op ;
20
- wire [`WIDTH-1:0] res ;
21
- wire [`DATABITS-1:0] out_databits ;
22
- wire [1:0] out_op;
23
-
24
-
25
- // instantiate the design under test
26
- hw5_unit hw5_unit_bench_design (.clk(clk), .reset(reset), .in_databits(in_databits), .a(a), .b(b), .in_op(in_op), .res(res), .out_databits(out_databits), .out_op(out_op));
27
-
28
-
29
- // interface to Ruby-VPI
30
- initial begin
31
- clk = 0;
32
- $ruby_init("ruby", "-w", "-I", "../../lib", "hw5_unit_bench.rb");
33
- end
34
-
35
- // generate a 50% duty-cycle clock for the design under test
36
- always begin
37
- #5 clk = ~clk;
38
- end
39
-
40
- // transfer control to Ruby-VPI every clock cycle
41
- always @(posedge clk) begin
42
- #1 $ruby_relay();
43
- end
44
-
45
- endmodule
@@ -1,18 +0,0 @@
1
-
2
- # An interface to the design under test.
3
- class Hw5_unit
4
- attr_reader :clk, :reset, :in_databits, :a, :b, :in_op, :res, :out_databits, :out_op
5
-
6
- def initialize
7
- @clk = Vpi::vpi_handle_by_name("hw5_unit_bench.clk", nil)
8
- @reset = Vpi::vpi_handle_by_name("hw5_unit_bench.reset", nil)
9
- @in_databits = Vpi::vpi_handle_by_name("hw5_unit_bench.in_databits", nil)
10
- @a = Vpi::vpi_handle_by_name("hw5_unit_bench.a", nil)
11
- @b = Vpi::vpi_handle_by_name("hw5_unit_bench.b", nil)
12
- @in_op = Vpi::vpi_handle_by_name("hw5_unit_bench.in_op", nil)
13
- @res = Vpi::vpi_handle_by_name("hw5_unit_bench.res", nil)
14
- @out_databits = Vpi::vpi_handle_by_name("hw5_unit_bench.out_databits", nil)
15
- @out_op = Vpi::vpi_handle_by_name("hw5_unit_bench.out_op", nil)
16
-
17
- end
18
- end
@@ -1,10 +0,0 @@
1
- SIMULATOR_SOURCES = ['hw5_unit_bench.v', 'hw5_unit.v']
2
- SIMULATOR_TARGET = 'hw5_unit_bench'
3
- SIMULATOR_ARGS = {
4
- :cver => '',
5
- :ivl => '',
6
- :vcs => '',
7
- :vsim => '',
8
- }
9
-
10
- require 'ruby-vpi/runner'
@@ -1,123 +0,0 @@
1
- =begin
2
- Copyright 2006 Suraj N. Kurapati
3
-
4
- This file is part of Ruby-VPI.
5
-
6
- Ruby-VPI is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU General Public License
8
- as published by the Free Software Foundation; either version 2
9
- of the License, or (at your option) any later version.
10
-
11
- Ruby-VPI is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Ruby-VPI; if not, write to the Free Software Foundation,
18
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
- =end
20
-
21
- # A specification which verifies the design under test.
22
- require 'hw5_unit_design.rb'
23
- require 'ruby-vpi/vpi_util'
24
- require 'test/unit'
25
-
26
- require 'InputGenerator'
27
- require 'Hw5UnitModel'
28
-
29
-
30
-
31
- class Hw5_unit_spec < Test::Unit::TestCase
32
- include Vpi
33
-
34
- # Number of input sequences to test.
35
- NUM_TESTS = 4000
36
-
37
- # Ruby's native int is 31 bits
38
- RUBY_INTEGER_BITS = 31
39
-
40
- # Used to convert VPI integer into Ruby integer
41
- VPI_INTEGER_MASK = (2 ** RUBY_INTEGER_BITS.succ) - 1
42
-
43
- # Upper limit of values allowed for an operation's tag.
44
- OPERATION_TAG_LIMIT = 2 ** 7
45
-
46
- OPERATION_ENCODINGS = {
47
- :nop => 0,
48
- :add => 1,
49
- :sub => 2,
50
- :mul => 3,
51
- }
52
-
53
- # Number of cycles needed to reset the DUT
54
- DUT_RESET_DELAY = 5
55
-
56
-
57
- def setup
58
- @ig = InputGenerator.new(RUBY_INTEGER_BITS)
59
- @design = Hw5_unit.new
60
-
61
- reset
62
- end
63
-
64
- def reset
65
- @design.reset.intVal = 1
66
- DUT_RESET_DELAY.times {relay_verilog}
67
-
68
- @design.reset.intVal = 0
69
- end
70
-
71
- def test_pipeline
72
- operationQueue = []
73
- numOperations = 0
74
-
75
- begin
76
- # start a new operation
77
- if numOperations < NUM_TESTS
78
- op = Hw5UnitModel::Operation.new(
79
- Hw5UnitModel::OPERATIONS[rand(Hw5UnitModel::OPERATIONS.size)],
80
- numOperations % OPERATION_TAG_LIMIT,
81
- @ig.gen.abs,
82
- @ig.gen.abs
83
- )
84
-
85
-
86
- @design.a.intVal = op.arg1
87
- @design.b.intVal = op.arg2
88
- @design.in_op.intVal = OPERATION_ENCODINGS[op.type]
89
- @design.in_databits.intVal = op.tag
90
-
91
-
92
- operationQueue << op
93
- numOperations += 1
94
- end
95
-
96
-
97
- # simulate a clock cycle
98
- relay_verilog
99
-
100
-
101
- # verify the output when present
102
- unless @design.out_databits.hexStrVal =~ /x/
103
- finishedOp = Hw5UnitModel::Operation.new(
104
- OPERATION_ENCODINGS.index(@design.out_op.intVal),
105
- @design.out_databits.intVal
106
- )
107
- finishedOp.result = @design.res.intVal & VPI_INTEGER_MASK
108
-
109
- expectedOp = operationQueue.shift
110
-
111
-
112
- assert_equal expectedOp.type, finishedOp.type, "incorrect operation"
113
- assert_equal expectedOp.tag, finishedOp.tag, "incorrect tag"
114
-
115
-
116
- # ignore the result of a NOP operation
117
- unless finishedOp.type == :nop
118
- assert_equal expectedOp.compute & VPI_INTEGER_MASK, finishedOp.result, "incorrect result"
119
- end
120
- end
121
- end until operationQueue.empty?
122
- end
123
- end