ruby-vpi 7.0.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 +398 -0
- data/LICENSE +340 -0
- data/MEMO +38 -0
- data/README +9 -0
- data/Rakefile +271 -0
- data/bin/generate_test.rb +258 -0
- data/bin/generate_test_tpl/bench.rb +31 -0
- data/bin/generate_test_tpl/bench.v +54 -0
- data/bin/generate_test_tpl/design.rb +26 -0
- data/bin/generate_test_tpl/proto.rb +8 -0
- data/bin/generate_test_tpl/runner.rake +28 -0
- data/bin/generate_test_tpl/spec.rb +46 -0
- data/bin/header_to_ruby.rb +70 -0
- data/doc/Rakefile +55 -0
- data/doc/src/LICENSE +397 -0
- data/doc/src/figures/organization.png +0 -0
- data/doc/src/figures/organization_detailed.png +0 -0
- data/doc/src/figures/ruby_init.png +0 -0
- data/doc/src/figures/ruby_relay.png +0 -0
- data/doc/src/figures.dia +0 -0
- data/doc/src/images/COPYING +67 -0
- data/doc/src/images/ChangeLog +27 -0
- data/doc/src/images/blank.png +0 -0
- data/doc/src/images/callouts/1.png +0 -0
- data/doc/src/images/callouts/10.png +0 -0
- data/doc/src/images/callouts/11.png +0 -0
- data/doc/src/images/callouts/12.png +0 -0
- data/doc/src/images/callouts/13.png +0 -0
- data/doc/src/images/callouts/14.png +0 -0
- data/doc/src/images/callouts/15.png +0 -0
- data/doc/src/images/callouts/2.png +0 -0
- data/doc/src/images/callouts/3.png +0 -0
- data/doc/src/images/callouts/4.png +0 -0
- data/doc/src/images/callouts/5.png +0 -0
- data/doc/src/images/callouts/6.png +0 -0
- data/doc/src/images/callouts/7.png +0 -0
- data/doc/src/images/callouts/8.png +0 -0
- data/doc/src/images/callouts/9.png +0 -0
- data/doc/src/images/callouts/ChangeLog +15 -0
- data/doc/src/images/caution.png +0 -0
- data/doc/src/images/caution.svg +290 -0
- data/doc/src/images/copyright +55 -0
- data/doc/src/images/draft.png +0 -0
- data/doc/src/images/home.png +0 -0
- data/doc/src/images/home.svg +386 -0
- data/doc/src/images/important.png +0 -0
- data/doc/src/images/important.svg +163 -0
- data/doc/src/images/next.png +0 -0
- data/doc/src/images/next.svg +191 -0
- data/doc/src/images/note.png +0 -0
- data/doc/src/images/note.svg +483 -0
- data/doc/src/images/prev.png +0 -0
- data/doc/src/images/prev.svg +852 -0
- data/doc/src/images/tip.png +0 -0
- data/doc/src/images/tip.svg +1145 -0
- data/doc/src/images/toc-blank.png +0 -0
- data/doc/src/images/toc-minus.png +0 -0
- data/doc/src/images/toc-plus.png +0 -0
- data/doc/src/images/up.png +0 -0
- data/doc/src/images/up.svg +195 -0
- data/doc/src/images/warning.png +0 -0
- data/doc/src/images/warning.svg +334 -0
- data/doc/src/license.xml +446 -0
- data/doc/src/manual.xml +1582 -0
- data/doc/src/manual.xsl +23 -0
- data/doc/src/shared.dtd +63 -0
- data/doc/src/styles/manual.css +87 -0
- data/doc/txt/manual.txt +1657 -0
- data/doc/xhtml/background.html +3 -0
- data/doc/xhtml/background.methodology.html +3 -0
- data/doc/xhtml/background.organization.html +10 -0
- data/doc/xhtml/background.running-tests.html +3 -0
- data/doc/xhtml/background.terminology.html +3 -0
- data/doc/xhtml/figures/organization.png +0 -0
- data/doc/xhtml/figures/organization_detailed.png +0 -0
- data/doc/xhtml/figures/ruby_init.png +0 -0
- data/doc/xhtml/figures/ruby_relay.png +0 -0
- data/doc/xhtml/gfdl-0.html +18 -0
- data/doc/xhtml/gfdl-1.html +70 -0
- data/doc/xhtml/gfdl-10.html +15 -0
- data/doc/xhtml/gfdl-2.html +13 -0
- data/doc/xhtml/gfdl-3.html +31 -0
- data/doc/xhtml/gfdl-4.html +75 -0
- data/doc/xhtml/gfdl-5.html +20 -0
- data/doc/xhtml/gfdl-6.html +12 -0
- data/doc/xhtml/gfdl-7.html +16 -0
- data/doc/xhtml/gfdl-8.html +17 -0
- data/doc/xhtml/gfdl-9.html +9 -0
- data/doc/xhtml/gfdl-addendum.html +25 -0
- data/doc/xhtml/gfdl.html +11 -0
- data/doc/xhtml/glossary.html +3 -0
- data/doc/xhtml/images/COPYING +67 -0
- data/doc/xhtml/images/ChangeLog +27 -0
- data/doc/xhtml/images/blank.png +0 -0
- data/doc/xhtml/images/callouts/1.png +0 -0
- data/doc/xhtml/images/callouts/10.png +0 -0
- data/doc/xhtml/images/callouts/11.png +0 -0
- data/doc/xhtml/images/callouts/12.png +0 -0
- data/doc/xhtml/images/callouts/13.png +0 -0
- data/doc/xhtml/images/callouts/14.png +0 -0
- data/doc/xhtml/images/callouts/15.png +0 -0
- data/doc/xhtml/images/callouts/2.png +0 -0
- data/doc/xhtml/images/callouts/3.png +0 -0
- data/doc/xhtml/images/callouts/4.png +0 -0
- data/doc/xhtml/images/callouts/5.png +0 -0
- data/doc/xhtml/images/callouts/6.png +0 -0
- data/doc/xhtml/images/callouts/7.png +0 -0
- data/doc/xhtml/images/callouts/8.png +0 -0
- data/doc/xhtml/images/callouts/9.png +0 -0
- data/doc/xhtml/images/callouts/ChangeLog +15 -0
- data/doc/xhtml/images/caution.png +0 -0
- data/doc/xhtml/images/caution.svg +290 -0
- data/doc/xhtml/images/copyright +55 -0
- data/doc/xhtml/images/draft.png +0 -0
- data/doc/xhtml/images/home.png +0 -0
- data/doc/xhtml/images/home.svg +386 -0
- data/doc/xhtml/images/important.png +0 -0
- data/doc/xhtml/images/important.svg +163 -0
- data/doc/xhtml/images/next.png +0 -0
- data/doc/xhtml/images/next.svg +191 -0
- data/doc/xhtml/images/note.png +0 -0
- data/doc/xhtml/images/note.svg +483 -0
- data/doc/xhtml/images/prev.png +0 -0
- data/doc/xhtml/images/prev.svg +852 -0
- data/doc/xhtml/images/tip.png +0 -0
- data/doc/xhtml/images/tip.svg +1145 -0
- data/doc/xhtml/images/toc-blank.png +0 -0
- data/doc/xhtml/images/toc-minus.png +0 -0
- data/doc/xhtml/images/toc-plus.png +0 -0
- data/doc/xhtml/images/up.png +0 -0
- data/doc/xhtml/images/up.svg +195 -0
- data/doc/xhtml/images/warning.png +0 -0
- data/doc/xhtml/images/warning.svg +334 -0
- data/doc/xhtml/index.html +4 -0
- data/doc/xhtml/introduction.html +3 -0
- data/doc/xhtml/introduction.license.html +3 -0
- data/doc/xhtml/introduction.manifest.html +3 -0
- data/doc/xhtml/introduction.related-works.html +3 -0
- data/doc/xhtml/introduction.resources.html +3 -0
- data/doc/xhtml/problem.ivl.html +18 -0
- data/doc/xhtml/problems.html +3 -0
- data/doc/xhtml/problems.ruby.html +3 -0
- data/doc/xhtml/problems.vsim.html +3 -0
- data/doc/xhtml/styles/manual.css +87 -0
- data/doc/xhtml/usage.examples.html +3 -0
- data/doc/xhtml/usage.html +3 -0
- data/doc/xhtml/usage.installation.html +3 -0
- data/doc/xhtml/usage.requirements.html +3 -0
- data/doc/xhtml/usage.tools.html +3 -0
- data/doc/xhtml/usage.tutorial.html +199 -0
- data/ext/Doxyfile +272 -0
- data/ext/README +124 -0
- data/ext/Rakefile +65 -0
- data/ext/common.h +56 -0
- data/ext/extconf.rb +4 -0
- data/ext/relay.cin +146 -0
- data/ext/relay.hin +48 -0
- data/ext/ruby-vpi.c +36 -0
- data/ext/swig.cin +38 -0
- data/ext/swig.hin +39 -0
- data/ext/swig_vpi.h +924 -0
- data/ext/swig_vpi.i +8 -0
- data/ext/swig_wrap.cin +4613 -0
- data/ext/verilog.h +59 -0
- data/ext/vlog.cin +92 -0
- data/ext/vlog.hin +57 -0
- data/ext/vpi_user.h +924 -0
- data/gem_extconf.rb +8 -0
- data/history.html +809 -0
- data/lib/ruby-vpi/erb.rb +41 -0
- data/lib/ruby-vpi/rake.rb +35 -0
- data/lib/ruby-vpi/rdoc.rb +51 -0
- data/lib/ruby-vpi/rspec.rb +32 -0
- data/lib/ruby-vpi/runner.rb +22 -0
- data/lib/ruby-vpi/vpi_util.rb +310 -0
- data/lib/ruby-vpi.rb +58 -0
- data/memo.html +86 -0
- data/readme.html +19 -0
- data/ref/c/annotated.html +36 -0
- data/ref/c/common_8h.html +178 -0
- data/ref/c/doxygen.css +310 -0
- data/ref/c/doxygen.png +0 -0
- data/ref/c/files.html +35 -0
- data/ref/c/functions.html +135 -0
- data/ref/c/functions_vars.html +135 -0
- data/ref/c/globals.html +55 -0
- data/ref/c/globals_0x63.html +86 -0
- data/ref/c/globals_0x65.html +55 -0
- data/ref/c/globals_0x66.html +55 -0
- data/ref/c/globals_0x70.html +71 -0
- data/ref/c/globals_0x72.html +62 -0
- data/ref/c/globals_0x73.html +65 -0
- data/ref/c/globals_0x74.html +55 -0
- data/ref/c/globals_0x76.html +472 -0
- data/ref/c/globals_0x78.html +55 -0
- data/ref/c/globals_defs.html +81 -0
- data/ref/c/globals_defs_0x65.html +50 -0
- data/ref/c/globals_defs_0x70.html +51 -0
- data/ref/c/globals_defs_0x76.html +463 -0
- data/ref/c/globals_defs_0x78.html +50 -0
- data/ref/c/globals_enum.html +39 -0
- data/ref/c/globals_eval.html +40 -0
- data/ref/c/globals_func.html +49 -0
- data/ref/c/globals_type.html +63 -0
- data/ref/c/globals_vars.html +42 -0
- data/ref/c/hierarchy.html +36 -0
- data/ref/c/index.html +20 -0
- data/ref/c/relay_8cin.html +268 -0
- data/ref/c/relay_8hin.html +161 -0
- data/ref/c/ruby-vpi_8c.html +34 -0
- data/ref/c/structrelay____RubyOptions____def.html +84 -0
- data/ref/c/structt__cb__data.html +208 -0
- data/ref/c/structt__vpi__delay.html +183 -0
- data/ref/c/structt__vpi__error__info.html +208 -0
- data/ref/c/structt__vpi__strengthval.html +108 -0
- data/ref/c/structt__vpi__systf__data.html +208 -0
- data/ref/c/structt__vpi__time.html +133 -0
- data/ref/c/structt__vpi__value.html +285 -0
- data/ref/c/structt__vpi__vecval.html +83 -0
- data/ref/c/structt__vpi__vlog__info.html +133 -0
- data/ref/c/swig_8cin.html +91 -0
- data/ref/c/swig_8hin.html +99 -0
- data/ref/c/tab_b.gif +0 -0
- data/ref/c/tab_l.gif +0 -0
- data/ref/c/tab_r.gif +0 -0
- data/ref/c/tabs.css +102 -0
- data/ref/c/verilog_8h.html +149 -0
- data/ref/c/vlog_8cin.html +199 -0
- data/ref/c/vlog_8hin.html +152 -0
- data/ref/c/vpi__user_8h.html +12747 -0
- data/ref/ruby/classes/Counter.html +258 -0
- data/ref/ruby/classes/Counter.src/M000037.html +20 -0
- data/ref/ruby/classes/Counter.src/M000038.html +22 -0
- data/ref/ruby/classes/Counter.src/M000039.html +20 -0
- data/ref/ruby/classes/Counter.src/M000040.html +22 -0
- data/ref/ruby/classes/CounterProto.html +164 -0
- data/ref/ruby/classes/CounterProto.src/M000004.html +22 -0
- data/ref/ruby/classes/CounterProto.src/M000005.html +22 -0
- data/ref/ruby/classes/ERB.html +158 -0
- data/ref/ruby/classes/ERB.src/M000034.html +29 -0
- data/ref/ruby/classes/FileUtils.html +165 -0
- data/ref/ruby/classes/FileUtils.src/M000047.html +18 -0
- data/ref/ruby/classes/FileUtils.src/M000048.html +18 -0
- data/ref/ruby/classes/Hw5UnitModel/Operation.html +216 -0
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000011.html +25 -0
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000012.html +33 -0
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000013.html +18 -0
- data/ref/ruby/classes/Hw5UnitModel.html +256 -0
- data/ref/ruby/classes/Hw5UnitModel.src/M000006.html +24 -0
- data/ref/ruby/classes/Hw5UnitModel.src/M000008.html +20 -0
- data/ref/ruby/classes/Hw5UnitModel.src/M000009.html +38 -0
- data/ref/ruby/classes/Hw5UnitModel.src/M000010.html +22 -0
- data/ref/ruby/classes/Hw5_unit.html +196 -0
- data/ref/ruby/classes/Hw5_unit.src/M000003.html +27 -0
- data/ref/ruby/classes/Hw5_unit_spec.html +237 -0
- data/ref/ruby/classes/Hw5_unit_spec.src/M000023.html +21 -0
- data/ref/ruby/classes/Hw5_unit_spec.src/M000024.html +21 -0
- data/ref/ruby/classes/Hw5_unit_spec.src/M000025.html +67 -0
- data/ref/ruby/classes/InputGenerator.html +260 -0
- data/ref/ruby/classes/InputGenerator.src/M000027.html +18 -0
- data/ref/ruby/classes/InputGenerator.src/M000028.html +18 -0
- data/ref/ruby/classes/InputGenerator.src/M000029.html +19 -0
- data/ref/ruby/classes/InputGenerator.src/M000030.html +38 -0
- data/ref/ruby/classes/InputGenerator.src/M000031.html +19 -0
- data/ref/ruby/classes/InputGenerator.src/M000032.html +19 -0
- data/ref/ruby/classes/MaximumCounterValue.html +159 -0
- data/ref/ruby/classes/MaximumCounterValue.src/M000035.html +23 -0
- data/ref/ruby/classes/MaximumCounterValue.src/M000036.html +21 -0
- data/ref/ruby/classes/ModuleInfo.html +199 -0
- data/ref/ruby/classes/ModuleInfo.src/M000018.html +44 -0
- data/ref/ruby/classes/ModuleInfo.src/M000019.html +26 -0
- data/ref/ruby/classes/OutputInfo.html +304 -0
- data/ref/ruby/classes/OutputInfo.src/M000017.html +51 -0
- data/ref/ruby/classes/RDoc.html +135 -0
- data/ref/ruby/classes/RDoc.src/M000051.html +40 -0
- data/ref/ruby/classes/ResettedCounterValue.html +174 -0
- data/ref/ruby/classes/ResettedCounterValue.src/M000014.html +19 -0
- data/ref/ruby/classes/ResettedCounterValue.src/M000015.html +18 -0
- data/ref/ruby/classes/ResettedCounterValue.src/M000016.html +23 -0
- data/ref/ruby/classes/RubyVPI.html +186 -0
- data/ref/ruby/classes/RubyVPI.src/M000049.html +18 -0
- data/ref/ruby/classes/RubyVPI.src/M000050.html +39 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +370 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000041.html +22 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000042.html +44 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000043.html +82 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000044.html +127 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000045.html +26 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000046.html +18 -0
- data/ref/ruby/classes/SWIG.html +111 -0
- data/ref/ruby/classes/String.html +140 -0
- data/ref/ruby/classes/String.src/M000033.html +37 -0
- data/ref/ruby/classes/Template.html +158 -0
- data/ref/ruby/classes/Template.src/M000026.html +18 -0
- data/ref/ruby/classes/TestHw5UnitModel.html +180 -0
- data/ref/ruby/classes/TestHw5UnitModel.src/M000020.html +19 -0
- data/ref/ruby/classes/TestHw5UnitModel.src/M000021.html +19 -0
- data/ref/ruby/classes/TestHw5UnitModel.src/M000022.html +64 -0
- data/ref/ruby/created.rid +1 -0
- data/ref/ruby/files/bin/generate_test_rb.html +236 -0
- data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +29 -0
- data/ref/ruby/files/bin/generate_test_tpl/bench_rb.html +115 -0
- data/ref/ruby/files/bin/generate_test_tpl/design_rb.html +107 -0
- data/ref/ruby/files/bin/generate_test_tpl/proto_rb.html +107 -0
- data/ref/ruby/files/bin/generate_test_tpl/spec_rb.html +140 -0
- data/ref/ruby/files/bin/generate_test_tpl/spec_rb.src/M000002.html +22 -0
- data/ref/ruby/files/bin/header_to_ruby_rb.html +116 -0
- data/ref/ruby/files/ext/extconf_rb.html +108 -0
- data/ref/ruby/files/gem_extconf_rb.html +114 -0
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +115 -0
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi_rb.html +108 -0
- data/ref/ruby/files/samp/counter/counter_rspecTest_bench_rb.html +115 -0
- data/ref/ruby/files/samp/counter/counter_rspecTest_design_rb.html +107 -0
- data/ref/ruby/files/samp/counter/counter_rspecTest_proto_rb.html +107 -0
- data/ref/ruby/files/samp/counter/counter_rspecTest_spec_rb.html +142 -0
- data/ref/ruby/files/samp/counter/counter_unitTest_bench_rb.html +115 -0
- data/ref/ruby/files/samp/counter/counter_unitTest_design_rb.html +107 -0
- data/ref/ruby/files/samp/counter/counter_unitTest_proto_rb.html +107 -0
- data/ref/ruby/files/samp/counter/counter_unitTest_spec_rb.html +135 -0
- data/ref/ruby/files/samp/pipelined_alu/Hw5UnitModel_rb.html +101 -0
- data/ref/ruby/files/samp/pipelined_alu/InputGenerator_rb.html +101 -0
- data/ref/ruby/files/samp/pipelined_alu/TestHw5UnitModel_rb.html +111 -0
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_bench_rb.html +108 -0
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_design_rb.html +107 -0
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_spec_rb.html +112 -0
- data/ref/ruby/fr_class_index.html +46 -0
- data/ref/ruby/fr_file_index.html +55 -0
- data/ref/ruby/fr_method_index.html +77 -0
- data/ref/ruby/index.html +24 -0
- data/ref/ruby/rdoc-style.css +208 -0
- data/samp/counter/Rakefile +1 -0
- data/samp/counter/counter.v +20 -0
- data/samp/counter/counter_rspecTest_bench.rb +9 -0
- data/samp/counter/counter_rspecTest_bench.v +28 -0
- data/samp/counter/counter_rspecTest_design.rb +22 -0
- data/samp/counter/counter_rspecTest_proto.rb +10 -0
- data/samp/counter/counter_rspecTest_runner.rake +28 -0
- data/samp/counter/counter_rspecTest_spec.rb +47 -0
- data/samp/counter/counter_unitTest_bench.rb +9 -0
- data/samp/counter/counter_unitTest_bench.v +28 -0
- data/samp/counter/counter_unitTest_design.rb +22 -0
- data/samp/counter/counter_unitTest_proto.rb +10 -0
- data/samp/counter/counter_unitTest_runner.rake +28 -0
- data/samp/counter/counter_unitTest_spec.rb +49 -0
- data/samp/pipelined_alu/Hw5UnitModel.rb +134 -0
- data/samp/pipelined_alu/InputGenerator.rb +94 -0
- data/samp/pipelined_alu/README +127 -0
- data/samp/pipelined_alu/Rakefile +1 -0
- data/samp/pipelined_alu/TestHw5UnitModel.rb +88 -0
- data/samp/pipelined_alu/hw5_unit.v +186 -0
- data/samp/pipelined_alu/hw5_unit_bench.rb +8 -0
- data/samp/pipelined_alu/hw5_unit_bench.v +45 -0
- data/samp/pipelined_alu/hw5_unit_design.rb +18 -0
- data/samp/pipelined_alu/hw5_unit_runner.rake +10 -0
- data/samp/pipelined_alu/hw5_unit_spec.rb +123 -0
- data/tpl/launcher.rake +30 -0
- data/tpl/runner.rake +96 -0
- data/tpl/synopsys_vcs.tab +2 -0
- metadata +484 -0
@@ -0,0 +1,370 @@
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: SWIG::TYPE_p_unsigned_int</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">SWIG::TYPE_p_unsigned_int</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/ruby-vpi/vpi_util_rb.html">
|
59
|
+
lib/ruby-vpi/vpi_util.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
This class represents an object inside a Verilog simulation. Such an object
|
84
|
+
is known as a <em>handle</em> in Verilog jargon. See <b>vpiHandle</b> in
|
85
|
+
IEEE Std. 1364-2005 for details.
|
86
|
+
</p>
|
87
|
+
<h1>Reading and writing values</h1>
|
88
|
+
<p>
|
89
|
+
There are several ways to read and write a handle’s value, depending
|
90
|
+
on its representation.
|
91
|
+
</p>
|
92
|
+
<h2>Using <tt>S_vpi_value</tt> objects</h2>
|
93
|
+
<p>
|
94
|
+
You can read and write values using <tt>S_vpi_value</tt> objects through
|
95
|
+
the following methods.
|
96
|
+
</p>
|
97
|
+
<ul>
|
98
|
+
<li><a href="TYPE_p_unsigned_int.html#M000041">get_value_wrapper</a>
|
99
|
+
|
100
|
+
</li>
|
101
|
+
<li>Vpi::vpi_get_value
|
102
|
+
|
103
|
+
</li>
|
104
|
+
<li>Vpi::vpi_put_value
|
105
|
+
|
106
|
+
</li>
|
107
|
+
</ul>
|
108
|
+
<h2>Using values and formats</h2>
|
109
|
+
<p>
|
110
|
+
You can read and write values, while specifying their format, through the
|
111
|
+
following methods.
|
112
|
+
</p>
|
113
|
+
<ul>
|
114
|
+
<li>value = handle.<a
|
115
|
+
href="TYPE_p_unsigned_int.html#M000042">get_value</a>(format)
|
116
|
+
|
117
|
+
</li>
|
118
|
+
<li>handle.<a href="TYPE_p_unsigned_int.html#M000043">put_value</a>(value,
|
119
|
+
format)
|
120
|
+
|
121
|
+
</li>
|
122
|
+
</ul>
|
123
|
+
<h2>Using values directly</h2>
|
124
|
+
<p>
|
125
|
+
You can read and write values directly, while implicitly specifying their
|
126
|
+
format, through several shortcut methods. The names of these methods can be
|
127
|
+
determined by (1) taking the name of a VPI value format listed in the
|
128
|
+
<b>VALUE_FORMAT_NAMES</b> array, (2) removing the "Vpi" prefix,
|
129
|
+
and (3) converting the first character into lower-case.
|
130
|
+
</p>
|
131
|
+
<p>
|
132
|
+
For example, the shortcut methods for reading and writing values using the
|
133
|
+
<b><tt>Vpi</b><em>I</em>ntVal</tt> format are:
|
134
|
+
</p>
|
135
|
+
<ul>
|
136
|
+
<li>intVal
|
137
|
+
|
138
|
+
</li>
|
139
|
+
<li>intVal=
|
140
|
+
|
141
|
+
</li>
|
142
|
+
</ul>
|
143
|
+
<p>
|
144
|
+
The methods shown above can be used like so:
|
145
|
+
</p>
|
146
|
+
<ul>
|
147
|
+
<li>value = handle.intVal
|
148
|
+
|
149
|
+
</li>
|
150
|
+
<li>handle.intVal = value
|
151
|
+
|
152
|
+
</li>
|
153
|
+
</ul>
|
154
|
+
<h2>Examples of all approaches</h2>
|
155
|
+
<p>
|
156
|
+
To read a handle’s value as an integer:
|
157
|
+
</p>
|
158
|
+
<ul>
|
159
|
+
<li>handle.<a href="TYPE_p_unsigned_int.html#M000042">get_value</a>(VpiIntVal)
|
160
|
+
|
161
|
+
</li>
|
162
|
+
<li>handle.intVal
|
163
|
+
|
164
|
+
</li>
|
165
|
+
</ul>
|
166
|
+
<p>
|
167
|
+
To write a handle’s value as an integer:
|
168
|
+
</p>
|
169
|
+
<ul>
|
170
|
+
<li>handle.<a href="TYPE_p_unsigned_int.html#M000043">put_value</a>(15,
|
171
|
+
VpiIntVal)
|
172
|
+
|
173
|
+
</li>
|
174
|
+
<li>handle.intVal = 15
|
175
|
+
|
176
|
+
</li>
|
177
|
+
</ul>
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div id="method-list">
|
185
|
+
<h3 class="section-bar">Methods</h3>
|
186
|
+
|
187
|
+
<div class="name-list">
|
188
|
+
<a href="#M000045">[]</a>
|
189
|
+
<a href="#M000046">each</a>
|
190
|
+
<a href="#M000042">get_value</a>
|
191
|
+
<a href="#M000041">get_value_wrapper</a>
|
192
|
+
<a href="#M000044">method_missing</a>
|
193
|
+
<a href="#M000043">put_value</a>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
|
200
|
+
<!-- if includes -->
|
201
|
+
<div id="includes">
|
202
|
+
<h3 class="section-bar">Included Modules</h3>
|
203
|
+
|
204
|
+
<div id="includes-list">
|
205
|
+
<span class="include-name">Vpi</span>
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div id="section">
|
210
|
+
|
211
|
+
|
212
|
+
<div id="constants-list">
|
213
|
+
<h3 class="section-bar">Constants</h3>
|
214
|
+
|
215
|
+
<div class="name-list">
|
216
|
+
<table summary="Constants">
|
217
|
+
<tr class="top-aligned-row context-row">
|
218
|
+
<td class="context-item-name">HINT_REGEXP</td>
|
219
|
+
<td>=</td>
|
220
|
+
<td class="context-item-value">%r{_([a-z])$}</td>
|
221
|
+
</tr>
|
222
|
+
<tr class="top-aligned-row context-row">
|
223
|
+
<td class="context-item-name">ASSIGN_REGEXP</td>
|
224
|
+
<td>=</td>
|
225
|
+
<td class="context-item-value">%r{=$}</td>
|
226
|
+
</tr>
|
227
|
+
<tr class="top-aligned-row context-row">
|
228
|
+
<td class="context-item-name">QUERY_REGEXP</td>
|
229
|
+
<td>=</td>
|
230
|
+
<td class="context-item-value">%r{\?$}</td>
|
231
|
+
</tr>
|
232
|
+
<tr class="top-aligned-row context-row">
|
233
|
+
<td class="context-item-name">PREFIX_REGEXP</td>
|
234
|
+
<td>=</td>
|
235
|
+
<td class="context-item-value">%r{^(.*?)_}</td>
|
236
|
+
</tr>
|
237
|
+
</table>
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
<!-- if method_list -->
|
247
|
+
<div id="methods">
|
248
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
249
|
+
|
250
|
+
<div id="method-M000045" class="method-detail">
|
251
|
+
<a name="M000045"></a>
|
252
|
+
|
253
|
+
<div class="method-heading">
|
254
|
+
<a href="TYPE_p_unsigned_int.src/M000045.html" target="Code" class="method-signature"
|
255
|
+
onclick="popupCode('TYPE_p_unsigned_int.src/M000045.html');return false;">
|
256
|
+
<span class="method-name">[]</span><span class="method-args">(aType)</span>
|
257
|
+
</a>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div class="method-description">
|
261
|
+
<p>
|
262
|
+
Returns an array of handles of the given type.
|
263
|
+
</p>
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div id="method-M000046" class="method-detail">
|
268
|
+
<a name="M000046"></a>
|
269
|
+
|
270
|
+
<div class="method-heading">
|
271
|
+
<a href="TYPE_p_unsigned_int.src/M000046.html" target="Code" class="method-signature"
|
272
|
+
onclick="popupCode('TYPE_p_unsigned_int.src/M000046.html');return false;">
|
273
|
+
<span class="method-name">each</span><span class="method-args">(aType {|handle| ...}</span>
|
274
|
+
</a>
|
275
|
+
</div>
|
276
|
+
|
277
|
+
<div class="method-description">
|
278
|
+
<p>
|
279
|
+
Iterates over all handles of the given type and executes the given block
|
280
|
+
once for each handle.
|
281
|
+
</p>
|
282
|
+
</div>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div id="method-M000042" class="method-detail">
|
286
|
+
<a name="M000042"></a>
|
287
|
+
|
288
|
+
<div class="method-heading">
|
289
|
+
<a href="TYPE_p_unsigned_int.src/M000042.html" target="Code" class="method-signature"
|
290
|
+
onclick="popupCode('TYPE_p_unsigned_int.src/M000042.html');return false;">
|
291
|
+
<span class="method-name">get_value</span><span class="method-args">(aFormat = VpiObjTypeVal)</span>
|
292
|
+
</a>
|
293
|
+
</div>
|
294
|
+
|
295
|
+
<div class="method-description">
|
296
|
+
<p>
|
297
|
+
Reads the value using the given format and returns it. If a format is not
|
298
|
+
given, then the Verilog simulator will attempt to determine the correct
|
299
|
+
format.
|
300
|
+
</p>
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
|
304
|
+
<div id="method-M000041" class="method-detail">
|
305
|
+
<a name="M000041"></a>
|
306
|
+
|
307
|
+
<div class="method-heading">
|
308
|
+
<a href="TYPE_p_unsigned_int.src/M000041.html" target="Code" class="method-signature"
|
309
|
+
onclick="popupCode('TYPE_p_unsigned_int.src/M000041.html');return false;">
|
310
|
+
<span class="method-name">get_value_wrapper</span><span class="method-args">(aFormat)</span>
|
311
|
+
</a>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div class="method-description">
|
315
|
+
<p>
|
316
|
+
Reads the value using the given format and returns a <tt>S_vpi_value</tt>
|
317
|
+
object.
|
318
|
+
</p>
|
319
|
+
</div>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
<div id="method-M000044" class="method-detail">
|
323
|
+
<a name="M000044"></a>
|
324
|
+
|
325
|
+
<div class="method-heading">
|
326
|
+
<a href="TYPE_p_unsigned_int.src/M000044.html" target="Code" class="method-signature"
|
327
|
+
onclick="popupCode('TYPE_p_unsigned_int.src/M000044.html');return false;">
|
328
|
+
<span class="method-name">method_missing</span><span class="method-args">(aMsg, *aArgs, &aBlockArg)</span>
|
329
|
+
</a>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
<div class="method-description">
|
333
|
+
<p>
|
334
|
+
Enables read and write access to VPI properties of this handle.
|
335
|
+
</p>
|
336
|
+
</div>
|
337
|
+
</div>
|
338
|
+
|
339
|
+
<div id="method-M000043" class="method-detail">
|
340
|
+
<a name="M000043"></a>
|
341
|
+
|
342
|
+
<div class="method-heading">
|
343
|
+
<a href="TYPE_p_unsigned_int.src/M000043.html" target="Code" class="method-signature"
|
344
|
+
onclick="popupCode('TYPE_p_unsigned_int.src/M000043.html');return false;">
|
345
|
+
<span class="method-name">put_value</span><span class="method-args">(aValue, aFormat = nil, aTime = nil, aDelay = VpiNoDelay)</span>
|
346
|
+
</a>
|
347
|
+
</div>
|
348
|
+
|
349
|
+
<div class="method-description">
|
350
|
+
<p>
|
351
|
+
Writes the given value using the given format, time, and delay, and then
|
352
|
+
returns the given value. If a format is not given, then the Verilog
|
353
|
+
simulator will attempt to determine the correct format.
|
354
|
+
</p>
|
355
|
+
</div>
|
356
|
+
</div>
|
357
|
+
|
358
|
+
|
359
|
+
</div>
|
360
|
+
|
361
|
+
|
362
|
+
</div>
|
363
|
+
|
364
|
+
|
365
|
+
<div id="validator-badges">
|
366
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
</body>
|
370
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
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>get_value_wrapper (SWIG::TYPE_p_unsigned_int)</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_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>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,44 @@
|
|
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>get_value (SWIG::TYPE_p_unsigned_int)</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_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>
|
43
|
+
</body>
|
44
|
+
</html>
|
@@ -0,0 +1,82 @@
|
|
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>put_value (SWIG::TYPE_p_unsigned_int)</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_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>
|
81
|
+
</body>
|
82
|
+
</html>
|