ruby-vpi 16.0.1 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. data/LICENSE +19 -19
  2. data/README +1 -1
  3. data/Rakefile +35 -32
  4. data/bin/convert.rb +28 -0
  5. data/bin/generate/design.rb +16 -0
  6. data/bin/generate/proto.rb +13 -0
  7. data/bin/generate/runner.rake +33 -0
  8. data/bin/generate/spec.rb +45 -0
  9. data/bin/generate.rb +177 -0
  10. data/bin/ruby-vpi +56 -0
  11. data/doc/Rakefile +20 -4
  12. data/doc/common.css +92 -33
  13. data/doc/common.inc +13 -0
  14. data/doc/common.tpl +42 -28
  15. data/doc/history.doc +11 -11
  16. data/doc/history.html +769 -248
  17. data/doc/history.inc +909 -0
  18. data/doc/history.rb +9 -0
  19. data/doc/history.yaml +69 -0
  20. data/doc/intro.inc +170 -178
  21. data/doc/lib/doc_format.rb +57 -144
  22. data/doc/lib/doc_proxy.rb +504 -88
  23. data/doc/lib/erb_content.rb +8 -8
  24. data/doc/lib/erb_proxy.rb +17 -17
  25. data/doc/manual.doc +626 -777
  26. data/doc/manual.html +1541 -1031
  27. data/doc/memo.doc +38 -36
  28. data/doc/memo.html +64 -28
  29. data/doc/readme.doc +4 -31
  30. data/doc/readme.html +221 -163
  31. data/doc/rss.erb +1 -1
  32. data/doc/rss.xml +73 -1761
  33. data/ext/Rakefile +6 -5
  34. data/ext/main.c +17 -15
  35. data/ext/relay.c +4 -7
  36. data/ext/relay.h +2 -2
  37. data/ext/swig_vpi.h +2 -2
  38. data/ext/swig_vpi.i +1 -2
  39. data/ext/swig_wrap.cin +12 -16
  40. data/ext/vlog.c +5 -5
  41. data/ext/vlog.h +2 -2
  42. data/lib/ruby-vpi/erb.rb +3 -3
  43. data/lib/ruby-vpi/float.rb +2 -2
  44. data/lib/ruby-vpi/rcov.rb +5 -7
  45. data/lib/ruby-vpi/runner.rb +43 -41
  46. data/lib/ruby-vpi/runner_boot_loader.rb +117 -0
  47. data/lib/ruby-vpi/runner_proxy.rb +6 -8
  48. data/lib/ruby-vpi/util.rb +10 -0
  49. data/lib/ruby-vpi/verilog_parser.rb +28 -56
  50. data/lib/ruby-vpi/vpi.rb +168 -123
  51. data/lib/ruby-vpi.rb +22 -143
  52. data/ref/c/annotated.html +1 -1
  53. data/ref/c/common_8h.html +1 -1
  54. data/ref/c/files.html +1 -1
  55. data/ref/c/functions.html +1 -1
  56. data/ref/c/functions_vars.html +1 -1
  57. data/ref/c/globals.html +1 -1
  58. data/ref/c/globals_0x63.html +1 -1
  59. data/ref/c/globals_0x65.html +1 -1
  60. data/ref/c/globals_0x66.html +1 -1
  61. data/ref/c/globals_0x6d.html +1 -1
  62. data/ref/c/globals_0x70.html +1 -1
  63. data/ref/c/globals_0x72.html +1 -1
  64. data/ref/c/globals_0x73.html +1 -1
  65. data/ref/c/globals_0x74.html +1 -1
  66. data/ref/c/globals_0x76.html +1 -1
  67. data/ref/c/globals_0x78.html +1 -1
  68. data/ref/c/globals_defs.html +1 -1
  69. data/ref/c/globals_defs_0x65.html +1 -1
  70. data/ref/c/globals_defs_0x70.html +1 -1
  71. data/ref/c/globals_defs_0x76.html +1 -1
  72. data/ref/c/globals_defs_0x78.html +1 -1
  73. data/ref/c/globals_enum.html +1 -1
  74. data/ref/c/globals_eval.html +1 -1
  75. data/ref/c/globals_func.html +1 -1
  76. data/ref/c/globals_type.html +1 -1
  77. data/ref/c/globals_vars.html +1 -1
  78. data/ref/c/index.html +1 -1
  79. data/ref/c/main_8c.html +1 -1
  80. data/ref/c/main_8h.html +1 -1
  81. data/ref/c/relay_8c.html +1 -1
  82. data/ref/c/relay_8h.html +1 -1
  83. data/ref/c/structt__cb__data.html +1 -1
  84. data/ref/c/structt__vpi__delay.html +1 -1
  85. data/ref/c/structt__vpi__error__info.html +1 -1
  86. data/ref/c/structt__vpi__strengthval.html +1 -1
  87. data/ref/c/structt__vpi__systf__data.html +1 -1
  88. data/ref/c/structt__vpi__time.html +1 -1
  89. data/ref/c/structt__vpi__value.html +1 -1
  90. data/ref/c/structt__vpi__vecval.html +1 -1
  91. data/ref/c/structt__vpi__vlog__info.html +1 -1
  92. data/ref/c/verilog_8h.html +1 -1
  93. data/ref/c/vlog_8c.html +1 -1
  94. data/ref/c/vlog_8h.html +1 -1
  95. data/ref/c/vpi__user_8h.html +1 -1
  96. data/ref/ruby/classes/ERB.html +5 -5
  97. data/ref/ruby/classes/ERB.src/{M000024.html → M000026.html} +0 -0
  98. data/ref/ruby/classes/FileUtils.html +11 -11
  99. data/ref/ruby/classes/FileUtils.src/{M000025.html → M000027.html} +0 -0
  100. data/ref/ruby/classes/FileUtils.src/{M000026.html → M000028.html} +0 -0
  101. data/ref/ruby/classes/Float.html +6 -6
  102. data/ref/ruby/classes/Float.src/{M000020.html → M000021.html} +0 -0
  103. data/ref/ruby/classes/Integer.html +65 -65
  104. data/ref/ruby/classes/Integer.src/M000009.html +12 -5
  105. data/ref/ruby/classes/Integer.src/M000010.html +5 -5
  106. data/ref/ruby/classes/Integer.src/M000011.html +5 -5
  107. data/ref/ruby/classes/Integer.src/M000012.html +5 -5
  108. data/ref/ruby/classes/Integer.src/M000013.html +5 -5
  109. data/ref/ruby/classes/Integer.src/M000014.html +18 -0
  110. data/ref/ruby/classes/Integer.src/M000017.html +12 -18
  111. data/ref/ruby/classes/Integer.src/M000018.html +18 -12
  112. data/ref/ruby/classes/Integer.src/M000019.html +12 -17
  113. data/ref/ruby/classes/Integer.src/M000020.html +30 -0
  114. data/ref/ruby/classes/RDoc.html +5 -5
  115. data/ref/ruby/classes/RDoc.src/{M000053.html → M000058.html} +0 -0
  116. data/ref/ruby/classes/{RubyVpi/Config.html → RubyVPI.html} +20 -6
  117. data/ref/ruby/classes/String.html +34 -15
  118. data/ref/ruby/classes/String.src/M000022.html +5 -28
  119. data/ref/ruby/classes/String.src/M000023.html +5 -5
  120. data/ref/ruby/classes/String.src/{M000021.html → M000024.html} +0 -0
  121. data/ref/ruby/classes/String.src/M000025.html +41 -0
  122. data/ref/ruby/classes/VerilogParser/Module/Port.html +16 -36
  123. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +10 -5
  124. data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000004.html → M000007.html} +4 -4
  125. data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000005.html → M000008.html} +4 -4
  126. data/ref/ruby/classes/VerilogParser/Module.html +28 -9
  127. data/ref/ruby/classes/VerilogParser/Module.src/M000005.html +29 -0
  128. data/ref/ruby/classes/VerilogParser.html +5 -39
  129. data/ref/ruby/classes/VerilogParser.src/M000004.html +26 -0
  130. data/ref/ruby/classes/Vpi/Handle.html +179 -77
  131. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +18 -0
  132. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -5
  133. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
  134. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -5
  135. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -5
  136. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +5 -8
  137. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +5 -8
  138. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +5 -9
  139. data/ref/ruby/classes/Vpi/Handle.src/M000043.html +8 -31
  140. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +8 -74
  141. data/ref/ruby/classes/Vpi/Handle.src/M000045.html +9 -17
  142. data/ref/ruby/classes/Vpi/Handle.src/M000046.html +31 -11
  143. data/ref/ruby/classes/Vpi/Handle.src/M000047.html +86 -0
  144. data/ref/ruby/classes/Vpi/Handle.src/M000048.html +17 -18
  145. data/ref/ruby/classes/Vpi/Handle.src/M000050.html +18 -0
  146. data/ref/ruby/classes/Vpi/Handle.src/M000051.html +24 -0
  147. data/ref/ruby/classes/Vpi/Handle.src/M000053.html +31 -0
  148. data/ref/ruby/classes/Vpi/Handle.src/M000054.html +89 -0
  149. data/ref/ruby/classes/Vpi/S_vpi_time.html +16 -16
  150. data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000050.html → M000055.html} +4 -4
  151. data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000051.html → M000056.html} +5 -5
  152. data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
  153. data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000035.html → M000032.html} +5 -5
  154. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +5 -5
  155. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
  156. data/ref/ruby/classes/Vpi.html +6 -42
  157. data/ref/ruby/classes/Vpi.src/M000029.html +15 -5
  158. data/ref/ruby/classes/Vpi.src/M000030.html +24 -24
  159. data/ref/ruby/classes/Vpi.src/M000031.html +6 -8
  160. data/ref/ruby/created.rid +1 -1
  161. data/ref/ruby/files/bin/{header_to_ruby_rb.html → convert_rb.html} +5 -5
  162. data/ref/ruby/files/bin/{generate_test_rb.html → generate_rb.html} +8 -21
  163. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
  164. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
  165. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
  166. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
  167. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
  168. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  169. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.html +197 -0
  170. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000001.html +17 -0
  171. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000002.html +18 -0
  172. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  173. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +6 -19
  174. data/ref/ruby/files/lib/ruby-vpi/util_rb.html +101 -0
  175. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +8 -1
  176. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  177. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -14
  178. data/ref/ruby/fr_class_index.html +1 -3
  179. data/ref/ruby/fr_file_index.html +4 -2
  180. data/ref/ruby/fr_method_index.html +56 -51
  181. data/ref/ruby/index.html +1 -1
  182. data/samp/counter/RSpec/Rakefile +1 -0
  183. data/samp/counter/RSpec/counter_design.rb +15 -0
  184. data/samp/counter/RSpec/counter_proto.rb +10 -0
  185. data/samp/counter/RSpec/counter_runner.rake +44 -0
  186. data/samp/counter/RSpec/counter_spec.rb +39 -0
  187. data/samp/counter/Rakefile +1 -1
  188. data/samp/counter/counter.v +7 -7
  189. data/samp/counter/xUnit/Rakefile +1 -0
  190. data/samp/counter/xUnit/counter_bench.rb +95 -0
  191. data/samp/counter/{counter_xunit_bench.v → xUnit/counter_bench.v} +0 -0
  192. data/samp/counter/xUnit/counter_design.rb +15 -0
  193. data/samp/counter/xUnit/counter_proto.rb +10 -0
  194. data/samp/counter/xUnit/counter_runner.rake +44 -0
  195. data/samp/counter/{counter_xunit_spec.rb → xUnit/counter_spec.rb} +9 -9
  196. data/samp/pipelined_alu/Rakefile +1 -1
  197. data/samp/pipelined_alu/TestHw5UnitModel.rb +4 -5
  198. data/samp/pipelined_alu/hw5_unit.v +55 -85
  199. data/samp/pipelined_alu/hw5_unit_design.rb +51 -0
  200. data/samp/pipelined_alu/hw5_unit_proto.rb +4 -0
  201. data/samp/pipelined_alu/hw5_unit_runner.rake +43 -0
  202. data/samp/pipelined_alu/hw5_unit_spec.rb +64 -0
  203. data/samp/register_file/LICENSE +20 -0
  204. data/samp/register_file/README +4 -0
  205. data/samp/register_file/Rakefile +1 -0
  206. data/samp/register_file/register_file.v +18 -0
  207. data/samp/register_file/register_file_design.rb +11 -0
  208. data/samp/register_file/register_file_proto.rb +11 -0
  209. data/samp/register_file/register_file_runner.rake +43 -0
  210. data/samp/register_file/register_file_spec.rb +58 -0
  211. metadata +78 -66
  212. data/bin/generate_test.rb +0 -200
  213. data/bin/generate_test_tpl/bench.rb +0 -89
  214. data/bin/generate_test_tpl/bench.v +0 -26
  215. data/bin/generate_test_tpl/design.rb +0 -11
  216. data/bin/generate_test_tpl/proto.rb +0 -16
  217. data/bin/generate_test_tpl/runner.rake +0 -42
  218. data/bin/generate_test_tpl/spec.rb +0 -37
  219. data/bin/header_to_ruby.rb +0 -27
  220. data/ref/ruby/classes/Integer.src/M000008.html +0 -25
  221. data/ref/ruby/classes/Integer.src/M000016.html +0 -25
  222. data/ref/ruby/classes/RubyVpi.html +0 -199
  223. data/ref/ruby/classes/RubyVpi.src/M000027.html +0 -121
  224. data/ref/ruby/classes/VerilogParser/Module/Parameter.html +0 -160
  225. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +0 -19
  226. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +0 -21
  227. data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +0 -34
  228. data/ref/ruby/classes/VerilogParser.src/M000001.html +0 -34
  229. data/ref/ruby/classes/Vpi/Handle.src/M000049.html +0 -69
  230. data/ref/ruby/classes/Vpi.src/M000028.html +0 -28
  231. data/ref/ruby/classes/Vpi.src/M000032.html +0 -22
  232. data/samp/counter/counter_rspec_bench.rb +0 -86
  233. data/samp/counter/counter_rspec_bench.v +0 -9
  234. data/samp/counter/counter_rspec_design.rb +0 -8
  235. data/samp/counter/counter_rspec_proto.rb +0 -13
  236. data/samp/counter/counter_rspec_runner.rake +0 -52
  237. data/samp/counter/counter_rspec_spec.rb +0 -39
  238. data/samp/counter/counter_xunit_bench.rb +0 -86
  239. data/samp/counter/counter_xunit_design.rb +0 -8
  240. data/samp/counter/counter_xunit_proto.rb +0 -13
  241. data/samp/counter/counter_xunit_runner.rake +0 -52
  242. data/samp/pipelined_alu/hw5_unit_test_bench.rb +0 -86
  243. data/samp/pipelined_alu/hw5_unit_test_bench.v +0 -14
  244. data/samp/pipelined_alu/hw5_unit_test_design.rb +0 -61
  245. data/samp/pipelined_alu/hw5_unit_test_proto.rb +0 -7
  246. data/samp/pipelined_alu/hw5_unit_test_runner.rake +0 -52
  247. data/samp/pipelined_alu/hw5_unit_test_spec.rb +0 -68
@@ -1,37 +0,0 @@
1
- # This file is a behavioral specification for the design under test.
2
-
3
- <%
4
- case aOutputInfo.specFormat
5
- when :xUnit
6
- %>
7
- class <%= aOutputInfo.specClassName %> < Test::Unit::TestCase
8
- def setup
9
- <%= aOutputInfo.designClassName %>.reset!
10
- end
11
- <% aModuleInfo.ports.each do |port| %>
12
-
13
- def test_<%= port.name %>
14
- # assert <%= aOutputInfo.designClassName %>.<%= port.name %> ..., "<%= port.name %> should ..."
15
- end
16
- <% end %>
17
- end
18
- <%
19
- when :rSpec, :tSpec
20
- %>
21
- context "A resetted <%= aOutputInfo.designClassName %>" do
22
- setup do
23
- <%= aOutputInfo.designClassName %>.reset!
24
- end
25
-
26
- specify "should ..." do
27
- # <%= aOutputInfo.designClassName %>.should ...
28
- end
29
- end
30
- <%
31
- else
32
- %>
33
- <%= aOutputInfo.designClassName %>.reset!
34
- # raise "should ..." unless <%= aOutputInfo.designClassName %> ...
35
- <%
36
- end
37
- %>
@@ -1,27 +0,0 @@
1
- # Transforms Verilog header files into Ruby.
2
- # * The standard input stream is read if no input files are specified.
3
- # * Output is written to the standard output stream.
4
- #--
5
- # Copyright 2006 Suraj N. Kurapati
6
- # See the file named LICENSE for details.
7
-
8
- if File.basename($0) == File.basename(__FILE__)
9
- # parse command-line options
10
- require 'optparse'
11
-
12
- opts = OptionParser.new
13
- opts.banner = "Usage: #{File.basename __FILE__} [options] [files]"
14
-
15
- opts.on '-h', '--help', 'show this help message' do
16
- require 'ruby-vpi/rdoc'
17
- RDoc.usage_from_file __FILE__
18
-
19
- puts opts
20
- exit
21
- end
22
-
23
- opts.parse! ARGV
24
-
25
- require 'ruby-vpi/verilog_parser'
26
- puts ARGF.read.verilog_to_ruby
27
- end
@@ -1,25 +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>log2 (Integer)</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/integer.rb, line 11</span>
14
- 11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log2</span>
15
- 12: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;integer must be positive&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
16
- 13: <span class="ruby-identifier">bin</span> = <span class="ruby-identifier">to_s</span>(<span class="ruby-value">2</span>)
17
- 14:
18
- 15: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bin</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^10+$/</span>
19
- 16: <span class="ruby-identifier">bin</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
20
- 17: <span class="ruby-keyword kw">else</span>
21
- 18: <span class="ruby-identifier">bin</span>.<span class="ruby-identifier">length</span>
22
- 19: <span class="ruby-keyword kw">end</span>
23
- 20: <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,25 +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>pack (Integer)</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/integer.rb, line 62</span>
14
- 62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pack</span> <span class="ruby-identifier">aPackedWidth</span>
15
- 63: <span class="ruby-identifier">bits</span> = <span class="ruby-identifier">length</span>
16
- 64: <span class="ruby-identifier">bits</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># positive integers also have a sign bit (zero)</span>
17
- 65:
18
- 66: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">aPackedWidth</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">bits</span>
19
- 67: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;packed width #{aPackedWidth} must be at least #{bits} for integer #{self}&quot;</span>
20
- 68: <span class="ruby-keyword kw">end</span>
21
- 69:
22
- 70: <span class="ruby-identifier">extend_sign</span>(<span class="ruby-identifier">bits</span>, <span class="ruby-identifier">aPackedWidth</span>)
23
- 71: <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,199 +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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: RubyVpi</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">RubyVpi</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/ruby-vpi_rb.html">
59
- lib/ruby-vpi.rb
60
- </a>
61
- <br />
62
- <a href="../files/lib/ruby-vpi/rcov_rb.html">
63
- lib/ruby-vpi/rcov.rb
64
- </a>
65
- <br />
66
- </td>
67
- </tr>
68
-
69
- </table>
70
- </div>
71
- <!-- banner header -->
72
-
73
- <div id="bodyContent">
74
-
75
-
76
-
77
- <div id="contextContent">
78
-
79
- <div id="description">
80
- <p>
81
- General Ruby-VPI project information and testbench bootstrapping.
82
- </p>
83
-
84
- </div>
85
-
86
-
87
- </div>
88
-
89
- <div id="method-list">
90
- <h3 class="section-bar">Methods</h3>
91
-
92
- <div class="name-list">
93
- <a href="#M000027">init_bench</a>&nbsp;&nbsp;
94
- </div>
95
- </div>
96
-
97
- </div>
98
-
99
-
100
- <!-- if includes -->
101
- <div id="includes">
102
- <h3 class="section-bar">Included Modules</h3>
103
-
104
- <div id="includes-list">
105
- <span class="include-name"><a href="Vpi.html">Vpi</a></span>
106
- </div>
107
- </div>
108
-
109
- <div id="section">
110
-
111
- <div id="class-list">
112
- <h3 class="section-bar">Classes and Modules</h3>
113
-
114
- Module <a href="RubyVpi/Config.html" class="link">RubyVpi::Config</a><br />
115
-
116
- </div>
117
-
118
- <div id="constants-list">
119
- <h3 class="section-bar">Constants</h3>
120
-
121
- <div class="name-list">
122
- <table summary="Constants">
123
- <tr class="top-aligned-row context-row">
124
- <td class="context-item-name">COVERAGE_ANALYSIS</td>
125
- <td>=</td>
126
- <td class="context-item-value">Rcov::CodeCoverageAnalyzer.new</td>
127
- </tr>
128
- <tr class="top-aligned-row context-row">
129
- <td class="context-item-name">COVERAGE_ANALYSIS_HANDLERS</td>
130
- <td>=</td>
131
- <td class="context-item-value">[]</td>
132
- </tr>
133
- </table>
134
- </div>
135
- </div>
136
-
137
-
138
-
139
-
140
-
141
-
142
- <!-- if method_list -->
143
- <div id="methods">
144
- <h3 class="section-bar">Public Class methods</h3>
145
-
146
- <div id="method-M000027" class="method-detail">
147
- <a name="M000027"></a>
148
-
149
- <div class="method-heading">
150
- <a href="RubyVpi.src/M000027.html" target="Code" class="method-signature"
151
- onclick="popupCode('RubyVpi.src/M000027.html');return false;">
152
- <span class="method-name">init_bench</span><span class="method-args">(aDesignId, aSpecFormat, &amp;aSimulationCycle)</span>
153
- </a>
154
- </div>
155
-
156
- <div class="method-description">
157
- <p>
158
- Initializes the bench by setting up code coverage, the interactive
159
- debugger, and so on:
160
- </p>
161
- <ol>
162
- <li>loads the design.rb file
163
-
164
- </li>
165
- <li>loads the proto.rb file if prototyping is enabled
166
-
167
- </li>
168
- <li>loads the spec.rb file
169
-
170
- </li>
171
- </ol>
172
- <table>
173
- <tr><td valign="top">aDesignId:</td><td>The name of the Ruby object which gives access to the design under test.
174
-
175
- </td></tr>
176
- <tr><td valign="top">aSpecFormat:</td><td>The name of the format being used by the specification.
177
-
178
- </td></tr>
179
- <tr><td valign="top">aSimulationCycle:</td><td>A block that simulates the design under test by, for example, toggling the
180
- clock signal.
181
-
182
- </td></tr>
183
- </table>
184
- </div>
185
- </div>
186
-
187
-
188
- </div>
189
-
190
-
191
- </div>
192
-
193
-
194
- <div id="validator-badges">
195
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
196
- </div>
197
-
198
- </body>
199
- </html>
@@ -1,121 +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>init_bench (RubyVpi)</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.rb, line 22</span>
14
- 22: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">init_bench</span> <span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">aSpecFormat</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aSimulationCycle</span>
15
- 23: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;block must be given&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
16
- 24:
17
- 25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">find</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-operator">=~</span> <span class="ruby-regexp re">/^(.*?)_bench.rb:/</span>}
18
- 26: <span class="ruby-identifier">testName</span> = <span class="ruby-identifier">$1</span>
19
- 27: <span class="ruby-keyword kw">else</span>
20
- 28: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Unable to determine name of test.'</span>
21
- 29: <span class="ruby-keyword kw">end</span>
22
- 30:
23
- 31: <span class="ruby-identifier">useDebugger</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'DEBUG'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
24
- 32: <span class="ruby-identifier">useCoverage</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'COVERAGE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
25
- 33: <span class="ruby-identifier">usePrototype</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PROTOTYPE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
26
- 34:
27
- 35: <span class="ruby-comment cmt"># set up code coverage analysis</span>
28
- 36: <span class="ruby-comment cmt"># XXX: this is loaded *before* RCov to prevent coverage statistics about</span>
29
- 37: <span class="ruby-comment cmt"># it</span>
30
- 38: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/vpi'</span>
31
- 39:
32
- 40: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useCoverage</span>
33
- 41: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rcov'</span>
34
- 42:
35
- 43: <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">with_coverage_analysis</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
36
- 44: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">dump_coverage_info</span> [
37
- 45: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">TextReport</span>.<span class="ruby-identifier">new</span>,
38
- 46: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">HTMLCoverage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:destdir</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{testName}_coverage&quot;</span>)
39
- 47: ]
40
- 48: <span class="ruby-keyword kw">end</span>
41
- 49:
42
- 50: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: coverage analysis is enabled for test #{testName.inspect}\n&quot;</span>
43
- 51: <span class="ruby-keyword kw">end</span>
44
- 52:
45
- 53: <span class="ruby-comment cmt"># set up the specification library</span>
46
- 54: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aSpecFormat</span>
47
- 55: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:xUnit</span>
48
- 56: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/unit'</span>
49
- 57:
50
- 58: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:rSpec</span>
51
- 59: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">concat</span> <span class="ruby-node">%w[-f s]</span>
52
- 60: <span class="ruby-identifier">require</span> <span class="ruby-value str">'spec'</span>
53
- 61:
54
- 62: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:tSpec</span>
55
- 63: <span class="ruby-constant">ARGV</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-rs'</span>
56
- 64: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/spec'</span>
57
- 65: <span class="ruby-keyword kw">end</span>
58
- 66:
59
- 67: <span class="ruby-comment cmt"># set up the interactive debugger</span>
60
- 68: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useDebugger</span>
61
- 69: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-debug'</span>
62
- 70:
63
- 71: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">start</span>
64
- 72: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">post_mortem</span>
65
- 73:
66
- 74: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: debugger is enabled for test #{testName.inspect}\n&quot;</span>
67
- 75: <span class="ruby-keyword kw">end</span>
68
- 76:
69
- 77: <span class="ruby-comment cmt"># suppress undefined method errors when debugger is not enabled</span>
70
- 78: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:debugger</span>
71
- 79: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
72
- 80: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:debugger</span> <span class="ruby-keyword kw">do</span>
73
- 81: <span class="ruby-comment cmt"># this is a dummy method!</span>
74
- 82: <span class="ruby-keyword kw">end</span>
75
- 83: <span class="ruby-keyword kw">end</span>
76
- 84: <span class="ruby-keyword kw">end</span>
77
- 85:
78
- 86: <span class="ruby-comment cmt"># set up the VPI utility layer</span>
79
- 87: <span class="ruby-constant">Object</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
80
- 88: <span class="ruby-identifier">include</span> <span class="ruby-constant">Vpi</span>
81
- 89: <span class="ruby-keyword kw">end</span>
82
- 90:
83
- 91: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
84
- 92: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:simulate</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aSimulationCycle</span>
85
- 93: <span class="ruby-keyword kw">end</span>
86
- 94:
87
- 95: <span class="ruby-comment cmt"># load the design under test</span>
88
- 96: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">design</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-node">&quot;#{testName}_bench&quot;</span>, <span class="ruby-keyword kw">nil</span>)
89
- 97: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Verilog bench for test #{testName.inspect} is inaccessible.&quot;</span>
90
- 98: <span class="ruby-keyword kw">end</span>
91
- 99:
92
- 100: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">design</span>)
93
- 101: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_design.rb&quot;</span>
94
- 102:
95
- 103: <span class="ruby-comment cmt"># load the design's prototype</span>
96
- 104: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">usePrototype</span>
97
- 105: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_proto.rb&quot;</span>
98
- 106:
99
- 107: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
100
- 108: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:advance_time</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
101
- 109: <span class="ruby-constant">Integer</span>(<span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">||</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">times</span> { <span class="ruby-identifier">design</span>.<span class="ruby-identifier">simulate!</span> }
102
- 110: <span class="ruby-keyword kw">end</span>
103
- 111:
104
- 112: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:vpi_register_cb</span> <span class="ruby-keyword kw">do</span>
105
- 113: <span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;vpi_register_cb: callbacks are ignored when prototype is enabled&quot;</span>
106
- 114: <span class="ruby-keyword kw">end</span>
107
- 115: <span class="ruby-keyword kw">end</span>
108
- 116:
109
- 117: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: prototype is enabled for test #{testName.inspect}\n&quot;</span>
110
- 118:
111
- 119: <span class="ruby-keyword kw">else</span>
112
- 120: <span class="ruby-comment cmt"># XXX: this completes the handshake, by calling relay_verilog, with</span>
113
- 121: <span class="ruby-comment cmt"># pthread_mutex_lock() in relay_main() in the C extension</span>
114
- 122: <span class="ruby-identifier">advance_time</span>
115
- 123: <span class="ruby-keyword kw">end</span>
116
- 124:
117
- 125: <span class="ruby-comment cmt"># load the design's specification</span>
118
- 126: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_spec.rb&quot;</span>
119
- 127: <span class="ruby-keyword kw">end</span></pre>
120
- </body>
121
- </html>
@@ -1,160 +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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: VerilogParser::Module::Parameter</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">VerilogParser::Module::Parameter</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/ruby-vpi/verilog_parser_rb.html">
59
- lib/ruby-vpi/verilog_parser.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000007">new</a>&nbsp;&nbsp;
90
- </div>
91
- </div>
92
-
93
- </div>
94
-
95
-
96
- <!-- if includes -->
97
-
98
- <div id="section">
99
-
100
-
101
-
102
-
103
-
104
- <div id="attribute-list">
105
- <h3 class="section-bar">Attributes</h3>
106
-
107
- <div class="name-list">
108
- <table>
109
- <tr class="top-aligned-row context-row">
110
- <td class="context-item-name">decl</td>
111
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
112
- <td class="context-item-desc"></td>
113
- </tr>
114
- <tr class="top-aligned-row context-row">
115
- <td class="context-item-name">name</td>
116
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
117
- <td class="context-item-desc"></td>
118
- </tr>
119
- <tr class="top-aligned-row context-row">
120
- <td class="context-item-name">value</td>
121
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
122
- <td class="context-item-desc"></td>
123
- </tr>
124
- </table>
125
- </div>
126
- </div>
127
-
128
-
129
-
130
- <!-- if method_list -->
131
- <div id="methods">
132
- <h3 class="section-bar">Public Class methods</h3>
133
-
134
- <div id="method-M000007" class="method-detail">
135
- <a name="M000007"></a>
136
-
137
- <div class="method-heading">
138
- <a href="Parameter.src/M000007.html" target="Code" class="method-signature"
139
- onclick="popupCode('Parameter.src/M000007.html');return false;">
140
- <span class="method-name">new</span><span class="method-args">(aDecl)</span>
141
- </a>
142
- </div>
143
-
144
- <div class="method-description">
145
- </div>
146
- </div>
147
-
148
-
149
- </div>
150
-
151
-
152
- </div>
153
-
154
-
155
- <div id="validator-badges">
156
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
157
- </div>
158
-
159
- </body>
160
- </html>
@@ -1,19 +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>new (VerilogParser::Module::Parameter)</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 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
- </body>
19
- </html>
@@ -1,21 +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>new (VerilogParser::Module::Port)</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 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
- </body>
21
- </html>