ruby-vpi 11.1.1 → 12.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/bin/generate_test.rb +12 -11
  2. data/bin/generate_test_tpl/bench.rb +0 -4
  3. data/bin/generate_test_tpl/bench.v +3 -6
  4. data/bin/generate_test_tpl/runner.rake +20 -4
  5. data/bin/generate_test_tpl/spec.rb +5 -7
  6. data/doc/common.css +110 -95
  7. data/doc/common.tpl +16 -17
  8. data/doc/history.html +350 -330
  9. data/doc/history.yml +49 -0
  10. data/doc/intro.inc +18 -4
  11. data/doc/lib/doc_proxy.rb +22 -32
  12. data/doc/manual.erb +90 -83
  13. data/doc/manual.html +298 -266
  14. data/doc/memo.html +31 -10
  15. data/doc/readme.html +26 -6
  16. data/ext/relay.c +24 -28
  17. data/ext/vlog.c +4 -15
  18. data/lib/ruby-vpi/rspec.rb +1 -1
  19. data/lib/ruby-vpi/runner.rb +12 -10
  20. data/lib/ruby-vpi/runner_proxy.rb +17 -6
  21. data/lib/ruby-vpi/verilog_parser.rb +11 -7
  22. data/lib/ruby-vpi/vpi.rb +11 -1
  23. data/lib/ruby-vpi.rb +4 -0
  24. data/ref/c/annotated.html +2 -2
  25. data/ref/c/common_8h.html +1 -1
  26. data/ref/c/files.html +1 -1
  27. data/ref/c/functions.html +1 -1
  28. data/ref/c/functions_vars.html +1 -1
  29. data/ref/c/globals.html +1 -1
  30. data/ref/c/globals_0x63.html +1 -1
  31. data/ref/c/globals_0x65.html +1 -1
  32. data/ref/c/globals_0x66.html +1 -1
  33. data/ref/c/globals_0x70.html +1 -1
  34. data/ref/c/globals_0x72.html +1 -1
  35. data/ref/c/globals_0x73.html +1 -1
  36. data/ref/c/globals_0x74.html +1 -1
  37. data/ref/c/globals_0x76.html +2 -2
  38. data/ref/c/globals_0x78.html +1 -1
  39. data/ref/c/globals_defs.html +1 -1
  40. data/ref/c/globals_defs_0x65.html +1 -1
  41. data/ref/c/globals_defs_0x70.html +1 -1
  42. data/ref/c/globals_defs_0x76.html +2 -2
  43. data/ref/c/globals_defs_0x78.html +1 -1
  44. data/ref/c/globals_enum.html +1 -1
  45. data/ref/c/globals_eval.html +1 -1
  46. data/ref/c/globals_func.html +2 -2
  47. data/ref/c/globals_type.html +1 -1
  48. data/ref/c/globals_vars.html +1 -1
  49. data/ref/c/index.html +1 -1
  50. data/ref/c/relay_8c.html +2 -1
  51. data/ref/c/relay_8h.html +1 -1
  52. data/ref/c/structrelay____RubyOptions____def.html +8 -2
  53. data/ref/c/structt__cb__data.html +1 -1
  54. data/ref/c/structt__vpi__delay.html +1 -1
  55. data/ref/c/structt__vpi__error__info.html +1 -1
  56. data/ref/c/structt__vpi__strengthval.html +1 -1
  57. data/ref/c/structt__vpi__systf__data.html +1 -1
  58. data/ref/c/structt__vpi__time.html +1 -1
  59. data/ref/c/structt__vpi__value.html +1 -1
  60. data/ref/c/structt__vpi__vecval.html +1 -1
  61. data/ref/c/structt__vpi__vlog__info.html +1 -1
  62. data/ref/c/swig_8c.html +1 -1
  63. data/ref/c/swig_8h.html +1 -1
  64. data/ref/c/verilog_8h.html +1 -1
  65. data/ref/c/vlog_8c.html +15 -15
  66. data/ref/c/vlog_8h.html +1 -1
  67. data/ref/c/vpi__user_8h.html +1 -1
  68. data/ref/ruby/classes/OutputInfo.html +1 -1
  69. data/ref/ruby/classes/OutputInfo.src/M000030.html +30 -30
  70. data/ref/ruby/classes/RDoc.html +5 -5
  71. data/ref/ruby/classes/RDoc.src/{M000097.html → M000099.html} +0 -0
  72. data/ref/ruby/classes/RubyVpi.src/M000085.html +43 -39
  73. data/ref/ruby/classes/String.src/M000033.html +26 -26
  74. data/ref/ruby/classes/String.src/M000034.html +4 -4
  75. data/ref/ruby/classes/Template.src/M000032.html +4 -4
  76. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000011.html +5 -5
  77. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +7 -7
  78. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +4 -4
  79. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000009.html +4 -4
  80. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000010.html +4 -4
  81. data/ref/ruby/classes/VerilogParser/Module.src/M000006.html +15 -11
  82. data/ref/ruby/classes/Vpi/Handle/Property.html +5 -5
  83. data/ref/ruby/classes/Vpi/Handle/Property.src/{M000096.html → M000098.html} +61 -61
  84. data/ref/ruby/classes/Vpi/Handle.html +78 -43
  85. data/ref/ruby/classes/Vpi/Handle.src/M000088.html +3 -3
  86. data/ref/ruby/classes/Vpi/Handle.src/M000089.html +4 -8
  87. data/ref/ruby/classes/Vpi/Handle.src/M000090.html +5 -31
  88. data/ref/ruby/classes/Vpi/Handle.src/M000091.html +9 -74
  89. data/ref/ruby/classes/Vpi/Handle.src/M000092.html +31 -17
  90. data/ref/ruby/classes/Vpi/Handle.src/M000093.html +74 -11
  91. data/ref/ruby/classes/Vpi/Handle.src/M000094.html +30 -0
  92. data/ref/ruby/classes/Vpi/Handle.src/M000095.html +11 -55
  93. data/ref/ruby/classes/Vpi/Handle.src/M000097.html +68 -0
  94. data/ref/ruby/created.rid +1 -1
  95. data/ref/ruby/files/bin/generate_test_rb.html +8 -11
  96. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +4 -4
  97. data/ref/ruby/files/bin/generate_test_rb.src/M000002.html +22 -24
  98. data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
  99. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
  100. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
  101. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
  102. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  103. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +2 -2
  104. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000003.html +10 -10
  105. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000004.html +12 -12
  106. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
  107. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  108. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -1
  109. data/ref/ruby/fr_method_index.html +20 -18
  110. data/samp/counter/counter_rspec_bench.v +3 -6
  111. data/samp/counter/counter_rspec_design.rb +2 -1
  112. data/samp/counter/counter_rspec_runner.rake +20 -4
  113. data/samp/counter/counter_rspec_spec.rb +4 -4
  114. data/samp/counter/counter_xunit_bench.v +3 -6
  115. data/samp/counter/counter_xunit_design.rb +2 -1
  116. data/samp/counter/counter_xunit_runner.rake +20 -4
  117. data/samp/pipelined_alu/hw5_unit_test_bench.v +3 -6
  118. data/samp/pipelined_alu/hw5_unit_test_runner.rake +20 -4
  119. metadata +21 -20
  120. data/doc/manual.rb +0 -5
@@ -138,15 +138,17 @@ names (strings or symbols) or integer constants.
138
138
  <h3 class="section-bar">Methods</h3>
139
139
 
140
140
  <div class="name-list">
141
- <a href="#M000092">[]</a>&nbsp;&nbsp;
142
- <a href="#M000090">get_value</a>&nbsp;&nbsp;
143
- <a href="#M000089">get_value_wrapper</a>&nbsp;&nbsp;
144
- <a href="#M000093">inspect</a>&nbsp;&nbsp;
145
- <a href="#M000095">method_missing</a>&nbsp;&nbsp;
146
- <a href="#M000091">put_value</a>&nbsp;&nbsp;
147
- <a href="#M000094">to_s</a>&nbsp;&nbsp;
141
+ <a href="#M000094">[]</a>&nbsp;&nbsp;
142
+ <a href="#M000092">get_value</a>&nbsp;&nbsp;
143
+ <a href="#M000091">get_value_wrapper</a>&nbsp;&nbsp;
144
+ <a href="#M000095">inspect</a>&nbsp;&nbsp;
145
+ <a href="#M000097">method_missing</a>&nbsp;&nbsp;
146
+ <a href="#M000093">put_value</a>&nbsp;&nbsp;
147
+ <a href="#M000096">to_s</a>&nbsp;&nbsp;
148
+ <a href="#M000088">x!</a>&nbsp;&nbsp;
148
149
  <a href="#M000087">x?</a>&nbsp;&nbsp;
149
- <a href="#M000088">z?</a>&nbsp;&nbsp;
150
+ <a href="#M000090">z!</a>&nbsp;&nbsp;
151
+ <a href="#M000089">z?</a>&nbsp;&nbsp;
150
152
  </div>
151
153
  </div>
152
154
 
@@ -194,12 +196,12 @@ names (strings or symbols) or integer constants.
194
196
  <div id="methods">
195
197
  <h3 class="section-bar">Public Instance methods</h3>
196
198
 
197
- <div id="method-M000092" class="method-detail">
198
- <a name="M000092"></a>
199
+ <div id="method-M000094" class="method-detail">
200
+ <a name="M000094"></a>
199
201
 
200
202
  <div class="method-heading">
201
- <a href="Handle.src/M000092.html" target="Code" class="method-signature"
202
- onclick="popupCode('Handle.src/M000092.html');return false;">
203
+ <a href="Handle.src/M000094.html" target="Code" class="method-signature"
204
+ onclick="popupCode('Handle.src/M000094.html');return false;">
203
205
  <span class="method-name">[]</span><span class="method-args">(*aTypes)</span>
204
206
  </a>
205
207
  </div>
@@ -212,12 +214,12 @@ constant).
212
214
  </div>
213
215
  </div>
214
216
 
215
- <div id="method-M000090" class="method-detail">
216
- <a name="M000090"></a>
217
+ <div id="method-M000092" class="method-detail">
218
+ <a name="M000092"></a>
217
219
 
218
220
  <div class="method-heading">
219
- <a href="Handle.src/M000090.html" target="Code" class="method-signature"
220
- onclick="popupCode('Handle.src/M000090.html');return false;">
221
+ <a href="Handle.src/M000092.html" target="Code" class="method-signature"
222
+ onclick="popupCode('Handle.src/M000092.html');return false;">
221
223
  <span class="method-name">get_value</span><span class="method-args">(aFormat = VpiObjTypeVal)</span>
222
224
  </a>
223
225
  </div>
@@ -231,12 +233,12 @@ attempt to determine the correct format.
231
233
  </div>
232
234
  </div>
233
235
 
234
- <div id="method-M000089" class="method-detail">
235
- <a name="M000089"></a>
236
+ <div id="method-M000091" class="method-detail">
237
+ <a name="M000091"></a>
236
238
 
237
239
  <div class="method-heading">
238
- <a href="Handle.src/M000089.html" target="Code" class="method-signature"
239
- onclick="popupCode('Handle.src/M000089.html');return false;">
240
+ <a href="Handle.src/M000091.html" target="Code" class="method-signature"
241
+ onclick="popupCode('Handle.src/M000091.html');return false;">
240
242
  <span class="method-name">get_value_wrapper</span><span class="method-args">(aFormat)</span>
241
243
  </a>
242
244
  </div>
@@ -249,12 +251,12 @@ Reads the value using the given format (integer constant) and returns a
249
251
  </div>
250
252
  </div>
251
253
 
252
- <div id="method-M000093" class="method-detail">
253
- <a name="M000093"></a>
254
+ <div id="method-M000095" class="method-detail">
255
+ <a name="M000095"></a>
254
256
 
255
257
  <div class="method-heading">
256
- <a href="Handle.src/M000093.html" target="Code" class="method-signature"
257
- onclick="popupCode('Handle.src/M000093.html');return false;">
258
+ <a href="Handle.src/M000095.html" target="Code" class="method-signature"
259
+ onclick="popupCode('Handle.src/M000095.html');return false;">
258
260
  <span class="method-name">inspect</span><span class="method-args">(*aPropNames)</span>
259
261
  </a>
260
262
  </div>
@@ -267,12 +269,12 @@ handles.
267
269
  </div>
268
270
  </div>
269
271
 
270
- <div id="method-M000095" class="method-detail">
271
- <a name="M000095"></a>
272
+ <div id="method-M000097" class="method-detail">
273
+ <a name="M000097"></a>
272
274
 
273
275
  <div class="method-heading">
274
- <a href="Handle.src/M000095.html" target="Code" class="method-signature"
275
- onclick="popupCode('Handle.src/M000095.html');return false;">
276
+ <a href="Handle.src/M000097.html" target="Code" class="method-signature"
277
+ onclick="popupCode('Handle.src/M000097.html');return false;">
276
278
  <span class="method-name">method_missing</span><span class="method-args">(aMeth, *aArgs, &amp;aBlockArg)</span>
277
279
  </a>
278
280
  </div>
@@ -293,18 +295,18 @@ Provides access to this handle&#8217;s
293
295
  through method calls. In the case that a child handle has the same name as
294
296
  a VPI property, the child handle will be accessed instead of the VPI
295
297
  property. However, you can still access the VPI property via <a
296
- href="Handle.html#M000090">get_value</a> and <a
297
- href="Handle.html#M000091">put_value</a>.
298
+ href="Handle.html#M000092">get_value</a> and <a
299
+ href="Handle.html#M000093">put_value</a>.
298
300
  </p>
299
301
  </div>
300
302
  </div>
301
303
 
302
- <div id="method-M000091" class="method-detail">
303
- <a name="M000091"></a>
304
+ <div id="method-M000093" class="method-detail">
305
+ <a name="M000093"></a>
304
306
 
305
307
  <div class="method-heading">
306
- <a href="Handle.src/M000091.html" target="Code" class="method-signature"
307
- onclick="popupCode('Handle.src/M000091.html');return false;">
308
+ <a href="Handle.src/M000093.html" target="Code" class="method-signature"
309
+ onclick="popupCode('Handle.src/M000093.html');return false;">
308
310
  <span class="method-name">put_value</span><span class="method-args">(aValue, aFormat = nil, aTime = nil, aDelay = VpiNoDelay)</span>
309
311
  </a>
310
312
  </div>
@@ -319,8 +321,8 @@ format.
319
321
  </div>
320
322
  </div>
321
323
 
322
- <div id="method-M000094" class="method-detail">
323
- <a name="M000094"></a>
324
+ <div id="method-M000096" class="method-detail">
325
+ <a name="M000096"></a>
324
326
 
325
327
  <div class="method-heading">
326
328
  <span class="method-name">to_s</span><span class="method-args">(*aPropNames)</span>
@@ -328,7 +330,24 @@ format.
328
330
 
329
331
  <div class="method-description">
330
332
  <p>
331
- Alias for <a href="Handle.html#M000093">inspect</a>
333
+ Alias for <a href="Handle.html#M000095">inspect</a>
334
+ </p>
335
+ </div>
336
+ </div>
337
+
338
+ <div id="method-M000088" class="method-detail">
339
+ <a name="M000088"></a>
340
+
341
+ <div class="method-heading">
342
+ <a href="Handle.src/M000088.html" target="Code" class="method-signature"
343
+ onclick="popupCode('Handle.src/M000088.html');return false;">
344
+ <span class="method-name">x!</span><span class="method-args">()</span>
345
+ </a>
346
+ </div>
347
+
348
+ <div class="method-description">
349
+ <p>
350
+ Sets the logic value of this handle to unknown (x).
332
351
  </p>
333
352
  </div>
334
353
  </div>
@@ -345,18 +364,34 @@ Alias for <a href="Handle.html#M000093">inspect</a>
345
364
 
346
365
  <div class="method-description">
347
366
  <p>
348
- Tests if the logic value of this handle is &quot;don&#8217;t care&quot;
349
- (x).
367
+ Tests if the logic value of this handle is unknown (x).
350
368
  </p>
351
369
  </div>
352
370
  </div>
353
371
 
354
- <div id="method-M000088" class="method-detail">
355
- <a name="M000088"></a>
372
+ <div id="method-M000090" class="method-detail">
373
+ <a name="M000090"></a>
356
374
 
357
375
  <div class="method-heading">
358
- <a href="Handle.src/M000088.html" target="Code" class="method-signature"
359
- onclick="popupCode('Handle.src/M000088.html');return false;">
376
+ <a href="Handle.src/M000090.html" target="Code" class="method-signature"
377
+ onclick="popupCode('Handle.src/M000090.html');return false;">
378
+ <span class="method-name">z!</span><span class="method-args">()</span>
379
+ </a>
380
+ </div>
381
+
382
+ <div class="method-description">
383
+ <p>
384
+ Sets the logic value of this handle to high impedance (z).
385
+ </p>
386
+ </div>
387
+ </div>
388
+
389
+ <div id="method-M000089" class="method-detail">
390
+ <a name="M000089"></a>
391
+
392
+ <div class="method-heading">
393
+ <a href="Handle.src/M000089.html" target="Code" class="method-signature"
394
+ onclick="popupCode('Handle.src/M000089.html');return false;">
360
395
  <span class="method-name">z?</span><span class="method-args">()</span>
361
396
  </a>
362
397
  </div>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>z? (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
13
  <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 58</span>
14
- 58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">z?</span>
15
- 59: <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>
14
+ 58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x!</span>
15
+ 59: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> = <span class="ruby-value str">'x'</span>
16
16
  60: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,18 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get_value_wrapper (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
13
  <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 63</span>
14
- 63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value_wrapper</span> <span class="ruby-identifier">aFormat</span>
15
- 64: <span class="ruby-identifier">val</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
16
- 65: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
17
- 66:
18
- 67: <span class="ruby-identifier">vpi_get_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span>
19
- 68: <span class="ruby-identifier">val</span>
20
- 69: <span class="ruby-keyword kw">end</span></pre>
14
+ 63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">z?</span>
15
+ 64: <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
+ 65: <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 72</span>
14
- 72: <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
- 73: <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
- 74:
17
- 75: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
18
- 76: <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
- 77: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
20
- 78:
21
- 79: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
22
- 80: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
23
- 81:
24
- 82: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
25
- 83: <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
- 84:
27
- 85: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
28
- 86: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
29
- 87:
30
- 88: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
31
- 89: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
32
- 90:
33
- 91: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
34
- 92: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
35
- 93:
36
- 94: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
37
- 95: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
38
- 96:
39
- 97: <span class="ruby-keyword kw">else</span>
40
- 98: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{val.format}&quot;</span>
41
- 99: <span class="ruby-keyword kw">end</span>
42
- 100: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 68</span>
14
+ 68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">z!</span>
15
+ 69: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> = <span class="ruby-value str">'z'</span>
16
+ 70: <span class="ruby-keyword kw">end</span></pre>
43
17
  </body>
44
18
  </html>
@@ -5,83 +5,18 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>put_value (Vpi::Handle)</title>
8
+ <title>get_value_wrapper (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 103</span>
14
- 103: <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
- 104: <span class="ruby-identifier">aFormat</span> =
16
- 105: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aFormat</span>
17
- 106: <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>)
18
- 107: <span class="ruby-keyword kw">else</span>
19
- 108: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
20
- 109: <span class="ruby-keyword kw">end</span>
21
- 110:
22
- 111: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
23
- 112: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
24
- 113:
25
- 114: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
26
- 115: <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
- 116: <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
- 117:
29
- 118: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
30
- 119: <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
- 120:
32
- 121: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
33
- 122: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
34
- 123: <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
- 124:
36
- 125: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
37
- 126: <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
- 127:
39
- 128: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
40
- 129: <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
- 130:
42
- 131: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
43
- 132: <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
- 133:
45
- 134: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
46
- 135: <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
- 136:
48
- 137: <span class="ruby-keyword kw">else</span>
49
- 138: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{newVal.format}&quot;</span>
50
- 139: <span class="ruby-keyword kw">end</span>
51
- 140:
52
- 141: <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
- 142:
54
- 143: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
55
- 144: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
56
- 145:
57
- 146: <span class="ruby-identifier">writtenCorrectly</span> =
58
- 147: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
59
- 148: <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
- 149: <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
- 150: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
62
- 151: <span class="ruby-keyword kw">else</span>
63
- 152: <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
- 153: <span class="ruby-keyword kw">end</span>
65
- 154:
66
- 155: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
67
- 156: <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
- 157:
69
- 158: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
70
- 159: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
71
- 160: <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
- 161:
73
- 162: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
74
- 163: <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
- 164:
76
- 165: <span class="ruby-keyword kw">else</span>
77
- 166: <span class="ruby-keyword kw">true</span>
78
- 167: <span class="ruby-keyword kw">end</span>
79
- 168:
80
- 169: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
81
- 170: <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
- 171: <span class="ruby-keyword kw">end</span>
83
- 172:
84
- 173: <span class="ruby-identifier">aValue</span>
85
- 174: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 73</span>
14
+ 73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value_wrapper</span> <span class="ruby-identifier">aFormat</span>
15
+ 74: <span class="ruby-identifier">val</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
16
+ 75: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
17
+ 76:
18
+ 77: <span class="ruby-identifier">vpi_get_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span>
19
+ 78: <span class="ruby-identifier">val</span>
20
+ 79: <span class="ruby-keyword kw">end</span></pre>
86
21
  </body>
87
22
  </html>
@@ -5,26 +5,40 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>[] (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 177</span>
14
- 177: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
15
- 178: <span class="ruby-identifier">handles</span> = []
16
- 179:
17
- 180: <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
- 181: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">t</span>)
19
- 182:
20
- 183: <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
- 184: <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
- 185: <span class="ruby-identifier">handles</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
23
- 186: <span class="ruby-keyword kw">end</span>
24
- 187: <span class="ruby-keyword kw">end</span>
25
- 188: <span class="ruby-keyword kw">end</span>
26
- 189:
27
- 190: <span class="ruby-identifier">handles</span>
28
- 191: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 82</span>
14
+ 82: <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
+ 83: <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
+ 84:
17
+ 85: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
18
+ 86: <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
+ 87: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
20
+ 88:
21
+ 89: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
22
+ 90: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
23
+ 91:
24
+ 92: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
25
+ 93: <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
+ 94:
27
+ 95: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
28
+ 96: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
29
+ 97:
30
+ 98: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
31
+ 99: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
32
+ 100:
33
+ 101: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
34
+ 102: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
35
+ 103:
36
+ 104: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
37
+ 105: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
38
+ 106:
39
+ 107: <span class="ruby-keyword kw">else</span>
40
+ 108: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{val.format}&quot;</span>
41
+ 109: <span class="ruby-keyword kw">end</span>
42
+ 110: <span class="ruby-keyword kw">end</span></pre>
29
43
  </body>
30
44
  </html>
@@ -5,20 +5,83 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>inspect (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 194</span>
14
- 194: <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
- 195: <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
- 196:
17
- 197: <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
- 198: <span class="ruby-node">&quot;#{name}=#{self.send(name.to_sym)}&quot;</span>
19
- 199: <span class="ruby-keyword kw">end</span>
20
- 200:
21
- 201: <span class="ruby-node">&quot;#&lt;Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}&gt;&quot;</span>
22
- 202: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 113</span>
14
+ 113: <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
+ 114: <span class="ruby-identifier">aFormat</span> =
16
+ 115: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aFormat</span>
17
+ 116: <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>)
18
+ 117: <span class="ruby-keyword kw">else</span>
19
+ 118: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
20
+ 119: <span class="ruby-keyword kw">end</span>
21
+ 120:
22
+ 121: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
23
+ 122: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
24
+ 123:
25
+ 124: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
26
+ 125: <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
+ 126: <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
+ 127:
29
+ 128: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
30
+ 129: <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
+ 130:
32
+ 131: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
33
+ 132: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
34
+ 133: <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
+ 134:
36
+ 135: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
37
+ 136: <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
+ 137:
39
+ 138: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
40
+ 139: <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
+ 140:
42
+ 141: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
43
+ 142: <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
+ 143:
45
+ 144: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
46
+ 145: <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
+ 146:
48
+ 147: <span class="ruby-keyword kw">else</span>
49
+ 148: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown S_vpi_value.format: #{newVal.format}&quot;</span>
50
+ 149: <span class="ruby-keyword kw">end</span>
51
+ 150:
52
+ 151: <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
+ 152:
54
+ 153: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
55
+ 154: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
56
+ 155:
57
+ 156: <span class="ruby-identifier">writtenCorrectly</span> =
58
+ 157: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
59
+ 158: <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
+ 159: <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
+ 160: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
62
+ 161: <span class="ruby-keyword kw">else</span>
63
+ 162: <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
+ 163: <span class="ruby-keyword kw">end</span>
65
+ 164:
66
+ 165: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
67
+ 166: <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
+ 167:
69
+ 168: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
70
+ 169: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
71
+ 170: <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
+ 171:
73
+ 172: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
74
+ 173: <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
+ 174:
76
+ 175: <span class="ruby-keyword kw">else</span>
77
+ 176: <span class="ruby-keyword kw">true</span>
78
+ 177: <span class="ruby-keyword kw">end</span>
79
+ 178:
80
+ 179: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
81
+ 180: <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
+ 181: <span class="ruby-keyword kw">end</span>
83
+ 182:
84
+ 183: <span class="ruby-identifier">aValue</span>
85
+ 184: <span class="ruby-keyword kw">end</span></pre>
23
86
  </body>
24
87
  </html>