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
data/lib/ruby-vpi/erb.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2006 Suraj N. Kurapati
|
3
|
+
|
4
|
+
This file is part of Ruby-VPI.
|
5
|
+
|
6
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
7
|
+
modify it under the terms of the GNU General Public License
|
8
|
+
as published by the Free Software Foundation; either version 2
|
9
|
+
of the License, or (at your option) any later version.
|
10
|
+
|
11
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
18
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19
|
+
=end
|
20
|
+
|
21
|
+
require 'erb'
|
22
|
+
|
23
|
+
# A version of ERB whose embedding tags behave like those of PHP. That is, only <%= ... %> tags produce output, whereas <% ... %> tags do *not* produce any output.
|
24
|
+
class ERB
|
25
|
+
alias original_initialize initialize
|
26
|
+
|
27
|
+
def initialize aInput, *aArgs
|
28
|
+
# ensure that only <%= ... %> tags generate output
|
29
|
+
input = aInput.gsub %r{<%=.*?%>}m do |s|
|
30
|
+
if ($' =~ /\r?\n/) == 0
|
31
|
+
s << $&
|
32
|
+
else
|
33
|
+
s
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
aArgs[1] = '>'
|
38
|
+
|
39
|
+
original_initialize input, *aArgs
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2006 Suraj N. Kurapati
|
3
|
+
|
4
|
+
This file is part of Ruby-VPI.
|
5
|
+
|
6
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
7
|
+
modify it under the terms of the GNU General Public License
|
8
|
+
as published by the Free Software Foundation; either version 2
|
9
|
+
of the License, or (at your option) any later version.
|
10
|
+
|
11
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
18
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19
|
+
=end
|
20
|
+
|
21
|
+
require 'fileutils'
|
22
|
+
|
23
|
+
module FileUtils
|
24
|
+
alias old_sh sh
|
25
|
+
|
26
|
+
# An improved sh() that also accepts arrays as arguments.
|
27
|
+
def sh *aArgs, &aBlock
|
28
|
+
old_sh *collect_args(aArgs).reject {|i| i.to_s.empty?}, &aBlock
|
29
|
+
end
|
30
|
+
|
31
|
+
# Collects the given arguments into a single, sparse array.
|
32
|
+
def collect_args *aArgs
|
33
|
+
aArgs.flatten.compact
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2006 Suraj N. Kurapati
|
3
|
+
Copyright 2004 Dave Thomas
|
4
|
+
|
5
|
+
This file is part of Ruby-VPI.
|
6
|
+
|
7
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
8
|
+
modify it under the terms of the GNU General Public License
|
9
|
+
as published by the Free Software Foundation; either version 2
|
10
|
+
of the License, or (at your option) any later version.
|
11
|
+
|
12
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
19
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
20
|
+
=end
|
21
|
+
|
22
|
+
require 'rdoc/usage'
|
23
|
+
|
24
|
+
module RDoc
|
25
|
+
# Display usage information from RDoc comments in the given file.
|
26
|
+
def RDoc.usage_from_file input_file, *args
|
27
|
+
comment = File.open(input_file) do |file|
|
28
|
+
find_comment(file)
|
29
|
+
end
|
30
|
+
|
31
|
+
comment = comment.gsub(/^\s*#/, '')
|
32
|
+
|
33
|
+
markup = SM::SimpleMarkup.new
|
34
|
+
flow_convertor = SM::ToFlow.new
|
35
|
+
|
36
|
+
flow = markup.convert(comment, flow_convertor)
|
37
|
+
|
38
|
+
format = "plain"
|
39
|
+
|
40
|
+
unless args.empty?
|
41
|
+
flow = extract_sections(flow, args)
|
42
|
+
end
|
43
|
+
|
44
|
+
options = RI::Options.instance
|
45
|
+
if args = ENV["RI"]
|
46
|
+
options.parse(args.split)
|
47
|
+
end
|
48
|
+
formatter = options.formatter.new(options, "")
|
49
|
+
formatter.display_flow(flow)
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Bootstraps the RSpec library from within Ruby.
|
2
|
+
|
3
|
+
=begin
|
4
|
+
Copyright 2006 Suraj N. Kurapati
|
5
|
+
Copyright 2006 RSpec project
|
6
|
+
|
7
|
+
This file is part of Ruby-VPI.
|
8
|
+
|
9
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
10
|
+
modify it under the terms of the GNU General Public License
|
11
|
+
as published by the Free Software Foundation; either version 2
|
12
|
+
of the License, or (at your option) any later version.
|
13
|
+
|
14
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
GNU General Public License for more details.
|
18
|
+
|
19
|
+
You should have received a copy of the GNU General Public License
|
20
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
21
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'rubygems'
|
25
|
+
require_gem 'rspec', '>= 0.5.4'
|
26
|
+
require 'spec'
|
27
|
+
|
28
|
+
# prevent RSpec termination when no arguments are provided
|
29
|
+
ARGV.unshift ''
|
30
|
+
|
31
|
+
$context_runner = ::Spec::Runner::OptionParser.create_context_runner(ARGV, false, STDERR, STDOUT)
|
32
|
+
at_exit {$context_runner.run false}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2006 Suraj N. Kurapati
|
3
|
+
|
4
|
+
This file is part of Ruby-VPI.
|
5
|
+
|
6
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
7
|
+
modify it under the terms of the GNU General Public License
|
8
|
+
as published by the Free Software Foundation; either version 2
|
9
|
+
of the License, or (at your option) any later version.
|
10
|
+
|
11
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
18
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19
|
+
=end
|
20
|
+
|
21
|
+
require 'ruby-vpi'
|
22
|
+
RubyVPI.load_runner_template
|
@@ -0,0 +1,310 @@
|
|
1
|
+
# A utility layer which transforms the VPI interface into one that is more suitable for Ruby.
|
2
|
+
|
3
|
+
=begin
|
4
|
+
Copyright 2006 Suraj N. Kurapati
|
5
|
+
|
6
|
+
This file is part of Ruby-VPI.
|
7
|
+
|
8
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
9
|
+
modify it under the terms of the GNU General Public License
|
10
|
+
as published by the Free Software Foundation; either version 2
|
11
|
+
of the License, or (at your option) any later version.
|
12
|
+
|
13
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
GNU General Public License for more details.
|
17
|
+
|
18
|
+
You should have received a copy of the GNU General Public License
|
19
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
20
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
21
|
+
=end
|
22
|
+
|
23
|
+
module SWIG
|
24
|
+
=begin rdoc
|
25
|
+
This class represents an object inside a Verilog simulation. Such an object is known as a _handle_ in Verilog jargon. See *vpiHandle* in IEEE Std. 1364-2005 for details.
|
26
|
+
|
27
|
+
= Reading and writing values
|
28
|
+
There are several ways to read and write a handle's value, depending on its representation.
|
29
|
+
|
30
|
+
== Using +S_vpi_value+ objects
|
31
|
+
You can read and write values using +S_vpi_value+ objects through the following methods.
|
32
|
+
* #get_value_wrapper
|
33
|
+
* Vpi::vpi_get_value
|
34
|
+
* Vpi::vpi_put_value
|
35
|
+
|
36
|
+
== Using values and formats
|
37
|
+
You can read and write values, while specifying their format, through the following methods.
|
38
|
+
* value = handle.#get_value(format)
|
39
|
+
* handle.#put_value(value, format)
|
40
|
+
|
41
|
+
== Using values directly
|
42
|
+
You can read and write values directly, while implicitly specifying their format, through several shortcut methods. The names of these methods can be determined by (1) taking the name of a VPI value format listed in the *VALUE_FORMAT_NAMES* array, (2) removing the "Vpi" prefix, and (3) converting the first character into lower-case.
|
43
|
+
|
44
|
+
For example, the shortcut methods for reading and writing values using the <tt><b>Vpi</b><em>I</em>ntVal</tt> format are:
|
45
|
+
* intVal
|
46
|
+
* intVal=
|
47
|
+
|
48
|
+
The methods shown above can be used like so:
|
49
|
+
* value = handle.#intVal
|
50
|
+
* handle.#intVal = value
|
51
|
+
|
52
|
+
== Examples of all approaches
|
53
|
+
To read a handle's value as an integer:
|
54
|
+
* handle.#get_value(VpiIntVal)
|
55
|
+
* handle.intVal
|
56
|
+
|
57
|
+
To write a handle's value as an integer:
|
58
|
+
* handle.#put_value(15, VpiIntVal)
|
59
|
+
* handle.intVal = 15
|
60
|
+
=end
|
61
|
+
class TYPE_p_unsigned_int
|
62
|
+
include Vpi
|
63
|
+
|
64
|
+
# Reads the value using the given format and returns a +S_vpi_value+ object.
|
65
|
+
def get_value_wrapper aFormat
|
66
|
+
val = S_vpi_value.new
|
67
|
+
val.format = aFormat
|
68
|
+
|
69
|
+
vpi_get_value self, val
|
70
|
+
val
|
71
|
+
end
|
72
|
+
|
73
|
+
# Reads the value using the given format and returns it. If a format is not given, then the Verilog simulator will attempt to determine the correct format.
|
74
|
+
def get_value aFormat = VpiObjTypeVal
|
75
|
+
val = get_value_wrapper(aFormat)
|
76
|
+
|
77
|
+
case val.format
|
78
|
+
when VpiBinStrVal, VpiOctStrVal, VpiDecStrVal, VpiHexStrVal, VpiStringVal
|
79
|
+
val.value.str
|
80
|
+
|
81
|
+
when VpiScalarVal
|
82
|
+
val.value.scalar
|
83
|
+
|
84
|
+
when VpiIntVal
|
85
|
+
get_value_wrapper(VpiHexStrVal).value.str.to_i(16)
|
86
|
+
|
87
|
+
when VpiRealVal
|
88
|
+
val.value.real
|
89
|
+
|
90
|
+
when VpiTimeVal
|
91
|
+
val.value.time
|
92
|
+
|
93
|
+
when VpiVectorVal
|
94
|
+
val.value.vector
|
95
|
+
|
96
|
+
when VpiStrengthVal
|
97
|
+
val.value.strength
|
98
|
+
|
99
|
+
else
|
100
|
+
raise "unknown S_vpi_value.format: #{val.format}"
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# Writes the given value using the given format, time, and delay, and then returns the given value. If a format is not given, then the Verilog simulator will attempt to determine the correct format.
|
105
|
+
def put_value aValue, aFormat = nil, aTime = nil, aDelay = VpiNoDelay
|
106
|
+
aFormat ||= get_value_wrapper(VpiObjTypeVal).format
|
107
|
+
|
108
|
+
newVal = S_vpi_value.new
|
109
|
+
newVal.format = aFormat
|
110
|
+
|
111
|
+
case aFormat
|
112
|
+
when VpiBinStrVal, VpiOctStrVal, VpiDecStrVal, VpiHexStrVal, VpiStringVal
|
113
|
+
newVal.value.str = aValue.to_s
|
114
|
+
|
115
|
+
when VpiScalarVal
|
116
|
+
newVal.value.scalar = aValue
|
117
|
+
|
118
|
+
when VpiIntVal
|
119
|
+
newVal.format = VpiHexStrVal
|
120
|
+
newVal.value.str = aValue.to_i.to_s(16)
|
121
|
+
|
122
|
+
when VpiRealVal
|
123
|
+
newVal.value.real = aValue.to_f
|
124
|
+
|
125
|
+
when VpiTimeVal
|
126
|
+
newVal.value.time = aValue
|
127
|
+
|
128
|
+
when VpiVectorVal
|
129
|
+
newVal.value.vector = aValue
|
130
|
+
|
131
|
+
when VpiStrengthVal
|
132
|
+
newVal.value.strength = aValue
|
133
|
+
|
134
|
+
else
|
135
|
+
raise "unknown S_vpi_value.format: #{newVal.format}"
|
136
|
+
end
|
137
|
+
|
138
|
+
vpi_put_value self, newVal, aTime, aDelay
|
139
|
+
|
140
|
+
# ensure that value was written correctly
|
141
|
+
readenVal = get_value(aFormat)
|
142
|
+
|
143
|
+
writtenCorrectly =
|
144
|
+
case aFormat
|
145
|
+
when VpiBinStrVal, VpiOctStrVal, VpiDecStrVal, VpiHexStrVal
|
146
|
+
if aValue =~ /[xz]/i # TODO: verify 'z' behavior
|
147
|
+
readenVal =~ /[xz]/i
|
148
|
+
else
|
149
|
+
readenVal == aValue.to_s
|
150
|
+
end
|
151
|
+
|
152
|
+
when VpiStringVal
|
153
|
+
readenVal == aValue.to_s
|
154
|
+
|
155
|
+
when VpiIntVal
|
156
|
+
# allow for register overflow when limit reached
|
157
|
+
readenVal == (aValue.to_i % (2 ** self.vpiSize))
|
158
|
+
|
159
|
+
when VpiRealVal
|
160
|
+
readenVal == aValue.to_f
|
161
|
+
|
162
|
+
else
|
163
|
+
true
|
164
|
+
end
|
165
|
+
|
166
|
+
unless writtenCorrectly
|
167
|
+
raise "value written (#{aValue.inspect}) does not match value read (#{readenVal.inspect}) from handle #{self}"
|
168
|
+
end
|
169
|
+
|
170
|
+
aValue
|
171
|
+
end
|
172
|
+
|
173
|
+
HINT_REGEXP = %r{_([a-z])$}
|
174
|
+
ASSIGN_REGEXP = %r{=$}
|
175
|
+
QUERY_REGEXP = %r{\?$}
|
176
|
+
PREFIX_REGEXP = %r{^(.*?)_}
|
177
|
+
|
178
|
+
# Enables read and write access to VPI properties of this handle.
|
179
|
+
def method_missing aMsg, *aArgs, &aBlockArg
|
180
|
+
methName = aMsg.to_s
|
181
|
+
|
182
|
+
# determine if property is being written
|
183
|
+
if isAssign = methName =~ ASSIGN_REGEXP
|
184
|
+
methName.sub! ASSIGN_REGEXP, ''
|
185
|
+
end
|
186
|
+
|
187
|
+
# determine if property is being queried
|
188
|
+
if isQuery = methName =~ QUERY_REGEXP
|
189
|
+
methName.sub! QUERY_REGEXP, ''
|
190
|
+
end
|
191
|
+
|
192
|
+
# parse Accessor parameter
|
193
|
+
if accessor = methName[HINT_REGEXP, 1]
|
194
|
+
methName.sub! HINT_REGEXP, ''
|
195
|
+
end
|
196
|
+
|
197
|
+
# parse Operation parameter
|
198
|
+
if operation = methName[PREFIX_REGEXP, 1]
|
199
|
+
methName.sub! PREFIX_REGEXP, ''
|
200
|
+
end
|
201
|
+
|
202
|
+
# resolve Property parameter into a valid VPI property
|
203
|
+
propName = methName[0, 1].upcase << methName[1..-1]
|
204
|
+
propName.insert(0, 'Vpi') unless methName =~ /^vpi/
|
205
|
+
|
206
|
+
puts '', Kernel.caller.join("\n"), '', "operation: #{operation}", "meth: #{aMsg}", "args: #{aArgs.inspect}", "name: #{methName}", "prop: #{propName}", "assign: #{isAssign}", "query: #{isQuery}" if $DEBUG
|
207
|
+
|
208
|
+
begin
|
209
|
+
prop = Vpi.const_get(propName)
|
210
|
+
rescue NameError
|
211
|
+
raise ArgumentError, "invalid VPI property `#{propName}'"
|
212
|
+
end
|
213
|
+
|
214
|
+
# access the VPI property
|
215
|
+
if operation
|
216
|
+
return self.send(operation.to_sym, prop, *aArgs, &aBlockArg)
|
217
|
+
else
|
218
|
+
loop do
|
219
|
+
puts "looping, accessor: #{accessor}" if $DEBUG
|
220
|
+
|
221
|
+
case accessor
|
222
|
+
when 'd' # delay values
|
223
|
+
if isAssign
|
224
|
+
# TODO: vpi_put_delays
|
225
|
+
else
|
226
|
+
# TODO: vpi_get_delays
|
227
|
+
end
|
228
|
+
|
229
|
+
when 'l' # logic values
|
230
|
+
if isAssign
|
231
|
+
value = aArgs.shift
|
232
|
+
return put_value(value, prop, *aArgs)
|
233
|
+
else
|
234
|
+
return get_value(prop)
|
235
|
+
end
|
236
|
+
|
237
|
+
when 'i' # integer values
|
238
|
+
return vpi_get(prop, self) unless isAssign
|
239
|
+
|
240
|
+
when 'b' # boolean values
|
241
|
+
unless isAssign
|
242
|
+
value = vpi_get(prop, self)
|
243
|
+
return value && (value != 0) # zero is false in C
|
244
|
+
end
|
245
|
+
|
246
|
+
when 's' # string values
|
247
|
+
return vpi_get_str(prop, self) unless isAssign
|
248
|
+
|
249
|
+
when 'h' # handle values
|
250
|
+
return vpi_handle(prop, self) unless isAssign
|
251
|
+
|
252
|
+
else # accessor not specified. guess its value from property name
|
253
|
+
if isQuery
|
254
|
+
accessor = 'b'
|
255
|
+
redo
|
256
|
+
end
|
257
|
+
|
258
|
+
case propName
|
259
|
+
when /Time$/
|
260
|
+
accessor = 'd'
|
261
|
+
redo
|
262
|
+
|
263
|
+
when /Val$/
|
264
|
+
accessor = 'l'
|
265
|
+
redo
|
266
|
+
|
267
|
+
when /Type$/, /Direction$/, /Index$/, /Size$/, /Strength\d?$/, /Polarity$/, /Edge$/, /Offset$/, /Mode$/
|
268
|
+
accessor = 'i'
|
269
|
+
redo
|
270
|
+
|
271
|
+
when /Is[A-Z]/, /ed$/
|
272
|
+
accessor = 'b'
|
273
|
+
redo
|
274
|
+
|
275
|
+
when /Name$/, /File$/, /Decompile$/
|
276
|
+
accessor = 's'
|
277
|
+
redo
|
278
|
+
|
279
|
+
when /Parent$/, /Inst$/, /Range$/, /Driver$/, /Net$/, /Load$/, /Conn$/, /Bit$/, /Word$/, /[LR]hs$/, /(In|Out)$/, /Term$/, /Argument$/, /Condition$/, /Use$/, /Operand$/, /Stmt$/, /Expr$/, /Scope$/, /Memory$/, /Delay$/
|
280
|
+
accessor = 'h'
|
281
|
+
redo
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
break
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
raise NoMethodError, "unable to access VPI property `#{propName}' through method `#{aMsg}' with arguments `#{aArgs.inspect}' for handle #{self}"
|
290
|
+
end
|
291
|
+
|
292
|
+
# Returns an array of handles of the given type.
|
293
|
+
def [] aType
|
294
|
+
handles = []
|
295
|
+
|
296
|
+
if itr = vpi_iterate(aType, self)
|
297
|
+
while h = vpi_scan(itr)
|
298
|
+
handles << h
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
handles
|
303
|
+
end
|
304
|
+
|
305
|
+
# Iterates over all handles of the given type and executes the given block once for each handle.
|
306
|
+
def each aType, &aBlock # :yields: handle
|
307
|
+
self[aType].each(&aBlock)
|
308
|
+
end
|
309
|
+
end
|
310
|
+
end
|
data/lib/ruby-vpi.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2006 Suraj N. Kurapati
|
3
|
+
|
4
|
+
This file is part of Ruby-VPI.
|
5
|
+
|
6
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
7
|
+
modify it under the terms of the GNU General Public License
|
8
|
+
as published by the Free Software Foundation; either version 2
|
9
|
+
of the License, or (at your option) any later version.
|
10
|
+
|
11
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
18
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19
|
+
=end
|
20
|
+
|
21
|
+
# Provides configuration information of the Ruby-VPI project.
|
22
|
+
module RubyVPI
|
23
|
+
LIBRARY_PATH = File.dirname(__FILE__)
|
24
|
+
PATH = File.dirname(LIBRARY_PATH)
|
25
|
+
TEMPLATE_PATH = File.join(PATH, 'tpl')
|
26
|
+
OBJECT_PATH = File.join(PATH, 'obj')
|
27
|
+
|
28
|
+
# Loads the test runner template.
|
29
|
+
def self.load_runner_template
|
30
|
+
load File.join(TEMPLATE_PATH, 'runner.rake')
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the current bench using the given parameters.
|
34
|
+
def self.init_bench aTestPrefix, aProtoClassId
|
35
|
+
Vpi::relay_verilog # service the $ruby_init() callback
|
36
|
+
|
37
|
+
require 'ruby-vpi/vpi_util'
|
38
|
+
|
39
|
+
# load the design under test
|
40
|
+
require "#{aTestPrefix}_design.rb"
|
41
|
+
|
42
|
+
if ENV['PROTO']
|
43
|
+
require "#{aTestPrefix}_proto.rb"
|
44
|
+
|
45
|
+
proto = Kernel.const_get(aProtoClassId).new
|
46
|
+
|
47
|
+
Vpi.class_eval do
|
48
|
+
define_method :relay_verilog do
|
49
|
+
proto.simulate!
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
puts "#{aTestPrefix}: verifying prototype instead of design"
|
54
|
+
end
|
55
|
+
|
56
|
+
require "#{aTestPrefix}_spec.rb"
|
57
|
+
end
|
58
|
+
end
|
data/memo.html
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
<h1>Notes</h1>
|
2
|
+
|
3
|
+
|
4
|
+
<ul>
|
5
|
+
<li>When within Rake, rubygems is automatically available for use. no need to require() it again</li>
|
6
|
+
</ul>
|
7
|
+
|
8
|
+
|
9
|
+
<h1>Pending tasks</h1>
|
10
|
+
|
11
|
+
|
12
|
+
<ul>
|
13
|
+
<li>integrate RCov for coverage statistics</li>
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
|
17
|
+
<ul>
|
18
|
+
<li>define handled methods in Vpi::method_missing for faster response
|
19
|
+
<ul>
|
20
|
+
<li>this has been verified as bottleneck from profiling data</li>
|
21
|
+
</ul></li>
|
22
|
+
</ul>
|
23
|
+
|
24
|
+
|
25
|
+
<ul>
|
26
|
+
<li>file bug report for Icarus 0.8 (l0_dcache)
|
27
|
+
<ul>
|
28
|
+
<li>try new icarus snapshot</li>
|
29
|
+
</ul></li>
|
30
|
+
</ul>
|
31
|
+
|
32
|
+
|
33
|
+
<ul>
|
34
|
+
<li><span class="caps">GHDL</span> simulator supports <span class="caps">VPI</span>
|
35
|
+
<ul>
|
36
|
+
<li>need way to invoke <span class="caps">VPI</span> tasks from <span class="caps">VHDL</span>, like <code>$ruby_init();</code></li>
|
37
|
+
</ul></li>
|
38
|
+
</ul>
|
39
|
+
|
40
|
+
|
41
|
+
<ul>
|
42
|
+
<li>smarter test generation, which adjusts to user modifications in previously generated output</li>
|
43
|
+
</ul>
|
44
|
+
|
45
|
+
|
46
|
+
<h1>Finished tasks</h1>
|
47
|
+
|
48
|
+
|
49
|
+
<ul>
|
50
|
+
<li>add support for <span class="caps">ESL</span> prototyping (like SystemC)</li>
|
51
|
+
</ul>
|
52
|
+
|
53
|
+
|
54
|
+
<ul>
|
55
|
+
<li>decouple code generation with $RUBYLIB and erb</li>
|
56
|
+
</ul>
|
57
|
+
|
58
|
+
|
59
|
+
<ul>
|
60
|
+
<li>change should_be to should_equal in examples</li>
|
61
|
+
</ul>
|
62
|
+
|
63
|
+
|
64
|
+
<ul>
|
65
|
+
<li>add support for <span class="caps">GPL</span> Cver in the test runner template</li>
|
66
|
+
</ul>
|
67
|
+
|
68
|
+
|
69
|
+
<ul>
|
70
|
+
<li>build ruby-vpi once to generate all <strong>.so files
|
71
|
+
<ul>
|
72
|
+
<li>test runner should not rebuild ruby-vpi every time</li>
|
73
|
+
</ul></li>
|
74
|
+
</ul>
|
75
|
+
|
76
|
+
|
77
|
+
<ul>
|
78
|
+
<li>distribute as a <span class="caps">GEM</span>, binary, and source
|
79
|
+
<ul>
|
80
|
+
<li>use <span class="caps">RUBYLIB</span> to bypass rubygems site installation for local testing. otherwise have to build & install gem <em>every</em> time!</li>
|
81
|
+
<li>put lib/</strong> into lib/ruby-vpi/*</li>
|
82
|
+
</ul></li>
|
83
|
+
</ul>
|
84
|
+
|
85
|
+
|
86
|
+
<h1>Obsolete tasks</h1>
|
data/readme.html
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<h1>Welcome to Ruby-VPI</h1>
|
2
|
+
|
3
|
+
|
4
|
+
<p>Ruby-VPI is a Ruby interface to Verilog <span class="caps">VPI</span>. It lets you create complex Verilog test benches easily and wholly in Ruby.</p>
|
5
|
+
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<li>See the <a href="./doc/">user manual</a> to begin using Ruby-VPI.</li>
|
9
|
+
</ul>
|
10
|
+
|
11
|
+
|
12
|
+
<ul>
|
13
|
+
<li>See the <a href="./history.html">release history</a> to see what is new in this release.</li>
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
|
17
|
+
<ul>
|
18
|
+
<li>Visit the <a href="http://ruby-vpi.rubyforge.org">project website</a> for additional resources.</li>
|
19
|
+
</ul>
|