ruby-vpi 13.0.0 → 14.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/Rakefile +6 -1
  2. data/bin/generate_test_tpl/bench.rb +84 -1
  3. data/bin/generate_test_tpl/bench.v +8 -17
  4. data/bin/generate_test_tpl/proto.rb +1 -1
  5. data/doc/common.css +14 -41
  6. data/doc/common.tpl +1 -1
  7. data/doc/figures/figures.dia +274 -753
  8. data/doc/figures/organization_detailed.png +0 -0
  9. data/doc/figures/ruby_relay.png +0 -0
  10. data/doc/history.html +363 -276
  11. data/doc/history.yml +40 -0
  12. data/doc/intro.inc +37 -15
  13. data/doc/lib/doc_proxy.rb +24 -4
  14. data/doc/manual.doc +345 -196
  15. data/doc/manual.html +741 -497
  16. data/doc/memo.doc +15 -15
  17. data/doc/memo.html +28 -27
  18. data/doc/readme.doc +2 -2
  19. data/doc/readme.html +51 -15
  20. data/doc/rss.erb +1 -1
  21. data/doc/rss.xml +1624 -31
  22. data/ext/Rakefile +1 -6
  23. data/ext/main.c +8 -3
  24. data/ext/main.h +5 -0
  25. data/ext/relay.c +12 -12
  26. data/ext/relay.h +1 -6
  27. data/ext/swig_vpi.i +2 -2
  28. data/ext/swig_wrap.cin +37 -20
  29. data/ext/verilog.h +2 -2
  30. data/ext/vlog.c +10 -3
  31. data/ext/vlog.h +4 -4
  32. data/lib/ruby-vpi/vpi.rb +114 -0
  33. data/lib/ruby-vpi.rb +21 -59
  34. data/ref/c/annotated.html +1 -1
  35. data/ref/c/common_8h.html +1 -1
  36. data/ref/c/files.html +1 -1
  37. data/ref/c/functions.html +1 -1
  38. data/ref/c/functions_vars.html +1 -1
  39. data/ref/c/globals.html +1 -1
  40. data/ref/c/globals_0x63.html +1 -1
  41. data/ref/c/globals_0x65.html +1 -1
  42. data/ref/c/globals_0x66.html +1 -1
  43. data/ref/c/globals_0x6d.html +3 -2
  44. data/ref/c/globals_0x70.html +1 -1
  45. data/ref/c/globals_0x72.html +4 -5
  46. data/ref/c/globals_0x73.html +1 -1
  47. data/ref/c/globals_0x74.html +1 -1
  48. data/ref/c/globals_0x76.html +4 -2
  49. data/ref/c/globals_0x78.html +1 -1
  50. data/ref/c/globals_defs.html +1 -1
  51. data/ref/c/globals_defs_0x65.html +1 -1
  52. data/ref/c/globals_defs_0x70.html +1 -1
  53. data/ref/c/globals_defs_0x76.html +1 -1
  54. data/ref/c/globals_defs_0x78.html +1 -1
  55. data/ref/c/globals_enum.html +1 -1
  56. data/ref/c/globals_eval.html +1 -1
  57. data/ref/c/globals_func.html +8 -7
  58. data/ref/c/globals_type.html +1 -1
  59. data/ref/c/globals_vars.html +3 -2
  60. data/ref/c/index.html +1 -1
  61. data/ref/c/main_8c.html +26 -1
  62. data/ref/c/main_8h.html +26 -1
  63. data/ref/c/relay_8c.html +11 -35
  64. data/ref/c/relay_8h.html +3 -27
  65. data/ref/c/structt__cb__data.html +1 -1
  66. data/ref/c/structt__vpi__delay.html +1 -1
  67. data/ref/c/structt__vpi__error__info.html +1 -1
  68. data/ref/c/structt__vpi__strengthval.html +1 -1
  69. data/ref/c/structt__vpi__systf__data.html +1 -1
  70. data/ref/c/structt__vpi__time.html +1 -1
  71. data/ref/c/structt__vpi__value.html +1 -1
  72. data/ref/c/structt__vpi__vecval.html +1 -1
  73. data/ref/c/structt__vpi__vlog__info.html +1 -1
  74. data/ref/c/verilog_8h.html +5 -5
  75. data/ref/c/vlog_8c.html +44 -6
  76. data/ref/c/vlog_8h.html +7 -8
  77. data/ref/c/vpi__user_8h.html +1 -1
  78. data/ref/ruby/classes/RDoc.html +5 -5
  79. data/ref/ruby/classes/RDoc.src/{M000041.html → M000045.html} +0 -0
  80. data/ref/ruby/classes/RubyVpi.html +10 -28
  81. data/ref/ruby/classes/RubyVpi.src/M000029.html +101 -124
  82. data/ref/ruby/classes/Vpi/Handle.html +56 -56
  83. data/ref/ruby/classes/Vpi/Handle.src/M000034.html +5 -9
  84. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +5 -31
  85. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -74
  86. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -17
  87. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +9 -11
  88. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +44 -0
  89. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +74 -55
  90. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +30 -0
  91. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +24 -0
  92. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +68 -0
  93. data/ref/ruby/classes/Vpi.html +149 -0
  94. data/ref/ruby/classes/Vpi.src/M000030.html +28 -0
  95. data/ref/ruby/classes/Vpi.src/M000031.html +18 -0
  96. data/ref/ruby/classes/Vpi.src/M000032.html +39 -0
  97. data/ref/ruby/classes/Vpi.src/M000033.html +22 -0
  98. data/ref/ruby/created.rid +1 -1
  99. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  100. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -2
  101. data/ref/ruby/fr_method_index.html +18 -14
  102. data/samp/counter/counter_rspec_bench.rb +81 -1
  103. data/samp/counter/counter_rspec_bench.v +5 -12
  104. data/samp/counter/counter_rspec_design.rb +1 -2
  105. data/samp/counter/counter_rspec_proto.rb +1 -1
  106. data/samp/counter/counter_rspec_spec.rb +3 -3
  107. data/samp/counter/counter_xunit_bench.rb +81 -1
  108. data/samp/counter/counter_xunit_bench.v +5 -12
  109. data/samp/counter/counter_xunit_design.rb +1 -2
  110. data/samp/counter/counter_xunit_proto.rb +1 -1
  111. data/samp/counter/counter_xunit_spec.rb +3 -3
  112. data/samp/pipelined_alu/hw5_unit_test_bench.rb +81 -1
  113. data/samp/pipelined_alu/hw5_unit_test_bench.v +11 -18
  114. data/samp/pipelined_alu/hw5_unit_test_design.rb +1 -1
  115. data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
  116. data/samp/pipelined_alu/hw5_unit_test_spec.rb +1 -1
  117. metadata +12 -9
  118. data/doc/figures/ruby_init.png +0 -0
  119. data/ext/swig_vpi.h +0 -924
  120. data/ref/ruby/classes/Vpi/Handle.src/M000030.html +0 -18
  121. data/ref/ruby/classes/Vpi/Handle.src/M000031.html +0 -18
  122. data/ref/ruby/classes/Vpi/Handle.src/M000032.html +0 -18
  123. data/ref/ruby/classes/Vpi/Handle.src/M000033.html +0 -18
@@ -10,133 +10,110 @@
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.rb, line 46</span>
14
- 46: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">init_bench</span> <span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">aSpecFormat</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aClockTrigger</span> <span class="ruby-comment cmt"># :yields: clock_signal</span>
15
- 47: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(.*?)_bench.rb:/</span>}
16
- 48: <span class="ruby-identifier">testName</span> = <span class="ruby-identifier">$1</span>
17
- 49: <span class="ruby-keyword kw">else</span>
18
- 50: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Unable to determine name of test.'</span>
19
- 51: <span class="ruby-keyword kw">end</span>
20
- 52:
21
- 53: <span class="ruby-identifier">aClockTrigger</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">lambda</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">clk</span><span class="ruby-operator">|</span> <span class="ruby-identifier">clk</span>.<span class="ruby-identifier">intVal</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>}
22
- 54:
23
- 55: <span class="ruby-identifier">useDebugger</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'DEBUG'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
24
- 56: <span class="ruby-identifier">useCoverage</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'COVERAGE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
25
- 57: <span class="ruby-identifier">usePrototype</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PROTOTYPE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
26
- 58:
27
- 59: <span class="ruby-comment cmt"># set up code coverage analysis</span>
28
- 60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useCoverage</span>
29
- 61: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rcov'</span>
30
- 62:
31
- 63: <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">with_coverage_analysis</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
32
- 64: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">dump_coverage_info</span> [
33
- 65: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">TextReport</span>.<span class="ruby-identifier">new</span>,
34
- 66: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">HTMLCoverage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:destdir</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{testName}_coverage&quot;</span>)
35
- 67: ]
36
- 68: <span class="ruby-keyword kw">end</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi.rb, line 31</span>
14
+ 31: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">init_bench</span> <span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">aSpecFormat</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aSimulationCycle</span>
15
+ 32: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;block must be given&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
16
+ 33:
17
+ 34: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(.*?)_bench.rb:/</span>}
18
+ 35: <span class="ruby-identifier">testName</span> = <span class="ruby-identifier">$1</span>
19
+ 36: <span class="ruby-keyword kw">else</span>
20
+ 37: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Unable to determine name of test.'</span>
21
+ 38: <span class="ruby-keyword kw">end</span>
22
+ 39:
23
+ 40: <span class="ruby-identifier">useDebugger</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'DEBUG'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
24
+ 41: <span class="ruby-identifier">useCoverage</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'COVERAGE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
25
+ 42: <span class="ruby-identifier">usePrototype</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PROTOTYPE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
26
+ 43:
27
+ 44: <span class="ruby-comment cmt"># set up code coverage analysis</span>
28
+ 45: <span class="ruby-comment cmt"># XXX: this is loaded *before* RCov to prevent coverage statistics about it</span>
29
+ 46: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/vpi'</span>
30
+ 47:
31
+ 48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useCoverage</span>
32
+ 49: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rcov'</span>
33
+ 50:
34
+ 51: <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">with_coverage_analysis</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
35
+ 52: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">dump_coverage_info</span> [
36
+ 53: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">TextReport</span>.<span class="ruby-identifier">new</span>,
37
+ 54: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">HTMLCoverage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:destdir</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{testName}_coverage&quot;</span>)
38
+ 55: ]
39
+ 56: <span class="ruby-keyword kw">end</span>
40
+ 57:
41
+ 58: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: coverage analysis is enabled for test #{testName.inspect}\n&quot;</span>
42
+ 59: <span class="ruby-keyword kw">end</span>
43
+ 60:
44
+ 61: <span class="ruby-comment cmt"># set up the specification library</span>
45
+ 62: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aSpecFormat</span>
46
+ 63: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:xUnit</span>
47
+ 64: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/unit'</span>
48
+ 65:
49
+ 66: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:rSpec</span>
50
+ 67: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">concat</span> <span class="ruby-node">%w[-f s]</span>
51
+ 68: <span class="ruby-identifier">require</span> <span class="ruby-value str">'spec'</span>
37
52
  69:
38
- 70: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: coverage analysis is enabled for test #{testName.inspect}\n&quot;</span>
39
- 71: <span class="ruby-keyword kw">end</span>
40
- 72:
41
- 73: <span class="ruby-comment cmt"># set up the specification library</span>
42
- 74: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aSpecFormat</span>
43
- 75: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:xUnit</span>
44
- 76: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/unit'</span>
45
- 77:
46
- 78: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:rSpec</span>
47
- 79: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">concat</span> <span class="ruby-node">%w[-f s]</span>
48
- 80: <span class="ruby-identifier">require</span> <span class="ruby-value str">'spec'</span>
53
+ 70: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:tSpec</span>
54
+ 71: <span class="ruby-constant">ARGV</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-rs'</span>
55
+ 72: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/spec'</span>
56
+ 73: <span class="ruby-keyword kw">end</span>
57
+ 74:
58
+ 75: <span class="ruby-comment cmt"># set up the interactive debugger</span>
59
+ 76: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useDebugger</span>
60
+ 77: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-debug'</span>
61
+ 78:
62
+ 79: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">start</span>
63
+ 80: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">post_mortem</span>
49
64
  81:
50
- 82: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:tSpec</span>
51
- 83: <span class="ruby-constant">ARGV</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-rs'</span>
52
- 84: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/spec'</span>
53
- 85: <span class="ruby-keyword kw">end</span>
54
- 86:
55
- 87: <span class="ruby-comment cmt"># set up the interactive debugger</span>
56
- 88: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useDebugger</span>
57
- 89: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-debug'</span>
58
- 90:
59
- 91: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">start</span>
60
- 92: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">post_mortem</span>
65
+ 82: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: debugger is enabled for test #{testName.inspect}\n&quot;</span>
66
+ 83: <span class="ruby-keyword kw">end</span>
67
+ 84:
68
+ 85: <span class="ruby-comment cmt"># suppress undefined method errors when debugger is not enabled</span>
69
+ 86: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:debugger</span>
70
+ 87: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
71
+ 88: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:debugger</span> <span class="ruby-keyword kw">do</span>
72
+ 89: <span class="ruby-comment cmt"># this is a dummy method!</span>
73
+ 90: <span class="ruby-keyword kw">end</span>
74
+ 91: <span class="ruby-keyword kw">end</span>
75
+ 92: <span class="ruby-keyword kw">end</span>
61
76
  93:
62
- 94: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: debugger is enabled for test #{testName.inspect}\n&quot;</span>
63
- 95: <span class="ruby-keyword kw">end</span>
64
- 96:
65
- 97: <span class="ruby-comment cmt"># suppress undefined method errors when debugger is not enabled</span>
66
- 98: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:debugger</span>
67
- 99: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
68
- 100: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:debugger</span> <span class="ruby-keyword kw">do</span>
69
- 101: <span class="ruby-comment cmt"># this is a dummy method!</span>
70
- 102: <span class="ruby-keyword kw">end</span>
71
- 103: <span class="ruby-keyword kw">end</span>
72
- 104: <span class="ruby-keyword kw">end</span>
73
- 105:
74
- 106: <span class="ruby-comment cmt"># set up the VPI utility layer</span>
75
- 107: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/vpi'</span>
76
- 108:
77
- 109: <span class="ruby-constant">Object</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
78
- 110: <span class="ruby-identifier">include</span> <span class="ruby-constant">Vpi</span>
79
- 111: <span class="ruby-keyword kw">end</span>
80
- 112:
81
- 113: <span class="ruby-comment cmt"># load the design under test</span>
82
- 114: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">design</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-node">&quot;#{testName}_bench&quot;</span>, <span class="ruby-keyword kw">nil</span>)
83
- 115: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Verilog bench for test #{testName.inspect} is inaccessible.&quot;</span>
84
- 116: <span class="ruby-keyword kw">end</span>
85
- 117:
86
- 118: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">design</span>)
87
- 119: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_design.rb&quot;</span>
77
+ 94: <span class="ruby-comment cmt"># set up the VPI utility layer</span>
78
+ 95: <span class="ruby-constant">Object</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
79
+ 96: <span class="ruby-identifier">include</span> <span class="ruby-constant">Vpi</span>
80
+ 97: <span class="ruby-keyword kw">end</span>
81
+ 98:
82
+ 99: <span class="ruby-comment cmt"># load the design under test</span>
83
+ 100: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">design</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-node">&quot;#{testName}_bench&quot;</span>, <span class="ruby-keyword kw">nil</span>)
84
+ 101: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Verilog bench for test #{testName.inspect} is inaccessible.&quot;</span>
85
+ 102: <span class="ruby-keyword kw">end</span>
86
+ 103:
87
+ 104: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">design</span>)
88
+ 105: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_design.rb&quot;</span>
89
+ 106:
90
+ 107: <span class="ruby-comment cmt"># load the design's prototype</span>
91
+ 108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">usePrototype</span>
92
+ 109: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_proto.rb&quot;</span>
93
+ 110:
94
+ 111: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
95
+ 112: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:simulate</span> <span class="ruby-keyword kw">do</span>
96
+ 113: <span class="ruby-identifier">design</span>.<span class="ruby-identifier">simulate!</span>
97
+ 114: <span class="ruby-keyword kw">end</span>
98
+ 115:
99
+ 116: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:vpi_register_cb</span> <span class="ruby-keyword kw">do</span>
100
+ 117: <span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;vpi_register_cb: callbacks not allowed when prototyping&quot;</span>
101
+ 118: <span class="ruby-keyword kw">end</span>
102
+ 119: <span class="ruby-keyword kw">end</span>
88
103
  120:
89
- 121: <span class="ruby-comment cmt"># load the design's prototype</span>
90
- 122: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">usePrototype</span>
91
- 123: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_proto.rb&quot;</span>
92
- 124:
93
- 125: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
94
- 126: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:relay_verilog</span> <span class="ruby-keyword kw">do</span>
95
- 127: <span class="ruby-identifier">design</span>.<span class="ruby-identifier">simulate!</span>
96
- 128: <span class="ruby-keyword kw">end</span>
97
- 129: <span class="ruby-keyword kw">end</span>
98
- 130:
99
- 131: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: prototype is enabled for test #{testName.inspect}\n&quot;</span>
100
- 132:
101
- 133: <span class="ruby-comment cmt"># trigger relay_verilog according to aClockTrigger</span>
102
- 134: <span class="ruby-keyword kw">else</span>
103
- 135: <span class="ruby-identifier">regs</span> = <span class="ruby-identifier">design</span>[<span class="ruby-constant">VpiReg</span>].<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">lineNo</span>}
104
- 136: <span class="ruby-identifier">clock</span> = <span class="ruby-identifier">regs</span>.<span class="ruby-identifier">first</span>
105
- 137:
106
- 138: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
107
- 139: <span class="ruby-comment cmt"># register callback for relay_verilog</span>
108
- 140: <span class="ruby-identifier">time</span> = <span class="ruby-constant">S_vpi_time</span>.<span class="ruby-identifier">new</span>
109
- 141: <span class="ruby-identifier">time</span>.<span class="ruby-identifier">type</span> = <span class="ruby-constant">VpiSuppressTime</span>
110
- 142:
111
- 143: <span class="ruby-identifier">value</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
112
- 144: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiSuppressVal</span>
113
- 145:
114
- 146: <span class="ruby-identifier">alarm</span> = <span class="ruby-constant">S_cb_data</span>.<span class="ruby-identifier">new</span>
115
- 147: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">reason</span> = <span class="ruby-constant">CbValueChange</span>
116
- 148: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">cb_rtn</span> = <span class="ruby-constant">Vlog_relay_ruby</span>
117
- 149: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">clock</span>
118
- 150: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">time</span>
119
- 151: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">value</span>
120
- 152: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">index</span> = <span class="ruby-value">0</span>
121
- 153: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">user_data</span> = <span class="ruby-keyword kw">nil</span>
122
- 154:
123
- 155: <span class="ruby-identifier">vpi_free_object</span>(<span class="ruby-identifier">vpi_register_cb</span>(<span class="ruby-identifier">alarm</span>))
124
- 156:
125
- 157: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:relay_verilog_old</span>, <span class="ruby-identifier">:relay_verilog</span>
126
- 158:
127
- 159: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:relay_verilog</span> <span class="ruby-keyword kw">do</span>
128
- 160: <span class="ruby-keyword kw">begin</span>
129
- 161: <span class="ruby-identifier">relay_verilog_old</span>
130
- 162: <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">aClockTrigger</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">clock</span>)
131
- 163: <span class="ruby-keyword kw">end</span>
132
- 164: <span class="ruby-keyword kw">end</span>
133
- 165:
134
- 166: <span class="ruby-comment cmt"># XXX: this completes the handshake with pthread_mutex_lock() in relay_main() in the C extension</span>
135
- 167: <span class="ruby-identifier">relay_verilog_old</span>
136
- 168: <span class="ruby-keyword kw">end</span>
137
- 169:
138
- 170: <span class="ruby-comment cmt"># load the design's specification</span>
139
- 171: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_spec.rb&quot;</span>
140
- 172: <span class="ruby-keyword kw">end</span></pre>
104
+ 121: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">&quot;#{Config::PROJECT_NAME}: prototype is enabled for test #{testName.inspect}\n&quot;</span>
105
+ 122:
106
+ 123: <span class="ruby-keyword kw">else</span>
107
+ 124: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
108
+ 125: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:simulate</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">aSimulationCycle</span>
109
+ 126: <span class="ruby-keyword kw">end</span>
110
+ 127:
111
+ 128: <span class="ruby-comment cmt"># XXX: this completes the handshake, by calling relay_verilog, with pthread_mutex_lock() in relay_main() in the C extension</span>
112
+ 129: <span class="ruby-identifier">advance_time</span>
113
+ 130: <span class="ruby-keyword kw">end</span>
114
+ 131:
115
+ 132: <span class="ruby-comment cmt"># load the design's specification</span>
116
+ 133: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;#{testName}_spec.rb&quot;</span>
117
+ 134: <span class="ruby-keyword kw">end</span></pre>
141
118
  </body>
142
119
  </html>
@@ -138,17 +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="#M000037">[]</a>&nbsp;&nbsp;
142
- <a href="#M000035">get_value</a>&nbsp;&nbsp;
143
- <a href="#M000034">get_value_wrapper</a>&nbsp;&nbsp;
144
- <a href="#M000038">inspect</a>&nbsp;&nbsp;
145
- <a href="#M000040">method_missing</a>&nbsp;&nbsp;
146
- <a href="#M000036">put_value</a>&nbsp;&nbsp;
147
- <a href="#M000039">to_s</a>&nbsp;&nbsp;
148
- <a href="#M000031">x!</a>&nbsp;&nbsp;
149
- <a href="#M000030">x?</a>&nbsp;&nbsp;
150
- <a href="#M000033">z!</a>&nbsp;&nbsp;
151
- <a href="#M000032">z?</a>&nbsp;&nbsp;
141
+ <a href="#M000041">[]</a>&nbsp;&nbsp;
142
+ <a href="#M000039">get_value</a>&nbsp;&nbsp;
143
+ <a href="#M000038">get_value_wrapper</a>&nbsp;&nbsp;
144
+ <a href="#M000042">inspect</a>&nbsp;&nbsp;
145
+ <a href="#M000044">method_missing</a>&nbsp;&nbsp;
146
+ <a href="#M000040">put_value</a>&nbsp;&nbsp;
147
+ <a href="#M000043">to_s</a>&nbsp;&nbsp;
148
+ <a href="#M000035">x!</a>&nbsp;&nbsp;
149
+ <a href="#M000034">x?</a>&nbsp;&nbsp;
150
+ <a href="#M000037">z!</a>&nbsp;&nbsp;
151
+ <a href="#M000036">z?</a>&nbsp;&nbsp;
152
152
  </div>
153
153
  </div>
154
154
 
@@ -190,12 +190,12 @@ names (strings or symbols) or integer constants.
190
190
  <div id="methods">
191
191
  <h3 class="section-bar">Public Instance methods</h3>
192
192
 
193
- <div id="method-M000037" class="method-detail">
194
- <a name="M000037"></a>
193
+ <div id="method-M000041" class="method-detail">
194
+ <a name="M000041"></a>
195
195
 
196
196
  <div class="method-heading">
197
- <a href="Handle.src/M000037.html" target="Code" class="method-signature"
198
- onclick="popupCode('Handle.src/M000037.html');return false;">
197
+ <a href="Handle.src/M000041.html" target="Code" class="method-signature"
198
+ onclick="popupCode('Handle.src/M000041.html');return false;">
199
199
  <span class="method-name">[]</span><span class="method-args">(*aTypes)</span>
200
200
  </a>
201
201
  </div>
@@ -208,12 +208,12 @@ constant).
208
208
  </div>
209
209
  </div>
210
210
 
211
- <div id="method-M000035" class="method-detail">
212
- <a name="M000035"></a>
211
+ <div id="method-M000039" class="method-detail">
212
+ <a name="M000039"></a>
213
213
 
214
214
  <div class="method-heading">
215
- <a href="Handle.src/M000035.html" target="Code" class="method-signature"
216
- onclick="popupCode('Handle.src/M000035.html');return false;">
215
+ <a href="Handle.src/M000039.html" target="Code" class="method-signature"
216
+ onclick="popupCode('Handle.src/M000039.html');return false;">
217
217
  <span class="method-name">get_value</span><span class="method-args">(aFormat = VpiObjTypeVal)</span>
218
218
  </a>
219
219
  </div>
@@ -227,12 +227,12 @@ attempt to determine the correct format.
227
227
  </div>
228
228
  </div>
229
229
 
230
- <div id="method-M000034" class="method-detail">
231
- <a name="M000034"></a>
230
+ <div id="method-M000038" class="method-detail">
231
+ <a name="M000038"></a>
232
232
 
233
233
  <div class="method-heading">
234
- <a href="Handle.src/M000034.html" target="Code" class="method-signature"
235
- onclick="popupCode('Handle.src/M000034.html');return false;">
234
+ <a href="Handle.src/M000038.html" target="Code" class="method-signature"
235
+ onclick="popupCode('Handle.src/M000038.html');return false;">
236
236
  <span class="method-name">get_value_wrapper</span><span class="method-args">(aFormat)</span>
237
237
  </a>
238
238
  </div>
@@ -245,12 +245,12 @@ Reads the value using the given format (integer constant) and returns a
245
245
  </div>
246
246
  </div>
247
247
 
248
- <div id="method-M000038" class="method-detail">
249
- <a name="M000038"></a>
248
+ <div id="method-M000042" class="method-detail">
249
+ <a name="M000042"></a>
250
250
 
251
251
  <div class="method-heading">
252
- <a href="Handle.src/M000038.html" target="Code" class="method-signature"
253
- onclick="popupCode('Handle.src/M000038.html');return false;">
252
+ <a href="Handle.src/M000042.html" target="Code" class="method-signature"
253
+ onclick="popupCode('Handle.src/M000042.html');return false;">
254
254
  <span class="method-name">inspect</span><span class="method-args">(*aPropNames)</span>
255
255
  </a>
256
256
  </div>
@@ -263,12 +263,12 @@ handles.
263
263
  </div>
264
264
  </div>
265
265
 
266
- <div id="method-M000040" class="method-detail">
267
- <a name="M000040"></a>
266
+ <div id="method-M000044" class="method-detail">
267
+ <a name="M000044"></a>
268
268
 
269
269
  <div class="method-heading">
270
- <a href="Handle.src/M000040.html" target="Code" class="method-signature"
271
- onclick="popupCode('Handle.src/M000040.html');return false;">
270
+ <a href="Handle.src/M000044.html" target="Code" class="method-signature"
271
+ onclick="popupCode('Handle.src/M000044.html');return false;">
272
272
  <span class="method-name">method_missing</span><span class="method-args">(aMeth, *aArgs, &amp;aBlockArg)</span>
273
273
  </a>
274
274
  </div>
@@ -289,18 +289,18 @@ Provides access to this handle&#8217;s
289
289
  through method calls. In the case that a child handle has the same name as
290
290
  a VPI property, the child handle will be accessed instead of the VPI
291
291
  property. However, you can still access the VPI property via <a
292
- href="Handle.html#M000035">get_value</a> and <a
293
- href="Handle.html#M000036">put_value</a>.
292
+ href="Handle.html#M000039">get_value</a> and <a
293
+ href="Handle.html#M000040">put_value</a>.
294
294
  </p>
295
295
  </div>
296
296
  </div>
297
297
 
298
- <div id="method-M000036" class="method-detail">
299
- <a name="M000036"></a>
298
+ <div id="method-M000040" class="method-detail">
299
+ <a name="M000040"></a>
300
300
 
301
301
  <div class="method-heading">
302
- <a href="Handle.src/M000036.html" target="Code" class="method-signature"
303
- onclick="popupCode('Handle.src/M000036.html');return false;">
302
+ <a href="Handle.src/M000040.html" target="Code" class="method-signature"
303
+ onclick="popupCode('Handle.src/M000040.html');return false;">
304
304
  <span class="method-name">put_value</span><span class="method-args">(aValue, aFormat = nil, aTime = nil, aDelay = VpiNoDelay)</span>
305
305
  </a>
306
306
  </div>
@@ -315,8 +315,8 @@ format.
315
315
  </div>
316
316
  </div>
317
317
 
318
- <div id="method-M000039" class="method-detail">
319
- <a name="M000039"></a>
318
+ <div id="method-M000043" class="method-detail">
319
+ <a name="M000043"></a>
320
320
 
321
321
  <div class="method-heading">
322
322
  <span class="method-name">to_s</span><span class="method-args">(*aPropNames)</span>
@@ -324,17 +324,17 @@ format.
324
324
 
325
325
  <div class="method-description">
326
326
  <p>
327
- Alias for <a href="Handle.html#M000038">inspect</a>
327
+ Alias for <a href="Handle.html#M000042">inspect</a>
328
328
  </p>
329
329
  </div>
330
330
  </div>
331
331
 
332
- <div id="method-M000031" class="method-detail">
333
- <a name="M000031"></a>
332
+ <div id="method-M000035" class="method-detail">
333
+ <a name="M000035"></a>
334
334
 
335
335
  <div class="method-heading">
336
- <a href="Handle.src/M000031.html" target="Code" class="method-signature"
337
- onclick="popupCode('Handle.src/M000031.html');return false;">
336
+ <a href="Handle.src/M000035.html" target="Code" class="method-signature"
337
+ onclick="popupCode('Handle.src/M000035.html');return false;">
338
338
  <span class="method-name">x!</span><span class="method-args">()</span>
339
339
  </a>
340
340
  </div>
@@ -346,12 +346,12 @@ Sets the logic value of this handle to unknown (x).
346
346
  </div>
347
347
  </div>
348
348
 
349
- <div id="method-M000030" class="method-detail">
350
- <a name="M000030"></a>
349
+ <div id="method-M000034" class="method-detail">
350
+ <a name="M000034"></a>
351
351
 
352
352
  <div class="method-heading">
353
- <a href="Handle.src/M000030.html" target="Code" class="method-signature"
354
- onclick="popupCode('Handle.src/M000030.html');return false;">
353
+ <a href="Handle.src/M000034.html" target="Code" class="method-signature"
354
+ onclick="popupCode('Handle.src/M000034.html');return false;">
355
355
  <span class="method-name">x?</span><span class="method-args">()</span>
356
356
  </a>
357
357
  </div>
@@ -363,12 +363,12 @@ Tests if the logic value of this handle is unknown (x).
363
363
  </div>
364
364
  </div>
365
365
 
366
- <div id="method-M000033" class="method-detail">
367
- <a name="M000033"></a>
366
+ <div id="method-M000037" class="method-detail">
367
+ <a name="M000037"></a>
368
368
 
369
369
  <div class="method-heading">
370
- <a href="Handle.src/M000033.html" target="Code" class="method-signature"
371
- onclick="popupCode('Handle.src/M000033.html');return false;">
370
+ <a href="Handle.src/M000037.html" target="Code" class="method-signature"
371
+ onclick="popupCode('Handle.src/M000037.html');return false;">
372
372
  <span class="method-name">z!</span><span class="method-args">()</span>
373
373
  </a>
374
374
  </div>
@@ -380,12 +380,12 @@ Sets the logic value of this handle to high impedance (z).
380
380
  </div>
381
381
  </div>
382
382
 
383
- <div id="method-M000032" class="method-detail">
384
- <a name="M000032"></a>
383
+ <div id="method-M000036" class="method-detail">
384
+ <a name="M000036"></a>
385
385
 
386
386
  <div class="method-heading">
387
- <a href="Handle.src/M000032.html" target="Code" class="method-signature"
388
- onclick="popupCode('Handle.src/M000032.html');return false;">
387
+ <a href="Handle.src/M000036.html" target="Code" class="method-signature"
388
+ onclick="popupCode('Handle.src/M000036.html');return false;">
389
389
  <span class="method-name">z?</span><span class="method-args">()</span>
390
390
  </a>
391
391
  </div>
@@ -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 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>
13
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 65</span>
14
+ 65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x?</span>
15
+ 66: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x/i</span>
16
+ 67: <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>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 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>
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>
43
17
  </body>
44
18
  </html>