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
@@ -5,40 +5,83 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get_value (Vpi::Handle)</title>
8
+ <title>put_value (Vpi::Handle)</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/vpi.rb, line 110</span>
14
- 110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value</span> <span class="ruby-identifier">aFormat</span> = <span class="ruby-constant">VpiObjTypeVal</span>
15
- 111: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>))
16
- 112:
17
- 113: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
18
- 114: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>, <span class="ruby-constant">VpiStringVal</span>
19
- 115: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
20
- 116:
21
- 117: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
22
- 118: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
23
- 119:
24
- 120: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
25
- 121: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiHexStrVal</span>).<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_i</span>(<span class="ruby-value">16</span>)
26
- 122:
27
- 123: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
28
- 124: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
29
- 125:
30
- 126: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
31
- 127: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
32
- 128:
33
- 129: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
34
- 130: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
35
- 131:
36
- 132: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
37
- 133: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
38
- 134:
39
- 135: <span class="ruby-keyword kw">else</span>
40
- 136: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{val.format}&quot;</span>
41
- 137: <span class="ruby-keyword kw">end</span>
42
- 138: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 138</span>
14
+ 138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_value</span> <span class="ruby-identifier">aValue</span>, <span class="ruby-identifier">aFormat</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">aTime</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">aDelay</span> = <span class="ruby-constant">VpiNoDelay</span>
15
+ 139: <span class="ruby-identifier">aFormat</span> =
16
+ 140: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aFormat</span>
17
+ 141: <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>)
18
+ 142: <span class="ruby-keyword kw">else</span>
19
+ 143: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
20
+ 144: <span class="ruby-keyword kw">end</span>
21
+ 145:
22
+ 146: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
23
+ 147: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
24
+ 148:
25
+ 149: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
26
+ 150: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>, <span class="ruby-constant">VpiStringVal</span>
27
+ 151: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
28
+ 152:
29
+ 153: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
30
+ 154: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span> = <span class="ruby-identifier">aValue</span>
31
+ 155:
32
+ 156: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
33
+ 157: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
34
+ 158: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">16</span>)
35
+ 159:
36
+ 160: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
37
+ 161: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
38
+ 162:
39
+ 163: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
40
+ 164: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">aValue</span>
41
+ 165:
42
+ 166: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
43
+ 167: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span> = <span class="ruby-identifier">aValue</span>
44
+ 168:
45
+ 169: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
46
+ 170: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span> = <span class="ruby-identifier">aValue</span>
47
+ 171:
48
+ 172: <span class="ruby-keyword kw">else</span>
49
+ 173: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{newVal.format}&quot;</span>
50
+ 174: <span class="ruby-keyword kw">end</span>
51
+ 175:
52
+ 176: <span class="ruby-identifier">vpi_put_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">newVal</span>, <span class="ruby-identifier">aTime</span>, <span class="ruby-identifier">aDelay</span>
53
+ 177:
54
+ 178: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
55
+ 179: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
56
+ 180:
57
+ 181: <span class="ruby-identifier">writtenCorrectly</span> =
58
+ 182: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
59
+ 183: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>
60
+ 184: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aValue</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span> <span class="ruby-comment cmt"># TODO: verify 'z' behavior</span>
61
+ 185: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
62
+ 186: <span class="ruby-keyword kw">else</span>
63
+ 187: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
64
+ 188: <span class="ruby-keyword kw">end</span>
65
+ 189:
66
+ 190: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
67
+ 191: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
68
+ 192:
69
+ 193: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
70
+ 194: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
71
+ 195: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">%</span> (<span class="ruby-value">2</span> <span class="ruby-operator">**</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vpiSize</span>))
72
+ 196:
73
+ 197: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
74
+ 198: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
75
+ 199:
76
+ 200: <span class="ruby-keyword kw">else</span>
77
+ 201: <span class="ruby-keyword kw">true</span>
78
+ 202: <span class="ruby-keyword kw">end</span>
79
+ 203:
80
+ 204: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
81
+ 205: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;value written (#{aValue.inspect}) does not match value read (#{readenVal.inspect}) from handle #{self}&quot;</span>
82
+ 206: <span class="ruby-keyword kw">end</span>
83
+ 207:
84
+ 208: <span class="ruby-identifier">aValue</span>
85
+ 209: <span class="ruby-keyword kw">end</span></pre>
43
86
  </body>
44
87
  </html>
@@ -5,83 +5,26 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>put_value (Vpi::Handle)</title>
8
+ <title>[] (Vpi::Handle)</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/vpi.rb, line 141</span>
14
- 141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_value</span> <span class="ruby-identifier">aValue</span>, <span class="ruby-identifier">aFormat</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">aTime</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">aDelay</span> = <span class="ruby-constant">VpiNoDelay</span>
15
- 142: <span class="ruby-identifier">aFormat</span> =
16
- 143: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aFormat</span>
17
- 144: <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>)
18
- 145: <span class="ruby-keyword kw">else</span>
19
- 146: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
20
- 147: <span class="ruby-keyword kw">end</span>
21
- 148:
22
- 149: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
23
- 150: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
24
- 151:
25
- 152: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
26
- 153: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>, <span class="ruby-constant">VpiStringVal</span>
27
- 154: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
28
- 155:
29
- 156: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
30
- 157: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span> = <span class="ruby-identifier">aValue</span>
31
- 158:
32
- 159: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
33
- 160: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
34
- 161: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">16</span>)
35
- 162:
36
- 163: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
37
- 164: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
38
- 165:
39
- 166: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
40
- 167: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">aValue</span>
41
- 168:
42
- 169: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
43
- 170: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span> = <span class="ruby-identifier">aValue</span>
44
- 171:
45
- 172: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
46
- 173: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span> = <span class="ruby-identifier">aValue</span>
47
- 174:
48
- 175: <span class="ruby-keyword kw">else</span>
49
- 176: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{newVal.format}&quot;</span>
50
- 177: <span class="ruby-keyword kw">end</span>
51
- 178:
52
- 179: <span class="ruby-identifier">vpi_put_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">newVal</span>, <span class="ruby-identifier">aTime</span>, <span class="ruby-identifier">aDelay</span>
53
- 180:
54
- 181: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
55
- 182: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
56
- 183:
57
- 184: <span class="ruby-identifier">writtenCorrectly</span> =
58
- 185: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
59
- 186: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>
60
- 187: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aValue</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span> <span class="ruby-comment cmt"># TODO: verify 'z' behavior</span>
61
- 188: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
62
- 189: <span class="ruby-keyword kw">else</span>
63
- 190: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
64
- 191: <span class="ruby-keyword kw">end</span>
65
- 192:
66
- 193: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
67
- 194: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
68
- 195:
69
- 196: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
70
- 197: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
71
- 198: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">%</span> (<span class="ruby-value">2</span> <span class="ruby-operator">**</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vpiSize</span>))
72
- 199:
73
- 200: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
74
- 201: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
75
- 202:
76
- 203: <span class="ruby-keyword kw">else</span>
77
- 204: <span class="ruby-keyword kw">true</span>
78
- 205: <span class="ruby-keyword kw">end</span>
79
- 206:
80
- 207: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
81
- 208: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;value written (#{aValue.inspect}) does not match value read (#{readenVal.inspect}) from handle #{self}&quot;</span>
82
- 209: <span class="ruby-keyword kw">end</span>
83
- 210:
84
- 211: <span class="ruby-identifier">aValue</span>
85
- 212: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 213</span>
14
+ 213: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
15
+ 214: <span class="ruby-identifier">handles</span> = []
16
+ 215:
17
+ 216: <span class="ruby-identifier">aTypes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
18
+ 217: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">t</span>)
19
+ 218:
20
+ 219: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">itr</span> = <span class="ruby-identifier">vpi_iterate</span>(<span class="ruby-identifier">t</span>, <span class="ruby-keyword kw">self</span>)
21
+ 220: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">h</span> = <span class="ruby-identifier">vpi_scan</span>(<span class="ruby-identifier">itr</span>)
22
+ 221: <span class="ruby-identifier">handles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
23
+ 222: <span class="ruby-keyword kw">end</span>
24
+ 223: <span class="ruby-keyword kw">end</span>
25
+ 224: <span class="ruby-keyword kw">end</span>
26
+ 225:
27
+ 226: <span class="ruby-identifier">handles</span>
28
+ 227: <span class="ruby-keyword kw">end</span></pre>
86
29
  </body>
87
30
  </html>
@@ -5,26 +5,20 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>[] (Vpi::Handle)</title>
8
+ <title>inspect (Vpi::Handle)</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/vpi.rb, line 215</span>
14
- 215: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
15
- 216: <span class="ruby-identifier">handles</span> = []
16
- 217:
17
- 218: <span class="ruby-identifier">aTypes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
18
- 219: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">t</span>)
19
- 220:
20
- 221: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">itr</span> = <span class="ruby-identifier">vpi_iterate</span>(<span class="ruby-identifier">t</span>, <span class="ruby-keyword kw">self</span>)
21
- 222: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">h</span> = <span class="ruby-identifier">vpi_scan</span>(<span class="ruby-identifier">itr</span>)
22
- 223: <span class="ruby-identifier">handles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
23
- 224: <span class="ruby-keyword kw">end</span>
24
- 225: <span class="ruby-keyword kw">end</span>
25
- 226: <span class="ruby-keyword kw">end</span>
26
- 227:
27
- 228: <span class="ruby-identifier">handles</span>
28
- 229: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 231</span>
14
+ 231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aPropNames</span>
15
+ 232: <span class="ruby-identifier">aPropNames</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-identifier">:fullName</span>, <span class="ruby-identifier">:size</span>, <span class="ruby-identifier">:file</span>, <span class="ruby-identifier">:lineNo</span>
16
+ 233:
17
+ 234: <span class="ruby-identifier">aPropNames</span>.<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
18
+ 235: <span class="ruby-node">&quot;#{name}=#{self.send(name.to_sym)}&quot;</span>
19
+ 236: <span class="ruby-keyword kw">end</span>
20
+ 237:
21
+ 238: <span class="ruby-node">&quot;#&lt;Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}&gt;&quot;</span>
22
+ 239: <span class="ruby-keyword kw">end</span></pre>
29
23
  </body>
30
24
  </html>
@@ -0,0 +1,31 @@
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>cbValueChange (Vpi::Handle)</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/vpi.rb, line 245</span>
14
+ 245: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cbValueChange</span> <span class="ruby-identifier">aOptions</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aHandler</span>
15
+ 246: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
16
+ 247:
17
+ 248: <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:time</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">S_vpi_time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">VpiSuppressTime</span>)
18
+ 249: <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:value</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:format</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">VpiSuppressVal</span>)
19
+ 250:
20
+ 251: <span class="ruby-identifier">alarm</span> = <span class="ruby-constant">S_cb_data</span>.<span class="ruby-identifier">new</span>(
21
+ 252: <span class="ruby-identifier">:reason</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">CbValueChange</span>,
22
+ 253: <span class="ruby-identifier">:obj</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">self</span>,
23
+ 254: <span class="ruby-identifier">:time</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:time</span>],
24
+ 255: <span class="ruby-identifier">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:value</span>],
25
+ 256: <span class="ruby-identifier">:index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
26
+ 257: )
27
+ 258:
28
+ 259: <span class="ruby-identifier">vpi_register_cb</span> <span class="ruby-identifier">alarm</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aHandler</span>
29
+ 260: <span class="ruby-keyword kw">end</span></pre>
30
+ </body>
31
+ </html>
@@ -10,59 +10,60 @@
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 253</span>
14
- 253: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span> <span class="ruby-identifier">aMeth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>
15
- 254: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">child</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-identifier">aMeth</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-keyword kw">self</span>)
16
- 255: <span class="ruby-comment cmt"># cache the child for future accesses, in order to cut down number of calls to method_missing</span>
17
- 256: (<span class="ruby-keyword kw">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
18
- 257: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">aMeth</span> <span class="ruby-keyword kw">do</span>
19
- 258: <span class="ruby-identifier">child</span>
20
- 259: <span class="ruby-keyword kw">end</span>
21
- 260: <span class="ruby-keyword kw">end</span>
22
- 261:
23
- 262: <span class="ruby-identifier">child</span>
24
- 263:
25
- 264: <span class="ruby-keyword kw">else</span>
26
- 265: <span class="ruby-identifier">prop</span> = <span class="ruby-ivar">@@propCache</span>[<span class="ruby-identifier">aMeth</span>]
27
- 266:
28
- 267: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>
29
- 268: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>)
30
- 269:
31
- 270: <span class="ruby-keyword kw">else</span>
32
- 271: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">accessor</span>
33
- 272: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:d</span> <span class="ruby-comment cmt"># delay values</span>
34
- 273: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">'processing of delay values is not yet implemented.'</span>
35
- 274: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
36
- 275: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
37
- 276:
38
- 277: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:l</span> <span class="ruby-comment cmt"># logic values</span>
39
- 278: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
40
- 279: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
41
- 280: <span class="ruby-identifier">put_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>)
42
- 281: <span class="ruby-keyword kw">else</span>
43
- 282: <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>)
44
- 283: <span class="ruby-keyword kw">end</span>
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-identifier">method_missing</span> <span class="ruby-identifier">aMeth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>
15
+ 271: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">child</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-identifier">aMeth</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-keyword kw">self</span>)
16
+ 272: <span class="ruby-comment cmt"># cache the child for future accesses, in order to cut down number of</span>
17
+ 273: <span class="ruby-comment cmt"># calls to method_missing</span>
18
+ 274: (<span class="ruby-keyword kw">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
19
+ 275: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">aMeth</span> <span class="ruby-keyword kw">do</span>
20
+ 276: <span class="ruby-identifier">child</span>
21
+ 277: <span class="ruby-keyword kw">end</span>
22
+ 278: <span class="ruby-keyword kw">end</span>
23
+ 279:
24
+ 280: <span class="ruby-identifier">child</span>
25
+ 281:
26
+ 282: <span class="ruby-keyword kw">else</span>
27
+ 283: <span class="ruby-identifier">prop</span> = <span class="ruby-ivar">@@propCache</span>[<span class="ruby-identifier">aMeth</span>]
45
28
  284:
46
- 285: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:i</span> <span class="ruby-comment cmt"># integer values</span>
47
- 286: <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
29
+ 285: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>
30
+ 286: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aBlockArg</span>)
48
31
  287:
49
- 288: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:b</span> <span class="ruby-comment cmt"># boolean values</span>
50
- 289: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
51
- 290: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>)
52
- 291: <span class="ruby-identifier">value</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-comment cmt"># zero is false in C</span>
53
- 292: <span class="ruby-keyword kw">end</span>
54
- 293:
55
- 294: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:s</span> <span class="ruby-comment cmt"># string values</span>
56
- 295: <span class="ruby-identifier">vpi_get_str</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
57
- 296:
58
- 297: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:h</span> <span class="ruby-comment cmt"># handle values</span>
59
- 298: <span class="ruby-identifier">vpi_handle</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
60
- 299:
61
- 300: <span class="ruby-keyword kw">else</span>
62
- 301: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-node">&quot;unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}&quot;</span>
63
- 302: <span class="ruby-keyword kw">end</span>
64
- 303: <span class="ruby-keyword kw">end</span>
65
- 304: <span class="ruby-keyword kw">end</span>
66
- 305: <span class="ruby-keyword kw">end</span></pre>
32
+ 288: <span class="ruby-keyword kw">else</span>
33
+ 289: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">accessor</span>
34
+ 290: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:d</span> <span class="ruby-comment cmt"># delay values</span>
35
+ 291: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">'processing of delay values is not yet implemented.'</span>
36
+ 292: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
37
+ 293: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
38
+ 294:
39
+ 295: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:l</span> <span class="ruby-comment cmt"># logic values</span>
40
+ 296: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
41
+ 297: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
42
+ 298: <span class="ruby-identifier">put_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>)
43
+ 299: <span class="ruby-keyword kw">else</span>
44
+ 300: <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>)
45
+ 301: <span class="ruby-keyword kw">end</span>
46
+ 302:
47
+ 303: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:i</span> <span class="ruby-comment cmt"># integer values</span>
48
+ 304: <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
49
+ 305:
50
+ 306: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:b</span> <span class="ruby-comment cmt"># boolean values</span>
51
+ 307: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
52
+ 308: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>)
53
+ 309: <span class="ruby-identifier">value</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-comment cmt"># zero is false in C</span>
54
+ 310: <span class="ruby-keyword kw">end</span>
55
+ 311:
56
+ 312: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:s</span> <span class="ruby-comment cmt"># string values</span>
57
+ 313: <span class="ruby-identifier">vpi_get_str</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
58
+ 314:
59
+ 315: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:h</span> <span class="ruby-comment cmt"># handle values</span>
60
+ 316: <span class="ruby-identifier">vpi_handle</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
61
+ 317:
62
+ 318: <span class="ruby-keyword kw">else</span>
63
+ 319: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-node">&quot;unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}&quot;</span>
64
+ 320: <span class="ruby-keyword kw">end</span>
65
+ 321: <span class="ruby-keyword kw">end</span>
66
+ 322: <span class="ruby-keyword kw">end</span>
67
+ 323: <span class="ruby-keyword kw">end</span></pre>
67
68
  </body>
68
69
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 490</span>
14
- 490: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer</span>
15
- 491: (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">high</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">INTEGER_BITS</span>) <span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">low</span>
16
- 492: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 517</span>
14
+ 517: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer</span>
15
+ 518: (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">high</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">INTEGER_BITS</span>) <span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">low</span>
16
+ 519: <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/vpi.rb, line 495</span>
14
- 495: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer=</span> <span class="ruby-identifier">aValue</span>
15
- 496: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">low</span> = <span class="ruby-identifier">aValue</span> <span class="ruby-operator">&amp;</span> <span class="ruby-constant">INTEGER_MASK</span>
16
- 497: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">high</span> = (<span class="ruby-identifier">aValue</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-constant">INTEGER_BITS</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-constant">INTEGER_MASK</span>
17
- 498: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 523</span>
14
+ 523: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer=</span> <span class="ruby-identifier">aValue</span>
15
+ 524: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">low</span> = <span class="ruby-identifier">aValue</span> <span class="ruby-operator">&amp;</span> <span class="ruby-constant">INTEGER_MASK</span>
16
+ 525: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">high</span> = (<span class="ruby-identifier">aValue</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-constant">INTEGER_BITS</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-constant">INTEGER_MASK</span>
17
+ 526: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>
@@ -86,9 +86,9 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000035">to_f</a>&nbsp;&nbsp;
90
- <a href="#M000034">to_i</a>&nbsp;&nbsp;
91
- <a href="#M000036">to_s</a>&nbsp;&nbsp;
89
+ <a href="#M000034">to_f</a>&nbsp;&nbsp;
90
+ <a href="#M000033">to_i</a>&nbsp;&nbsp;
91
+ <a href="#M000035">to_s</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -110,12 +110,12 @@
110
110
  <div id="methods">
111
111
  <h3 class="section-bar">Public Instance methods</h3>
112
112
 
113
- <div id="method-M000035" class="method-detail">
114
- <a name="M000035"></a>
113
+ <div id="method-M000034" class="method-detail">
114
+ <a name="M000034"></a>
115
115
 
116
116
  <div class="method-heading">
117
- <a href="S_vpi_value.src/M000035.html" target="Code" class="method-signature"
118
- onclick="popupCode('S_vpi_value.src/M000035.html');return false;">
117
+ <a href="S_vpi_value.src/M000034.html" target="Code" class="method-signature"
118
+ onclick="popupCode('S_vpi_value.src/M000034.html');return false;">
119
119
  <span class="method-name">to_f</span><span class="method-args">()</span>
120
120
  </a>
121
121
  </div>
@@ -124,12 +124,12 @@
124
124
  </div>
125
125
  </div>
126
126
 
127
- <div id="method-M000034" class="method-detail">
128
- <a name="M000034"></a>
127
+ <div id="method-M000033" class="method-detail">
128
+ <a name="M000033"></a>
129
129
 
130
130
  <div class="method-heading">
131
- <a href="S_vpi_value.src/M000034.html" target="Code" class="method-signature"
132
- onclick="popupCode('S_vpi_value.src/M000034.html');return false;">
131
+ <a href="S_vpi_value.src/M000033.html" target="Code" class="method-signature"
132
+ onclick="popupCode('S_vpi_value.src/M000033.html');return false;">
133
133
  <span class="method-name">to_i</span><span class="method-args">()</span>
134
134
  </a>
135
135
  </div>
@@ -138,12 +138,12 @@
138
138
  </div>
139
139
  </div>
140
140
 
141
- <div id="method-M000036" class="method-detail">
142
- <a name="M000036"></a>
141
+ <div id="method-M000035" class="method-detail">
142
+ <a name="M000035"></a>
143
143
 
144
144
  <div class="method-heading">
145
- <a href="S_vpi_value.src/M000036.html" target="Code" class="method-signature"
146
- onclick="popupCode('S_vpi_value.src/M000036.html');return false;">
145
+ <a href="S_vpi_value.src/M000035.html" target="Code" class="method-signature"
146
+ onclick="popupCode('S_vpi_value.src/M000035.html');return false;">
147
147
  <span class="method-name">to_s</span><span class="method-args">()</span>
148
148
  </a>
149
149
  </div>