ruby-vpi 11.1.1 → 12.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/bin/generate_test.rb +12 -11
  2. data/bin/generate_test_tpl/bench.rb +0 -4
  3. data/bin/generate_test_tpl/bench.v +3 -6
  4. data/bin/generate_test_tpl/runner.rake +20 -4
  5. data/bin/generate_test_tpl/spec.rb +5 -7
  6. data/doc/common.css +110 -95
  7. data/doc/common.tpl +16 -17
  8. data/doc/history.html +350 -330
  9. data/doc/history.yml +49 -0
  10. data/doc/intro.inc +18 -4
  11. data/doc/lib/doc_proxy.rb +22 -32
  12. data/doc/manual.erb +90 -83
  13. data/doc/manual.html +298 -266
  14. data/doc/memo.html +31 -10
  15. data/doc/readme.html +26 -6
  16. data/ext/relay.c +24 -28
  17. data/ext/vlog.c +4 -15
  18. data/lib/ruby-vpi/rspec.rb +1 -1
  19. data/lib/ruby-vpi/runner.rb +12 -10
  20. data/lib/ruby-vpi/runner_proxy.rb +17 -6
  21. data/lib/ruby-vpi/verilog_parser.rb +11 -7
  22. data/lib/ruby-vpi/vpi.rb +11 -1
  23. data/lib/ruby-vpi.rb +4 -0
  24. data/ref/c/annotated.html +2 -2
  25. data/ref/c/common_8h.html +1 -1
  26. data/ref/c/files.html +1 -1
  27. data/ref/c/functions.html +1 -1
  28. data/ref/c/functions_vars.html +1 -1
  29. data/ref/c/globals.html +1 -1
  30. data/ref/c/globals_0x63.html +1 -1
  31. data/ref/c/globals_0x65.html +1 -1
  32. data/ref/c/globals_0x66.html +1 -1
  33. data/ref/c/globals_0x70.html +1 -1
  34. data/ref/c/globals_0x72.html +1 -1
  35. data/ref/c/globals_0x73.html +1 -1
  36. data/ref/c/globals_0x74.html +1 -1
  37. data/ref/c/globals_0x76.html +2 -2
  38. data/ref/c/globals_0x78.html +1 -1
  39. data/ref/c/globals_defs.html +1 -1
  40. data/ref/c/globals_defs_0x65.html +1 -1
  41. data/ref/c/globals_defs_0x70.html +1 -1
  42. data/ref/c/globals_defs_0x76.html +2 -2
  43. data/ref/c/globals_defs_0x78.html +1 -1
  44. data/ref/c/globals_enum.html +1 -1
  45. data/ref/c/globals_eval.html +1 -1
  46. data/ref/c/globals_func.html +2 -2
  47. data/ref/c/globals_type.html +1 -1
  48. data/ref/c/globals_vars.html +1 -1
  49. data/ref/c/index.html +1 -1
  50. data/ref/c/relay_8c.html +2 -1
  51. data/ref/c/relay_8h.html +1 -1
  52. data/ref/c/structrelay____RubyOptions____def.html +8 -2
  53. data/ref/c/structt__cb__data.html +1 -1
  54. data/ref/c/structt__vpi__delay.html +1 -1
  55. data/ref/c/structt__vpi__error__info.html +1 -1
  56. data/ref/c/structt__vpi__strengthval.html +1 -1
  57. data/ref/c/structt__vpi__systf__data.html +1 -1
  58. data/ref/c/structt__vpi__time.html +1 -1
  59. data/ref/c/structt__vpi__value.html +1 -1
  60. data/ref/c/structt__vpi__vecval.html +1 -1
  61. data/ref/c/structt__vpi__vlog__info.html +1 -1
  62. data/ref/c/swig_8c.html +1 -1
  63. data/ref/c/swig_8h.html +1 -1
  64. data/ref/c/verilog_8h.html +1 -1
  65. data/ref/c/vlog_8c.html +15 -15
  66. data/ref/c/vlog_8h.html +1 -1
  67. data/ref/c/vpi__user_8h.html +1 -1
  68. data/ref/ruby/classes/OutputInfo.html +1 -1
  69. data/ref/ruby/classes/OutputInfo.src/M000030.html +30 -30
  70. data/ref/ruby/classes/RDoc.html +5 -5
  71. data/ref/ruby/classes/RDoc.src/{M000097.html → M000099.html} +0 -0
  72. data/ref/ruby/classes/RubyVpi.src/M000085.html +43 -39
  73. data/ref/ruby/classes/String.src/M000033.html +26 -26
  74. data/ref/ruby/classes/String.src/M000034.html +4 -4
  75. data/ref/ruby/classes/Template.src/M000032.html +4 -4
  76. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000011.html +5 -5
  77. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +7 -7
  78. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +4 -4
  79. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000009.html +4 -4
  80. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000010.html +4 -4
  81. data/ref/ruby/classes/VerilogParser/Module.src/M000006.html +15 -11
  82. data/ref/ruby/classes/Vpi/Handle/Property.html +5 -5
  83. data/ref/ruby/classes/Vpi/Handle/Property.src/{M000096.html → M000098.html} +61 -61
  84. data/ref/ruby/classes/Vpi/Handle.html +78 -43
  85. data/ref/ruby/classes/Vpi/Handle.src/M000088.html +3 -3
  86. data/ref/ruby/classes/Vpi/Handle.src/M000089.html +4 -8
  87. data/ref/ruby/classes/Vpi/Handle.src/M000090.html +5 -31
  88. data/ref/ruby/classes/Vpi/Handle.src/M000091.html +9 -74
  89. data/ref/ruby/classes/Vpi/Handle.src/M000092.html +31 -17
  90. data/ref/ruby/classes/Vpi/Handle.src/M000093.html +74 -11
  91. data/ref/ruby/classes/Vpi/Handle.src/M000094.html +30 -0
  92. data/ref/ruby/classes/Vpi/Handle.src/M000095.html +11 -55
  93. data/ref/ruby/classes/Vpi/Handle.src/M000097.html +68 -0
  94. data/ref/ruby/created.rid +1 -1
  95. data/ref/ruby/files/bin/generate_test_rb.html +8 -11
  96. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +4 -4
  97. data/ref/ruby/files/bin/generate_test_rb.src/M000002.html +22 -24
  98. data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
  99. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
  100. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
  101. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
  102. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  103. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +2 -2
  104. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000003.html +10 -10
  105. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000004.html +12 -12
  106. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
  107. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  108. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -1
  109. data/ref/ruby/fr_method_index.html +20 -18
  110. data/samp/counter/counter_rspec_bench.v +3 -6
  111. data/samp/counter/counter_rspec_design.rb +2 -1
  112. data/samp/counter/counter_rspec_runner.rake +20 -4
  113. data/samp/counter/counter_rspec_spec.rb +4 -4
  114. data/samp/counter/counter_xunit_bench.v +3 -6
  115. data/samp/counter/counter_xunit_design.rb +2 -1
  116. data/samp/counter/counter_xunit_runner.rake +20 -4
  117. data/samp/pipelined_alu/hw5_unit_test_bench.v +3 -6
  118. data/samp/pipelined_alu/hw5_unit_test_runner.rake +20 -4
  119. metadata +21 -20
  120. data/doc/manual.rb +0 -5
@@ -33,46 +33,50 @@
33
33
  48: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:rSpec</span>
34
34
  49: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">concat</span> <span class="ruby-node">%w[-f s]</span>
35
35
  50: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rspec'</span>
36
- 51: <span class="ruby-keyword kw">end</span>
37
- 52:
38
- 53: <span class="ruby-comment cmt"># service the $ruby_init() task</span>
39
- 54: <span class="ruby-identifier">relay_verilog</span>
40
- 55:
41
- 56: <span class="ruby-comment cmt"># set up code coverage analysis</span>
42
- 57: <span class="ruby-keyword kw">unless</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>
43
- 58: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rcov'</span>
36
+ 51:
37
+ 52: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:tSpec</span>
38
+ 53: <span class="ruby-constant">ARGV</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-rs'</span>
39
+ 54: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/spec'</span>
40
+ 55: <span class="ruby-keyword kw">end</span>
41
+ 56:
42
+ 57: <span class="ruby-comment cmt"># service the $ruby_init() task</span>
43
+ 58: <span class="ruby-identifier">relay_verilog</span>
44
44
  59:
45
- 60: <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>
46
- 61: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">dump_coverage_info</span> [
47
- 62: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">TextReport</span>.<span class="ruby-identifier">new</span>,
48
- 63: <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>)
49
- 64: ]
50
- 65: <span class="ruby-keyword kw">end</span>
51
- 66: <span class="ruby-keyword kw">end</span>
52
- 67:
53
- 68: <span class="ruby-comment cmt"># load the design under test</span>
54
- 69: <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>)
55
- 70: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Verilog bench for test #{testName.inspect} is inaccessible.&quot;</span>
56
- 71: <span class="ruby-keyword kw">end</span>
57
- 72:
58
- 73: <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>)
59
- 74: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_design.rb&quot;</span>
60
- 75:
61
- 76: <span class="ruby-comment cmt"># load the design's prototype</span>
62
- 77: <span class="ruby-keyword kw">unless</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>
63
- 78: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_proto.rb&quot;</span>
45
+ 60: <span class="ruby-comment cmt"># set up code coverage analysis</span>
46
+ 61: <span class="ruby-keyword kw">unless</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>
47
+ 62: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rcov'</span>
48
+ 63:
49
+ 64: <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>
50
+ 65: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">dump_coverage_info</span> [
51
+ 66: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">TextReport</span>.<span class="ruby-identifier">new</span>,
52
+ 67: <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>)
53
+ 68: ]
54
+ 69: <span class="ruby-keyword kw">end</span>
55
+ 70: <span class="ruby-keyword kw">end</span>
56
+ 71:
57
+ 72: <span class="ruby-comment cmt"># load the design under test</span>
58
+ 73: <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>)
59
+ 74: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Verilog bench for test #{testName.inspect} is inaccessible.&quot;</span>
60
+ 75: <span class="ruby-keyword kw">end</span>
61
+ 76:
62
+ 77: <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>)
63
+ 78: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_design.rb&quot;</span>
64
64
  79:
65
- 80: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
66
- 81: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:relay_verilog</span> <span class="ruby-keyword kw">do</span>
67
- 82: <span class="ruby-identifier">design</span>.<span class="ruby-identifier">simulate!</span>
68
- 83: <span class="ruby-keyword kw">end</span>
69
- 84: <span class="ruby-keyword kw">end</span>
70
- 85:
71
- 86: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: prototype has been enabled for test #{testName.inspect}&quot;</span>
72
- 87: <span class="ruby-keyword kw">end</span>
73
- 88:
74
- 89: <span class="ruby-comment cmt"># load the design's specification</span>
75
- 90: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_spec.rb&quot;</span>
76
- 91: <span class="ruby-keyword kw">end</span></pre>
65
+ 80: <span class="ruby-comment cmt"># load the design's prototype</span>
66
+ 81: <span class="ruby-keyword kw">unless</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>
67
+ 82: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_proto.rb&quot;</span>
68
+ 83:
69
+ 84: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
70
+ 85: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:relay_verilog</span> <span class="ruby-keyword kw">do</span>
71
+ 86: <span class="ruby-identifier">design</span>.<span class="ruby-identifier">simulate!</span>
72
+ 87: <span class="ruby-keyword kw">end</span>
73
+ 88: <span class="ruby-keyword kw">end</span>
74
+ 89:
75
+ 90: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: prototype has been enabled for test #{testName.inspect}&quot;</span>
76
+ 91: <span class="ruby-keyword kw">end</span>
77
+ 92:
78
+ 93: <span class="ruby-comment cmt"># load the design's specification</span>
79
+ 94: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_spec.rb&quot;</span>
80
+ 95: <span class="ruby-keyword kw">end</span></pre>
77
81
  </body>
78
82
  </html>
@@ -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 104</span>
14
- 104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verilog_to_ruby</span>
15
- 105: <span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
16
- 106:
17
- 107: <span class="ruby-comment cmt"># single-line comments</span>
18
- 108: <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
- 109:
20
- 110: <span class="ruby-comment cmt"># multi-line comments</span>
21
- 111: <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
- 112:
23
- 113: <span class="ruby-comment cmt"># preprocessor directives</span>
24
- 114: <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
- 115:
26
- 116: <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
- 117: <span class="ruby-node">&quot;#{$1.to_ruby_const_name} = #{$2}&quot;</span>
28
- 118: <span class="ruby-keyword kw">end</span>
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>
16
+ 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>
19
+ 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>
22
+ 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>
29
25
  119:
30
- 120: <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
- 121:
32
- 122: <span class="ruby-comment cmt"># numbers</span>
33
- 123: <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
- 124:
35
- 125: <span class="ruby-comment cmt"># ranges</span>
36
- 126: <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
- 127:
38
- 128: <span class="ruby-identifier">content</span>
39
- 129: <span class="ruby-keyword kw">end</span></pre>
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>
40
40
  </body>
41
41
  </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 132</span>
14
- 132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ruby_const_name</span>
15
- 133: <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
- 134: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 136</span>
14
+ 136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ruby_const_name</span>
15
+ 137: <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
+ 138: <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 bin/generate_test.rb, line 81</span>
14
- 81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aName</span>
15
- 82: <span class="ruby-keyword kw">super</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">TEMPLATE_PATH</span>, <span class="ruby-identifier">aName</span>))
16
- 83: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File bin/generate_test.rb, line 78</span>
14
+ 78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aName</span>
15
+ 79: <span class="ruby-keyword kw">super</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">TEMPLATE_PATH</span>, <span class="ruby-identifier">aName</span>))
16
+ 80: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
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 71</span>
14
- 71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
- 72: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
- 73: <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
- 74: <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">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>
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 80</span>
14
- 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
- 81: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
- 82:
17
- 83: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(\[.*?\])?\s*(\w+)$/</span>
18
- 84: <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
- 85: <span class="ruby-keyword kw">end</span></pre>
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>
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 87</span>
14
- 87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">input?</span>
15
- 88: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\binput\b/</span>
16
- 89: <span class="ruby-keyword kw">end</span></pre>
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>
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 91</span>
14
- 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output?</span>
15
- 92: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\boutput\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 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>
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">reg?</span>
15
- 96: <span class="ruby-ivar">@decl</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\breg\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 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>
17
17
  </body>
18
18
  </html>
@@ -14,17 +14,21 @@
14
14
  52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aDecl</span>
15
15
  53: <span class="ruby-ivar">@decl</span> = <span class="ruby-identifier">aDecl</span>.<span class="ruby-identifier">strip</span>
16
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">$3</span> <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">$4</span>
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
19
  57:
20
- 58: <span class="ruby-identifier">paramDecls</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{\bparameter\b(.*)$}</span>
21
- 59: <span class="ruby-ivar">@parameters</span> = <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>
22
- 60: <span class="ruby-constant">Parameter</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
23
- 61: <span class="ruby-keyword kw">end</span>
24
- 62:
25
- 63: <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>
26
- 64: <span class="ruby-constant">Port</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">decl</span>
27
- 65: <span class="ruby-keyword kw">end</span>
28
- 66: <span class="ruby-keyword kw">end</span></pre>
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>
29
33
  </body>
30
34
  </html>
@@ -76,7 +76,7 @@
76
76
  <h3 class="section-bar">Methods</h3>
77
77
 
78
78
  <div class="name-list">
79
- <a href="#M000096">resolve</a>&nbsp;&nbsp;
79
+ <a href="#M000098">resolve</a>&nbsp;&nbsp;
80
80
  </div>
81
81
  </div>
82
82
 
@@ -98,12 +98,12 @@
98
98
  <div id="methods">
99
99
  <h3 class="section-bar">Public Class methods</h3>
100
100
 
101
- <div id="method-M000096" class="method-detail">
102
- <a name="M000096"></a>
101
+ <div id="method-M000098" class="method-detail">
102
+ <a name="M000098"></a>
103
103
 
104
104
  <div class="method-heading">
105
- <a href="Property.src/M000096.html" target="Code" class="method-signature"
106
- onclick="popupCode('Property.src/M000096.html');return false;">
105
+ <a href="Property.src/M000098.html" target="Code" class="method-signature"
106
+ onclick="popupCode('Property.src/M000098.html');return false;">
107
107
  <span class="method-name">resolve</span><span class="method-args">(aName)</span>
108
108
  </a>
109
109
  </div>
@@ -10,71 +10,71 @@
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.rb, line 270</span>
14
- 270: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Property</span>.<span class="ruby-identifier">resolve</span> <span class="ruby-identifier">aName</span>
15
- 271: <span class="ruby-comment cmt"># parse the given property name</span>
16
- 272: <span class="ruby-identifier">tokens</span> = <span class="ruby-identifier">aName</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/_/</span>)
17
- 273:
18
- 274:
19
- 275: <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/[\?!=]$/</span>, <span class="ruby-value str">''</span>)
20
- 276:
21
- 277: <span class="ruby-identifier">addendum</span> = <span class="ruby-identifier">$&amp;</span>
22
- 278: <span class="ruby-identifier">isAssign</span> = <span class="ruby-identifier">$&amp;</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'='</span>
23
- 279: <span class="ruby-identifier">isQuery</span> = <span class="ruby-identifier">$&amp;</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'?'</span>
24
- 280:
25
- 281:
26
- 282: <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[a-z]$/</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">pop</span>
27
- 283: <span class="ruby-identifier">accessor</span> = <span class="ruby-identifier">$&amp;</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 280</span>
14
+ 280: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Property</span>.<span class="ruby-identifier">resolve</span> <span class="ruby-identifier">aName</span>
15
+ 281: <span class="ruby-comment cmt"># parse the given property name</span>
16
+ 282: <span class="ruby-identifier">tokens</span> = <span class="ruby-identifier">aName</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/_/</span>)
17
+ 283:
28
18
  284:
29
- 285: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">pop</span>
19
+ 285: <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/[\?!=]$/</span>, <span class="ruby-value str">''</span>)
30
20
  286:
31
- 287: <span class="ruby-identifier">operation</span> =
32
- 288: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">empty?</span>
33
- 289: <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'_'</span>) <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">addendum</span> <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>)
34
- 290: <span class="ruby-keyword kw">end</span>
21
+ 287: <span class="ruby-identifier">addendum</span> = <span class="ruby-identifier">$&amp;</span>
22
+ 288: <span class="ruby-identifier">isAssign</span> = <span class="ruby-identifier">$&amp;</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'='</span>
23
+ 289: <span class="ruby-identifier">isQuery</span> = <span class="ruby-identifier">$&amp;</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'?'</span>
24
+ 290:
35
25
  291:
36
- 292: <span class="ruby-comment cmt"># determine the VPI integer type for the property</span>
37
- 293: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</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">name</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
38
- 294: <span class="ruby-identifier">name</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">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[Vv]pi/</span>
39
- 295:
40
- 296: <span class="ruby-keyword kw">begin</span>
41
- 297: <span class="ruby-identifier">type</span> = <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">name</span>)
42
- 298: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NameError</span>
43
- 299: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;#{name.inspect} is not a valid VPI property&quot;</span>
44
- 300: <span class="ruby-keyword kw">end</span>
26
+ 292: <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[a-z]$/</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">pop</span>
27
+ 293: <span class="ruby-identifier">accessor</span> = <span class="ruby-identifier">$&amp;</span>
28
+ 294:
29
+ 295: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">pop</span>
30
+ 296:
31
+ 297: <span class="ruby-identifier">operation</span> =
32
+ 298: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">empty?</span>
33
+ 299: <span class="ruby-identifier">tokens</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'_'</span>) <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">addendum</span> <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>)
34
+ 300: <span class="ruby-keyword kw">end</span>
45
35
  301:
46
- 302: <span class="ruby-identifier">accessor</span> =
47
- 303: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">accessor</span>
48
- 304: <span class="ruby-identifier">accessor</span>.<span class="ruby-identifier">to_sym</span>
36
+ 302: <span class="ruby-comment cmt"># determine the VPI integer type for the property</span>
37
+ 303: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</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">name</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
38
+ 304: <span class="ruby-identifier">name</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">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[Vv]pi/</span>
49
39
  305:
50
- 306: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># infer accessor from VPI property name</span>
51
- 307: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span>
52
- 308: <span class="ruby-identifier">:b</span>
53
- 309:
54
- 310: <span class="ruby-keyword kw">else</span>
55
- 311: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">name</span>
56
- 312: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Time$/</span>
57
- 313: <span class="ruby-identifier">:d</span>
58
- 314:
59
- 315: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Val$/</span>
60
- 316: <span class="ruby-identifier">:l</span>
61
- 317:
62
- 318: <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>, <span class="ruby-regexp re">/LineNo$/</span>
63
- 319: <span class="ruby-identifier">:i</span>
64
- 320:
65
- 321: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Is[A-Z]/</span>, <span class="ruby-regexp re">/ed$/</span>
66
- 322: <span class="ruby-identifier">:b</span>
67
- 323:
68
- 324: <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>
69
- 325: <span class="ruby-identifier">:s</span>
70
- 326:
71
- 327: <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>
72
- 328: <span class="ruby-identifier">:h</span>
73
- 329: <span class="ruby-keyword kw">end</span>
74
- 330: <span class="ruby-keyword kw">end</span>
75
- 331: <span class="ruby-keyword kw">end</span>
76
- 332:
77
- 333: <span class="ruby-constant">Property</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">operation</span>, <span class="ruby-identifier">accessor</span>, <span class="ruby-identifier">isAssign</span>
78
- 334: <span class="ruby-keyword kw">end</span></pre>
40
+ 306: <span class="ruby-keyword kw">begin</span>
41
+ 307: <span class="ruby-identifier">type</span> = <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">name</span>)
42
+ 308: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NameError</span>
43
+ 309: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;#{name.inspect} is not a valid VPI property&quot;</span>
44
+ 310: <span class="ruby-keyword kw">end</span>
45
+ 311:
46
+ 312: <span class="ruby-identifier">accessor</span> =
47
+ 313: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">accessor</span>
48
+ 314: <span class="ruby-identifier">accessor</span>.<span class="ruby-identifier">to_sym</span>
49
+ 315:
50
+ 316: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># infer accessor from VPI property name</span>
51
+ 317: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span>
52
+ 318: <span class="ruby-identifier">:b</span>
53
+ 319:
54
+ 320: <span class="ruby-keyword kw">else</span>
55
+ 321: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">name</span>
56
+ 322: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Time$/</span>
57
+ 323: <span class="ruby-identifier">:d</span>
58
+ 324:
59
+ 325: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Val$/</span>
60
+ 326: <span class="ruby-identifier">:l</span>
61
+ 327:
62
+ 328: <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>, <span class="ruby-regexp re">/LineNo$/</span>
63
+ 329: <span class="ruby-identifier">:i</span>
64
+ 330:
65
+ 331: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Is[A-Z]/</span>, <span class="ruby-regexp re">/ed$/</span>
66
+ 332: <span class="ruby-identifier">:b</span>
67
+ 333:
68
+ 334: <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>
69
+ 335: <span class="ruby-identifier">:s</span>
70
+ 336:
71
+ 337: <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>
72
+ 338: <span class="ruby-identifier">:h</span>
73
+ 339: <span class="ruby-keyword kw">end</span>
74
+ 340: <span class="ruby-keyword kw">end</span>
75
+ 341: <span class="ruby-keyword kw">end</span>
76
+ 342:
77
+ 343: <span class="ruby-constant">Property</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">operation</span>, <span class="ruby-identifier">accessor</span>, <span class="ruby-identifier">isAssign</span>
78
+ 344: <span class="ruby-keyword kw">end</span></pre>
79
79
  </body>
80
80
  </html>