ruby-vpi 16.0.1 → 17.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +19 -19
- data/README +1 -1
- data/Rakefile +35 -32
- data/bin/convert.rb +28 -0
- data/bin/generate/design.rb +16 -0
- data/bin/generate/proto.rb +13 -0
- data/bin/generate/runner.rake +33 -0
- data/bin/generate/spec.rb +45 -0
- data/bin/generate.rb +177 -0
- data/bin/ruby-vpi +56 -0
- data/doc/Rakefile +20 -4
- data/doc/common.css +92 -33
- data/doc/common.inc +13 -0
- data/doc/common.tpl +42 -28
- data/doc/history.doc +11 -11
- data/doc/history.html +769 -248
- data/doc/history.inc +909 -0
- data/doc/history.rb +9 -0
- data/doc/history.yaml +69 -0
- data/doc/intro.inc +170 -178
- data/doc/lib/doc_format.rb +57 -144
- data/doc/lib/doc_proxy.rb +504 -88
- data/doc/lib/erb_content.rb +8 -8
- data/doc/lib/erb_proxy.rb +17 -17
- data/doc/manual.doc +626 -777
- data/doc/manual.html +1541 -1031
- data/doc/memo.doc +38 -36
- data/doc/memo.html +64 -28
- data/doc/readme.doc +4 -31
- data/doc/readme.html +221 -163
- data/doc/rss.erb +1 -1
- data/doc/rss.xml +73 -1761
- data/ext/Rakefile +6 -5
- data/ext/main.c +17 -15
- data/ext/relay.c +4 -7
- data/ext/relay.h +2 -2
- data/ext/swig_vpi.h +2 -2
- data/ext/swig_vpi.i +1 -2
- data/ext/swig_wrap.cin +12 -16
- data/ext/vlog.c +5 -5
- data/ext/vlog.h +2 -2
- data/lib/ruby-vpi/erb.rb +3 -3
- data/lib/ruby-vpi/float.rb +2 -2
- data/lib/ruby-vpi/rcov.rb +5 -7
- data/lib/ruby-vpi/runner.rb +43 -41
- data/lib/ruby-vpi/runner_boot_loader.rb +117 -0
- data/lib/ruby-vpi/runner_proxy.rb +6 -8
- data/lib/ruby-vpi/util.rb +10 -0
- data/lib/ruby-vpi/verilog_parser.rb +28 -56
- data/lib/ruby-vpi/vpi.rb +168 -123
- data/lib/ruby-vpi.rb +22 -143
- 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/{M000024.html → M000026.html} +0 -0
- data/ref/ruby/classes/FileUtils.html +11 -11
- data/ref/ruby/classes/FileUtils.src/{M000025.html → M000027.html} +0 -0
- data/ref/ruby/classes/FileUtils.src/{M000026.html → M000028.html} +0 -0
- data/ref/ruby/classes/Float.html +6 -6
- data/ref/ruby/classes/Float.src/{M000020.html → M000021.html} +0 -0
- data/ref/ruby/classes/Integer.html +65 -65
- data/ref/ruby/classes/Integer.src/M000009.html +12 -5
- 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/M000013.html +5 -5
- data/ref/ruby/classes/Integer.src/M000014.html +18 -0
- data/ref/ruby/classes/Integer.src/M000017.html +12 -18
- data/ref/ruby/classes/Integer.src/M000018.html +18 -12
- data/ref/ruby/classes/Integer.src/M000019.html +12 -17
- data/ref/ruby/classes/Integer.src/M000020.html +30 -0
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000053.html → M000058.html} +0 -0
- data/ref/ruby/classes/{RubyVpi/Config.html → RubyVPI.html} +20 -6
- data/ref/ruby/classes/String.html +34 -15
- data/ref/ruby/classes/String.src/M000022.html +5 -28
- data/ref/ruby/classes/String.src/M000023.html +5 -5
- data/ref/ruby/classes/String.src/{M000021.html → M000024.html} +0 -0
- data/ref/ruby/classes/String.src/M000025.html +41 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.html +16 -36
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +10 -5
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000004.html → M000007.html} +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000005.html → M000008.html} +4 -4
- data/ref/ruby/classes/VerilogParser/Module.html +28 -9
- data/ref/ruby/classes/VerilogParser/Module.src/M000005.html +29 -0
- data/ref/ruby/classes/VerilogParser.html +5 -39
- data/ref/ruby/classes/VerilogParser.src/M000004.html +26 -0
- data/ref/ruby/classes/Vpi/Handle.html +179 -77
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +18 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -5
- 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 +5 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +5 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +5 -9
- data/ref/ruby/classes/Vpi/Handle.src/M000043.html +8 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +8 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000045.html +9 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +31 -11
- data/ref/ruby/classes/Vpi/Handle.src/M000047.html +86 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000048.html +17 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000050.html +18 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000051.html +24 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000053.html +31 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000054.html +89 -0
- data/ref/ruby/classes/Vpi/S_vpi_time.html +16 -16
- data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000050.html → M000055.html} +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000051.html → M000056.html} +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
- data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000035.html → M000032.html} +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
- data/ref/ruby/classes/Vpi.html +6 -42
- data/ref/ruby/classes/Vpi.src/M000029.html +15 -5
- data/ref/ruby/classes/Vpi.src/M000030.html +24 -24
- data/ref/ruby/classes/Vpi.src/M000031.html +6 -8
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/{header_to_ruby_rb.html → convert_rb.html} +5 -5
- data/ref/ruby/files/bin/{generate_test_rb.html → generate_rb.html} +8 -21
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.html +197 -0
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000001.html +17 -0
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000002.html +18 -0
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +6 -19
- data/ref/ruby/files/lib/ruby-vpi/util_rb.html +101 -0
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +8 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -14
- data/ref/ruby/fr_class_index.html +1 -3
- data/ref/ruby/fr_file_index.html +4 -2
- data/ref/ruby/fr_method_index.html +56 -51
- data/ref/ruby/index.html +1 -1
- data/samp/counter/RSpec/Rakefile +1 -0
- data/samp/counter/RSpec/counter_design.rb +15 -0
- data/samp/counter/RSpec/counter_proto.rb +10 -0
- data/samp/counter/RSpec/counter_runner.rake +44 -0
- data/samp/counter/RSpec/counter_spec.rb +39 -0
- data/samp/counter/Rakefile +1 -1
- data/samp/counter/counter.v +7 -7
- data/samp/counter/xUnit/Rakefile +1 -0
- data/samp/counter/xUnit/counter_bench.rb +95 -0
- data/samp/counter/{counter_xunit_bench.v → xUnit/counter_bench.v} +0 -0
- data/samp/counter/xUnit/counter_design.rb +15 -0
- data/samp/counter/xUnit/counter_proto.rb +10 -0
- data/samp/counter/xUnit/counter_runner.rake +44 -0
- data/samp/counter/{counter_xunit_spec.rb → xUnit/counter_spec.rb} +9 -9
- data/samp/pipelined_alu/Rakefile +1 -1
- data/samp/pipelined_alu/TestHw5UnitModel.rb +4 -5
- data/samp/pipelined_alu/hw5_unit.v +55 -85
- data/samp/pipelined_alu/hw5_unit_design.rb +51 -0
- data/samp/pipelined_alu/hw5_unit_proto.rb +4 -0
- data/samp/pipelined_alu/hw5_unit_runner.rake +43 -0
- data/samp/pipelined_alu/hw5_unit_spec.rb +64 -0
- data/samp/register_file/LICENSE +20 -0
- data/samp/register_file/README +4 -0
- data/samp/register_file/Rakefile +1 -0
- data/samp/register_file/register_file.v +18 -0
- data/samp/register_file/register_file_design.rb +11 -0
- data/samp/register_file/register_file_proto.rb +11 -0
- data/samp/register_file/register_file_runner.rake +43 -0
- data/samp/register_file/register_file_spec.rb +58 -0
- metadata +78 -66
- data/bin/generate_test.rb +0 -200
- data/bin/generate_test_tpl/bench.rb +0 -89
- data/bin/generate_test_tpl/bench.v +0 -26
- data/bin/generate_test_tpl/design.rb +0 -11
- data/bin/generate_test_tpl/proto.rb +0 -16
- data/bin/generate_test_tpl/runner.rake +0 -42
- data/bin/generate_test_tpl/spec.rb +0 -37
- data/bin/header_to_ruby.rb +0 -27
- data/ref/ruby/classes/Integer.src/M000008.html +0 -25
- data/ref/ruby/classes/Integer.src/M000016.html +0 -25
- data/ref/ruby/classes/RubyVpi.html +0 -199
- data/ref/ruby/classes/RubyVpi.src/M000027.html +0 -121
- data/ref/ruby/classes/VerilogParser/Module/Parameter.html +0 -160
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +0 -19
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +0 -21
- data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +0 -34
- data/ref/ruby/classes/VerilogParser.src/M000001.html +0 -34
- data/ref/ruby/classes/Vpi/Handle.src/M000049.html +0 -69
- data/ref/ruby/classes/Vpi.src/M000028.html +0 -28
- data/ref/ruby/classes/Vpi.src/M000032.html +0 -22
- data/samp/counter/counter_rspec_bench.rb +0 -86
- data/samp/counter/counter_rspec_bench.v +0 -9
- data/samp/counter/counter_rspec_design.rb +0 -8
- data/samp/counter/counter_rspec_proto.rb +0 -13
- data/samp/counter/counter_rspec_runner.rake +0 -52
- data/samp/counter/counter_rspec_spec.rb +0 -39
- data/samp/counter/counter_xunit_bench.rb +0 -86
- data/samp/counter/counter_xunit_design.rb +0 -8
- data/samp/counter/counter_xunit_proto.rb +0 -13
- data/samp/counter/counter_xunit_runner.rake +0 -52
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +0 -86
- data/samp/pipelined_alu/hw5_unit_test_bench.v +0 -14
- data/samp/pipelined_alu/hw5_unit_test_design.rb +0 -61
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +0 -7
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +0 -52
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +0 -68
@@ -5,27 +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
|
-
260: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 221</span>
|
14
|
+
221: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
|
15
|
+
222: <span class="ruby-identifier">handles</span> = []
|
16
|
+
223:
|
17
|
+
224: <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">arg</span><span class="ruby-operator">|</span>
|
18
|
+
225: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">arg</span>)
|
19
|
+
226:
|
20
|
+
227: <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
|
+
228: <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
|
+
229: <span class="ruby-identifier">handles</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">h</span>
|
23
|
+
230: <span class="ruby-keyword kw">end</span>
|
24
|
+
231: <span class="ruby-keyword kw">end</span>
|
25
|
+
232: <span class="ruby-keyword kw">end</span>
|
26
|
+
233:
|
27
|
+
234: <span class="ruby-identifier">handles</span>
|
28
|
+
235: <span class="ruby-keyword kw">end</span></pre>
|
30
29
|
</body>
|
31
30
|
</html>
|
@@ -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><=> (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 255</span>
|
14
|
+
255: <span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>
|
15
|
+
256: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">fullName</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">fullName</span>
|
16
|
+
257: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
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>inspect (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 262</span>
|
14
|
+
262: <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
|
+
263: <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
|
+
264:
|
17
|
+
265: <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
|
+
266: <span class="ruby-node">"#{name}=#{self.send(name.to_sym)}"</span>
|
19
|
+
267: <span class="ruby-keyword kw">end</span>
|
20
|
+
268:
|
21
|
+
269: <span class="ruby-node">"#<Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}>"</span>
|
22
|
+
270: <span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
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 276</span>
|
14
|
+
276: <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
|
+
277: <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
|
+
278:
|
17
|
+
279: <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
|
+
280: <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
|
+
281:
|
20
|
+
282: <span class="ruby-identifier">alarm</span> = <span class="ruby-constant">S_cb_data</span>.<span class="ruby-identifier">new</span>(
|
21
|
+
283: <span class="ruby-identifier">:reason</span> =<span class="ruby-operator">></span> <span class="ruby-constant">CbValueChange</span>,
|
22
|
+
284: <span class="ruby-identifier">:obj</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>,
|
23
|
+
285: <span class="ruby-identifier">:time</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:time</span>],
|
24
|
+
286: <span class="ruby-identifier">:value</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">aOptions</span>[<span class="ruby-identifier">:value</span>],
|
25
|
+
287: <span class="ruby-identifier">:index</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
26
|
+
288: )
|
27
|
+
289:
|
28
|
+
290: <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
|
+
291: <span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,89 @@
|
|
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>method_missing (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 302</span>
|
14
|
+
302: <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
|
+
303: <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
|
+
304: <span class="ruby-comment cmt"># cache the child for future accesses, in order</span>
|
17
|
+
305: <span class="ruby-comment cmt"># to cut down number of calls to method_missing</span>
|
18
|
+
306: (<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
|
+
307: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">aMeth</span> <span class="ruby-keyword kw">do</span>
|
20
|
+
308: <span class="ruby-identifier">child</span>
|
21
|
+
309: <span class="ruby-keyword kw">end</span>
|
22
|
+
310: <span class="ruby-keyword kw">end</span>
|
23
|
+
311:
|
24
|
+
312: <span class="ruby-identifier">child</span>
|
25
|
+
313:
|
26
|
+
314: <span class="ruby-keyword kw">else</span>
|
27
|
+
315: <span class="ruby-identifier">prop</span> = <span class="ruby-ivar">@@propCache</span>[<span class="ruby-identifier">aMeth</span>]
|
28
|
+
316:
|
29
|
+
317: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">operation</span>
|
30
|
+
318: <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>)
|
31
|
+
319: <span class="ruby-keyword kw">else</span>
|
32
|
+
320: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">accessor</span>
|
33
|
+
321: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:d</span> <span class="ruby-comment cmt"># delay values</span>
|
34
|
+
322: <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
|
+
323: <span class="ruby-comment cmt"># TODO: vpi_put_delays</span>
|
36
|
+
324: <span class="ruby-comment cmt"># TODO: vpi_get_delays</span>
|
37
|
+
325:
|
38
|
+
326: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:l</span> <span class="ruby-comment cmt"># logic values</span>
|
39
|
+
327: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
40
|
+
328: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">aArgs</span>.<span class="ruby-identifier">shift</span>
|
41
|
+
329: <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
|
+
330: <span class="ruby-keyword kw">else</span>
|
43
|
+
331: <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>)
|
44
|
+
332: <span class="ruby-keyword kw">end</span>
|
45
|
+
333:
|
46
|
+
334: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:i</span> <span class="ruby-comment cmt"># integer values</span>
|
47
|
+
335: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
48
|
+
336: <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>)
|
49
|
+
337: <span class="ruby-keyword kw">else</span>
|
50
|
+
338: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
51
|
+
339: <span class="ruby-keyword kw">end</span>
|
52
|
+
340:
|
53
|
+
341: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:b</span> <span class="ruby-comment cmt"># boolean values</span>
|
54
|
+
342: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
55
|
+
343: <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>)
|
56
|
+
344: <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>
|
57
|
+
345: <span class="ruby-keyword kw">else</span>
|
58
|
+
346: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
59
|
+
347: <span class="ruby-keyword kw">end</span>
|
60
|
+
348:
|
61
|
+
349: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:s</span> <span class="ruby-comment cmt"># string values</span>
|
62
|
+
350: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
63
|
+
351: <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>)
|
64
|
+
352: <span class="ruby-keyword kw">else</span>
|
65
|
+
353: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
66
|
+
354: <span class="ruby-keyword kw">end</span>
|
67
|
+
355:
|
68
|
+
356: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:h</span> <span class="ruby-comment cmt"># handle values</span>
|
69
|
+
357: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
70
|
+
358: <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>)
|
71
|
+
359: <span class="ruby-keyword kw">else</span>
|
72
|
+
360: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
73
|
+
361: <span class="ruby-keyword kw">end</span>
|
74
|
+
362:
|
75
|
+
363: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:a</span> <span class="ruby-comment cmt"># array of child handles</span>
|
76
|
+
364: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">assignment</span>
|
77
|
+
365: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">type</span>]
|
78
|
+
366: <span class="ruby-keyword kw">else</span>
|
79
|
+
367: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
80
|
+
368: <span class="ruby-keyword kw">end</span>
|
81
|
+
369:
|
82
|
+
370: <span class="ruby-keyword kw">else</span>
|
83
|
+
371: <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>
|
84
|
+
372: <span class="ruby-keyword kw">end</span>
|
85
|
+
373: <span class="ruby-keyword kw">end</span>
|
86
|
+
374: <span class="ruby-keyword kw">end</span>
|
87
|
+
375: <span class="ruby-keyword kw">end</span></pre>
|
88
|
+
</body>
|
89
|
+
</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="#M000055">integer</a>
|
90
|
+
<a href="#M000056">integer=</a>
|
91
|
+
<a href="#M000057">to_i</a>
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
|
@@ -123,12 +123,12 @@
|
|
123
123
|
<div id="methods">
|
124
124
|
<h3 class="section-bar">Public Instance methods</h3>
|
125
125
|
|
126
|
-
<div id="method-
|
127
|
-
<a name="
|
126
|
+
<div id="method-M000055" class="method-detail">
|
127
|
+
<a name="M000055"></a>
|
128
128
|
|
129
129
|
<div class="method-heading">
|
130
|
-
<a href="S_vpi_time.src/
|
131
|
-
onclick="popupCode('S_vpi_time.src/
|
130
|
+
<a href="S_vpi_time.src/M000055.html" target="Code" class="method-signature"
|
131
|
+
onclick="popupCode('S_vpi_time.src/M000055.html');return false;">
|
132
132
|
<span class="method-name">integer</span><span class="method-args">()</span>
|
133
133
|
</a>
|
134
134
|
</div>
|
@@ -136,17 +136,17 @@
|
|
136
136
|
<div class="method-description">
|
137
137
|
<p>
|
138
138
|
Returns the high and low portions of this time as a single 64-bit <a
|
139
|
-
href="S_vpi_time.html#
|
139
|
+
href="S_vpi_time.html#M000055">integer</a>.
|
140
140
|
</p>
|
141
141
|
</div>
|
142
142
|
</div>
|
143
143
|
|
144
|
-
<div id="method-
|
145
|
-
<a name="
|
144
|
+
<div id="method-M000056" class="method-detail">
|
145
|
+
<a name="M000056"></a>
|
146
146
|
|
147
147
|
<div class="method-heading">
|
148
|
-
<a href="S_vpi_time.src/
|
149
|
-
onclick="popupCode('S_vpi_time.src/
|
148
|
+
<a href="S_vpi_time.src/M000056.html" target="Code" class="method-signature"
|
149
|
+
onclick="popupCode('S_vpi_time.src/M000056.html');return false;">
|
150
150
|
<span class="method-name">integer=</span><span class="method-args">(aValue)</span>
|
151
151
|
</a>
|
152
152
|
</div>
|
@@ -154,13 +154,13 @@ href="S_vpi_time.html#M000050">integer</a>.
|
|
154
154
|
<div class="method-description">
|
155
155
|
<p>
|
156
156
|
Sets the high and low portions of this time from the given 64-bit <a
|
157
|
-
href="S_vpi_time.html#
|
157
|
+
href="S_vpi_time.html#M000055">integer</a>.
|
158
158
|
</p>
|
159
159
|
</div>
|
160
160
|
</div>
|
161
161
|
|
162
|
-
<div id="method-
|
163
|
-
<a name="
|
162
|
+
<div id="method-M000057" class="method-detail">
|
163
|
+
<a name="M000057"></a>
|
164
164
|
|
165
165
|
<div class="method-heading">
|
166
166
|
<span class="method-name">to_i</span><span class="method-args">()</span>
|
@@ -168,7 +168,7 @@ href="S_vpi_time.html#M000050">integer</a>.
|
|
168
168
|
|
169
169
|
<div class="method-description">
|
170
170
|
<p>
|
171
|
-
Alias for <a href="S_vpi_time.html#
|
171
|
+
Alias for <a href="S_vpi_time.html#M000055">integer</a>
|
172
172
|
</p>
|
173
173
|
</div>
|
174
174
|
</div>
|
@@ -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 562</span>
|
14
|
+
562: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer</span>
|
15
|
+
563: (<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
|
+
564: <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 568</span>
|
14
|
+
568: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integer=</span> <span class="ruby-identifier">aValue</span>
|
15
|
+
569: <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
|
+
570: <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
|
+
571: <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="#M000033">to_f</a>
|
90
|
+
<a href="#M000032">to_i</a>
|
91
|
+
<a href="#M000034">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-M000033" class="method-detail">
|
114
|
+
<a name="M000033"></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/M000033.html" target="Code" class="method-signature"
|
118
|
+
onclick="popupCode('S_vpi_value.src/M000033.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-M000032" class="method-detail">
|
128
|
+
<a name="M000032"></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/M000032.html" target="Code" class="method-signature"
|
132
|
+
onclick="popupCode('S_vpi_value.src/M000032.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-M000034" class="method-detail">
|
142
|
+
<a name="M000034"></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/M000034.html" target="Code" class="method-signature"
|
146
|
+
onclick="popupCode('S_vpi_value.src/M000034.html');return false;">
|
147
147
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
148
148
|
</a>
|
149
149
|
</div>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>to_i (Vpi::S_vpi_value)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 578</span>
|
14
|
+
578: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_i</span>
|
15
|
+
579: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">integer</span>
|
16
|
+
580: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>to_f (Vpi::S_vpi_value)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 582</span>
|
14
|
+
582: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span>
|
15
|
+
583: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
|
16
|
+
584: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>to_s (Vpi::S_vpi_value)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 586</span>
|
14
|
+
586: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
+
587: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
|
16
|
+
588: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
data/ref/ruby/classes/Vpi.html
CHANGED
@@ -88,10 +88,8 @@ suitable for Ruby.
|
|
88
88
|
|
89
89
|
<div class="name-list">
|
90
90
|
<a href="#M000030">advance_time</a>
|
91
|
-
<a href="#M000032">new</a>
|
92
|
-
<a href="#M000029">simulate</a>
|
93
91
|
<a href="#M000031">simulation_time</a>
|
94
|
-
<a href="#
|
92
|
+
<a href="#M000029">vpi_register_cb</a>
|
95
93
|
</div>
|
96
94
|
</div>
|
97
95
|
|
@@ -190,22 +188,6 @@ handles
|
|
190
188
|
|
191
189
|
<!-- if method_list -->
|
192
190
|
<div id="methods">
|
193
|
-
<h3 class="section-bar">Public Class methods</h3>
|
194
|
-
|
195
|
-
<div id="method-M000032" class="method-detail">
|
196
|
-
<a name="M000032"></a>
|
197
|
-
|
198
|
-
<div class="method-heading">
|
199
|
-
<a href="Vpi.src/M000032.html" target="Code" class="method-signature"
|
200
|
-
onclick="popupCode('Vpi.src/M000032.html');return false;">
|
201
|
-
<span class="method-name">new</span><span class="method-args">(aMembers = {})</span>
|
202
|
-
</a>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<div class="method-description">
|
206
|
-
</div>
|
207
|
-
</div>
|
208
|
-
|
209
191
|
<h3 class="section-bar">Public Instance methods</h3>
|
210
192
|
|
211
193
|
<div id="method-M000030" class="method-detail">
|
@@ -225,24 +207,6 @@ Advances the simulation by the given number of steps.
|
|
225
207
|
</div>
|
226
208
|
</div>
|
227
209
|
|
228
|
-
<div id="method-M000029" class="method-detail">
|
229
|
-
<a name="M000029"></a>
|
230
|
-
|
231
|
-
<div class="method-heading">
|
232
|
-
<a href="Vpi.src/M000029.html" target="Code" class="method-signature"
|
233
|
-
onclick="popupCode('Vpi.src/M000029.html');return false;">
|
234
|
-
<span class="method-name">simulate</span><span class="method-args">()</span>
|
235
|
-
</a>
|
236
|
-
</div>
|
237
|
-
|
238
|
-
<div class="method-description">
|
239
|
-
<p>
|
240
|
-
Simulates the design under test according to <a
|
241
|
-
href="RubyVpi.html#M000027">RubyVpi.init_bench</a>.
|
242
|
-
</p>
|
243
|
-
</div>
|
244
|
-
</div>
|
245
|
-
|
246
210
|
<div id="method-M000031" class="method-detail">
|
247
211
|
<a name="M000031"></a>
|
248
212
|
|
@@ -260,12 +224,12 @@ Returns the current simulation time as an integer.
|
|
260
224
|
</div>
|
261
225
|
</div>
|
262
226
|
|
263
|
-
<div id="method-
|
264
|
-
<a name="
|
227
|
+
<div id="method-M000029" class="method-detail">
|
228
|
+
<a name="M000029"></a>
|
265
229
|
|
266
230
|
<div class="method-heading">
|
267
|
-
<a href="Vpi.src/
|
268
|
-
onclick="popupCode('Vpi.src/
|
231
|
+
<a href="Vpi.src/M000029.html" target="Code" class="method-signature"
|
232
|
+
onclick="popupCode('Vpi.src/M000029.html');return false;">
|
269
233
|
<span class="method-name">vpi_register_cb</span><span class="method-args">(aData {|Vpi::S_cb_data| ...}</span>
|
270
234
|
</a>
|
271
235
|
</div>
|
@@ -273,7 +237,7 @@ Returns the current simulation time as an integer.
|
|
273
237
|
<div class="method-description">
|
274
238
|
<p>
|
275
239
|
This is a Ruby version of the <a
|
276
|
-
href="Vpi.html#
|
240
|
+
href="Vpi.html#M000029">vpi_register_cb</a> C function. It is identical to
|
277
241
|
the C function, except for the following differences:
|
278
242
|
</p>
|
279
243
|
<ul>
|
@@ -5,14 +5,24 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>vpi_register_cb (Vpi)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 476</span>
|
14
|
+
476: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">vpi_register_cb</span> <span class="ruby-identifier">aData</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aHandler</span> <span class="ruby-comment cmt"># :yields: Vpi::S_cb_data</span>
|
15
|
+
477: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"block must be given"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
|
16
|
+
478:
|
17
|
+
479: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">aHandler</span>.<span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">to_s</span>
|
18
|
+
480:
|
19
|
+
481: <span class="ruby-comment cmt"># register the callback with Verilog</span>
|
20
|
+
482: <span class="ruby-identifier">aData</span>.<span class="ruby-identifier">user_data</span> = <span class="ruby-identifier">key</span>
|
21
|
+
483: <span class="ruby-identifier">aData</span>.<span class="ruby-identifier">cb_rtn</span> = <span class="ruby-constant">Vlog_relay_ruby</span>
|
22
|
+
484: <span class="ruby-identifier">token</span> = <span class="ruby-identifier">vpi_register_cb_old</span>(<span class="ruby-identifier">aData</span>)
|
23
|
+
485:
|
24
|
+
486: <span class="ruby-ivar">@@callbacks</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Callback</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">aHandler</span>, <span class="ruby-identifier">token</span>)
|
25
|
+
487: <span class="ruby-identifier">token</span>
|
26
|
+
488: <span class="ruby-keyword kw">end</span></pre>
|
17
27
|
</body>
|
18
28
|
</html>
|