ruby-vpi 15.0.2 → 16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. data/LICENSE +23 -340
  2. data/Rakefile +169 -192
  3. data/bin/generate_test.rb +26 -25
  4. data/bin/generate_test_tpl/runner.rake +4 -10
  5. data/bin/header_to_ruby.rb +3 -20
  6. data/doc/README +11 -0
  7. data/doc/Rakefile +8 -21
  8. data/doc/common.css +44 -10
  9. data/doc/common.tpl +5 -10
  10. data/doc/history.doc +8 -7
  11. data/doc/history.html +228 -560
  12. data/doc/history.rb +7 -11
  13. data/doc/{history.yml → history.yaml} +325 -128
  14. data/doc/images/{feed-icon.png → feed-icon-28x28.png} +0 -0
  15. data/doc/images/ruby/LICENSE +15 -0
  16. data/doc/images/ruby/logo-reflection.png +0 -0
  17. data/doc/images/ruby/logo-reflection.xcf +0 -0
  18. data/doc/images/ruby/logo.png +0 -0
  19. data/doc/images/{LICENSE → tango/LICENSE} +0 -0
  20. data/doc/images/{caution.png → tango/caution.png} +0 -0
  21. data/doc/images/{caution.svg → tango/caution.svg} +0 -0
  22. data/doc/images/{home.png → tango/home.png} +0 -0
  23. data/doc/images/{home.svg → tango/home.svg} +0 -0
  24. data/doc/images/{important.png → tango/important.png} +0 -0
  25. data/doc/images/{important.svg → tango/important.svg} +0 -0
  26. data/doc/images/{next.png → tango/next.png} +0 -0
  27. data/doc/images/{next.svg → tango/next.svg} +0 -0
  28. data/doc/images/{note.png → tango/note.png} +0 -0
  29. data/doc/images/{note.svg → tango/note.svg} +0 -0
  30. data/doc/images/{prev.png → tango/prev.png} +0 -0
  31. data/doc/images/{prev.svg → tango/prev.svg} +0 -0
  32. data/doc/images/{tip.png → tango/tip.png} +0 -0
  33. data/doc/images/{tip.svg → tango/tip.svg} +0 -0
  34. data/doc/images/{up.png → tango/up.png} +0 -0
  35. data/doc/images/{up.svg → tango/up.svg} +0 -0
  36. data/doc/images/{warning.png → tango/warning.png} +0 -0
  37. data/doc/images/{warning.svg → tango/warning.svg} +0 -0
  38. data/doc/intro.inc +105 -36
  39. data/doc/lib/doc_format.rb +151 -29
  40. data/doc/lib/doc_proxy.rb +28 -69
  41. data/doc/lib/erb_content.rb +10 -22
  42. data/doc/lib/erb_proxy.rb +13 -24
  43. data/doc/manual.doc +16 -60
  44. data/doc/manual.html +257 -340
  45. data/doc/memo.doc +2 -0
  46. data/doc/memo.html +11 -11
  47. data/doc/readme.doc +36 -2
  48. data/doc/readme.html +214 -51
  49. data/doc/rss.erb +3 -3
  50. data/doc/rss.xml +217 -269
  51. data/ext/Rakefile +7 -22
  52. data/ext/common.h +10 -21
  53. data/ext/extconf.rb +5 -0
  54. data/ext/main.c +2 -18
  55. data/ext/main.h +1 -16
  56. data/ext/relay.c +3 -17
  57. data/ext/relay.h +3 -17
  58. data/ext/verilog.h +6 -18
  59. data/ext/vlog.c +3 -21
  60. data/ext/vlog.h +3 -17
  61. data/lib/ruby-vpi/erb.rb +7 -20
  62. data/lib/ruby-vpi/float.rb +6 -20
  63. data/lib/ruby-vpi/integer.rb +27 -47
  64. data/lib/ruby-vpi/rake.rb +4 -19
  65. data/lib/ruby-vpi/rcov.rb +6 -21
  66. data/lib/ruby-vpi/rdoc.rb +3 -21
  67. data/lib/ruby-vpi/runner.rb +28 -29
  68. data/lib/ruby-vpi/runner_proxy.rb +5 -21
  69. data/lib/ruby-vpi/verilog_parser.rb +5 -20
  70. data/lib/ruby-vpi/vpi.rb +420 -376
  71. data/lib/ruby-vpi.rb +26 -32
  72. data/ref/c/annotated.html +1 -1
  73. data/ref/c/common_8h.html +1 -1
  74. data/ref/c/files.html +1 -1
  75. data/ref/c/functions.html +1 -1
  76. data/ref/c/functions_vars.html +1 -1
  77. data/ref/c/globals.html +1 -1
  78. data/ref/c/globals_0x63.html +1 -1
  79. data/ref/c/globals_0x65.html +1 -1
  80. data/ref/c/globals_0x66.html +1 -1
  81. data/ref/c/globals_0x6d.html +1 -1
  82. data/ref/c/globals_0x70.html +1 -1
  83. data/ref/c/globals_0x72.html +1 -1
  84. data/ref/c/globals_0x73.html +1 -1
  85. data/ref/c/globals_0x74.html +1 -1
  86. data/ref/c/globals_0x76.html +1 -1
  87. data/ref/c/globals_0x78.html +1 -1
  88. data/ref/c/globals_defs.html +1 -1
  89. data/ref/c/globals_defs_0x65.html +1 -1
  90. data/ref/c/globals_defs_0x70.html +1 -1
  91. data/ref/c/globals_defs_0x76.html +1 -1
  92. data/ref/c/globals_defs_0x78.html +1 -1
  93. data/ref/c/globals_enum.html +1 -1
  94. data/ref/c/globals_eval.html +1 -1
  95. data/ref/c/globals_func.html +1 -1
  96. data/ref/c/globals_type.html +1 -1
  97. data/ref/c/globals_vars.html +1 -1
  98. data/ref/c/index.html +1 -1
  99. data/ref/c/main_8c.html +1 -1
  100. data/ref/c/main_8h.html +1 -1
  101. data/ref/c/relay_8c.html +1 -1
  102. data/ref/c/relay_8h.html +1 -1
  103. data/ref/c/structt__cb__data.html +1 -1
  104. data/ref/c/structt__vpi__delay.html +1 -1
  105. data/ref/c/structt__vpi__error__info.html +1 -1
  106. data/ref/c/structt__vpi__strengthval.html +1 -1
  107. data/ref/c/structt__vpi__systf__data.html +1 -1
  108. data/ref/c/structt__vpi__time.html +1 -1
  109. data/ref/c/structt__vpi__value.html +1 -1
  110. data/ref/c/structt__vpi__vecval.html +1 -1
  111. data/ref/c/structt__vpi__vlog__info.html +1 -1
  112. data/ref/c/verilog_8h.html +1 -1
  113. data/ref/c/vlog_8c.html +1 -1
  114. data/ref/c/vlog_8h.html +1 -1
  115. data/ref/c/vpi__user_8h.html +1 -1
  116. data/ref/ruby/classes/ERB.html +5 -5
  117. data/ref/ruby/classes/ERB.src/{M000026.html → M000024.html} +15 -15
  118. data/ref/ruby/classes/FileUtils.html +10 -10
  119. data/ref/ruby/classes/FileUtils.src/{M000027.html → M000025.html} +4 -4
  120. data/ref/ruby/classes/FileUtils.src/{M000028.html → M000026.html} +4 -4
  121. data/ref/ruby/classes/Float.html +5 -5
  122. data/ref/ruby/classes/Float.src/{M000022.html → M000020.html} +5 -5
  123. data/ref/ruby/classes/Integer.html +20 -56
  124. data/ref/ruby/classes/Integer.src/M000008.html +11 -11
  125. data/ref/ruby/classes/Integer.src/M000009.html +4 -4
  126. data/ref/ruby/classes/Integer.src/M000010.html +4 -4
  127. data/ref/ruby/classes/Integer.src/M000011.html +4 -4
  128. data/ref/ruby/classes/Integer.src/M000012.html +4 -4
  129. data/ref/ruby/classes/Integer.src/M000013.html +4 -4
  130. data/ref/ruby/classes/Integer.src/M000016.html +12 -9
  131. data/ref/ruby/classes/Integer.src/M000017.html +18 -9
  132. data/ref/ruby/classes/Integer.src/M000018.html +12 -12
  133. data/ref/ruby/classes/Integer.src/M000019.html +17 -18
  134. data/ref/ruby/classes/RDoc.src/M000053.html +25 -25
  135. data/ref/ruby/classes/RubyVpi/Config.html +3 -3
  136. data/ref/ruby/classes/RubyVpi.html +11 -5
  137. data/ref/ruby/classes/RubyVpi.src/{M000029.html → M000027.html} +103 -101
  138. data/ref/ruby/classes/String.html +21 -15
  139. data/ref/ruby/classes/String.src/M000021.html +36 -0
  140. data/ref/ruby/classes/String.src/{M000024.html → M000022.html} +24 -24
  141. data/ref/ruby/classes/String.src/M000023.html +5 -23
  142. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +5 -5
  143. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +7 -7
  144. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html +4 -4
  145. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +4 -4
  146. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +4 -4
  147. data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +20 -20
  148. data/ref/ruby/classes/VerilogParser.html +6 -0
  149. data/ref/ruby/classes/VerilogParser.src/M000001.html +20 -20
  150. data/ref/ruby/classes/Vpi/Handle.html +89 -88
  151. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +18 -0
  152. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
  153. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -5
  154. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -5
  155. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +8 -5
  156. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +8 -8
  157. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +7 -6
  158. data/ref/ruby/classes/Vpi/Handle.src/M000043.html +31 -9
  159. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +74 -31
  160. data/ref/ruby/classes/Vpi/Handle.src/M000045.html +17 -74
  161. data/ref/ruby/classes/Vpi/Handle.src/M000046.html +11 -17
  162. data/ref/ruby/classes/Vpi/Handle.src/M000048.html +31 -0
  163. data/ref/ruby/classes/Vpi/Handle.src/M000049.html +53 -52
  164. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html +4 -4
  165. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html +5 -5
  166. data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
  167. data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000036.html → M000033.html} +5 -5
  168. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
  169. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html +5 -5
  170. data/ref/ruby/classes/Vpi.html +48 -19
  171. data/ref/ruby/classes/Vpi.src/M000028.html +28 -0
  172. data/ref/ruby/classes/Vpi.src/M000029.html +18 -0
  173. data/ref/ruby/classes/Vpi.src/M000030.html +25 -15
  174. data/ref/ruby/classes/Vpi.src/M000031.html +9 -5
  175. data/ref/ruby/classes/Vpi.src/M000032.html +9 -25
  176. data/ref/ruby/created.rid +1 -1
  177. data/ref/ruby/files/bin/generate_test_rb.html +2 -1
  178. data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
  179. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +7 -1
  180. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +7 -1
  181. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +7 -1
  182. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +7 -1
  183. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +7 -1
  184. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  185. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  186. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
  187. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
  188. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  189. data/ref/ruby/files/lib/ruby-vpi_rb.html +7 -1
  190. data/ref/ruby/fr_method_index.html +34 -34
  191. data/samp/counter/counter_rspec_runner.rake +4 -0
  192. data/samp/counter/counter_xunit_runner.rake +4 -0
  193. data/samp/pipelined_alu/Hw5UnitModel.rb +3 -19
  194. data/samp/pipelined_alu/README +38 -13
  195. data/samp/pipelined_alu/TestHw5UnitModel.rb +9 -20
  196. data/samp/pipelined_alu/hw5_unit.v +1 -16
  197. data/samp/pipelined_alu/hw5_unit_test_runner.rake +4 -0
  198. data/samp/pipelined_alu/hw5_unit_test_spec.rb +3 -20
  199. data/samp/pipelined_alu/int_gen.rb +6 -20
  200. metadata +47 -43
  201. data/doc/LICENSE +0 -397
  202. data/doc/images/feed-icon.LICENSE +0 -2
  203. data/doc/images/feed-icon.svg +0 -18
  204. data/ref/ruby/classes/Integer.src/M000020.html +0 -25
  205. data/ref/ruby/classes/Integer.src/M000021.html +0 -30
  206. data/ref/ruby/classes/String.src/M000025.html +0 -18
  207. data/ref/ruby/classes/Vpi/Handle.src/M000047.html +0 -24
  208. data/ref/ruby/classes/Vpi.src/M000033.html +0 -22
@@ -10,32 +10,32 @@
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/verilog_parser.rb, line 108</span>
14
- 108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verilog_to_ruby</span>
15
- 109: <span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 93</span>
14
+ 93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verilog_to_ruby</span>
15
+ 94: <span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
16
+ 95:
17
+ 96: <span class="ruby-comment cmt"># single-line comments</span>
18
+ 97: <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
+ 98:
20
+ 99: <span class="ruby-comment cmt"># multi-line comments</span>
21
+ 100: <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
+ 101:
23
+ 102: <span class="ruby-comment cmt"># preprocessor directives</span>
24
+ 103: <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
+ 104:
26
+ 105: <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
+ 106: <span class="ruby-node">&quot;#{$1.to_ruby_const_name} = #{$2}&quot;</span>
28
+ 107: <span class="ruby-keyword kw">end</span>
29
+ 108:
30
+ 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">''</span>
16
31
  110:
17
- 111: <span class="ruby-comment cmt"># single-line comments</span>
18
- 112: <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>
32
+ 111: <span class="ruby-comment cmt"># numbers</span>
33
+ 112: <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>
19
34
  113:
20
- 114: <span class="ruby-comment cmt"># multi-line comments</span>
21
- 115: <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>
35
+ 114: <span class="ruby-comment cmt"># ranges</span>
36
+ 115: <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>
22
37
  116:
23
- 117: <span class="ruby-comment cmt"># preprocessor directives</span>
24
- 118: <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
- 119:
26
- 120: <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
- 121: <span class="ruby-node">&quot;#{$1.to_ruby_const_name} = #{$2}&quot;</span>
28
- 122: <span class="ruby-keyword kw">end</span>
29
- 123:
30
- 124: <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
- 125:
32
- 126: <span class="ruby-comment cmt"># numbers</span>
33
- 127: <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
- 128:
35
- 129: <span class="ruby-comment cmt"># ranges</span>
36
- 130: <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
- 131:
38
- 132: <span class="ruby-identifier">content</span>
39
- 133: <span class="ruby-keyword kw">end</span></pre>
38
+ 117: <span class="ruby-identifier">content</span>
39
+ 118: <span class="ruby-keyword kw">end</span></pre>
40
40
  </body>
41
41
  </html>
@@ -5,32 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>to_f (String)</title>
8
+ <title>to_ruby_const_name (String)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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/float.rb, line 23</span>
14
- 23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span> <span class="ruby-identifier">aRadix</span> = <span class="ruby-value">10</span>
15
- 24: <span class="ruby-identifier">whole</span>, <span class="ruby-identifier">frac</span> = <span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>, <span class="ruby-value">2</span>)
16
- 25: <span class="ruby-identifier">whole</span> = <span class="ruby-identifier">whole</span>.<span class="ruby-identifier">to_i</span>(<span class="ruby-identifier">aRadix</span>).<span class="ruby-identifier">to_f</span>
17
- 26:
18
- 27: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">frac</span>
19
- 28: <span class="ruby-identifier">f</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
20
- 29:
21
- 30: <span class="ruby-identifier">frac</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
22
- 31: <span class="ruby-identifier">power</span> = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">next</span>
23
- 32: <span class="ruby-identifier">weight</span> = <span class="ruby-identifier">aRadix</span> <span class="ruby-operator">**</span> <span class="ruby-operator">-</span><span class="ruby-identifier">power</span>
24
- 33: <span class="ruby-identifier">digit</span> = <span class="ruby-identifier">frac</span>[<span class="ruby-identifier">i</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">to_i</span>(<span class="ruby-identifier">aRadix</span>)
25
- 34:
26
- 35: <span class="ruby-identifier">f</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">digit</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">weight</span>
27
- 36: <span class="ruby-keyword kw">end</span>
28
- 37:
29
- 38: <span class="ruby-identifier">f</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">f</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^-/</span>
30
- 39: <span class="ruby-identifier">whole</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">f</span>
31
- 40: <span class="ruby-keyword kw">end</span>
32
- 41:
33
- 42: <span class="ruby-identifier">whole</span>
34
- 43: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 121</span>
14
+ 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ruby_const_name</span>
15
+ 122: <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
+ 123: <span class="ruby-keyword kw">end</span></pre>
35
17
  </body>
36
18
  </html>
@@ -10,10 +10,10 @@
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/verilog_parser.rb, line 75</span>
14
- 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
- 76: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
- 77: <span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@value</span> = <span class="ruby-ivar">@decl</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'='</span>).<span class="ruby-identifier">map!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">strip</span>}
17
- 78: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 59</span>
14
+ 59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
+ 60: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
+ 61: <span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@value</span> = <span class="ruby-ivar">@decl</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'='</span>).<span class="ruby-identifier">map!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">strip</span>}
17
+ 62: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>
@@ -10,12 +10,12 @@
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/verilog_parser.rb, line 84</span>
14
- 84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
- 85: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
- 86:
17
- 87: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(\[.*?\])?\s*(\w+)$/</span>
18
- 88: <span class="ruby-ivar">@size</span>, <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span>
19
- 89: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 68</span>
14
+ 68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
+ 69: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
+ 70:
17
+ 71: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(\[.*?\])?\s*(\w+)$/</span>
18
+ 72: <span class="ruby-ivar">@size</span>, <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span>
19
+ 73: <span class="ruby-keyword kw">end</span></pre>
20
20
  </body>
21
21
  </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/verilog_parser.rb, line 91</span>
14
- 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">input?</span>
15
- 92: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\binput\b/</span>
16
- 93: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 75</span>
14
+ 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">input?</span>
15
+ 76: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\binput\b/</span>
16
+ 77: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </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/verilog_parser.rb, line 95</span>
14
- 95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output?</span>
15
- 96: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\boutput\b/</span>
16
- 97: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 79</span>
14
+ 79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output?</span>
15
+ 80: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\boutput\b/</span>
16
+ 81: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </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/verilog_parser.rb, line 99</span>
14
- 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reg?</span>
15
- 100: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\breg\b/</span>
16
- 101: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 83</span>
14
+ 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reg?</span>
15
+ 84: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\breg\b/</span>
16
+ 85: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,25 +10,25 @@
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/verilog_parser.rb, line 52</span>
14
- 52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
- 53: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
- 54:
17
- 55: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{module\s+(\w+)\s*(?:\#\((.*?)\))?\s*\((.*?)\)\s*;}</span><span class="ruby-identifier">m</span>
18
- 56: <span class="ruby-ivar">@name</span>, <span class="ruby-identifier">paramDecls</span>, <span class="ruby-identifier">portDecls</span> = <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span>, <span class="ruby-identifier">$3</span>
19
- 57:
20
- 58: <span class="ruby-ivar">@parameters</span> =
21
- 59: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">paramDecls</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{\bparameter\b(.*)$}</span>
22
- 60: <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">decl</span><span class="ruby-operator">|</span>
23
- 61: <span class="ruby-constant">Parameter</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
24
- 62: <span class="ruby-keyword kw">end</span>
25
- 63: <span class="ruby-keyword kw">else</span>
26
- 64: []
27
- 65: <span class="ruby-keyword kw">end</span>
28
- 66:
29
- 67: <span class="ruby-ivar">@ports</span> = <span class="ruby-identifier">portDecls</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">decl</span><span class="ruby-operator">|</span>
30
- 68: <span class="ruby-constant">Port</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
31
- 69: <span class="ruby-keyword kw">end</span>
32
- 70: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 36</span>
14
+ 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
+ 37: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
+ 38:
17
+ 39: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{module\s+(\w+)\s*(?:\#\((.*?)\))?\s*\((.*?)\)\s*;}</span><span class="ruby-identifier">m</span>
18
+ 40: <span class="ruby-ivar">@name</span>, <span class="ruby-identifier">paramDecls</span>, <span class="ruby-identifier">portDecls</span> = <span class="ruby-identifier">$1</span>, <span class="ruby-identifier">$2</span>, <span class="ruby-identifier">$3</span>
19
+ 41:
20
+ 42: <span class="ruby-ivar">@parameters</span> =
21
+ 43: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">paramDecls</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{\bparameter\b(.*)$}</span>
22
+ 44: <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">decl</span><span class="ruby-operator">|</span>
23
+ 45: <span class="ruby-constant">Parameter</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
24
+ 46: <span class="ruby-keyword kw">end</span>
25
+ 47: <span class="ruby-keyword kw">else</span>
26
+ 48: []
27
+ 49: <span class="ruby-keyword kw">end</span>
28
+ 50:
29
+ 51: <span class="ruby-ivar">@ports</span> = <span class="ruby-identifier">portDecls</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">decl</span><span class="ruby-operator">|</span>
30
+ 52: <span class="ruby-constant">Port</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
31
+ 53: <span class="ruby-keyword kw">end</span>
32
+ 54: <span class="ruby-keyword kw">end</span></pre>
33
33
  </body>
34
34
  </html>
@@ -78,6 +78,12 @@
78
78
 
79
79
  <div id="contextContent">
80
80
 
81
+ <div id="description">
82
+ <p>
83
+ A library for parsing Verilog source code.
84
+ </p>
85
+
86
+ </div>
81
87
 
82
88
 
83
89
  </div>
@@ -10,25 +10,25 @@
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/verilog_parser.rb, line 26</span>
14
- 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aInput</span>
15
- 27: <span class="ruby-identifier">input</span> = <span class="ruby-identifier">aInput</span>.<span class="ruby-identifier">dup</span>
16
- 28:
17
- 29: <span class="ruby-comment cmt"># strip comments</span>
18
- 30: <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{//.*$}</span>, <span class="ruby-value str">''</span>
19
- 31: <span class="ruby-identifier">input</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">''</span>
20
- 32:
21
- 33: <span class="ruby-ivar">@modules</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{module.*?;}</span><span class="ruby-identifier">m</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">decl</span><span class="ruby-operator">|</span>
22
- 34: <span class="ruby-constant">Module</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
23
- 35: <span class="ruby-keyword kw">end</span>
24
- 36:
25
- 37: <span class="ruby-ivar">@constants</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{(`define\s+(\w+)\s+(.+))}</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">matches</span><span class="ruby-operator">|</span>
26
- 38: <span class="ruby-constant">Constant</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">matches</span>)
27
- 39: <span class="ruby-keyword kw">end</span>
28
- 40:
29
- 41: <span class="ruby-ivar">@includes</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{(`include\s*(\S+))}</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">matches</span><span class="ruby-operator">|</span>
30
- 42: <span class="ruby-constant">Include</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">matches</span>)
31
- 43: <span class="ruby-keyword kw">end</span>
32
- 44: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 10</span>
14
+ 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aInput</span>
15
+ 11: <span class="ruby-identifier">input</span> = <span class="ruby-identifier">aInput</span>.<span class="ruby-identifier">dup</span>
16
+ 12:
17
+ 13: <span class="ruby-comment cmt"># strip comments</span>
18
+ 14: <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{//.*$}</span>, <span class="ruby-value str">''</span>
19
+ 15: <span class="ruby-identifier">input</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">''</span>
20
+ 16:
21
+ 17: <span class="ruby-ivar">@modules</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{module.*?;}</span><span class="ruby-identifier">m</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">decl</span><span class="ruby-operator">|</span>
22
+ 18: <span class="ruby-constant">Module</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
23
+ 19: <span class="ruby-keyword kw">end</span>
24
+ 20:
25
+ 21: <span class="ruby-ivar">@constants</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{(`define\s+(\w+)\s+(.+))}</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">matches</span><span class="ruby-operator">|</span>
26
+ 22: <span class="ruby-constant">Constant</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">matches</span>)
27
+ 23: <span class="ruby-keyword kw">end</span>
28
+ 24:
29
+ 25: <span class="ruby-ivar">@includes</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">%r{(`include\s*(\S+))}</span>).<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">matches</span><span class="ruby-operator">|</span>
30
+ 26: <span class="ruby-constant">Include</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">matches</span>)
31
+ 27: <span class="ruby-keyword kw">end</span>
32
+ 28: <span class="ruby-keyword kw">end</span></pre>
33
33
  </body>
34
34
  </html>