ruby-vpi 15.0.2 → 16.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +23 -340
- data/Rakefile +169 -192
- data/bin/generate_test.rb +26 -25
- data/bin/generate_test_tpl/runner.rake +4 -10
- data/bin/header_to_ruby.rb +3 -20
- data/doc/README +11 -0
- data/doc/Rakefile +8 -21
- data/doc/common.css +44 -10
- data/doc/common.tpl +5 -10
- data/doc/history.doc +8 -7
- data/doc/history.html +228 -560
- data/doc/history.rb +7 -11
- data/doc/{history.yml → history.yaml} +325 -128
- data/doc/images/{feed-icon.png → feed-icon-28x28.png} +0 -0
- data/doc/images/ruby/LICENSE +15 -0
- data/doc/images/ruby/logo-reflection.png +0 -0
- data/doc/images/ruby/logo-reflection.xcf +0 -0
- data/doc/images/ruby/logo.png +0 -0
- data/doc/images/{LICENSE → tango/LICENSE} +0 -0
- data/doc/images/{caution.png → tango/caution.png} +0 -0
- data/doc/images/{caution.svg → tango/caution.svg} +0 -0
- data/doc/images/{home.png → tango/home.png} +0 -0
- data/doc/images/{home.svg → tango/home.svg} +0 -0
- data/doc/images/{important.png → tango/important.png} +0 -0
- data/doc/images/{important.svg → tango/important.svg} +0 -0
- data/doc/images/{next.png → tango/next.png} +0 -0
- data/doc/images/{next.svg → tango/next.svg} +0 -0
- data/doc/images/{note.png → tango/note.png} +0 -0
- data/doc/images/{note.svg → tango/note.svg} +0 -0
- data/doc/images/{prev.png → tango/prev.png} +0 -0
- data/doc/images/{prev.svg → tango/prev.svg} +0 -0
- data/doc/images/{tip.png → tango/tip.png} +0 -0
- data/doc/images/{tip.svg → tango/tip.svg} +0 -0
- data/doc/images/{up.png → tango/up.png} +0 -0
- data/doc/images/{up.svg → tango/up.svg} +0 -0
- data/doc/images/{warning.png → tango/warning.png} +0 -0
- data/doc/images/{warning.svg → tango/warning.svg} +0 -0
- data/doc/intro.inc +105 -36
- data/doc/lib/doc_format.rb +151 -29
- data/doc/lib/doc_proxy.rb +28 -69
- data/doc/lib/erb_content.rb +10 -22
- data/doc/lib/erb_proxy.rb +13 -24
- data/doc/manual.doc +16 -60
- data/doc/manual.html +257 -340
- data/doc/memo.doc +2 -0
- data/doc/memo.html +11 -11
- data/doc/readme.doc +36 -2
- data/doc/readme.html +214 -51
- data/doc/rss.erb +3 -3
- data/doc/rss.xml +217 -269
- data/ext/Rakefile +7 -22
- data/ext/common.h +10 -21
- data/ext/extconf.rb +5 -0
- data/ext/main.c +2 -18
- data/ext/main.h +1 -16
- data/ext/relay.c +3 -17
- data/ext/relay.h +3 -17
- data/ext/verilog.h +6 -18
- data/ext/vlog.c +3 -21
- data/ext/vlog.h +3 -17
- data/lib/ruby-vpi/erb.rb +7 -20
- data/lib/ruby-vpi/float.rb +6 -20
- data/lib/ruby-vpi/integer.rb +27 -47
- data/lib/ruby-vpi/rake.rb +4 -19
- data/lib/ruby-vpi/rcov.rb +6 -21
- data/lib/ruby-vpi/rdoc.rb +3 -21
- data/lib/ruby-vpi/runner.rb +28 -29
- data/lib/ruby-vpi/runner_proxy.rb +5 -21
- data/lib/ruby-vpi/verilog_parser.rb +5 -20
- data/lib/ruby-vpi/vpi.rb +420 -376
- data/lib/ruby-vpi.rb +26 -32
- data/ref/c/annotated.html +1 -1
- data/ref/c/common_8h.html +1 -1
- data/ref/c/files.html +1 -1
- data/ref/c/functions.html +1 -1
- data/ref/c/functions_vars.html +1 -1
- data/ref/c/globals.html +1 -1
- data/ref/c/globals_0x63.html +1 -1
- data/ref/c/globals_0x65.html +1 -1
- data/ref/c/globals_0x66.html +1 -1
- data/ref/c/globals_0x6d.html +1 -1
- data/ref/c/globals_0x70.html +1 -1
- data/ref/c/globals_0x72.html +1 -1
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +1 -1
- data/ref/c/globals_0x78.html +1 -1
- data/ref/c/globals_defs.html +1 -1
- data/ref/c/globals_defs_0x65.html +1 -1
- data/ref/c/globals_defs_0x70.html +1 -1
- data/ref/c/globals_defs_0x76.html +1 -1
- data/ref/c/globals_defs_0x78.html +1 -1
- data/ref/c/globals_enum.html +1 -1
- data/ref/c/globals_eval.html +1 -1
- data/ref/c/globals_func.html +1 -1
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +1 -1
- data/ref/c/index.html +1 -1
- data/ref/c/main_8c.html +1 -1
- data/ref/c/main_8h.html +1 -1
- data/ref/c/relay_8c.html +1 -1
- data/ref/c/relay_8h.html +1 -1
- data/ref/c/structt__cb__data.html +1 -1
- data/ref/c/structt__vpi__delay.html +1 -1
- data/ref/c/structt__vpi__error__info.html +1 -1
- data/ref/c/structt__vpi__strengthval.html +1 -1
- data/ref/c/structt__vpi__systf__data.html +1 -1
- data/ref/c/structt__vpi__time.html +1 -1
- data/ref/c/structt__vpi__value.html +1 -1
- data/ref/c/structt__vpi__vecval.html +1 -1
- data/ref/c/structt__vpi__vlog__info.html +1 -1
- data/ref/c/verilog_8h.html +1 -1
- data/ref/c/vlog_8c.html +1 -1
- data/ref/c/vlog_8h.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/ERB.html +5 -5
- data/ref/ruby/classes/ERB.src/{M000026.html → M000024.html} +15 -15
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/{M000027.html → M000025.html} +4 -4
- data/ref/ruby/classes/FileUtils.src/{M000028.html → M000026.html} +4 -4
- data/ref/ruby/classes/Float.html +5 -5
- data/ref/ruby/classes/Float.src/{M000022.html → M000020.html} +5 -5
- data/ref/ruby/classes/Integer.html +20 -56
- data/ref/ruby/classes/Integer.src/M000008.html +11 -11
- data/ref/ruby/classes/Integer.src/M000009.html +4 -4
- data/ref/ruby/classes/Integer.src/M000010.html +4 -4
- data/ref/ruby/classes/Integer.src/M000011.html +4 -4
- data/ref/ruby/classes/Integer.src/M000012.html +4 -4
- data/ref/ruby/classes/Integer.src/M000013.html +4 -4
- data/ref/ruby/classes/Integer.src/M000016.html +12 -9
- data/ref/ruby/classes/Integer.src/M000017.html +18 -9
- data/ref/ruby/classes/Integer.src/M000018.html +12 -12
- data/ref/ruby/classes/Integer.src/M000019.html +17 -18
- data/ref/ruby/classes/RDoc.src/M000053.html +25 -25
- data/ref/ruby/classes/RubyVpi/Config.html +3 -3
- data/ref/ruby/classes/RubyVpi.html +11 -5
- data/ref/ruby/classes/RubyVpi.src/{M000029.html → M000027.html} +103 -101
- data/ref/ruby/classes/String.html +21 -15
- data/ref/ruby/classes/String.src/M000021.html +36 -0
- data/ref/ruby/classes/String.src/{M000024.html → M000022.html} +24 -24
- data/ref/ruby/classes/String.src/M000023.html +5 -23
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +5 -5
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +7 -7
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +20 -20
- data/ref/ruby/classes/VerilogParser.html +6 -0
- data/ref/ruby/classes/VerilogParser.src/M000001.html +20 -20
- data/ref/ruby/classes/Vpi/Handle.html +89 -88
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +18 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +8 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +8 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +7 -6
- data/ref/ruby/classes/Vpi/Handle.src/M000043.html +31 -9
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +74 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000045.html +17 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +11 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000048.html +31 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000049.html +53 -52
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
- data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000036.html → M000033.html} +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html +5 -5
- data/ref/ruby/classes/Vpi.html +48 -19
- data/ref/ruby/classes/Vpi.src/M000028.html +28 -0
- data/ref/ruby/classes/Vpi.src/M000029.html +18 -0
- data/ref/ruby/classes/Vpi.src/M000030.html +25 -15
- data/ref/ruby/classes/Vpi.src/M000031.html +9 -5
- data/ref/ruby/classes/Vpi.src/M000032.html +9 -25
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +2 -1
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +7 -1
- data/ref/ruby/fr_method_index.html +34 -34
- data/samp/counter/counter_rspec_runner.rake +4 -0
- data/samp/counter/counter_xunit_runner.rake +4 -0
- data/samp/pipelined_alu/Hw5UnitModel.rb +3 -19
- data/samp/pipelined_alu/README +38 -13
- data/samp/pipelined_alu/TestHw5UnitModel.rb +9 -20
- data/samp/pipelined_alu/hw5_unit.v +1 -16
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +4 -0
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +3 -20
- data/samp/pipelined_alu/int_gen.rb +6 -20
- metadata +47 -43
- data/doc/LICENSE +0 -397
- data/doc/images/feed-icon.LICENSE +0 -2
- data/doc/images/feed-icon.svg +0 -18
- data/ref/ruby/classes/Integer.src/M000020.html +0 -25
- data/ref/ruby/classes/Integer.src/M000021.html +0 -30
- data/ref/ruby/classes/String.src/M000025.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000047.html +0 -24
- data/ref/ruby/classes/Vpi.src/M000033.html +0 -22
@@ -5,40 +5,83 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<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
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 138</span>
|
14
|
+
138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_value</span> <span class="ruby-identifier">aValue</span>, <span class="ruby-identifier">aFormat</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">aTime</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">aDelay</span> = <span class="ruby-constant">VpiNoDelay</span>
|
15
|
+
139: <span class="ruby-identifier">aFormat</span> =
|
16
|
+
140: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aFormat</span>
|
17
|
+
141: <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>)
|
18
|
+
142: <span class="ruby-keyword kw">else</span>
|
19
|
+
143: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
|
20
|
+
144: <span class="ruby-keyword kw">end</span>
|
21
|
+
145:
|
22
|
+
146: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
|
23
|
+
147: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
|
24
|
+
148:
|
25
|
+
149: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
26
|
+
150: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>, <span class="ruby-constant">VpiStringVal</span>
|
27
|
+
151: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
28
|
+
152:
|
29
|
+
153: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
30
|
+
154: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span> = <span class="ruby-identifier">aValue</span>
|
31
|
+
155:
|
32
|
+
156: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
33
|
+
157: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
|
34
|
+
158: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">16</span>)
|
35
|
+
159:
|
36
|
+
160: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
37
|
+
161: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
|
38
|
+
162:
|
39
|
+
163: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
40
|
+
164: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">aValue</span>
|
41
|
+
165:
|
42
|
+
166: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
43
|
+
167: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span> = <span class="ruby-identifier">aValue</span>
|
44
|
+
168:
|
45
|
+
169: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
46
|
+
170: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span> = <span class="ruby-identifier">aValue</span>
|
47
|
+
171:
|
48
|
+
172: <span class="ruby-keyword kw">else</span>
|
49
|
+
173: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{newVal.format}"</span>
|
50
|
+
174: <span class="ruby-keyword kw">end</span>
|
51
|
+
175:
|
52
|
+
176: <span class="ruby-identifier">vpi_put_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">newVal</span>, <span class="ruby-identifier">aTime</span>, <span class="ruby-identifier">aDelay</span>
|
53
|
+
177:
|
54
|
+
178: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
|
55
|
+
179: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
|
56
|
+
180:
|
57
|
+
181: <span class="ruby-identifier">writtenCorrectly</span> =
|
58
|
+
182: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
59
|
+
183: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>
|
60
|
+
184: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aValue</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span> <span class="ruby-comment cmt"># TODO: verify 'z' behavior</span>
|
61
|
+
185: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
|
62
|
+
186: <span class="ruby-keyword kw">else</span>
|
63
|
+
187: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
64
|
+
188: <span class="ruby-keyword kw">end</span>
|
65
|
+
189:
|
66
|
+
190: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
|
67
|
+
191: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
68
|
+
192:
|
69
|
+
193: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
70
|
+
194: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
|
71
|
+
195: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">%</span> (<span class="ruby-value">2</span> <span class="ruby-operator">**</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">vpiSize</span>))
|
72
|
+
196:
|
73
|
+
197: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
74
|
+
198: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
|
75
|
+
199:
|
76
|
+
200: <span class="ruby-keyword kw">else</span>
|
77
|
+
201: <span class="ruby-keyword kw">true</span>
|
78
|
+
202: <span class="ruby-keyword kw">end</span>
|
79
|
+
203:
|
80
|
+
204: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
|
81
|
+
205: <span class="ruby-identifier">raise</span> <span class="ruby-node">"value written (#{aValue.inspect}) does not match value read (#{readenVal.inspect}) from handle #{self}"</span>
|
82
|
+
206: <span class="ruby-keyword kw">end</span>
|
83
|
+
207:
|
84
|
+
208: <span class="ruby-identifier">aValue</span>
|
85
|
+
209: <span class="ruby-keyword kw">end</span></pre>
|
43
86
|
</body>
|
44
87
|
</html>
|
@@ -5,83 +5,26 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>[] (Vpi::Handle)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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">"unknown S_vpi_value.format: #{newVal.format}"</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">"value written (#{aValue.inspect}) does not match value read (#{readenVal.inspect}) from handle #{self}"</span>
|
82
|
-
209: <span class="ruby-keyword kw">end</span>
|
83
|
-
210:
|
84
|
-
211: <span class="ruby-identifier">aValue</span>
|
85
|
-
212: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 213</span>
|
14
|
+
213: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
|
15
|
+
214: <span class="ruby-identifier">handles</span> = []
|
16
|
+
215:
|
17
|
+
216: <span class="ruby-identifier">aTypes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
18
|
+
217: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">t</span>)
|
19
|
+
218:
|
20
|
+
219: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">itr</span> = <span class="ruby-identifier">vpi_iterate</span>(<span class="ruby-identifier">t</span>, <span class="ruby-keyword kw">self</span>)
|
21
|
+
220: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">h</span> = <span class="ruby-identifier">vpi_scan</span>(<span class="ruby-identifier">itr</span>)
|
22
|
+
221: <span class="ruby-identifier">handles</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">h</span>
|
23
|
+
222: <span class="ruby-keyword kw">end</span>
|
24
|
+
223: <span class="ruby-keyword kw">end</span>
|
25
|
+
224: <span class="ruby-keyword kw">end</span>
|
26
|
+
225:
|
27
|
+
226: <span class="ruby-identifier">handles</span>
|
28
|
+
227: <span class="ruby-keyword kw">end</span></pre>
|
86
29
|
</body>
|
87
30
|
</html>
|
@@ -5,26 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>inspect (Vpi::Handle)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
224: <span class="ruby-keyword kw">end</span>
|
24
|
-
225: <span class="ruby-keyword kw">end</span>
|
25
|
-
226: <span class="ruby-keyword kw">end</span>
|
26
|
-
227:
|
27
|
-
228: <span class="ruby-identifier">handles</span>
|
28
|
-
229: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 231</span>
|
14
|
+
231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aPropNames</span>
|
15
|
+
232: <span class="ruby-identifier">aPropNames</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-identifier">:fullName</span>, <span class="ruby-identifier">:size</span>, <span class="ruby-identifier">:file</span>, <span class="ruby-identifier">:lineNo</span>
|
16
|
+
233:
|
17
|
+
234: <span class="ruby-identifier">aPropNames</span>.<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
18
|
+
235: <span class="ruby-node">"#{name}=#{self.send(name.to_sym)}"</span>
|
19
|
+
236: <span class="ruby-keyword kw">end</span>
|
20
|
+
237:
|
21
|
+
238: <span class="ruby-node">"#<Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}>"</span>
|
22
|
+
239: <span class="ruby-keyword kw">end</span></pre>
|
29
23
|
</body>
|
30
24
|
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cbValueChange (Vpi::Handle)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 245</span>
|
14
|
+
245: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cbValueChange</span> <span class="ruby-identifier">aOptions</span> = {}, <span class="ruby-operator">&</span><span class="ruby-identifier">aHandler</span>
|
15
|
+
246: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
|
16
|
+
247:
|
17
|
+
248: <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:time</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">S_vpi_time</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-constant">VpiSuppressTime</span>)
|
18
|
+
249: <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:value</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:format</span> =<span class="ruby-operator">></span> <span class="ruby-constant">VpiSuppressVal</span>)
|
19
|
+
250:
|
20
|
+
251: <span class="ruby-identifier">alarm</span> = <span class="ruby-constant">S_cb_data</span>.<span class="ruby-identifier">new</span>(
|
21
|
+
252: <span class="ruby-identifier">:reason</span> =<span class="ruby-operator">></span> <span class="ruby-constant">CbValueChange</span>,
|
22
|
+
253: <span class="ruby-identifier">:obj</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>,
|
23
|
+
254: <span class="ruby-identifier">:time</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:time</span>],
|
24
|
+
255: <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:value</span>],
|
25
|
+
256: <span class="ruby-identifier">:index</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
26
|
+
257: )
|
27
|
+
258:
|
28
|
+
259: <span class="ruby-identifier">vpi_register_cb</span> <span class="ruby-identifier">alarm</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aHandler</span>
|
29
|
+
260: <span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -10,59 +10,60 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
267: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>
|
29
|
-
268: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aBlockArg</span>)
|
30
|
-
269:
|
31
|
-
270: <span class="ruby-keyword kw">else</span>
|
32
|
-
271: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">accessor</span>
|
33
|
-
272: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:d</span> <span class="ruby-comment cmt"># delay values</span>
|
34
|
-
273: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">'processing of delay values is not yet implemented.'</span>
|
35
|
-
274: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
|
36
|
-
275: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
|
37
|
-
276:
|
38
|
-
277: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:l</span> <span class="ruby-comment cmt"># logic values</span>
|
39
|
-
278: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
40
|
-
279: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
|
41
|
-
280: <span class="ruby-identifier">put_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>)
|
42
|
-
281: <span class="ruby-keyword kw">else</span>
|
43
|
-
282: <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>)
|
44
|
-
283: <span class="ruby-keyword kw">end</span>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 270</span>
|
14
|
+
270: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span> <span class="ruby-identifier">aMeth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aBlockArg</span>
|
15
|
+
271: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">child</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-identifier">aMeth</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-keyword kw">self</span>)
|
16
|
+
272: <span class="ruby-comment cmt"># cache the child for future accesses, in order to cut down number of</span>
|
17
|
+
273: <span class="ruby-comment cmt"># calls to method_missing</span>
|
18
|
+
274: (<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
19
|
+
275: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">aMeth</span> <span class="ruby-keyword kw">do</span>
|
20
|
+
276: <span class="ruby-identifier">child</span>
|
21
|
+
277: <span class="ruby-keyword kw">end</span>
|
22
|
+
278: <span class="ruby-keyword kw">end</span>
|
23
|
+
279:
|
24
|
+
280: <span class="ruby-identifier">child</span>
|
25
|
+
281:
|
26
|
+
282: <span class="ruby-keyword kw">else</span>
|
27
|
+
283: <span class="ruby-identifier">prop</span> = <span class="ruby-ivar">@@propCache</span>[<span class="ruby-identifier">aMeth</span>]
|
45
28
|
284:
|
46
|
-
285:
|
47
|
-
286:
|
29
|
+
285: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>
|
30
|
+
286: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aBlockArg</span>)
|
48
31
|
287:
|
49
|
-
288:
|
50
|
-
289:
|
51
|
-
290:
|
52
|
-
291: <span class="ruby-identifier">
|
53
|
-
292:
|
54
|
-
293:
|
55
|
-
294:
|
56
|
-
295: <span class="ruby-
|
57
|
-
296:
|
58
|
-
297:
|
59
|
-
298:
|
60
|
-
299:
|
61
|
-
300:
|
62
|
-
301:
|
63
|
-
302:
|
64
|
-
303:
|
65
|
-
304:
|
66
|
-
305:
|
32
|
+
288: <span class="ruby-keyword kw">else</span>
|
33
|
+
289: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">accessor</span>
|
34
|
+
290: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:d</span> <span class="ruby-comment cmt"># delay values</span>
|
35
|
+
291: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">'processing of delay values is not yet implemented.'</span>
|
36
|
+
292: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
|
37
|
+
293: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
|
38
|
+
294:
|
39
|
+
295: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:l</span> <span class="ruby-comment cmt"># logic values</span>
|
40
|
+
296: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
41
|
+
297: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
|
42
|
+
298: <span class="ruby-identifier">put_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">aArgs</span>)
|
43
|
+
299: <span class="ruby-keyword kw">else</span>
|
44
|
+
300: <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>)
|
45
|
+
301: <span class="ruby-keyword kw">end</span>
|
46
|
+
302:
|
47
|
+
303: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:i</span> <span class="ruby-comment cmt"># integer values</span>
|
48
|
+
304: <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
49
|
+
305:
|
50
|
+
306: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:b</span> <span class="ruby-comment cmt"># boolean values</span>
|
51
|
+
307: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
52
|
+
308: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">vpi_get</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>)
|
53
|
+
309: <span class="ruby-identifier">value</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>) <span class="ruby-comment cmt"># zero is false in C</span>
|
54
|
+
310: <span class="ruby-keyword kw">end</span>
|
55
|
+
311:
|
56
|
+
312: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:s</span> <span class="ruby-comment cmt"># string values</span>
|
57
|
+
313: <span class="ruby-identifier">vpi_get_str</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
58
|
+
314:
|
59
|
+
315: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:h</span> <span class="ruby-comment cmt"># handle values</span>
|
60
|
+
316: <span class="ruby-identifier">vpi_handle</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
61
|
+
317:
|
62
|
+
318: <span class="ruby-keyword kw">else</span>
|
63
|
+
319: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-node">"unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}"</span>
|
64
|
+
320: <span class="ruby-keyword kw">end</span>
|
65
|
+
321: <span class="ruby-keyword kw">end</span>
|
66
|
+
322: <span class="ruby-keyword kw">end</span>
|
67
|
+
323: <span class="ruby-keyword kw">end</span></pre>
|
67
68
|
</body>
|
68
69
|
</html>
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 517</span>
|
14
|
+
517: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer</span>
|
15
|
+
518: (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">high</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">INTEGER_BITS</span>) <span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">low</span>
|
16
|
+
519: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 523</span>
|
14
|
+
523: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer=</span> <span class="ruby-identifier">aValue</span>
|
15
|
+
524: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">low</span> = <span class="ruby-identifier">aValue</span> <span class="ruby-operator">&</span> <span class="ruby-constant">INTEGER_MASK</span>
|
16
|
+
525: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">high</span> = (<span class="ruby-identifier">aValue</span> <span class="ruby-operator">>></span> <span class="ruby-constant">INTEGER_BITS</span>) <span class="ruby-operator">&</span> <span class="ruby-constant">INTEGER_MASK</span>
|
17
|
+
526: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -86,9 +86,9 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
89
|
+
<a href="#M000034">to_f</a>
|
90
|
+
<a href="#M000033">to_i</a>
|
91
|
+
<a href="#M000035">to_s</a>
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
|
@@ -110,12 +110,12 @@
|
|
110
110
|
<div id="methods">
|
111
111
|
<h3 class="section-bar">Public Instance methods</h3>
|
112
112
|
|
113
|
-
<div id="method-
|
114
|
-
<a name="
|
113
|
+
<div id="method-M000034" class="method-detail">
|
114
|
+
<a name="M000034"></a>
|
115
115
|
|
116
116
|
<div class="method-heading">
|
117
|
-
<a href="S_vpi_value.src/
|
118
|
-
onclick="popupCode('S_vpi_value.src/
|
117
|
+
<a href="S_vpi_value.src/M000034.html" target="Code" class="method-signature"
|
118
|
+
onclick="popupCode('S_vpi_value.src/M000034.html');return false;">
|
119
119
|
<span class="method-name">to_f</span><span class="method-args">()</span>
|
120
120
|
</a>
|
121
121
|
</div>
|
@@ -124,12 +124,12 @@
|
|
124
124
|
</div>
|
125
125
|
</div>
|
126
126
|
|
127
|
-
<div id="method-
|
128
|
-
<a name="
|
127
|
+
<div id="method-M000033" class="method-detail">
|
128
|
+
<a name="M000033"></a>
|
129
129
|
|
130
130
|
<div class="method-heading">
|
131
|
-
<a href="S_vpi_value.src/
|
132
|
-
onclick="popupCode('S_vpi_value.src/
|
131
|
+
<a href="S_vpi_value.src/M000033.html" target="Code" class="method-signature"
|
132
|
+
onclick="popupCode('S_vpi_value.src/M000033.html');return false;">
|
133
133
|
<span class="method-name">to_i</span><span class="method-args">()</span>
|
134
134
|
</a>
|
135
135
|
</div>
|
@@ -138,12 +138,12 @@
|
|
138
138
|
</div>
|
139
139
|
</div>
|
140
140
|
|
141
|
-
<div id="method-
|
142
|
-
<a name="
|
141
|
+
<div id="method-M000035" class="method-detail">
|
142
|
+
<a name="M000035"></a>
|
143
143
|
|
144
144
|
<div class="method-heading">
|
145
|
-
<a href="S_vpi_value.src/
|
146
|
-
onclick="popupCode('S_vpi_value.src/
|
145
|
+
<a href="S_vpi_value.src/M000035.html" target="Code" class="method-signature"
|
146
|
+
onclick="popupCode('S_vpi_value.src/M000035.html');return false;">
|
147
147
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
148
148
|
</a>
|
149
149
|
</div>
|