ruby-vpi 18.0.2 → 19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +15 -19
- data/bin/generate/proto.rb +15 -10
- data/bin/ruby-vpi +2 -0
- data/doc/README +3 -5
- data/doc/Rakefile +3 -3
- data/doc/common.css +24 -136
- data/doc/common.tpl +48 -37
- data/doc/figures/figures.dia +19 -19
- data/doc/figures/ruby_relay.png +0 -0
- data/doc/history.html +252 -67
- data/doc/history.inc +98 -1
- data/doc/history.yaml +105 -0
- data/doc/intro.inc +43 -32
- data/doc/lib/doc_format.rb +19 -13
- data/doc/lib/doc_proxy.rb +7 -7
- data/doc/manual.doc +156 -117
- data/doc/manual.html +601 -560
- data/doc/memo.html +29 -25
- data/doc/print.css +63 -4
- data/doc/readme.doc +4 -6
- data/doc/readme.html +129 -111
- data/doc/rss.xml +168 -7
- data/doc/screen.css +146 -0
- data/doc/spacing.css +57 -0
- data/{samp → examples}/counter/RSpec/Rakefile +0 -0
- data/{samp → examples}/counter/RSpec/counter_design.rb +0 -0
- data/examples/counter/RSpec/counter_proto.rb +9 -0
- data/{samp → examples}/counter/RSpec/counter_runner.rake +0 -0
- data/{samp → examples}/counter/RSpec/counter_spec.rb +0 -0
- data/{samp → examples}/counter/Rakefile +0 -0
- data/{samp → examples}/counter/counter.v +0 -0
- data/{samp → examples}/counter/xUnit/Rakefile +0 -0
- data/{samp → examples}/counter/xUnit/counter_bench.rb +0 -0
- data/{samp → examples}/counter/xUnit/counter_bench.v +0 -0
- data/{samp → examples}/counter/xUnit/counter_design.rb +0 -0
- data/examples/counter/xUnit/counter_proto.rb +9 -0
- data/{samp → examples}/counter/xUnit/counter_runner.rake +0 -0
- data/{samp → examples}/counter/xUnit/counter_spec.rb +0 -0
- data/{samp → examples}/pipelined_alu/Hw5UnitModel.rb +0 -0
- data/{samp → examples}/pipelined_alu/README +0 -0
- data/{samp → examples}/pipelined_alu/Rakefile +0 -0
- data/{samp → examples}/pipelined_alu/TestHw5UnitModel.rb +0 -0
- data/{samp → examples}/pipelined_alu/hw5_unit.v +0 -0
- data/{samp → examples}/pipelined_alu/hw5_unit_design.rb +0 -7
- data/examples/pipelined_alu/hw5_unit_proto.rb +2 -0
- data/{samp → examples}/pipelined_alu/hw5_unit_runner.rake +0 -0
- data/{samp → examples}/pipelined_alu/hw5_unit_spec.rb +0 -0
- data/{samp → examples}/pipelined_alu/int_gen.rb +0 -0
- data/{samp → examples}/register_file/LICENSE +0 -0
- data/{samp → examples}/register_file/README +0 -0
- data/{samp → examples}/register_file/Rakefile +0 -0
- data/{samp → examples}/register_file/register_file.v +0 -0
- data/{samp → examples}/register_file/register_file_design.rb +0 -0
- data/examples/register_file/register_file_proto.rb +11 -0
- data/{samp → examples}/register_file/register_file_runner.rake +0 -0
- data/{samp → examples}/register_file/register_file_spec.rb +0 -0
- data/ext/main.c +5 -5
- data/ext/swig_vpi.i +6 -2
- data/lib/ruby-vpi/core/callback.rb +142 -0
- data/lib/ruby-vpi/core/edge.rb +128 -0
- data/lib/ruby-vpi/core/handle.rb +421 -0
- data/lib/ruby-vpi/core/scheduler.rb +244 -0
- data/lib/ruby-vpi/core/struct.rb +123 -0
- data/lib/ruby-vpi/core.rb +41 -0
- data/lib/ruby-vpi/rcov.rb +25 -12
- data/lib/ruby-vpi/runner.rb +30 -26
- data/lib/ruby-vpi/runner_boot_loader.rb +67 -37
- data/lib/ruby-vpi.rb +2 -2
- 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 +7 -5
- data/ref/ruby/classes/ERB.src/{M000026.html → M000024.html} +0 -0
- data/ref/ruby/classes/FileUtils.html +11 -11
- data/ref/ruby/classes/FileUtils.src/{M000027.html → M000025.html} +0 -0
- data/ref/ruby/classes/FileUtils.src/{M000028.html → M000026.html} +0 -0
- data/ref/ruby/classes/Float.html +8 -6
- data/ref/ruby/classes/Float.src/{M000021.html → M000019.html} +0 -0
- data/ref/ruby/classes/Integer.html +67 -65
- data/ref/ruby/classes/Integer.src/M000007.html +25 -0
- data/ref/ruby/classes/Integer.src/{M000014.html → M000008.html} +5 -5
- data/ref/ruby/classes/Integer.src/M000009.html +5 -12
- data/ref/ruby/classes/Integer.src/M000010.html +5 -5
- data/ref/ruby/classes/Integer.src/M000011.html +5 -5
- data/ref/ruby/classes/Integer.src/M000012.html +5 -5
- data/ref/ruby/classes/Integer.src/M000015.html +25 -0
- data/ref/ruby/classes/Integer.src/M000016.html +31 -0
- data/ref/ruby/classes/Integer.src/M000017.html +12 -12
- data/ref/ruby/classes/Integer.src/M000018.html +17 -18
- data/ref/ruby/classes/Object.html +126 -0
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000061.html → M000081.html} +0 -0
- data/ref/ruby/classes/RubyVPI.html +50 -9
- data/ref/ruby/classes/String.html +22 -20
- data/ref/ruby/classes/String.src/M000020.html +36 -0
- data/ref/ruby/classes/String.src/M000021.html +41 -0
- data/ref/ruby/classes/String.src/M000022.html +5 -23
- data/ref/ruby/classes/String.src/M000023.html +5 -28
- data/ref/ruby/classes/{Vpi → VPI}/Handle.html +442 -140
- data/ref/ruby/classes/{Vpi/Handle.src/M000042.html → VPI/Handle.src/M000037.html} +4 -4
- data/ref/ruby/classes/VPI/Handle.src/M000038.html +21 -0
- data/ref/ruby/classes/VPI/Handle.src/M000039.html +18 -0
- data/ref/ruby/classes/{Vpi/Handle.src/M000036.html → VPI/Handle.src/M000040.html} +5 -5
- data/ref/ruby/classes/VPI/Handle.src/M000045.html +18 -0
- data/ref/ruby/classes/{Vpi/Handle.src/M000038.html → VPI/Handle.src/M000046.html} +5 -5
- data/ref/ruby/classes/VPI/Handle.src/M000057.html +18 -0
- data/ref/ruby/classes/{Vpi/Handle.src/M000040.html → VPI/Handle.src/M000058.html} +5 -5
- data/ref/ruby/classes/VPI/Handle.src/M000061.html +18 -0
- data/ref/ruby/classes/VPI/Handle.src/M000062.html +18 -0
- data/ref/ruby/classes/{Vpi/Handle.src/M000054.html → VPI/Handle.src/M000065.html} +11 -11
- data/ref/ruby/classes/VPI/Handle.src/M000067.html +21 -0
- data/ref/ruby/classes/VPI/Handle.src/M000068.html +28 -0
- data/ref/ruby/classes/VPI/Handle.src/M000069.html +50 -0
- data/ref/ruby/classes/{Vpi/Handle.src/M000048.html → VPI/Handle.src/M000070.html} +6 -6
- data/ref/ruby/classes/{Vpi/Handle.src/M000049.html → VPI/Handle.src/M000071.html} +6 -6
- data/ref/ruby/classes/{Vpi/Handle.src/M000050.html → VPI/Handle.src/M000072.html} +5 -5
- data/ref/ruby/classes/{Vpi/Handle.src/M000051.html → VPI/Handle.src/M000073.html} +17 -17
- data/ref/ruby/classes/VPI/Handle.src/M000075.html +18 -0
- data/ref/ruby/classes/VPI/Handle.src/M000076.html +40 -0
- data/ref/ruby/classes/{Vpi/Handle.src/M000056.html → VPI/Handle.src/M000077.html} +18 -18
- data/ref/ruby/classes/{Vpi → VPI}/S_vpi_time.html +22 -20
- data/ref/ruby/classes/VPI/S_vpi_time.src/M000078.html +18 -0
- data/ref/ruby/classes/VPI/S_vpi_time.src/M000079.html +19 -0
- data/ref/ruby/classes/{Vpi → VPI}/S_vpi_value.html +37 -23
- data/ref/ruby/classes/VPI/S_vpi_value.src/M000034.html +35 -0
- data/ref/ruby/classes/VPI/S_vpi_value.src/M000035.html +42 -0
- data/ref/ruby/classes/VPI/S_vpi_value.src/M000036.html +42 -0
- data/ref/ruby/classes/{Vpi.html → VPI.html} +129 -34
- data/ref/ruby/classes/VPI.src/M000027.html +19 -0
- data/ref/ruby/classes/VPI.src/M000028.html +18 -0
- data/ref/ruby/classes/VPI.src/M000029.html +19 -0
- data/ref/ruby/classes/VPI.src/M000031.html +25 -0
- data/ref/ruby/classes/VPI.src/M000032.html +26 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.html +17 -15
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html +23 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000007.html → M000005.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +5 -10
- data/ref/ruby/classes/VerilogParser/Module.html +7 -5
- data/ref/ruby/classes/VerilogParser/Module.src/{M000005.html → M000003.html} +0 -0
- data/ref/ruby/classes/VerilogParser.html +7 -5
- data/ref/ruby/classes/VerilogParser.src/{M000004.html → M000002.html} +0 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_rb.html +2 -2
- data/ref/ruby/files/lib/ruby-vpi/{vpi_rb.html → core/callback_rb.html} +7 -8
- data/ref/ruby/files/lib/ruby-vpi/core/edge_rb.html +114 -0
- data/ref/ruby/files/lib/ruby-vpi/core/handle_rb.html +107 -0
- data/ref/ruby/files/lib/ruby-vpi/core/scheduler_rb.html +114 -0
- data/ref/ruby/files/lib/ruby-vpi/core/struct_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/core_rb.html +121 -0
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.html +5 -41
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000001.html +3 -3
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/fr_class_index.html +5 -4
- data/ref/ruby/fr_file_index.html +6 -1
- data/ref/ruby/fr_method_index.html +80 -60
- metadata +126 -103
- data/ext/swig_vpi.h +0 -924
- data/ext/swig_wrap.cin +0 -7083
- data/lib/ruby-vpi/vpi.rb +0 -651
- data/ref/ruby/classes/Integer.src/M000013.html +0 -18
- data/ref/ruby/classes/Integer.src/M000019.html +0 -25
- data/ref/ruby/classes/Integer.src/M000020.html +0 -30
- data/ref/ruby/classes/String.src/M000024.html +0 -18
- data/ref/ruby/classes/String.src/M000025.html +0 -18
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000043.html +0 -21
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +0 -21
- data/ref/ruby/classes/Vpi/Handle.src/M000045.html +0 -22
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +0 -50
- data/ref/ruby/classes/Vpi/Handle.src/M000047.html +0 -91
- data/ref/ruby/classes/Vpi/Handle.src/M000053.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000057.html +0 -40
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000058.html +0 -18
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000059.html +0 -19
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000032.html +0 -18
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +0 -18
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +0 -18
- data/ref/ruby/classes/Vpi.src/M000029.html +0 -28
- data/ref/ruby/classes/Vpi.src/M000030.html +0 -39
- data/ref/ruby/classes/Vpi.src/M000031.html +0 -20
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000002.html +0 -18
- data/samp/counter/RSpec/counter_proto.rb +0 -10
- data/samp/counter/xUnit/counter_proto.rb +0 -10
- data/samp/pipelined_alu/hw5_unit_proto.rb +0 -4
- data/samp/register_file/register_file_proto.rb +0 -11
@@ -5,27 +5,27 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>cbValueChange (
|
8
|
+
<title>cbValueChange (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/
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/core/callback.rb, line 99</span>
|
14
|
+
99: <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
|
+
100: <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
|
+
101:
|
17
|
+
102: <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
|
+
103: <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
|
+
104:
|
20
|
+
105: <span class="ruby-identifier">alarm</span> = <span class="ruby-constant">S_cb_data</span>.<span class="ruby-identifier">new</span>(
|
21
|
+
106: <span class="ruby-identifier">:reason</span> =<span class="ruby-operator">></span> <span class="ruby-constant">CbValueChange</span>,
|
22
|
+
107: <span class="ruby-identifier">:obj</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>,
|
23
|
+
108: <span class="ruby-identifier">:time</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:time</span>],
|
24
|
+
109: <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:value</span>],
|
25
|
+
110: <span class="ruby-identifier">:index</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
26
|
+
111: )
|
27
|
+
112:
|
28
|
+
113: <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
|
+
114: <span class="ruby-keyword kw">end</span></pre>
|
30
30
|
</body>
|
31
31
|
</html>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
7
|
<head>
|
8
|
-
<title>Class:
|
8
|
+
<title>Class: VPI::S_vpi_time</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
11
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
@@ -50,13 +50,13 @@
|
|
50
50
|
<table class="header-table">
|
51
51
|
<tr class="top-aligned-row">
|
52
52
|
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">
|
53
|
+
<td class="class-name-in-header">VPI::S_vpi_time</td>
|
54
54
|
</tr>
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
-
<a href="../../files/lib/ruby-vpi/
|
59
|
-
lib/ruby-vpi/
|
58
|
+
<a href="../../files/lib/ruby-vpi/core/struct_rb.html">
|
59
|
+
lib/ruby-vpi/core/struct.rb
|
60
60
|
</a>
|
61
61
|
<br />
|
62
62
|
</td>
|
@@ -65,7 +65,9 @@
|
|
65
65
|
<tr class="top-aligned-row">
|
66
66
|
<td><strong>Parent:</strong></td>
|
67
67
|
<td>
|
68
|
+
<a href="../Object.html">
|
68
69
|
Object
|
70
|
+
</a>
|
69
71
|
</td>
|
70
72
|
</tr>
|
71
73
|
</table>
|
@@ -86,9 +88,9 @@
|
|
86
88
|
<h3 class="section-bar">Methods</h3>
|
87
89
|
|
88
90
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
91
|
+
<a href="#M000078">integer</a>
|
92
|
+
<a href="#M000079">integer=</a>
|
93
|
+
<a href="#M000080">to_i</a>
|
92
94
|
</div>
|
93
95
|
</div>
|
94
96
|
|
@@ -123,12 +125,12 @@
|
|
123
125
|
<div id="methods">
|
124
126
|
<h3 class="section-bar">Public Instance methods</h3>
|
125
127
|
|
126
|
-
<div id="method-
|
127
|
-
<a name="
|
128
|
+
<div id="method-M000078" class="method-detail">
|
129
|
+
<a name="M000078"></a>
|
128
130
|
|
129
131
|
<div class="method-heading">
|
130
|
-
<a href="S_vpi_time.src/
|
131
|
-
onclick="popupCode('S_vpi_time.src/
|
132
|
+
<a href="S_vpi_time.src/M000078.html" target="Code" class="method-signature"
|
133
|
+
onclick="popupCode('S_vpi_time.src/M000078.html');return false;">
|
132
134
|
<span class="method-name">integer</span><span class="method-args">()</span>
|
133
135
|
</a>
|
134
136
|
</div>
|
@@ -136,17 +138,17 @@
|
|
136
138
|
<div class="method-description">
|
137
139
|
<p>
|
138
140
|
Returns the high and low portions of this time as a single 64-bit <a
|
139
|
-
href="S_vpi_time.html#
|
141
|
+
href="S_vpi_time.html#M000078">integer</a>.
|
140
142
|
</p>
|
141
143
|
</div>
|
142
144
|
</div>
|
143
145
|
|
144
|
-
<div id="method-
|
145
|
-
<a name="
|
146
|
+
<div id="method-M000079" class="method-detail">
|
147
|
+
<a name="M000079"></a>
|
146
148
|
|
147
149
|
<div class="method-heading">
|
148
|
-
<a href="S_vpi_time.src/
|
149
|
-
onclick="popupCode('S_vpi_time.src/
|
150
|
+
<a href="S_vpi_time.src/M000079.html" target="Code" class="method-signature"
|
151
|
+
onclick="popupCode('S_vpi_time.src/M000079.html');return false;">
|
150
152
|
<span class="method-name">integer=</span><span class="method-args">(aValue)</span>
|
151
153
|
</a>
|
152
154
|
</div>
|
@@ -154,13 +156,13 @@ href="S_vpi_time.html#M000058">integer</a>.
|
|
154
156
|
<div class="method-description">
|
155
157
|
<p>
|
156
158
|
Sets the high and low portions of this time from the given 64-bit <a
|
157
|
-
href="S_vpi_time.html#
|
159
|
+
href="S_vpi_time.html#M000078">integer</a>.
|
158
160
|
</p>
|
159
161
|
</div>
|
160
162
|
</div>
|
161
163
|
|
162
|
-
<div id="method-
|
163
|
-
<a name="
|
164
|
+
<div id="method-M000080" class="method-detail">
|
165
|
+
<a name="M000080"></a>
|
164
166
|
|
165
167
|
<div class="method-heading">
|
166
168
|
<span class="method-name">to_i</span><span class="method-args">()</span>
|
@@ -168,7 +170,7 @@ href="S_vpi_time.html#M000058">integer</a>.
|
|
168
170
|
|
169
171
|
<div class="method-description">
|
170
172
|
<p>
|
171
|
-
Alias for <a href="S_vpi_time.html#
|
173
|
+
Alias for <a href="S_vpi_time.html#M000078">integer</a>
|
172
174
|
</p>
|
173
175
|
</div>
|
174
176
|
</div>
|
@@ -0,0 +1,18 @@
|
|
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>integer (VPI::S_vpi_time)</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/core/struct.rb, line 10</span>
|
14
|
+
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer</span>
|
15
|
+
11: (<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
|
+
12: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
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>integer= (VPI::S_vpi_time)</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/core/struct.rb, line 16</span>
|
14
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer=</span> <span class="ruby-identifier">aValue</span>
|
15
|
+
17: <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
|
+
18: <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
|
+
19: <span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
7
|
<head>
|
8
|
-
<title>Class:
|
8
|
+
<title>Class: VPI::S_vpi_value</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
11
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
@@ -50,13 +50,13 @@
|
|
50
50
|
<table class="header-table">
|
51
51
|
<tr class="top-aligned-row">
|
52
52
|
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">
|
53
|
+
<td class="class-name-in-header">VPI::S_vpi_value</td>
|
54
54
|
</tr>
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
-
<a href="../../files/lib/ruby-vpi/
|
59
|
-
lib/ruby-vpi/
|
58
|
+
<a href="../../files/lib/ruby-vpi/core/struct_rb.html">
|
59
|
+
lib/ruby-vpi/core/struct.rb
|
60
60
|
</a>
|
61
61
|
<br />
|
62
62
|
</td>
|
@@ -65,7 +65,9 @@
|
|
65
65
|
<tr class="top-aligned-row">
|
66
66
|
<td><strong>Parent:</strong></td>
|
67
67
|
<td>
|
68
|
+
<a href="../Object.html">
|
68
69
|
Object
|
70
|
+
</a>
|
69
71
|
</td>
|
70
72
|
</tr>
|
71
73
|
</table>
|
@@ -86,9 +88,9 @@
|
|
86
88
|
<h3 class="section-bar">Methods</h3>
|
87
89
|
|
88
90
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
91
|
+
<a href="#M000034">detect_format</a>
|
92
|
+
<a href="#M000036">read</a>
|
93
|
+
<a href="#M000035">write</a>
|
92
94
|
</div>
|
93
95
|
</div>
|
94
96
|
|
@@ -108,47 +110,59 @@
|
|
108
110
|
|
109
111
|
<!-- if method_list -->
|
110
112
|
<div id="methods">
|
111
|
-
<h3 class="section-bar">Public
|
113
|
+
<h3 class="section-bar">Public Class methods</h3>
|
112
114
|
|
113
|
-
<div id="method-
|
114
|
-
<a name="
|
115
|
+
<div id="method-M000034" class="method-detail">
|
116
|
+
<a name="M000034"></a>
|
115
117
|
|
116
118
|
<div class="method-heading">
|
117
|
-
<a href="S_vpi_value.src/
|
118
|
-
onclick="popupCode('S_vpi_value.src/
|
119
|
-
<span class="method-name">
|
119
|
+
<a href="S_vpi_value.src/M000034.html" target="Code" class="method-signature"
|
120
|
+
onclick="popupCode('S_vpi_value.src/M000034.html');return false;">
|
121
|
+
<span class="method-name">detect_format</span><span class="method-args">(aValue)</span>
|
120
122
|
</a>
|
121
123
|
</div>
|
122
124
|
|
123
125
|
<div class="method-description">
|
126
|
+
<p>
|
127
|
+
Attempts to detect the format of the given value. Returns <tt>nil</tt> if
|
128
|
+
detection is not possible.
|
129
|
+
</p>
|
124
130
|
</div>
|
125
131
|
</div>
|
126
132
|
|
127
|
-
<
|
128
|
-
|
133
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
134
|
+
|
135
|
+
<div id="method-M000036" class="method-detail">
|
136
|
+
<a name="M000036"></a>
|
129
137
|
|
130
138
|
<div class="method-heading">
|
131
|
-
<a href="S_vpi_value.src/
|
132
|
-
onclick="popupCode('S_vpi_value.src/
|
133
|
-
<span class="method-name">
|
139
|
+
<a href="S_vpi_value.src/M000036.html" target="Code" class="method-signature"
|
140
|
+
onclick="popupCode('S_vpi_value.src/M000036.html');return false;">
|
141
|
+
<span class="method-name">read</span><span class="method-args">(aFormat = self.format)</span>
|
134
142
|
</a>
|
135
143
|
</div>
|
136
144
|
|
137
145
|
<div class="method-description">
|
146
|
+
<p>
|
147
|
+
Returns the value in the given format.
|
148
|
+
</p>
|
138
149
|
</div>
|
139
150
|
</div>
|
140
151
|
|
141
|
-
<div id="method-
|
142
|
-
<a name="
|
152
|
+
<div id="method-M000035" class="method-detail">
|
153
|
+
<a name="M000035"></a>
|
143
154
|
|
144
155
|
<div class="method-heading">
|
145
|
-
<a href="S_vpi_value.src/
|
146
|
-
onclick="popupCode('S_vpi_value.src/
|
147
|
-
<span class="method-name">
|
156
|
+
<a href="S_vpi_value.src/M000035.html" target="Code" class="method-signature"
|
157
|
+
onclick="popupCode('S_vpi_value.src/M000035.html');return false;">
|
158
|
+
<span class="method-name">write</span><span class="method-args">(aValue, aFormat)</span>
|
148
159
|
</a>
|
149
160
|
</div>
|
150
161
|
|
151
162
|
<div class="method-description">
|
163
|
+
<p>
|
164
|
+
Writes the given value, which has the given format.
|
165
|
+
</p>
|
152
166
|
</div>
|
153
167
|
</div>
|
154
168
|
|
@@ -0,0 +1,35 @@
|
|
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>detect_format (VPI::S_vpi_value)</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/core/struct.rb, line 28</span>
|
14
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">detect_format</span> <span class="ruby-identifier">aValue</span>
|
15
|
+
29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_int</span>
|
16
|
+
30: <span class="ruby-constant">VpiIntVal</span>
|
17
|
+
31:
|
18
|
+
32: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_float</span>
|
19
|
+
33: <span class="ruby-constant">VpiRealVal</span>
|
20
|
+
34:
|
21
|
+
35: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_str</span>
|
22
|
+
36: <span class="ruby-constant">VpiStringVal</span>
|
23
|
+
37:
|
24
|
+
38: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">S_vpi_time</span>
|
25
|
+
39: <span class="ruby-constant">VpiTimeVal</span>
|
26
|
+
40:
|
27
|
+
41: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">S_vpi_vecval</span>
|
28
|
+
42: <span class="ruby-constant">VpiVectorVal</span>
|
29
|
+
43:
|
30
|
+
44: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">S_vpi_strengthval</span>
|
31
|
+
45: <span class="ruby-constant">VpiStrengthVal</span>
|
32
|
+
46: <span class="ruby-keyword kw">end</span>
|
33
|
+
47: <span class="ruby-keyword kw">end</span></pre>
|
34
|
+
</body>
|
35
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
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>write (VPI::S_vpi_value)</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/core/struct.rb, line 50</span>
|
14
|
+
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span> <span class="ruby-identifier">aValue</span>, <span class="ruby-identifier">aFormat</span>
|
15
|
+
51: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
16
|
+
52: <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>
|
17
|
+
53: <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>
|
18
|
+
54:
|
19
|
+
55: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
20
|
+
56: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span>
|
21
|
+
57:
|
22
|
+
58: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
23
|
+
59: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">integer</span> = <span class="ruby-identifier">aValue</span>.<span class="ruby-identifier">to_i</span>
|
24
|
+
60:
|
25
|
+
61: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
26
|
+
62: <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>
|
27
|
+
63:
|
28
|
+
64: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
29
|
+
65: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">aValue</span>
|
30
|
+
66:
|
31
|
+
67: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
32
|
+
68: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span> = <span class="ruby-identifier">aValue</span>
|
33
|
+
69:
|
34
|
+
70: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
35
|
+
71: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span> = <span class="ruby-identifier">aValue</span>
|
36
|
+
72:
|
37
|
+
73: <span class="ruby-keyword kw">else</span>
|
38
|
+
74: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown format: #{aFormat.inspect}"</span>
|
39
|
+
75: <span class="ruby-keyword kw">end</span>
|
40
|
+
76: <span class="ruby-keyword kw">end</span></pre>
|
41
|
+
</body>
|
42
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
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>read (VPI::S_vpi_value)</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/core/struct.rb, line 79</span>
|
14
|
+
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span> <span class="ruby-identifier">aFormat</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">format</span>
|
15
|
+
80: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aFormat</span>
|
16
|
+
81: <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>
|
17
|
+
82: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_s</span>
|
18
|
+
83:
|
19
|
+
84: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
20
|
+
85: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>.<span class="ruby-identifier">to_i</span>
|
21
|
+
86:
|
22
|
+
87: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
23
|
+
88: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">integer</span>.<span class="ruby-identifier">to_i</span>
|
24
|
+
89:
|
25
|
+
90: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
26
|
+
91: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>.<span class="ruby-identifier">to_f</span>
|
27
|
+
92:
|
28
|
+
93: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
29
|
+
94: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
|
30
|
+
95:
|
31
|
+
96: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
32
|
+
97: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
|
33
|
+
98:
|
34
|
+
99: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
35
|
+
100: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
|
36
|
+
101:
|
37
|
+
102: <span class="ruby-keyword kw">else</span>
|
38
|
+
103: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown format: #{aFormat.inspect}"</span>
|
39
|
+
104: <span class="ruby-keyword kw">end</span>
|
40
|
+
105: <span class="ruby-keyword kw">end</span></pre>
|
41
|
+
</body>
|
42
|
+
</html>
|