ruby-vpi 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +19 -0
- data/README +3 -3
- data/Rakefile +147 -112
- data/bin/generate_test.rb +0 -2
- data/doc/src/manual.xml +11 -9
- data/doc/txt/manual.txt +14 -9
- data/doc/xhtml/background.organization.html +1 -1
- data/doc/xhtml/index.html +2 -2
- data/doc/xhtml/introduction.manifest.html +1 -1
- data/doc/xhtml/usage.installation.html +7 -1
- data/doc/xhtml/usage.tutorial.html +1 -1
- data/gem_extconf.rb +1 -1
- data/history.html +37 -0
- data/lib/ruby-vpi/runner.rb +77 -2
- data/lib/ruby-vpi.rb +0 -10
- data/readme.html +5 -3
- 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_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/hierarchy.html +1 -1
- data/ref/c/index.html +1 -1
- data/ref/c/relay_8cin.html +1 -1
- data/ref/c/relay_8hin.html +1 -1
- data/ref/c/ruby-vpi_8c.html +1 -1
- data/ref/c/structrelay____RubyOptions____def.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/swig_8cin.html +1 -1
- data/ref/c/swig_8hin.html +1 -1
- data/ref/c/verilog_8h.html +1 -1
- data/ref/c/vlog_8cin.html +1 -1
- data/ref/c/vlog_8hin.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/Counter.html +20 -20
- data/ref/ruby/classes/Counter.src/M000038.html +7 -9
- data/ref/ruby/classes/Counter.src/M000039.html +9 -7
- data/ref/ruby/classes/Counter.src/M000040.html +7 -9
- data/ref/ruby/classes/Counter.src/M000041.html +22 -0
- data/ref/ruby/classes/CounterProto.html +9 -9
- data/ref/ruby/classes/CounterProto.src/M000005.html +1 -1
- data/ref/ruby/classes/CounterProto.src/{M000004.html → M000006.html} +1 -1
- data/ref/ruby/classes/ERB.html +5 -5
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/M000048.html +5 -5
- data/ref/ruby/classes/{InputGenerator.src/M000027.html → FileUtils.src/M000049.html} +4 -4
- data/ref/ruby/classes/Hw5UnitModel/Operation.html +15 -15
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000012.html +12 -20
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000013.html +20 -5
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000014.html +18 -0
- data/ref/ruby/classes/Hw5UnitModel.html +24 -24
- data/ref/ruby/classes/Hw5UnitModel.src/M000009.html +7 -25
- data/ref/ruby/classes/Hw5UnitModel.src/M000010.html +25 -9
- data/ref/ruby/classes/Hw5UnitModel.src/M000011.html +22 -0
- data/ref/ruby/classes/Hw5_unit.html +5 -5
- data/ref/ruby/classes/Hw5_unit_spec.html +15 -15
- data/ref/ruby/classes/Hw5_unit_spec.src/M000024.html +8 -8
- data/ref/ruby/classes/Hw5_unit_spec.src/M000025.html +8 -54
- data/ref/ruby/classes/Hw5_unit_spec.src/M000026.html +67 -0
- data/ref/ruby/classes/InputGenerator.html +30 -30
- data/ref/ruby/classes/InputGenerator.src/M000028.html +5 -5
- data/ref/ruby/classes/InputGenerator.src/M000029.html +5 -6
- data/ref/ruby/classes/InputGenerator.src/M000030.html +6 -25
- data/ref/ruby/classes/InputGenerator.src/M000031.html +25 -6
- data/ref/ruby/classes/InputGenerator.src/M000032.html +6 -6
- data/ref/ruby/classes/InputGenerator.src/M000033.html +19 -0
- data/ref/ruby/classes/MaximumCounterValue.html +10 -10
- data/ref/ruby/classes/MaximumCounterValue.src/M000036.html +10 -8
- data/ref/ruby/classes/MaximumCounterValue.src/M000037.html +21 -0
- data/ref/ruby/classes/ModuleInfo.html +10 -10
- data/ref/ruby/classes/ModuleInfo.src/M000019.html +31 -13
- data/ref/ruby/classes/ModuleInfo.src/M000020.html +26 -0
- data/ref/ruby/classes/OutputInfo.html +5 -10
- data/ref/ruby/classes/OutputInfo.src/{M000017.html → M000018.html} +36 -36
- data/ref/ruby/classes/ResettedCounterValue.html +15 -15
- data/ref/ruby/classes/ResettedCounterValue.src/M000015.html +6 -5
- data/ref/ruby/classes/ResettedCounterValue.src/M000016.html +5 -10
- data/ref/ruby/classes/ResettedCounterValue.src/M000017.html +23 -0
- data/ref/ruby/classes/RubyVPI.html +0 -46
- data/ref/ruby/classes/RubyVPI.src/M000050.html +24 -24
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +35 -35
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000042.html +9 -31
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000043.html +31 -69
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000044.html +69 -114
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000045.html +114 -13
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000046.html +13 -5
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000047.html +18 -0
- data/ref/ruby/classes/String.html +5 -5
- data/ref/ruby/classes/Template.html +5 -5
- data/ref/ruby/classes/TestHw5UnitModel.html +15 -15
- data/ref/ruby/classes/TestHw5UnitModel.src/M000021.html +6 -6
- data/ref/ruby/classes/TestHw5UnitModel.src/M000022.html +6 -51
- data/ref/ruby/classes/TestHw5UnitModel.src/M000023.html +64 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +6 -6
- data/ref/ruby/files/bin/generate_test_tpl/bench_rb.html +1 -1
- data/ref/ruby/files/bin/generate_test_tpl/design_rb.html +1 -1
- data/ref/ruby/files/bin/generate_test_tpl/proto_rb.html +1 -1
- data/ref/ruby/files/bin/generate_test_tpl/spec_rb.html +6 -6
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/ext/extconf_rb.html +1 -1
- data/ref/ruby/files/gem_extconf_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +78 -2
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000001.html +20 -0
- data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_bench_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_design_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_proto_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_spec_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_bench_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_design_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_proto_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_spec_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/Hw5UnitModel_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/InputGenerator_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/TestHw5UnitModel_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_bench_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_design_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_spec_rb.html +1 -1
- data/ref/ruby/fr_file_index.html +1 -0
- data/ref/ruby/fr_method_index.html +48 -48
- data/samp/counter/Rakefile +1 -1
- data/samp/pipelined_alu/Rakefile +1 -1
- metadata +41 -41
- data/ref/ruby/classes/Counter.src/M000037.html +0 -20
- data/ref/ruby/classes/FileUtils.src/M000047.html +0 -18
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000011.html +0 -25
- data/ref/ruby/classes/Hw5UnitModel.src/M000008.html +0 -20
- data/ref/ruby/classes/Hw5_unit_spec.src/M000023.html +0 -21
- data/ref/ruby/classes/MaximumCounterValue.src/M000035.html +0 -23
- data/ref/ruby/classes/ModuleInfo.src/M000018.html +0 -44
- data/ref/ruby/classes/ResettedCounterValue.src/M000014.html +0 -19
- data/ref/ruby/classes/RubyVPI.src/M000049.html +0 -18
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000041.html +0 -22
- data/ref/ruby/classes/TestHw5UnitModel.src/M000020.html +0 -19
- data/tpl/runner.rake +0 -96
- /data/{tpl/launcher.rake → lib/ruby-vpi/runner_proxy.rb} +0 -0
- /data/{tpl → lib/ruby-vpi}/synopsys_vcs.tab +0 -0
- /data/ref/ruby/classes/ERB.src/{M000034.html → M000035.html} +0 -0
- /data/ref/ruby/classes/Hw5UnitModel.src/{M000006.html → M000007.html} +0 -0
- /data/ref/ruby/classes/Hw5_unit.src/{M000003.html → M000004.html} +0 -0
- /data/ref/ruby/classes/String.src/{M000033.html → M000034.html} +0 -0
- /data/ref/ruby/classes/Template.src/{M000026.html → M000027.html} +0 -0
- /data/ref/ruby/files/bin/generate_test_rb.src/{M000001.html → M000002.html} +0 -0
- /data/ref/ruby/files/bin/generate_test_tpl/spec_rb.src/{M000002.html → M000003.html} +0 -0
|
@@ -5,40 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>get_value_wrapper (SWIG::TYPE_p_unsigned_int)</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>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
81: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
|
22
|
-
82: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
|
|
23
|
-
83:
|
|
24
|
-
84: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
|
25
|
-
85: <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
|
-
86:
|
|
27
|
-
87: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
|
28
|
-
88: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
|
|
29
|
-
89:
|
|
30
|
-
90: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
|
31
|
-
91: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
|
|
32
|
-
92:
|
|
33
|
-
93: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
|
34
|
-
94: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
|
|
35
|
-
95:
|
|
36
|
-
96: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
|
37
|
-
97: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
|
|
38
|
-
98:
|
|
39
|
-
99: <span class="ruby-keyword kw">else</span>
|
|
40
|
-
100: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{val.format}"</span>
|
|
41
|
-
101: <span class="ruby-keyword kw">end</span>
|
|
42
|
-
102: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 65</span>
|
|
14
|
+
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value_wrapper</span> <span class="ruby-identifier">aFormat</span>
|
|
15
|
+
66: <span class="ruby-identifier">val</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
|
|
16
|
+
67: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
|
|
17
|
+
68:
|
|
18
|
+
69: <span class="ruby-identifier">vpi_get_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span>
|
|
19
|
+
70: <span class="ruby-identifier">val</span>
|
|
20
|
+
71: <span class="ruby-keyword kw">end</span></pre>
|
|
43
21
|
</body>
|
|
44
22
|
</html>
|
|
@@ -5,78 +5,40 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>get_value (SWIG::TYPE_p_unsigned_int)</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_util.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
|
-
|
|
43
|
-
134: <span class="ruby-keyword kw">else</span>
|
|
44
|
-
135: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{newVal.format}"</span>
|
|
45
|
-
136: <span class="ruby-keyword kw">end</span>
|
|
46
|
-
137:
|
|
47
|
-
138: <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>
|
|
48
|
-
139:
|
|
49
|
-
140: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
|
|
50
|
-
141: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
|
|
51
|
-
142:
|
|
52
|
-
143: <span class="ruby-identifier">writtenCorrectly</span> =
|
|
53
|
-
144: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
|
54
|
-
145: <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>
|
|
55
|
-
146: <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>
|
|
56
|
-
147: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
|
|
57
|
-
148: <span class="ruby-keyword kw">else</span>
|
|
58
|
-
149: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
|
59
|
-
150: <span class="ruby-keyword kw">end</span>
|
|
60
|
-
151:
|
|
61
|
-
152: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
|
|
62
|
-
153: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
|
63
|
-
154:
|
|
64
|
-
155: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
|
65
|
-
156: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
|
|
66
|
-
157: <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>))
|
|
67
|
-
158:
|
|
68
|
-
159: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
|
69
|
-
160: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
|
|
70
|
-
161:
|
|
71
|
-
162: <span class="ruby-keyword kw">else</span>
|
|
72
|
-
163: <span class="ruby-keyword kw">true</span>
|
|
73
|
-
164: <span class="ruby-keyword kw">end</span>
|
|
74
|
-
165:
|
|
75
|
-
166: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
|
|
76
|
-
167: <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>
|
|
77
|
-
168: <span class="ruby-keyword kw">end</span>
|
|
78
|
-
169:
|
|
79
|
-
170: <span class="ruby-identifier">aValue</span>
|
|
80
|
-
171: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 74</span>
|
|
14
|
+
74: <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
|
+
75: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-identifier">aFormat</span>)
|
|
16
|
+
76:
|
|
17
|
+
77: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
|
|
18
|
+
78: <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
|
+
79: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
|
|
20
|
+
80:
|
|
21
|
+
81: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
|
22
|
+
82: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
|
|
23
|
+
83:
|
|
24
|
+
84: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
|
25
|
+
85: <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
|
+
86:
|
|
27
|
+
87: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
|
28
|
+
88: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
|
|
29
|
+
89:
|
|
30
|
+
90: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
|
31
|
+
91: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
|
|
32
|
+
92:
|
|
33
|
+
93: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
|
34
|
+
94: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
|
|
35
|
+
95:
|
|
36
|
+
96: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
|
37
|
+
97: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
|
|
38
|
+
98:
|
|
39
|
+
99: <span class="ruby-keyword kw">else</span>
|
|
40
|
+
100: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{val.format}"</span>
|
|
41
|
+
101: <span class="ruby-keyword kw">end</span>
|
|
42
|
+
102: <span class="ruby-keyword kw">end</span></pre>
|
|
81
43
|
</body>
|
|
82
44
|
</html>
|
|
@@ -5,123 +5,78 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>put_value (SWIG::TYPE_p_unsigned_int)</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_util.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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
246: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'s'</span> <span class="ruby-comment cmt"># string values</span>
|
|
82
|
-
247: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_get_str</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
|
|
83
|
-
248:
|
|
84
|
-
249: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'h'</span> <span class="ruby-comment cmt"># handle values</span>
|
|
85
|
-
250: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">vpi_handle</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">isAssign</span>
|
|
86
|
-
251:
|
|
87
|
-
252: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># accessor not specified. guess its value from property name</span>
|
|
88
|
-
253: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">isQuery</span>
|
|
89
|
-
254: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'b'</span>
|
|
90
|
-
255: <span class="ruby-keyword kw">redo</span>
|
|
91
|
-
256: <span class="ruby-keyword kw">end</span>
|
|
92
|
-
257:
|
|
93
|
-
258: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">propName</span>
|
|
94
|
-
259: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Time$/</span>
|
|
95
|
-
260: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'d'</span>
|
|
96
|
-
261: <span class="ruby-keyword kw">redo</span>
|
|
97
|
-
262:
|
|
98
|
-
263: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Val$/</span>
|
|
99
|
-
264: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'l'</span>
|
|
100
|
-
265: <span class="ruby-keyword kw">redo</span>
|
|
101
|
-
266:
|
|
102
|
-
267: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Type$/</span>, <span class="ruby-regexp re">/Direction$/</span>, <span class="ruby-regexp re">/Index$/</span>, <span class="ruby-regexp re">/Size$/</span>, <span class="ruby-regexp re">/Strength\d?$/</span>, <span class="ruby-regexp re">/Polarity$/</span>, <span class="ruby-regexp re">/Edge$/</span>, <span class="ruby-regexp re">/Offset$/</span>, <span class="ruby-regexp re">/Mode$/</span>
|
|
103
|
-
268: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'i'</span>
|
|
104
|
-
269: <span class="ruby-keyword kw">redo</span>
|
|
105
|
-
270:
|
|
106
|
-
271: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Is[A-Z]/</span>, <span class="ruby-regexp re">/ed$/</span>
|
|
107
|
-
272: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'b'</span>
|
|
108
|
-
273: <span class="ruby-keyword kw">redo</span>
|
|
109
|
-
274:
|
|
110
|
-
275: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Name$/</span>, <span class="ruby-regexp re">/File$/</span>, <span class="ruby-regexp re">/Decompile$/</span>
|
|
111
|
-
276: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'s'</span>
|
|
112
|
-
277: <span class="ruby-keyword kw">redo</span>
|
|
113
|
-
278:
|
|
114
|
-
279: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Parent$/</span>, <span class="ruby-regexp re">/Inst$/</span>, <span class="ruby-regexp re">/Range$/</span>, <span class="ruby-regexp re">/Driver$/</span>, <span class="ruby-regexp re">/Net$/</span>, <span class="ruby-regexp re">/Load$/</span>, <span class="ruby-regexp re">/Conn$/</span>, <span class="ruby-regexp re">/Bit$/</span>, <span class="ruby-regexp re">/Word$/</span>, <span class="ruby-regexp re">/[LR]hs$/</span>, <span class="ruby-regexp re">/(In|Out)$/</span>, <span class="ruby-regexp re">/Term$/</span>, <span class="ruby-regexp re">/Argument$/</span>, <span class="ruby-regexp re">/Condition$/</span>, <span class="ruby-regexp re">/Use$/</span>, <span class="ruby-regexp re">/Operand$/</span>, <span class="ruby-regexp re">/Stmt$/</span>, <span class="ruby-regexp re">/Expr$/</span>, <span class="ruby-regexp re">/Scope$/</span>, <span class="ruby-regexp re">/Memory$/</span>, <span class="ruby-regexp re">/Delay$/</span>
|
|
115
|
-
280: <span class="ruby-identifier">accessor</span> = <span class="ruby-value str">'h'</span>
|
|
116
|
-
281: <span class="ruby-keyword kw">redo</span>
|
|
117
|
-
282: <span class="ruby-keyword kw">end</span>
|
|
118
|
-
283: <span class="ruby-keyword kw">end</span>
|
|
119
|
-
284:
|
|
120
|
-
285: <span class="ruby-keyword kw">break</span>
|
|
121
|
-
286: <span class="ruby-keyword kw">end</span>
|
|
122
|
-
287: <span class="ruby-keyword kw">end</span>
|
|
123
|
-
288:
|
|
124
|
-
289: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-node">"unable to access VPI property `#{propName}' through method `#{aMsg}' with arguments `#{aArgs.inspect}' for handle #{self}"</span>
|
|
125
|
-
290: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi_util.rb, line 105</span>
|
|
14
|
+
105: <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
|
+
106: <span class="ruby-identifier">aFormat</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiObjTypeVal</span>).<span class="ruby-identifier">format</span>
|
|
16
|
+
107:
|
|
17
|
+
108: <span class="ruby-identifier">newVal</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
|
|
18
|
+
109: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-identifier">aFormat</span>
|
|
19
|
+
110:
|
|
20
|
+
111: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
|
21
|
+
112: <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>
|
|
22
|
+
113: <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>
|
|
23
|
+
114:
|
|
24
|
+
115: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
|
25
|
+
116: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span> = <span class="ruby-identifier">aValue</span>
|
|
26
|
+
117:
|
|
27
|
+
118: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
|
28
|
+
119: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiHexStrVal</span>
|
|
29
|
+
120: <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>)
|
|
30
|
+
121:
|
|
31
|
+
122: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
|
32
|
+
123: <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>
|
|
33
|
+
124:
|
|
34
|
+
125: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
|
35
|
+
126: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">aValue</span>
|
|
36
|
+
127:
|
|
37
|
+
128: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
|
38
|
+
129: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span> = <span class="ruby-identifier">aValue</span>
|
|
39
|
+
130:
|
|
40
|
+
131: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
|
41
|
+
132: <span class="ruby-identifier">newVal</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span> = <span class="ruby-identifier">aValue</span>
|
|
42
|
+
133:
|
|
43
|
+
134: <span class="ruby-keyword kw">else</span>
|
|
44
|
+
135: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{newVal.format}"</span>
|
|
45
|
+
136: <span class="ruby-keyword kw">end</span>
|
|
46
|
+
137:
|
|
47
|
+
138: <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>
|
|
48
|
+
139:
|
|
49
|
+
140: <span class="ruby-comment cmt"># ensure that value was written correctly</span>
|
|
50
|
+
141: <span class="ruby-identifier">readenVal</span> = <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">aFormat</span>)
|
|
51
|
+
142:
|
|
52
|
+
143: <span class="ruby-identifier">writtenCorrectly</span> =
|
|
53
|
+
144: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
|
54
|
+
145: <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>
|
|
55
|
+
146: <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>
|
|
56
|
+
147: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[xz]/i</span>
|
|
57
|
+
148: <span class="ruby-keyword kw">else</span>
|
|
58
|
+
149: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
|
59
|
+
150: <span class="ruby-keyword kw">end</span>
|
|
60
|
+
151:
|
|
61
|
+
152: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStringVal</span>
|
|
62
|
+
153: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_s</span>
|
|
63
|
+
154:
|
|
64
|
+
155: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
|
65
|
+
156: <span class="ruby-comment cmt"># allow for register overflow when limit reached</span>
|
|
66
|
+
157: <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>))
|
|
67
|
+
158:
|
|
68
|
+
159: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
|
69
|
+
160: <span class="ruby-identifier">readenVal</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_f</span>
|
|
70
|
+
161:
|
|
71
|
+
162: <span class="ruby-keyword kw">else</span>
|
|
72
|
+
163: <span class="ruby-keyword kw">true</span>
|
|
73
|
+
164: <span class="ruby-keyword kw">end</span>
|
|
74
|
+
165:
|
|
75
|
+
166: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">writtenCorrectly</span>
|
|
76
|
+
167: <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>
|
|
77
|
+
168: <span class="ruby-keyword kw">end</span>
|
|
78
|
+
169:
|
|
79
|
+
170: <span class="ruby-identifier">aValue</span>
|
|
80
|
+
171: <span class="ruby-keyword kw">end</span></pre>
|
|
126
81
|
</body>
|
|
127
82
|
</html>
|