ruby-vpi 14.0.0 → 15.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/bin/generate_test_tpl/proto.rb +8 -6
  2. data/doc/common.css +1 -0
  3. data/doc/history.html +357 -281
  4. data/doc/history.yml +35 -1
  5. data/doc/intro.inc +1 -1
  6. data/doc/manual.doc +38 -29
  7. data/doc/manual.html +109 -63
  8. data/doc/readme.html +6 -6
  9. data/doc/rss.xml +69 -1
  10. data/ext/Rakefile +1 -5
  11. data/ext/extconf.rb +0 -5
  12. data/ext/relay.c +1 -1
  13. data/ext/vlog.c +1 -1
  14. data/lib/ruby-vpi/vpi.rb +50 -4
  15. data/lib/ruby-vpi.rb +7 -7
  16. data/ref/c/annotated.html +6 -1
  17. data/ref/c/common_8h.html +1 -1
  18. data/ref/c/files.html +2 -1
  19. data/ref/c/functions.html +40 -20
  20. data/ref/c/functions_vars.html +40 -20
  21. data/ref/c/globals.html +212 -5
  22. data/ref/c/globals_0x62.html +62 -0
  23. data/ref/c/globals_0x63.html +19 -3
  24. data/ref/c/globals_0x65.html +8 -2
  25. data/ref/c/globals_0x66.html +19 -3
  26. data/ref/c/globals_0x67.html +64 -0
  27. data/ref/c/globals_0x69.html +62 -0
  28. data/ref/c/globals_0x6c.html +64 -0
  29. data/ref/c/globals_0x6d.html +10 -3
  30. data/ref/c/globals_0x6e.html +63 -0
  31. data/ref/c/globals_0x70.html +8 -2
  32. data/ref/c/globals_0x72.html +14 -4
  33. data/ref/c/globals_0x73.html +189 -3
  34. data/ref/c/globals_0x74.html +8 -2
  35. data/ref/c/globals_0x75.html +63 -0
  36. data/ref/c/globals_0x76.html +14 -4
  37. data/ref/c/globals_0x78.html +8 -2
  38. data/ref/c/globals_defs.html +6 -1
  39. data/ref/c/globals_defs_0x65.html +6 -1
  40. data/ref/c/globals_defs_0x6c.html +57 -0
  41. data/ref/c/globals_defs_0x6e.html +56 -0
  42. data/ref/c/globals_defs_0x70.html +6 -1
  43. data/ref/c/globals_defs_0x72.html +57 -0
  44. data/ref/c/globals_defs_0x73.html +165 -0
  45. data/ref/c/globals_defs_0x75.html +56 -0
  46. data/ref/c/globals_defs_0x76.html +10 -3
  47. data/ref/c/globals_defs_0x78.html +6 -1
  48. data/ref/c/globals_enum.html +1 -1
  49. data/ref/c/globals_eval.html +1 -1
  50. data/ref/c/globals_func.html +174 -14
  51. data/ref/c/globals_func_0x66.html +63 -0
  52. data/ref/c/globals_func_0x67.html +56 -0
  53. data/ref/c/globals_func_0x69.html +54 -0
  54. data/ref/c/globals_func_0x6d.html +56 -0
  55. data/ref/c/globals_func_0x70.html +54 -0
  56. data/ref/c/globals_func_0x72.html +57 -0
  57. data/ref/c/globals_func_0x73.html +113 -0
  58. data/ref/c/globals_func_0x76.html +58 -0
  59. data/ref/c/globals_type.html +6 -3
  60. data/ref/c/globals_vars.html +89 -3
  61. data/ref/c/index.html +1 -1
  62. data/ref/c/main_8c.html +2 -2
  63. data/ref/c/main_8h.html +1 -1
  64. data/ref/c/relay_8c.html +1 -1
  65. data/ref/c/relay_8h.html +1 -1
  66. data/ref/c/structswig__cast__info.html +98 -0
  67. data/ref/c/structswig__class.html +115 -0
  68. data/ref/c/structswig__module__info.html +132 -0
  69. data/ref/c/structswig__type__info.html +132 -0
  70. data/ref/c/structt__cb__data.html +1 -1
  71. data/ref/c/structt__vpi__delay.html +1 -1
  72. data/ref/c/structt__vpi__error__info.html +1 -1
  73. data/ref/c/structt__vpi__strengthval.html +1 -1
  74. data/ref/c/structt__vpi__systf__data.html +1 -1
  75. data/ref/c/structt__vpi__time.html +1 -1
  76. data/ref/c/structt__vpi__value.html +1 -1
  77. data/ref/c/structt__vpi__vecval.html +1 -1
  78. data/ref/c/structt__vpi__vlog__info.html +1 -1
  79. data/ref/c/swig__wrap_8cin.html +11610 -0
  80. data/ref/c/unions__vpi__value__value.html +166 -0
  81. data/ref/c/verilog_8h.html +1 -1
  82. data/ref/c/vlog_8c.html +3 -3
  83. data/ref/c/vlog_8h.html +1 -1
  84. data/ref/c/vpi__user_8h.html +1 -1
  85. data/ref/ruby/classes/RDoc.html +5 -5
  86. data/ref/ruby/classes/RDoc.src/{M000045.html → M000053.html} +0 -0
  87. data/ref/ruby/classes/RubyVpi.src/M000029.html +27 -27
  88. data/ref/ruby/classes/Vpi/Handle.html +93 -57
  89. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
  90. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -9
  91. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -31
  92. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +5 -74
  93. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +8 -17
  94. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +8 -11
  95. data/ref/ruby/classes/Vpi/Handle.src/M000043.html +22 -0
  96. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +31 -55
  97. data/ref/ruby/classes/Vpi/Handle.src/M000045.html +87 -0
  98. data/ref/ruby/classes/Vpi/Handle.src/M000046.html +30 -0
  99. data/ref/ruby/classes/Vpi/Handle.src/M000047.html +24 -0
  100. data/ref/ruby/classes/Vpi/Handle.src/M000049.html +68 -0
  101. data/ref/ruby/classes/Vpi/S_vpi_time.html +186 -0
  102. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html +18 -0
  103. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html +19 -0
  104. data/ref/ruby/classes/Vpi/S_vpi_value.html +167 -0
  105. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +18 -0
  106. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html +18 -0
  107. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000036.html +18 -0
  108. data/ref/ruby/classes/Vpi.html +3 -1
  109. data/ref/ruby/classes/Vpi.src/M000030.html +14 -14
  110. data/ref/ruby/classes/Vpi.src/M000031.html +4 -4
  111. data/ref/ruby/classes/Vpi.src/M000032.html +24 -25
  112. data/ref/ruby/classes/Vpi.src/M000033.html +8 -8
  113. data/ref/ruby/created.rid +1 -1
  114. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  115. data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
  116. data/ref/ruby/fr_class_index.html +2 -0
  117. data/ref/ruby/fr_method_index.html +22 -14
  118. data/samp/counter/counter_rspec_proto.rb +8 -6
  119. data/samp/counter/counter_xunit_proto.rb +8 -6
  120. data/samp/pipelined_alu/hw5_unit_test_proto.rb +2 -2
  121. metadata +42 -6
  122. data/ref/ruby/classes/Vpi/Handle.src/M000034.html +0 -18
  123. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +0 -18
  124. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +0 -18
@@ -5,18 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get_value_wrapper (Vpi::Handle)</title>
8
+ <title>x! (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 85</span>
14
- 85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value_wrapper</span> <span class="ruby-identifier">aFormat</span>
15
- 86: <span class="ruby-identifier">val</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
16
- 87: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
17
- 88:
18
- 89: <span class="ruby-identifier">vpi_get_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span>
19
- 90: <span class="ruby-identifier">val</span>
20
- 91: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 70</span>
14
+ 70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x!</span>
15
+ 71: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> = <span class="ruby-value str">'x'</span>
16
+ 72: <span class="ruby-keyword kw">end</span></pre>
21
17
  </body>
22
18
  </html>
@@ -5,40 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get_value (Vpi::Handle)</title>
8
+ <title>z? (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 94</span>
14
- 94: <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
- 95: <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
- 96:
17
- 97: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
18
- 98: <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
- 99: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
20
- 100:
21
- 101: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
22
- 102: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
23
- 103:
24
- 104: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
25
- 105: <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
- 106:
27
- 107: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
28
- 108: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
29
- 109:
30
- 110: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
31
- 111: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
32
- 112:
33
- 113: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
34
- 114: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
35
- 115:
36
- 116: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
37
- 117: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
38
- 118:
39
- 119: <span class="ruby-keyword kw">else</span>
40
- 120: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{val.format}&quot;</span>
41
- 121: <span class="ruby-keyword kw">end</span>
42
- 122: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 75</span>
14
+ 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">z?</span>
15
+ 76: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/z/i</span>
16
+ 77: <span class="ruby-keyword kw">end</span></pre>
43
17
  </body>
44
18
  </html>
@@ -5,83 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>put_value (Vpi::Handle)</title>
8
+ <title>z! (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 125</span>
14
- 125: <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
- 126: <span class="ruby-identifier">aFormat</span> =
16
- 127: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aFormat</span>
17
- 128: <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>)
18
- 129: <span class="ruby-keyword kw">else</span>
19
- 130: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
20
- 131: <span class="ruby-keyword kw">end</span>
21
- 132:
22
- 133: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
23
- 134: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
24
- 135:
25
- 136: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
26
- 137: <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
- 138: <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
- 139:
29
- 140: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
30
- 141: <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
- 142:
32
- 143: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
33
- 144: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
34
- 145: <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
- 146:
36
- 147: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
37
- 148: <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
- 149:
39
- 150: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
40
- 151: <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
- 152:
42
- 153: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
43
- 154: <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
- 155:
45
- 156: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
46
- 157: <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
- 158:
48
- 159: <span class="ruby-keyword kw">else</span>
49
- 160: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{newVal.format}&quot;</span>
50
- 161: <span class="ruby-keyword kw">end</span>
51
- 162:
52
- 163: <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
- 164:
54
- 165: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
55
- 166: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
56
- 167:
57
- 168: <span class="ruby-identifier">writtenCorrectly</span> =
58
- 169: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
59
- 170: <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
- 171: <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
- 172: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
62
- 173: <span class="ruby-keyword kw">else</span>
63
- 174: <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
- 175: <span class="ruby-keyword kw">end</span>
65
- 176:
66
- 177: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
67
- 178: <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
- 179:
69
- 180: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
70
- 181: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
71
- 182: <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
- 183:
73
- 184: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
74
- 185: <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
- 186:
76
- 187: <span class="ruby-keyword kw">else</span>
77
- 188: <span class="ruby-keyword kw">true</span>
78
- 189: <span class="ruby-keyword kw">end</span>
79
- 190:
80
- 191: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
81
- 192: <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
- 193: <span class="ruby-keyword kw">end</span>
83
- 194:
84
- 195: <span class="ruby-identifier">aValue</span>
85
- 196: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 80</span>
14
+ 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">z!</span>
15
+ 81: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> = <span class="ruby-value str">'z'</span>
16
+ 82: <span class="ruby-keyword kw">end</span></pre>
86
17
  </body>
87
18
  </html>
@@ -5,26 +5,17 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>[] (Vpi::Handle)</title>
8
+ <title>posedge? (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 199</span>
14
- 199: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
15
- 200: <span class="ruby-identifier">handles</span> = []
16
- 201:
17
- 202: <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
- 203: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">t</span>)
19
- 204:
20
- 205: <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
- 206: <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
- 207: <span class="ruby-identifier">handles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
23
- 208: <span class="ruby-keyword kw">end</span>
24
- 209: <span class="ruby-keyword kw">end</span>
25
- 210: <span class="ruby-keyword kw">end</span>
26
- 211:
27
- 212: <span class="ruby-identifier">handles</span>
28
- 213: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 85</span>
14
+ 85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">posedge?</span>
15
+ 86: <span class="ruby-identifier">old</span> = <span class="ruby-ivar">@lastVal</span>
16
+ 87: <span class="ruby-identifier">new</span> = <span class="ruby-ivar">@lastVal</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">intVal</span>
17
+ 88:
18
+ 89: <span class="ruby-identifier">old</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">new</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
19
+ 90: <span class="ruby-keyword kw">end</span></pre>
29
20
  </body>
30
21
  </html>
@@ -5,20 +5,17 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>inspect (Vpi::Handle)</title>
8
+ <title>negedge? (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 216</span>
14
- 216: <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
- 217: <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
- 218:
17
- 219: <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
- 220: <span class="ruby-node">&quot;#{name}=#{self.send(name.to_sym)}&quot;</span>
19
- 221: <span class="ruby-keyword kw">end</span>
20
- 222:
21
- 223: <span class="ruby-node">&quot;#&lt;Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}&gt;&quot;</span>
22
- 224: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 93</span>
14
+ 93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">negedge?</span>
15
+ 94: <span class="ruby-identifier">old</span> = <span class="ruby-ivar">@lastVal</span>
16
+ 95: <span class="ruby-identifier">new</span> = <span class="ruby-ivar">@lastVal</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">intVal</span>
17
+ 96:
18
+ 97: <span class="ruby-identifier">old</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">new</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
19
+ 98: <span class="ruby-keyword kw">end</span></pre>
23
20
  </body>
24
21
  </html>
@@ -0,0 +1,22 @@
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>get_value_wrapper (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 101</span>
14
+ 101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value_wrapper</span> <span class="ruby-identifier">aFormat</span>
15
+ 102: <span class="ruby-identifier">val</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
16
+ 103: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
17
+ 104:
18
+ 105: <span class="ruby-identifier">vpi_get_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span>
19
+ 106: <span class="ruby-identifier">val</span>
20
+ 107: <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -5,64 +5,40 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>method_missing (Vpi::Handle)</title>
8
+ <title>get_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 237</span>
14
- 237: <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
- 238: <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
- 239: <span class="ruby-comment cmt"># cache the child for future accesses, in order to cut down number of calls to method_missing</span>
17
- 240: (<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
- 241: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">aMeth</span> <span class="ruby-keyword kw">do</span>
19
- 242: <span class="ruby-identifier">child</span>
20
- 243: <span class="ruby-keyword kw">end</span>
21
- 244: <span class="ruby-keyword kw">end</span>
22
- 245:
23
- 246: <span class="ruby-identifier">child</span>
24
- 247:
25
- 248: <span class="ruby-keyword kw">else</span>
26
- 249: <span class="ruby-identifier">prop</span> = <span class="ruby-ivar">@@propCache</span>[<span class="ruby-identifier">aMeth</span>]
27
- 250:
28
- 251: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>
29
- 252: <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
- 253:
31
- 254: <span class="ruby-keyword kw">else</span>
32
- 255: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">accessor</span>
33
- 256: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:d</span> <span class="ruby-comment cmt"># delay values</span>
34
- 257: <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
- 258: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
36
- 259: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
37
- 260:
38
- 261: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:l</span> <span class="ruby-comment cmt"># logic values</span>
39
- 262: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
40
- 263: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
41
- 264: <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
- 265: <span class="ruby-keyword kw">else</span>
43
- 266: <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>)
44
- 267: <span class="ruby-keyword kw">end</span>
45
- 268:
46
- 269: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:i</span> <span class="ruby-comment cmt"># integer values</span>
47
- 270: <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>
48
- 271:
49
- 272: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:b</span> <span class="ruby-comment cmt"># boolean values</span>
50
- 273: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
51
- 274: <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
- 275: <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
- 276: <span class="ruby-keyword kw">end</span>
54
- 277:
55
- 278: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:s</span> <span class="ruby-comment cmt"># string values</span>
56
- 279: <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
- 280:
58
- 281: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:h</span> <span class="ruby-comment cmt"># handle values</span>
59
- 282: <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
- 283:
61
- 284: <span class="ruby-keyword kw">else</span>
62
- 285: <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
- 286: <span class="ruby-keyword kw">end</span>
64
- 287: <span class="ruby-keyword kw">end</span>
65
- 288: <span class="ruby-keyword kw">end</span>
66
- 289: <span class="ruby-keyword kw">end</span></pre>
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>
67
43
  </body>
68
44
  </html>
@@ -0,0 +1,87 @@
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>put_value (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 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>
86
+ </body>
87
+ </html>
@@ -0,0 +1,30 @@
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>[] (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 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>
29
+ </body>
30
+ </html>
@@ -0,0 +1,24 @@
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>inspect (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 232</span>
14
+ 232: <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
+ 233: <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
+ 234:
17
+ 235: <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
+ 236: <span class="ruby-node">&quot;#{name}=#{self.send(name.to_sym)}&quot;</span>
19
+ 237: <span class="ruby-keyword kw">end</span>
20
+ 238:
21
+ 239: <span class="ruby-node">&quot;#&lt;Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}&gt;&quot;</span>
22
+ 240: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>