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
@@ -10,118 +10,118 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 179</span>
14
- 179: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span> <span class="ruby-identifier">aMsg</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>
15
- 180: <span class="ruby-identifier">methName</span> = <span class="ruby-identifier">aMsg</span>.<span class="ruby-identifier">to_s</span>
16
- 181:
17
- 182: <span class="ruby-comment cmt"># determine if property is being written</span>
18
- 183: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isAssign</span> = <span class="ruby-identifier">methName</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">ASSIGN_REGEXP</span>
19
- 184: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">ASSIGN_REGEXP</span>, <span class="ruby-value str">''</span>
20
- 185: <span class="ruby-keyword kw">end</span>
21
- 186:
22
- 187: <span class="ruby-comment cmt"># determine if property is being queried</span>
23
- 188: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span> = <span class="ruby-identifier">methName</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">QUERY_REGEXP</span>
24
- 189: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">QUERY_REGEXP</span>, <span class="ruby-value str">''</span>
25
- 190: <span class="ruby-keyword kw">end</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 189</span>
14
+ 189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span> <span class="ruby-identifier">aMsg</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>
15
+ 190: <span class="ruby-identifier">methName</span> = <span class="ruby-identifier">aMsg</span>.<span class="ruby-identifier">to_s</span>
26
16
  191:
27
- 192: <span class="ruby-comment cmt"># parse Accessor parameter</span>
28
- 193: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">accessor</span> = <span class="ruby-identifier">methName</span>[<span class="ruby-constant">HINT_REGEXP</span>, <span class="ruby-value">1</span>]
29
- 194: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">HINT_REGEXP</span>, <span class="ruby-value str">''</span>
17
+ 192: <span class="ruby-comment cmt"># determine if property is being written</span>
18
+ 193: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isAssign</span> = <span class="ruby-identifier">methName</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">ASSIGN_REGEXP</span>
19
+ 194: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">ASSIGN_REGEXP</span>, <span class="ruby-value str">''</span>
30
20
  195: <span class="ruby-keyword kw">end</span>
31
21
  196:
32
- 197: <span class="ruby-comment cmt"># parse Operation parameter</span>
33
- 198: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">operation</span> = <span class="ruby-identifier">methName</span>[<span class="ruby-constant">PREFIX_REGEXP</span>, <span class="ruby-value">1</span>]
34
- 199: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">PREFIX_REGEXP</span>, <span class="ruby-value str">''</span>
22
+ 197: <span class="ruby-comment cmt"># determine if property is being queried</span>
23
+ 198: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span> = <span class="ruby-identifier">methName</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">QUERY_REGEXP</span>
24
+ 199: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">QUERY_REGEXP</span>, <span class="ruby-value str">''</span>
35
25
  200: <span class="ruby-keyword kw">end</span>
36
26
  201:
37
- 202: <span class="ruby-comment cmt"># resolve Property parameter into a valid VPI property</span>
38
- 203: <span class="ruby-identifier">propName</span> = <span class="ruby-identifier">methName</span>[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">upcase</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">methName</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
39
- 204: <span class="ruby-identifier">propName</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-value">0</span>, <span class="ruby-value str">'Vpi'</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">methName</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^vpi/</span>
40
- 205:
41
- 206: <span class="ruby-identifier">puts</span> <span class="ruby-value str">''</span>, <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">caller</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>), <span class="ruby-value str">''</span>, <span class="ruby-node">&quot;operation: #{operation}&quot;</span>, <span class="ruby-node">&quot;meth: #{aMsg}&quot;</span>, <span class="ruby-node">&quot;args: #{aArgs.inspect}&quot;</span>, <span class="ruby-node">&quot;name: #{methName}&quot;</span>, <span class="ruby-node">&quot;prop: #{propName}&quot;</span>, <span class="ruby-node">&quot;assign: #{isAssign}&quot;</span>, <span class="ruby-node">&quot;query: #{isQuery}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
42
- 207:
43
- 208: <span class="ruby-keyword kw">begin</span>
44
- 209: <span class="ruby-identifier">prop</span> = <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">propName</span>)
45
- 210: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NameError</span>
46
- 211: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;invalid VPI property `#{propName}'&quot;</span>
47
- 212: <span class="ruby-keyword kw">end</span>
48
- 213:
49
- 214: <span class="ruby-comment cmt"># access the VPI property</span>
50
- 215: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">operation</span>
51
- 216: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">operation</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">prop</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>)
52
- 217: <span class="ruby-keyword kw">else</span>
53
- 218: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
54
- 219: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;looping, accessor: #{accessor}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
55
- 220:
56
- 221: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">accessor</span>
57
- 222: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'d'</span> <span class="ruby-comment cmt"># delay values</span>
58
- 223: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isAssign</span>
59
- 224: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
60
- 225: <span class="ruby-keyword kw">else</span>
61
- 226: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
62
- 227: <span class="ruby-keyword kw">end</span>
63
- 228:
64
- 229: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'l'</span> <span class="ruby-comment cmt"># logic values</span>
65
- 230: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isAssign</span>
66
- 231: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
67
- 232: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">put_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">prop</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>)
68
- 233: <span class="ruby-keyword kw">else</span>
69
- 234: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>)
70
- 235: <span class="ruby-keyword kw">end</span>
71
- 236:
72
- 237: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'i'</span> <span class="ruby-comment cmt"># integer values</span>
73
- 238: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
74
- 239:
75
- 240: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'b'</span> <span class="ruby-comment cmt"># boolean values</span>
76
- 241: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
77
- 242: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>)
78
- 243: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-comment cmt"># zero is false in C</span>
79
- 244: <span class="ruby-keyword kw">end</span>
80
- 245:
81
- 246: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'s'</span> <span class="ruby-comment cmt"># string values</span>
82
- 247: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_get_str</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
83
- 248:
84
- 249: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'h'</span> <span class="ruby-comment cmt"># handle values</span>
85
- 250: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_handle</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
86
- 251:
87
- 252: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># accessor not specified. guess its value from property name</span>
88
- 253: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span>
89
- 254: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'b'</span>
90
- 255: <span class="ruby-keyword kw">redo</span>
91
- 256: <span class="ruby-keyword kw">end</span>
92
- 257:
93
- 258: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">propName</span>
94
- 259: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Time$/</span>
95
- 260: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'d'</span>
96
- 261: <span class="ruby-keyword kw">redo</span>
97
- 262:
98
- 263: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Val$/</span>
99
- 264: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'l'</span>
100
- 265: <span class="ruby-keyword kw">redo</span>
101
- 266:
102
- 267: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Type$/</span>, <span class="ruby-regexp re">/Direction$/</span>, <span class="ruby-regexp re">/Index$/</span>, <span class="ruby-regexp re">/Size$/</span>, <span class="ruby-regexp re">/Strength\d?$/</span>, <span class="ruby-regexp re">/Polarity$/</span>, <span class="ruby-regexp re">/Edge$/</span>, <span class="ruby-regexp re">/Offset$/</span>, <span class="ruby-regexp re">/Mode$/</span>
103
- 268: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'i'</span>
104
- 269: <span class="ruby-keyword kw">redo</span>
105
- 270:
106
- 271: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Is[A-Z]/</span>, <span class="ruby-regexp re">/ed$/</span>
107
- 272: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'b'</span>
108
- 273: <span class="ruby-keyword kw">redo</span>
109
- 274:
110
- 275: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Name$/</span>, <span class="ruby-regexp re">/File$/</span>, <span class="ruby-regexp re">/Decompile$/</span>
111
- 276: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'s'</span>
112
- 277: <span class="ruby-keyword kw">redo</span>
113
- 278:
114
- 279: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Parent$/</span>, <span class="ruby-regexp re">/Inst$/</span>, <span class="ruby-regexp re">/Range$/</span>, <span class="ruby-regexp re">/Driver$/</span>, <span class="ruby-regexp re">/Net$/</span>, <span class="ruby-regexp re">/Load$/</span>, <span class="ruby-regexp re">/Conn$/</span>, <span class="ruby-regexp re">/Bit$/</span>, <span class="ruby-regexp re">/Word$/</span>, <span class="ruby-regexp re">/[LR]hs$/</span>, <span class="ruby-regexp re">/(In|Out)$/</span>, <span class="ruby-regexp re">/Term$/</span>, <span class="ruby-regexp re">/Argument$/</span>, <span class="ruby-regexp re">/Condition$/</span>, <span class="ruby-regexp re">/Use$/</span>, <span class="ruby-regexp re">/Operand$/</span>, <span class="ruby-regexp re">/Stmt$/</span>, <span class="ruby-regexp re">/Expr$/</span>, <span class="ruby-regexp re">/Scope$/</span>, <span class="ruby-regexp re">/Memory$/</span>, <span class="ruby-regexp re">/Delay$/</span>
115
- 280: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'h'</span>
116
- 281: <span class="ruby-keyword kw">redo</span>
117
- 282: <span class="ruby-keyword kw">end</span>
118
- 283: <span class="ruby-keyword kw">end</span>
27
+ 202: <span class="ruby-comment cmt"># parse Accessor parameter</span>
28
+ 203: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">accessor</span> = <span class="ruby-identifier">methName</span>[<span class="ruby-constant">HINT_REGEXP</span>, <span class="ruby-value">1</span>]
29
+ 204: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">HINT_REGEXP</span>, <span class="ruby-value str">''</span>
30
+ 205: <span class="ruby-keyword kw">end</span>
31
+ 206:
32
+ 207: <span class="ruby-comment cmt"># parse Operation parameter</span>
33
+ 208: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">operation</span> = <span class="ruby-identifier">methName</span>[<span class="ruby-constant">PREFIX_REGEXP</span>, <span class="ruby-value">1</span>]
34
+ 209: <span class="ruby-identifier">methName</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-constant">PREFIX_REGEXP</span>, <span class="ruby-value str">''</span>
35
+ 210: <span class="ruby-keyword kw">end</span>
36
+ 211:
37
+ 212: <span class="ruby-comment cmt"># resolve Property parameter into a valid VPI property</span>
38
+ 213: <span class="ruby-identifier">propName</span> = <span class="ruby-identifier">methName</span>[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">upcase</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">methName</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
39
+ 214: <span class="ruby-identifier">propName</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-value">0</span>, <span class="ruby-value str">'Vpi'</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">methName</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^vpi/</span>
40
+ 215:
41
+ 216: <span class="ruby-identifier">puts</span> <span class="ruby-value str">''</span>, <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">caller</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>), <span class="ruby-value str">''</span>, <span class="ruby-node">&quot;operation: #{operation}&quot;</span>, <span class="ruby-node">&quot;meth: #{aMsg}&quot;</span>, <span class="ruby-node">&quot;args: #{aArgs.inspect}&quot;</span>, <span class="ruby-node">&quot;name: #{methName}&quot;</span>, <span class="ruby-node">&quot;prop: #{propName}&quot;</span>, <span class="ruby-node">&quot;assign: #{isAssign}&quot;</span>, <span class="ruby-node">&quot;query: #{isQuery}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
42
+ 217:
43
+ 218: <span class="ruby-keyword kw">begin</span>
44
+ 219: <span class="ruby-identifier">prop</span> = <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">propName</span>)
45
+ 220: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NameError</span>
46
+ 221: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;invalid VPI property `#{propName}'&quot;</span>
47
+ 222: <span class="ruby-keyword kw">end</span>
48
+ 223:
49
+ 224: <span class="ruby-comment cmt"># access the VPI property</span>
50
+ 225: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">operation</span>
51
+ 226: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">operation</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">prop</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>)
52
+ 227: <span class="ruby-keyword kw">else</span>
53
+ 228: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
54
+ 229: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;looping, accessor: #{accessor}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
55
+ 230:
56
+ 231: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">accessor</span>
57
+ 232: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'d'</span> <span class="ruby-comment cmt"># delay values</span>
58
+ 233: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isAssign</span>
59
+ 234: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
60
+ 235: <span class="ruby-keyword kw">else</span>
61
+ 236: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
62
+ 237: <span class="ruby-keyword kw">end</span>
63
+ 238:
64
+ 239: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'l'</span> <span class="ruby-comment cmt"># logic values</span>
65
+ 240: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isAssign</span>
66
+ 241: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
67
+ 242: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">put_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">prop</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>)
68
+ 243: <span class="ruby-keyword kw">else</span>
69
+ 244: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>)
70
+ 245: <span class="ruby-keyword kw">end</span>
71
+ 246:
72
+ 247: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'i'</span> <span class="ruby-comment cmt"># integer values</span>
73
+ 248: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
74
+ 249:
75
+ 250: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'b'</span> <span class="ruby-comment cmt"># boolean values</span>
76
+ 251: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
77
+ 252: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>)
78
+ 253: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-comment cmt"># zero is false in C</span>
79
+ 254: <span class="ruby-keyword kw">end</span>
80
+ 255:
81
+ 256: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'s'</span> <span class="ruby-comment cmt"># string values</span>
82
+ 257: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_get_str</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
83
+ 258:
84
+ 259: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'h'</span> <span class="ruby-comment cmt"># handle values</span>
85
+ 260: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_handle</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
86
+ 261:
87
+ 262: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># accessor not specified. guess its value from property name</span>
88
+ 263: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span>
89
+ 264: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'b'</span>
90
+ 265: <span class="ruby-keyword kw">redo</span>
91
+ 266: <span class="ruby-keyword kw">end</span>
92
+ 267:
93
+ 268: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">propName</span>
94
+ 269: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Time$/</span>
95
+ 270: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'d'</span>
96
+ 271: <span class="ruby-keyword kw">redo</span>
97
+ 272:
98
+ 273: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Val$/</span>
99
+ 274: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'l'</span>
100
+ 275: <span class="ruby-keyword kw">redo</span>
101
+ 276:
102
+ 277: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Type$/</span>, <span class="ruby-regexp re">/Direction$/</span>, <span class="ruby-regexp re">/Index$/</span>, <span class="ruby-regexp re">/Size$/</span>, <span class="ruby-regexp re">/Strength\d?$/</span>, <span class="ruby-regexp re">/Polarity$/</span>, <span class="ruby-regexp re">/Edge$/</span>, <span class="ruby-regexp re">/Offset$/</span>, <span class="ruby-regexp re">/Mode$/</span>
103
+ 278: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'i'</span>
104
+ 279: <span class="ruby-keyword kw">redo</span>
105
+ 280:
106
+ 281: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Is[A-Z]/</span>, <span class="ruby-regexp re">/ed$/</span>
107
+ 282: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'b'</span>
108
+ 283: <span class="ruby-keyword kw">redo</span>
119
109
  284:
120
- 285: <span class="ruby-keyword kw">break</span>
121
- 286: <span class="ruby-keyword kw">end</span>
122
- 287: <span class="ruby-keyword kw">end</span>
110
+ 285: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Name$/</span>, <span class="ruby-regexp re">/File$/</span>, <span class="ruby-regexp re">/Decompile$/</span>
111
+ 286: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'s'</span>
112
+ 287: <span class="ruby-keyword kw">redo</span>
123
113
  288:
124
- 289: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-node">&quot;unable to access VPI property `#{propName}' through method `#{aMsg}' with arguments `#{aArgs.inspect}' for handle #{self}&quot;</span>
125
- 290: <span class="ruby-keyword kw">end</span></pre>
114
+ 289: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Parent$/</span>, <span class="ruby-regexp re">/Inst$/</span>, <span class="ruby-regexp re">/Range$/</span>, <span class="ruby-regexp re">/Driver$/</span>, <span class="ruby-regexp re">/Net$/</span>, <span class="ruby-regexp re">/Load$/</span>, <span class="ruby-regexp re">/Conn$/</span>, <span class="ruby-regexp re">/Bit$/</span>, <span class="ruby-regexp re">/Word$/</span>, <span class="ruby-regexp re">/[LR]hs$/</span>, <span class="ruby-regexp re">/(In|Out)$/</span>, <span class="ruby-regexp re">/Term$/</span>, <span class="ruby-regexp re">/Argument$/</span>, <span class="ruby-regexp re">/Condition$/</span>, <span class="ruby-regexp re">/Use$/</span>, <span class="ruby-regexp re">/Operand$/</span>, <span class="ruby-regexp re">/Stmt$/</span>, <span class="ruby-regexp re">/Expr$/</span>, <span class="ruby-regexp re">/Scope$/</span>, <span class="ruby-regexp re">/Memory$/</span>, <span class="ruby-regexp re">/Delay$/</span>
115
+ 290: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'h'</span>
116
+ 291: <span class="ruby-keyword kw">redo</span>
117
+ 292: <span class="ruby-keyword kw">end</span>
118
+ 293: <span class="ruby-keyword kw">end</span>
119
+ 294:
120
+ 295: <span class="ruby-keyword kw">break</span>
121
+ 296: <span class="ruby-keyword kw">end</span>
122
+ 297: <span class="ruby-keyword kw">end</span>
123
+ 298:
124
+ 299: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-node">&quot;unable to access VPI property `#{propName}' through method `#{aMsg}' with arguments `#{aArgs.inspect}' for handle #{self}&quot;</span>
125
+ 300: <span class="ruby-keyword kw">end</span></pre>
126
126
  </body>
127
127
  </html>
@@ -10,17 +10,17 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 293</span>
14
- 293: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-identifier">aType</span>
15
- 294: <span class="ruby-identifier">handles</span> = []
16
- 295:
17
- 296: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">itr</span> = <span class="ruby-identifier">vpi_iterate</span>(<span class="ruby-identifier">aType</span>, <span class="ruby-keyword kw">self</span>)
18
- 297: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">h</span> = <span class="ruby-identifier">vpi_scan</span>(<span class="ruby-identifier">itr</span>)
19
- 298: <span class="ruby-identifier">handles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
20
- 299: <span class="ruby-keyword kw">end</span>
21
- 300: <span class="ruby-keyword kw">end</span>
22
- 301:
23
- 302: <span class="ruby-identifier">handles</span>
24
- 303: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 303</span>
14
+ 303: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-identifier">aType</span>
15
+ 304: <span class="ruby-identifier">handles</span> = []
16
+ 305:
17
+ 306: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">itr</span> = <span class="ruby-identifier">vpi_iterate</span>(<span class="ruby-identifier">aType</span>, <span class="ruby-keyword kw">self</span>)
18
+ 307: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">h</span> = <span class="ruby-identifier">vpi_scan</span>(<span class="ruby-identifier">itr</span>)
19
+ 308: <span class="ruby-identifier">handles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
20
+ 309: <span class="ruby-keyword kw">end</span>
21
+ 310: <span class="ruby-keyword kw">end</span>
22
+ 311:
23
+ 312: <span class="ruby-identifier">handles</span>
24
+ 313: <span class="ruby-keyword kw">end</span></pre>
25
25
  </body>
26
26
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 306</span>
14
- 306: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span> <span class="ruby-identifier">aType</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlock</span> <span class="ruby-comment cmt"># :yields: handle</span>
15
- 307: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">aType</span>].<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlock</span>)
16
- 308: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 316</span>
14
+ 316: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span> <span class="ruby-identifier">aType</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlock</span> <span class="ruby-comment cmt"># :yields: handle</span>
15
+ 317: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">aType</span>].<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlock</span>)
16
+ 318: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -55,8 +55,8 @@
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
57
57
  <td>
58
- <a href="../files/bin/header_to_ruby_rb.html">
59
- bin/header_to_ruby.rb
58
+ <a href="../files/lib/ruby-vpi/verilog_parser_rb.html">
59
+ lib/ruby-vpi/verilog_parser.rb
60
60
  </a>
61
61
  <br />
62
62
  </td>
@@ -86,7 +86,8 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000012">to_ruby</a>&nbsp;&nbsp;
89
+ <a href="#M000017">to_ruby_const_name</a>&nbsp;&nbsp;
90
+ <a href="#M000016">verilog_to_ruby</a>&nbsp;&nbsp;
90
91
  </div>
91
92
  </div>
92
93
 
@@ -108,19 +109,36 @@
108
109
  <div id="methods">
109
110
  <h3 class="section-bar">Public Instance methods</h3>
110
111
 
111
- <div id="method-M000012" class="method-detail">
112
- <a name="M000012"></a>
112
+ <div id="method-M000017" class="method-detail">
113
+ <a name="M000017"></a>
113
114
 
114
115
  <div class="method-heading">
115
- <a href="String.src/M000012.html" target="Code" class="method-signature"
116
- onclick="popupCode('String.src/M000012.html');return false;">
117
- <span class="method-name">to_ruby</span><span class="method-args">()</span>
116
+ <a href="String.src/M000017.html" target="Code" class="method-signature"
117
+ onclick="popupCode('String.src/M000017.html');return false;">
118
+ <span class="method-name">to_ruby_const_name</span><span class="method-args">()</span>
118
119
  </a>
119
120
  </div>
120
121
 
121
122
  <div class="method-description">
122
123
  <p>
123
- Converts this Verilog header content into Ruby syntax.
124
+ Converts this string into a valid Ruby constant name.
125
+ </p>
126
+ </div>
127
+ </div>
128
+
129
+ <div id="method-M000016" class="method-detail">
130
+ <a name="M000016"></a>
131
+
132
+ <div class="method-heading">
133
+ <a href="String.src/M000016.html" target="Code" class="method-signature"
134
+ onclick="popupCode('String.src/M000016.html');return false;">
135
+ <span class="method-name">verilog_to_ruby</span><span class="method-args">()</span>
136
+ </a>
137
+ </div>
138
+
139
+ <div class="method-description">
140
+ <p>
141
+ Converts this string containing Verilog code into loadable Ruby code.
124
142
  </p>
125
143
  </div>
126
144
  </div>
@@ -0,0 +1,41 @@
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>verilog_to_ruby (String)</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/verilog_parser.rb, line 105</span>
14
+ 105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verilog_to_ruby</span>
15
+ 106: <span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
16
+ 107:
17
+ 108: <span class="ruby-comment cmt"># single-line comments</span>
18
+ 109: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{//(.*)$}</span>, <span class="ruby-value str">'#\1'</span>
19
+ 110:
20
+ 111: <span class="ruby-comment cmt"># multi-line comments</span>
21
+ 112: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{/\*.*?\*/}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">&quot;\n=begin\n\\0\n=end\n&quot;</span>
22
+ 113:
23
+ 114: <span class="ruby-comment cmt"># preprocessor directives</span>
24
+ 115: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{`include}</span>, <span class="ruby-value str">'#\0'</span>
25
+ 116:
26
+ 117: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{`define\s+(\w+)\s+(.+)}</span> <span class="ruby-keyword kw">do</span>
27
+ 118: <span class="ruby-node">&quot;#{$1.to_ruby_const_name} = #{$2}&quot;</span>
28
+ 119: <span class="ruby-keyword kw">end</span>
29
+ 120:
30
+ 121: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{`+}</span>, <span class="ruby-value str">''</span>
31
+ 122:
32
+ 123: <span class="ruby-comment cmt"># numbers</span>
33
+ 124: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{\d*\'([dohb]\w+)}</span>, <span class="ruby-value str">'0\1'</span>
34
+ 125:
35
+ 126: <span class="ruby-comment cmt"># ranges</span>
36
+ 127: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(\S)\s*:\s*(\S)}</span>, <span class="ruby-value str">'\1..\2'</span>
37
+ 128:
38
+ 129: <span class="ruby-identifier">content</span>
39
+ 130: <span class="ruby-keyword kw">end</span></pre>
40
+ </body>
41
+ </html>
@@ -0,0 +1,18 @@
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>to_ruby_const_name (String)</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/verilog_parser.rb, line 133</span>
14
+ 133: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ruby_const_name</span>
15
+ 134: <span class="ruby-keyword kw">self</span>[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">upcase</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
16
+ 135: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -86,10 +86,10 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000003">doc</a>&nbsp;&nbsp;
90
- <a href="#M000005">to_html4</a>&nbsp;&nbsp;
91
- <a href="#M000004">to_xhtml</a>&nbsp;&nbsp;
92
- <a href="#M000006">to_xml</a>&nbsp;&nbsp;
89
+ <a href="#M000010">doc</a>&nbsp;&nbsp;
90
+ <a href="#M000012">to_html4</a>&nbsp;&nbsp;
91
+ <a href="#M000011">to_xhtml</a>&nbsp;&nbsp;
92
+ <a href="#M000013">to_xml</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -120,12 +120,12 @@
120
120
  <div id="methods">
121
121
  <h3 class="section-bar">Public Instance methods</h3>
122
122
 
123
- <div id="method-M000003" class="method-detail">
124
- <a name="M000003"></a>
123
+ <div id="method-M000010" class="method-detail">
124
+ <a name="M000010"></a>
125
125
 
126
126
  <div class="method-heading">
127
- <a href="Table.src/M000003.html" target="Code" class="method-signature"
128
- onclick="popupCode('Table.src/M000003.html');return false;">
127
+ <a href="Table.src/M000010.html" target="Code" class="method-signature"
128
+ onclick="popupCode('Table.src/M000010.html');return false;">
129
129
  <span class="method-name">doc</span><span class="method-args">()</span>
130
130
  </a>
131
131
  </div>
@@ -134,12 +134,12 @@
134
134
  </div>
135
135
  </div>
136
136
 
137
- <div id="method-M000005" class="method-detail">
138
- <a name="M000005"></a>
137
+ <div id="method-M000012" class="method-detail">
138
+ <a name="M000012"></a>
139
139
 
140
140
  <div class="method-heading">
141
- <a href="Table.src/M000005.html" target="Code" class="method-signature"
142
- onclick="popupCode('Table.src/M000005.html');return false;">
141
+ <a href="Table.src/M000012.html" target="Code" class="method-signature"
142
+ onclick="popupCode('Table.src/M000012.html');return false;">
143
143
  <span class="method-name">to_html4</span><span class="method-args">()</span>
144
144
  </a>
145
145
  </div>
@@ -148,12 +148,12 @@
148
148
  </div>
149
149
  </div>
150
150
 
151
- <div id="method-M000004" class="method-detail">
152
- <a name="M000004"></a>
151
+ <div id="method-M000011" class="method-detail">
152
+ <a name="M000011"></a>
153
153
 
154
154
  <div class="method-heading">
155
- <a href="Table.src/M000004.html" target="Code" class="method-signature"
156
- onclick="popupCode('Table.src/M000004.html');return false;">
155
+ <a href="Table.src/M000011.html" target="Code" class="method-signature"
156
+ onclick="popupCode('Table.src/M000011.html');return false;">
157
157
  <span class="method-name">to_xhtml</span><span class="method-args">()</span>
158
158
  </a>
159
159
  </div>
@@ -162,12 +162,12 @@
162
162
  </div>
163
163
  </div>
164
164
 
165
- <div id="method-M000006" class="method-detail">
166
- <a name="M000006"></a>
165
+ <div id="method-M000013" class="method-detail">
166
+ <a name="M000013"></a>
167
167
 
168
168
  <div class="method-heading">
169
- <a href="Table.src/M000006.html" target="Code" class="method-signature"
170
- onclick="popupCode('Table.src/M000006.html');return false;">
169
+ <a href="Table.src/M000013.html" target="Code" class="method-signature"
170
+ onclick="popupCode('Table.src/M000013.html');return false;">
171
171
  <span class="method-name">to_xml</span><span class="method-args">()</span>
172
172
  </a>
173
173
  </div>
@@ -94,7 +94,7 @@
94
94
  <h3 class="section-bar">Methods</h3>
95
95
 
96
96
  <div class="name-list">
97
- <a href="#M000010">new</a>&nbsp;&nbsp;
97
+ <a href="#M000015">new</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -129,12 +129,12 @@
129
129
  <div id="methods">
130
130
  <h3 class="section-bar">Public Class methods</h3>
131
131
 
132
- <div id="method-M000010" class="method-detail">
133
- <a name="M000010"></a>
132
+ <div id="method-M000015" class="method-detail">
133
+ <a name="M000015"></a>
134
134
 
135
135
  <div class="method-heading">
136
- <a href="Template.src/M000010.html" target="Code" class="method-signature"
137
- onclick="popupCode('Template.src/M000010.html');return false;">
136
+ <a href="Template.src/M000015.html" target="Code" class="method-signature"
137
+ onclick="popupCode('Template.src/M000015.html');return false;">
138
138
  <span class="method-name">new</span><span class="method-args">(aName)</span>
139
139
  </a>
140
140
  </div>