ruby-vpi 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/doc/txt/manual.txt
ADDED
@@ -0,0 +1,1657 @@
|
|
1
|
+
Ruby-VPI user manual
|
2
|
+
|
3
|
+
Copyright 2006 Suraj N. Kurapati
|
4
|
+
|
5
|
+
Copyright 2005, 2006 Tango Desktop Project for admonition and navigation
|
6
|
+
graphics released under this license.
|
7
|
+
|
8
|
+
Copyright 1999, 2000, 2001 Norman Walsh for DocBook graphics released under
|
9
|
+
this license.
|
10
|
+
|
11
|
+
Permission is granted to copy, distribute and/or modify this document under the
|
12
|
+
terms of the GNU Free Documentation License, Version 1.2 or any later version
|
13
|
+
published by the Free Software Foundation; with no Invariant Sections, no
|
14
|
+
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included
|
15
|
+
in the section entitled "GNU Free Documentation License".
|
16
|
+
|
17
|
+
Abstract
|
18
|
+
|
19
|
+
This manual explains how to use Ruby-VPI. You can find the newest version of
|
20
|
+
this manual at the Ruby-VPI website.
|
21
|
+
|
22
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
23
|
+
|
24
|
+
Table of Contents
|
25
|
+
|
26
|
+
1. Introduction
|
27
|
+
|
28
|
+
License
|
29
|
+
Manifest
|
30
|
+
Resources
|
31
|
+
Related works
|
32
|
+
|
33
|
+
Ye olde PLI
|
34
|
+
|
35
|
+
2. Background
|
36
|
+
|
37
|
+
Methodology
|
38
|
+
Terminology
|
39
|
+
Organization
|
40
|
+
|
41
|
+
Interface to VPI
|
42
|
+
|
43
|
+
Running a test
|
44
|
+
|
45
|
+
Initialization
|
46
|
+
Execution
|
47
|
+
|
48
|
+
3. Usage
|
49
|
+
|
50
|
+
Requirements
|
51
|
+
Installation and maintenance
|
52
|
+
Tools
|
53
|
+
|
54
|
+
Automated test generation
|
55
|
+
Verilog to Ruby conversion
|
56
|
+
|
57
|
+
Examples
|
58
|
+
Tutorial
|
59
|
+
|
60
|
+
Start with a design
|
61
|
+
Generate a test
|
62
|
+
Specify your expectations
|
63
|
+
Implement the prototype
|
64
|
+
Verify the prototype
|
65
|
+
Implement the design
|
66
|
+
Verify the design
|
67
|
+
|
68
|
+
4. Known problems
|
69
|
+
|
70
|
+
Ruby
|
71
|
+
|
72
|
+
SystemStackError
|
73
|
+
test/unit
|
74
|
+
|
75
|
+
Icarus Verilog
|
76
|
+
|
77
|
+
vpi_handle_by_name
|
78
|
+
Vpi::reset
|
79
|
+
|
80
|
+
Mentor Modelsim
|
81
|
+
|
82
|
+
ruby_run()
|
83
|
+
|
84
|
+
Glossary
|
85
|
+
A. GNU Free Documentation License
|
86
|
+
|
87
|
+
PREAMBLE
|
88
|
+
APPLICABILITY AND DEFINITIONS
|
89
|
+
VERBATIM COPYING
|
90
|
+
COPYING IN QUANTITY
|
91
|
+
MODIFICATIONS
|
92
|
+
COMBINING DOCUMENTS
|
93
|
+
COLLECTIONS OF DOCUMENTS
|
94
|
+
AGGREGATION WITH INDEPENDENT WORKS
|
95
|
+
TRANSLATION
|
96
|
+
TERMINATION
|
97
|
+
FUTURE REVISIONS OF THIS LICENSE
|
98
|
+
ADDENDUM: How to use this License for your documents
|
99
|
+
|
100
|
+
List of Figures
|
101
|
+
|
102
|
+
2.1. Overall organization of a test
|
103
|
+
2.2. Detailed organization of a test
|
104
|
+
2.3. Initialization of a test
|
105
|
+
2.4. Execution of a test
|
106
|
+
3.1. Declaration of a simple up-counter with synchronous reset
|
107
|
+
3.2. Generating a test with specification in RSpec format
|
108
|
+
3.3. Generating a test with specification in unit test format
|
109
|
+
3.4. Specification implemented in RSpec format
|
110
|
+
3.5. Specification implemented in unit test format
|
111
|
+
3.6. Ruby prototype of our Verilog design
|
112
|
+
3.7. Running a test with specification in RSpec format
|
113
|
+
3.8. Running a test with specification in unit test format
|
114
|
+
3.9. Implementation of a simple up-counter with synchronous reset
|
115
|
+
3.10. Running a test with specification in RSpec format
|
116
|
+
3.11. Running a test with specification in unit test format
|
117
|
+
|
118
|
+
List of Tables
|
119
|
+
|
120
|
+
2.1. Naming format for accessing a handle's VPI properties
|
121
|
+
2.2. Possible accessors and their implications
|
122
|
+
|
123
|
+
List of Examples
|
124
|
+
|
125
|
+
2.1. Accessing a handle's VPI properties
|
126
|
+
4.1. Part of a bench which instantiates a Verilog design
|
127
|
+
4.2. Bad design with unconnected registers
|
128
|
+
4.3. Fixed design with wired registers
|
129
|
+
|
130
|
+
Chapter 1. Introduction
|
131
|
+
|
132
|
+
Table of Contents
|
133
|
+
|
134
|
+
License
|
135
|
+
Manifest
|
136
|
+
Resources
|
137
|
+
Related works
|
138
|
+
|
139
|
+
Ye olde PLI
|
140
|
+
|
141
|
+
Ruby-VPI is a Ruby interface to VPI. It lets you create complex Verilog test
|
142
|
+
benches easily and wholly in Ruby.
|
143
|
+
|
144
|
+
License
|
145
|
+
|
146
|
+
Ruby-VPI is free software; you can redistribute it and/or modify it under the
|
147
|
+
terms of the GNU General Public License as published by the Free Software
|
148
|
+
Foundation; either version 2 of the License, or (at your option) any later
|
149
|
+
version.
|
150
|
+
|
151
|
+
Manifest
|
152
|
+
|
153
|
+
When you extract a Ruby-VPI release package, the following is what you would
|
154
|
+
expect to find.
|
155
|
+
|
156
|
+
doc
|
157
|
+
|
158
|
+
This directory contains user documentation in various formats.
|
159
|
+
|
160
|
+
ref
|
161
|
+
|
162
|
+
This directory contains reference API documentation in HTML format.
|
163
|
+
|
164
|
+
ext
|
165
|
+
|
166
|
+
This directory contains source code, written in the C language, for the
|
167
|
+
core of Ruby-VPI.
|
168
|
+
|
169
|
+
lib
|
170
|
+
|
171
|
+
This directory contains libraries, written in the Ruby language, for use by
|
172
|
+
specifications.
|
173
|
+
|
174
|
+
tpl
|
175
|
+
|
176
|
+
This directory contains templates used by tests.
|
177
|
+
|
178
|
+
bin
|
179
|
+
|
180
|
+
This directory contains various tools. See the section called “Tools” for
|
181
|
+
more information.
|
182
|
+
|
183
|
+
samp
|
184
|
+
|
185
|
+
This directory contains example tests. See the section called “Examples”
|
186
|
+
for more information.
|
187
|
+
|
188
|
+
Resources
|
189
|
+
|
190
|
+
Project
|
191
|
+
|
192
|
+
Access project facilities, hosted generously by RubyForge.
|
193
|
+
|
194
|
+
Tracker
|
195
|
+
|
196
|
+
Report problems, contribute patches, and more.
|
197
|
+
|
198
|
+
Releases
|
199
|
+
|
200
|
+
Download the newest release of Ruby-VPI.
|
201
|
+
|
202
|
+
Sources
|
203
|
+
|
204
|
+
Browse or access the source code repository.
|
205
|
+
|
206
|
+
Forums
|
207
|
+
|
208
|
+
Ask for help, give feedback, or discuss.
|
209
|
+
|
210
|
+
Related works
|
211
|
+
|
212
|
+
You may wish to consider the following projects, which are similar to Ruby-VPI.
|
213
|
+
|
214
|
+
RHDL
|
215
|
+
|
216
|
+
Hardware description and verification language based on Ruby.
|
217
|
+
|
218
|
+
MyHDL
|
219
|
+
|
220
|
+
Hardware description and verification language based on Python, which
|
221
|
+
features conversion to Verilog and co-simulation.
|
222
|
+
|
223
|
+
JOVE
|
224
|
+
|
225
|
+
Java interface to VPI.
|
226
|
+
|
227
|
+
ScriptEDA
|
228
|
+
|
229
|
+
Perl, Python, and Tcl interface to VPI.
|
230
|
+
|
231
|
+
Ye olde PLI
|
232
|
+
|
233
|
+
The following projects utilize the archaic tf and acc PLI interfaces, which
|
234
|
+
have been officially deprecated in IEEE Std 1364-2005.
|
235
|
+
|
236
|
+
ScriptSim
|
237
|
+
|
238
|
+
Perl, Python, and Tcl/Tk interface to PLI.
|
239
|
+
|
240
|
+
Verilog::Pli
|
241
|
+
|
242
|
+
Perl interface to PLI.
|
243
|
+
|
244
|
+
JPLI
|
245
|
+
|
246
|
+
Java interface to PLI.
|
247
|
+
|
248
|
+
Chapter 2. Background
|
249
|
+
|
250
|
+
Table of Contents
|
251
|
+
|
252
|
+
Methodology
|
253
|
+
Terminology
|
254
|
+
Organization
|
255
|
+
|
256
|
+
Interface to VPI
|
257
|
+
|
258
|
+
Running a test
|
259
|
+
|
260
|
+
Initialization
|
261
|
+
Execution
|
262
|
+
|
263
|
+
Ruby-VPI is a bench which lets you test Verilog modules using the Ruby
|
264
|
+
language.
|
265
|
+
|
266
|
+
Methodology
|
267
|
+
|
268
|
+
Ruby-VPI presents an open-ended interface to VPI. Thus, you can use any
|
269
|
+
methodology you wish when writing tests. However, BDD is emphasized in this
|
270
|
+
project because it greatly simplifies thinking about how to verify a design.
|
271
|
+
|
272
|
+
Terminology
|
273
|
+
|
274
|
+
[Tip] Tip
|
275
|
+
Have a look at the Glossary for definitions of terms used in this manual.
|
276
|
+
|
277
|
+
As a newcomer into the world of Verilog, I often heard the term test bench: “I
|
278
|
+
ran the test bench, but it didn't work!” or “Are you crazy?!! You still haven't
|
279
|
+
written the test bench? o_O”, for example. I flipped through my textbook and
|
280
|
+
surfed the Internet for a definition of the term, but it was to no avail.
|
281
|
+
Instead, both resources nonchalantly employed the term throughout their being,
|
282
|
+
as if mocking my ignorance of what seems to be universal knowledge.
|
283
|
+
|
284
|
+
Defeated, I turned to my inner faculties to determine the answer. “Let's see,
|
285
|
+
the term test bench has the word test—so it has something to do with
|
286
|
+
testing—and it has the word bench—so maybe it's referring to a table where the
|
287
|
+
testing should occur”. This reasoning grew increasingly familiar as my mind
|
288
|
+
rummaged through towering stores of obsolescence and ultimately revealed
|
289
|
+
dreaded memories of sleepless anguish: debugging electronics in the robotics
|
290
|
+
laboratory.
|
291
|
+
|
292
|
+
“Aha!”, I exclaimed hesitantly, trying to dismiss the past. The term has its
|
293
|
+
roots in the testing of electronic devices, where an engineer would sit at a
|
294
|
+
bench in an electronics laboratory and verify that an electronic component
|
295
|
+
satisfies some criteria. The bench would be furnished with tools of measurement
|
296
|
+
and manipulation—such as oscilloscopes, voltmeters, soldering irons, and so
|
297
|
+
on—which help the engineer to verify the electronic component or locate the
|
298
|
+
sources of defects in the component.
|
299
|
+
|
300
|
+
Alright, now I remember what a laboratory bench is, but how does that compare
|
301
|
+
with the term test bench? Surely they cannot have the same meaning, because it
|
302
|
+
doesn't make sense to run a laboratory bench or to write one. Thus, to avoid
|
303
|
+
propagating such confusion into this manual, I have attempted to clarify the
|
304
|
+
terminology by simplifying and reintroducing it in a new light.
|
305
|
+
|
306
|
+
Organization
|
307
|
+
|
308
|
+
Figure 2.1. Overall organization of a test
|
309
|
+
|
310
|
+
Overall organization of a test
|
311
|
+
|
312
|
+
As Figure 2.1, “Overall organization of a test” shows, a test is composed of a
|
313
|
+
bench, a design, and a specification. To extend the analogy of an electronics
|
314
|
+
laboratory, the first acts as the laboratory bench which provides measurement
|
315
|
+
and manipulation tools. The second acts as the electronic component being
|
316
|
+
verified by the engineer. And the third acts as the engineer who measures,
|
317
|
+
manipulates, and verifies the electronic component.
|
318
|
+
|
319
|
+
Interface to VPI
|
320
|
+
|
321
|
+
Figure 2.2. Detailed organization of a test
|
322
|
+
|
323
|
+
Detailed organization of a test
|
324
|
+
|
325
|
+
In Figure 2.2, “Detailed organization of a test”, Ruby-VPI acts as the bench, a
|
326
|
+
Verilog simulator encapsulates the design, and a Ruby interpreter encapsulates
|
327
|
+
the specification. Notice that Ruby-VPI encapsulates all communication between
|
328
|
+
the Ruby interpreter and VPI. This allows the specification, or any Ruby
|
329
|
+
program in general, to access VPI using nothing more than the Ruby language!
|
330
|
+
Thus, Ruby-VPI removes the burden of having to write C programs in order to
|
331
|
+
access VPI.
|
332
|
+
|
333
|
+
Furthermore, Ruby-VPI presents the entire IEEE Std 1364-2005 VPI interface to
|
334
|
+
the Ruby interpreter, but with the following minor changes.
|
335
|
+
|
336
|
+
● The first letter in the name of every function, type, structure, and
|
337
|
+
constant becomes capitalized.
|
338
|
+
|
339
|
+
For example, the s_vpi_value structure in C becomes the S_vpi_value class
|
340
|
+
in Ruby. Likewise, the vpiIntVal constant in C becomes the VpiIntVal
|
341
|
+
constant in Ruby.
|
342
|
+
|
343
|
+
● The VPI functions vpi_vprintf and vpi_mcd_vprintf are not made accessible
|
344
|
+
to Ruby. However, this isn't a big problem because you can use Ruby's
|
345
|
+
printf method instead.
|
346
|
+
|
347
|
+
The reason for this limitation is that some C compilers have trouble with
|
348
|
+
pointers to the va_list type. For these compilers, the second line in the
|
349
|
+
code shown below causes a “type mismatch” error.
|
350
|
+
|
351
|
+
void foo(va_list ap) {
|
352
|
+
va_list *p = ≈
|
353
|
+
}
|
354
|
+
|
355
|
+
|
356
|
+
VPI utility layer
|
357
|
+
|
358
|
+
From a user's perspective, the VPI utility layer greatly enhances the ability
|
359
|
+
to interact with handles. One simply invokes a handle's methods, which are
|
360
|
+
carefully named in the following manner, to access its VPI properties.
|
361
|
+
|
362
|
+
Table 2.1. Naming format for accessing a handle's VPI properties
|
363
|
+
|
364
|
+
┌─────────┬─┬────────┬─┬────────┬────────┐
|
365
|
+
│Operation│_│Property│_│Accessor│Addendum│
|
366
|
+
├─────────┴─┼────────┼─┴────────┼────────┤
|
367
|
+
│optional │required│optional │optional│
|
368
|
+
└───────────┴────────┴──────────┴────────┘
|
369
|
+
|
370
|
+
Operation
|
371
|
+
|
372
|
+
This parameter suggests a method that should be invoked in the context of
|
373
|
+
the Property parameter.
|
374
|
+
|
375
|
+
Property
|
376
|
+
|
377
|
+
This parameter suggests which VPI property should be accessed. The first
|
378
|
+
letter of this parameter's value should be lower case, and the vpi
|
379
|
+
prefix—common to all VPI properties—can be omitted.
|
380
|
+
|
381
|
+
For example, the VPI property vpiFullName is considered equivalent to
|
382
|
+
fullName but not equivalent to either FullName or full_name.
|
383
|
+
|
384
|
+
Accessor
|
385
|
+
|
386
|
+
This parameter suggests which VPI function should be used to access the VPI
|
387
|
+
property. When this parameter is not specified, the VPI utility layer will
|
388
|
+
attempt to guess the value of this parameter (see the source code of the
|
389
|
+
SWIG::TYPE_p_unsigned_int#method_missing method for details).
|
390
|
+
|
391
|
+
Table 2.2. Possible accessors and their implications
|
392
|
+
|
393
|
+
┌────────┬──────────────────────┬──────────────────────────────────────┐
|
394
|
+
│Accessor│Kind of value accessed│VPI functions used to access the value│
|
395
|
+
├────────┼──────────────────────┼──────────────────────────────────────┤
|
396
|
+
│d │delay │vpi_get_delays, vpi_put_delays │
|
397
|
+
├────────┼──────────────────────┼──────────────────────────────────────┤
|
398
|
+
│l │logic │vpi_get_value, vpi_put_value │
|
399
|
+
├────────┼──────────────────────┼──────────────────────────────────────┤
|
400
|
+
│i │integer │vpi_get │
|
401
|
+
├────────┼──────────────────────┼──────────────────────────────────────┤
|
402
|
+
│b │boolean │vpi_get │
|
403
|
+
├────────┼──────────────────────┼──────────────────────────────────────┤
|
404
|
+
│s │string │vpi_get_str │
|
405
|
+
├────────┼──────────────────────┼──────────────────────────────────────┤
|
406
|
+
│h │handle │vpi_handle │
|
407
|
+
└────────┴──────────────────────┴──────────────────────────────────────┘
|
408
|
+
Addendum
|
409
|
+
|
410
|
+
When this parameter is a question mark (?), it suggests that the specified
|
411
|
+
VPI property should be queried as a boolean value. This produces the same
|
412
|
+
effect as specifying b for the Accessor parameter.
|
413
|
+
|
414
|
+
When this parameter is an equal sign (=), it suggests that the specified
|
415
|
+
VPI property should be written to.
|
416
|
+
|
417
|
+
Example 2.1. Accessing a handle's VPI properties
|
418
|
+
|
419
|
+
┌─────────────────────┬────────────────────────────────────────────┬────────────┐
|
420
|
+
│ │ Naming format │ │
|
421
|
+
│ Ruby expression ├─────────┬─┬────────────┬─┬────────┬────────┤Description │
|
422
|
+
│ │Operation│_│ Property │_│Accessor│Addendum│ │
|
423
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
424
|
+
│ │ │ │ │ │ │ │These │
|
425
|
+
│handle.each_vpiNet {|│ │ │ │ │ │ │expressions │
|
426
|
+
│net| puts │each │_│vpiNet │ │ │ │print the │
|
427
|
+
│net.fullName} │ │ │ │ │ │ │full name of│
|
428
|
+
│ │ │ │ │ │ │ │each vpiNet │
|
429
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤object │
|
430
|
+
│ │ │ │ │ │ │ │associated │
|
431
|
+
│handle.each_net {|net│each │_│net │ │ │ │with the │
|
432
|
+
│| puts net.fullName} │ │ │ │ │ │ │handle. │
|
433
|
+
│ │ │ │ │ │ │ │ │
|
434
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
435
|
+
│handle.vpiIntVal │ │ │vpiIntVal │ │ │ │ │
|
436
|
+
│ │ │ │ │ │ │ │These │
|
437
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤expressions │
|
438
|
+
│handle.vpiIntVal_l │ │ │vpiIntVal │_│l │ │access the │
|
439
|
+
│ │ │ │ │ │ │ │logic value │
|
440
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤of the │
|
441
|
+
│handle.intVal │ │ │intVal │ │ │ │handle's │
|
442
|
+
│ │ │ │ │ │ │ │vpiIntVal │
|
443
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤property. │
|
444
|
+
│handle.intVal_l │ │ │intVal │_│l │ │ │
|
445
|
+
│ │ │ │ │ │ │ │ │
|
446
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
447
|
+
│handle.vpiIntVal = 15│ │ │vpiIntVal │ │ │= │ │
|
448
|
+
│ │ │ │ │ │ │ │These │
|
449
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤expressions │
|
450
|
+
│handle.vpiIntVal_l = │ │ │ │ │ │ │assign the │
|
451
|
+
│15 │ │ │vpiIntVal │_│l │= │number 15 to│
|
452
|
+
│ │ │ │ │ │ │ │the logic │
|
453
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤value of the│
|
454
|
+
│handle.intVal = 15 │ │ │intVal │ │ │= │handle's │
|
455
|
+
│ │ │ │ │ │ │ │vpiIntVal │
|
456
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤property. │
|
457
|
+
│handle.intVal_l = 15 │ │ │intVal │_│l │= │ │
|
458
|
+
│ │ │ │ │ │ │ │ │
|
459
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
460
|
+
│handle.vpiType │ │ │vpiType │ │ │ │ │
|
461
|
+
│ │ │ │ │ │ │ │These │
|
462
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤expressions │
|
463
|
+
│handle.vpiType_i │ │ │vpiType │_│i │ │access the │
|
464
|
+
│ │ │ │ │ │ │ │integer │
|
465
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤value of the│
|
466
|
+
│handle.type │ │ │type │ │ │ │handle's │
|
467
|
+
│ │ │ │ │ │ │ │vpiType │
|
468
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤property. │
|
469
|
+
│handle.type_i │ │ │type │_│i │ │ │
|
470
|
+
│ │ │ │ │ │ │ │ │
|
471
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
472
|
+
│handle.vpiProtected │ │ │vpiProtected│ │ │ │ │
|
473
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤These │
|
474
|
+
│handle.vpiProtected_b│ │ │vpiProtected│_│b │ │expressions │
|
475
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤access the │
|
476
|
+
│handle.vpiProtected? │ │ │vpiProtected│ │ │? │boolean │
|
477
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤value of the│
|
478
|
+
│handle.protected │ │ │protected │ │ │ │handle's │
|
479
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤vpiProtected│
|
480
|
+
│handle.protected_b │ │ │protected │_│b │ │property. │
|
481
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤ │
|
482
|
+
│handle.protected? │ │ │protected │ │ │? │ │
|
483
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
484
|
+
│handle.vpiFullName │ │ │vpiFullName │ │ │ │ │
|
485
|
+
│ │ │ │ │ │ │ │These │
|
486
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤expressions │
|
487
|
+
│handle.vpiFullName_s │ │ │vpiFullName │_│s │ │access the │
|
488
|
+
│ │ │ │ │ │ │ │string value│
|
489
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤of the │
|
490
|
+
│handle.fullName │ │ │fullName │ │ │ │handle's │
|
491
|
+
│ │ │ │ │ │ │ │vpiFullName │
|
492
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤property. │
|
493
|
+
│handle.fullName_s │ │ │fullName │_│s │ │ │
|
494
|
+
│ │ │ │ │ │ │ │ │
|
495
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┼────────────┤
|
496
|
+
│handle.vpiParent │ │ │vpiParent │ │ │ │ │
|
497
|
+
│ │ │ │ │ │ │ │These │
|
498
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤expressions │
|
499
|
+
│handle.vpiParent_h │ │ │vpiParent │_│h │ │access the │
|
500
|
+
│ │ │ │ │ │ │ │handle value│
|
501
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤of the │
|
502
|
+
│handle.parent │ │ │parent │ │ │ │handle's │
|
503
|
+
│ │ │ │ │ │ │ │vpiParent │
|
504
|
+
├─────────────────────┼─────────┼─┼────────────┼─┼────────┼────────┤property. │
|
505
|
+
│handle.parent_h │ │ │parent │_│h │ │ │
|
506
|
+
│ │ │ │ │ │ │ │ │
|
507
|
+
└─────────────────────┴─────────┴─┴────────────┴─┴────────┴────────┴────────────┘
|
508
|
+
|
509
|
+
Running a test
|
510
|
+
|
511
|
+
Unlike an engineer who can verify an electronic component in real-time, the
|
512
|
+
Verilog simulator and the Ruby interpreter (see Figure 2.2, “Detailed
|
513
|
+
organization of a test”) take turns working with objects in a simulation when a
|
514
|
+
test is run. In particular, they take turns manipulating the design and
|
515
|
+
transfer control to each other when appropriate.
|
516
|
+
|
517
|
+
The situation is similar to a pair of friends playing catch. One friend throws
|
518
|
+
a ball to the other, and the other throws it back. Either is able to inspect
|
519
|
+
and modify the ball, but only when it is in hand.
|
520
|
+
|
521
|
+
Initialization
|
522
|
+
|
523
|
+
A test is first initialized before it is executed. Figure 2.3, “Initialization
|
524
|
+
of a test” illustrates the initialization process described below.
|
525
|
+
|
526
|
+
Figure 2.3. Initialization of a test
|
527
|
+
|
528
|
+
Initialization of a test
|
529
|
+
|
530
|
+
Procedure 2.1. Initialization of a test
|
531
|
+
|
532
|
+
1. The Verilog simulator initializes the Ruby interpreter by invoking the
|
533
|
+
$ruby_init; system task/function, whose parameters represent the
|
534
|
+
command-line invocation of the Ruby interpreter. For example, one would
|
535
|
+
specify $ruby_init("ruby", "-w"); in Verilog to achieve the same effect as
|
536
|
+
specifying ruby -w at a command-prompt.
|
537
|
+
|
538
|
+
2. The Verilog simulator is paused and the Ruby interpreter is initialized
|
539
|
+
with the arguments of the $ruby_init; system task/function.
|
540
|
+
|
541
|
+
3. When the Ruby interpreter invokes the Vpi::relay_verilog method, it is
|
542
|
+
paused and the Verilog simulator is given control.
|
543
|
+
|
544
|
+
Execution
|
545
|
+
|
546
|
+
After a test is initialized, it is executed such that the design is verified
|
547
|
+
against the specification. Figure 2.4, “Execution of a test” illustrates the
|
548
|
+
execution process described below.
|
549
|
+
|
550
|
+
Figure 2.4. Execution of a test
|
551
|
+
|
552
|
+
Execution of a test
|
553
|
+
|
554
|
+
Procedure 2.2. Execution of a test
|
555
|
+
|
556
|
+
1. The Verilog simulator transfers control to the Ruby interpreter by invoking
|
557
|
+
the $ruby_relay; system task/function.
|
558
|
+
|
559
|
+
2. The Verilog simulator is paused and the Ruby interpreter is given control.
|
560
|
+
|
561
|
+
3. When the Ruby interpreter invokes the Vpi::relay_verilog method, it is
|
562
|
+
paused and the Verilog simulator is given control.
|
563
|
+
|
564
|
+
Chapter 3. Usage
|
565
|
+
|
566
|
+
Table of Contents
|
567
|
+
|
568
|
+
Requirements
|
569
|
+
Installation and maintenance
|
570
|
+
Tools
|
571
|
+
|
572
|
+
Automated test generation
|
573
|
+
Verilog to Ruby conversion
|
574
|
+
|
575
|
+
Examples
|
576
|
+
Tutorial
|
577
|
+
|
578
|
+
Start with a design
|
579
|
+
Generate a test
|
580
|
+
Specify your expectations
|
581
|
+
Implement the prototype
|
582
|
+
Verify the prototype
|
583
|
+
Implement the design
|
584
|
+
Verify the design
|
585
|
+
|
586
|
+
Requirements
|
587
|
+
|
588
|
+
The following software is necessary in order to use Ruby-VPI.
|
589
|
+
|
590
|
+
Verilog simulator
|
591
|
+
|
592
|
+
Ruby-VPI is known to work with the following simulators. Nevertheless, you
|
593
|
+
should be able to use it with any Verilog simulator that supports VPI.
|
594
|
+
|
595
|
+
Icarus Verilog
|
596
|
+
|
597
|
+
Version 0.8 or newer is acceptable.
|
598
|
+
|
599
|
+
GPL Cver
|
600
|
+
|
601
|
+
Version 2.11a or newer is acceptable.
|
602
|
+
|
603
|
+
Synopsys VCS
|
604
|
+
|
605
|
+
Version X-2005.06 or newer is acceptable.
|
606
|
+
|
607
|
+
Mentor Modelsim
|
608
|
+
|
609
|
+
Version 6.1b or newer is acceptable.
|
610
|
+
|
611
|
+
make
|
612
|
+
|
613
|
+
GNU make is preferred but any distribution of make should be acceptable.
|
614
|
+
|
615
|
+
C compiler
|
616
|
+
|
617
|
+
GNU Compiler Collection (GCC) is preferred but any C compiler should be
|
618
|
+
acceptable.
|
619
|
+
|
620
|
+
POSIX threads (pthreads)
|
621
|
+
|
622
|
+
Header and linkable object files, and operating system support for this
|
623
|
+
library are necessary.
|
624
|
+
|
625
|
+
Ruby
|
626
|
+
|
627
|
+
Version 1.8 or newer, including header and linkable object files for
|
628
|
+
building extensions, is necessary. You can install Ruby by following these
|
629
|
+
instructions.
|
630
|
+
|
631
|
+
RubyGems
|
632
|
+
|
633
|
+
Any recent version should be acceptable. You can install RubyGems by
|
634
|
+
following these instructions.
|
635
|
+
|
636
|
+
Installation and maintenance
|
637
|
+
|
638
|
+
Once you have satisfied the necessary requirements, you can install Ruby-VPI by
|
639
|
+
running the command gem install ruby-vpi. Likewise, you can uninstall Ruby-VPI
|
640
|
+
by running the command gem uninstall ruby-vpi. Furthermore, you can upgrade to
|
641
|
+
the latest release of Ruby-VPI by running the command gem update ruby-vpi.
|
642
|
+
|
643
|
+
You can learn more about using and manipulating RubyGems in the RubyGems user
|
644
|
+
manual.
|
645
|
+
|
646
|
+
Tools
|
647
|
+
|
648
|
+
The bin directory contains various utilities which ease the process of writing
|
649
|
+
tests. Each tool provides help and usage information invoked with the --help
|
650
|
+
option.
|
651
|
+
|
652
|
+
Automated test generation
|
653
|
+
|
654
|
+
The generate_test.rb tool can be used to automatically generate tests from
|
655
|
+
Verilog 2001 module declarations (see the section called “Generate a test”).
|
656
|
+
You can try it by running the command generate_test.rb --help.
|
657
|
+
|
658
|
+
Verilog to Ruby conversion
|
659
|
+
|
660
|
+
The header_to_ruby.rb tool can be used to convert Verilog header files into
|
661
|
+
Ruby. You can try it by running the command header_to_ruby.rb --help.
|
662
|
+
|
663
|
+
Examples
|
664
|
+
|
665
|
+
The samp directory contains several example tests which illustrate how Ruby-VPI
|
666
|
+
can be used. Each example has an associated Rakefile which simplifies the
|
667
|
+
process of running it. Therefore, simply navigate into an example directory and
|
668
|
+
run the command rake to get started.
|
669
|
+
|
670
|
+
Also, some example specifications make use of BDD through the RSpec library.
|
671
|
+
See the the section called “Methodology” for a discussion of RSpec.
|
672
|
+
|
673
|
+
Tutorial
|
674
|
+
|
675
|
+
Procedure 3.1. Typical way of using Ruby-VPI
|
676
|
+
|
677
|
+
1. Declare the design, which is a Verilog module, using Verilog 2001 syntax.
|
678
|
+
|
679
|
+
2. Generate a test for the design using the automated test generator tool.
|
680
|
+
|
681
|
+
3. Identify your expectations for the design and implement them in the
|
682
|
+
specification.
|
683
|
+
|
684
|
+
4. Implement the prototype of the design in Ruby.
|
685
|
+
|
686
|
+
5. Verify the prototype against the specification.
|
687
|
+
|
688
|
+
6. Implement the design in Verilog once the prototype has been verified.
|
689
|
+
|
690
|
+
7. Verify the design against the specification.
|
691
|
+
|
692
|
+
Start with a design
|
693
|
+
|
694
|
+
First, we need a design to verify. In this tutorial, Figure 3.1, “Declaration
|
695
|
+
of a simple up-counter with synchronous reset” will serve as our design. Its
|
696
|
+
interface is composed of the following parts:
|
697
|
+
|
698
|
+
Size
|
699
|
+
|
700
|
+
This parameter defines the number of bits used to represent the counter's
|
701
|
+
value.
|
702
|
+
|
703
|
+
clock
|
704
|
+
|
705
|
+
Each positive edge of this signal causes the count register to increment.
|
706
|
+
|
707
|
+
reset
|
708
|
+
|
709
|
+
Assertion of this signal causes the count register to become zero.
|
710
|
+
|
711
|
+
count
|
712
|
+
|
713
|
+
This register contains the counter's value.
|
714
|
+
|
715
|
+
[Important] Before we continue…
|
716
|
+
Save the source code shown in Figure 3.1, “Declaration of a simple
|
717
|
+
up-counter with synchronous reset” into a file named counter.v.
|
718
|
+
|
719
|
+
Figure 3.1. Declaration of a simple up-counter with synchronous reset
|
720
|
+
|
721
|
+
module counter #(parameter Size = 5) (
|
722
|
+
input clock,
|
723
|
+
input reset,
|
724
|
+
output reg [Size - 1 : 0] count
|
725
|
+
);
|
726
|
+
endmodule
|
727
|
+
|
728
|
+
Generate a test
|
729
|
+
|
730
|
+
Now that we have a design to verify, let us generate a test for it using the
|
731
|
+
automated test generator tool. This tool allows us to implement our
|
732
|
+
specification in either RSpec, unit test, or our very own format. Each format
|
733
|
+
represents a different software development methodology: RSpec represents BDD,
|
734
|
+
unit testing represents TDD, and our own format can represent another
|
735
|
+
methodology.
|
736
|
+
|
737
|
+
[Note] Note
|
738
|
+
In this tutorial, we will see how to implement our specification in both
|
739
|
+
RSpec and unit test formats.
|
740
|
+
|
741
|
+
Once we have decided how we want to implement our specification, we can proceed
|
742
|
+
to generate a test for our design. Figure 3.2, “Generating a test with
|
743
|
+
specification in RSpec format” and Figure 3.3, “Generating a test with
|
744
|
+
specification in unit test format” illustrate this process. Here, the test
|
745
|
+
generation tool produces a test composed of the following parts:
|
746
|
+
|
747
|
+
Runner
|
748
|
+
|
749
|
+
Written in Rake, this file builds and runs the test bench.
|
750
|
+
|
751
|
+
Bench
|
752
|
+
|
753
|
+
Written in Verilog and Ruby, these files define the testing environment.
|
754
|
+
|
755
|
+
Design
|
756
|
+
|
757
|
+
Written in Ruby, this file provides an interface to the design under test.
|
758
|
+
|
759
|
+
Prototype
|
760
|
+
|
761
|
+
Written in Ruby, this file defines a prototype of the design under test.
|
762
|
+
|
763
|
+
Specification
|
764
|
+
|
765
|
+
Written in Ruby, this file verifies the design.
|
766
|
+
|
767
|
+
The reason for dividing a single test into these parts is mainly to decouple
|
768
|
+
the design from the specification. This allows you to focus on writing the
|
769
|
+
specification while the remainder is automatically generated by the tool. For
|
770
|
+
example, when the interface of a Verilog module changes, you would simply
|
771
|
+
re-run this tool to incorporate those changes into the test without diverting
|
772
|
+
your focus from the specification.
|
773
|
+
|
774
|
+
Figure 3.2. Generating a test with specification in RSpec format
|
775
|
+
|
776
|
+
$ generate_test.rb counter.v --rspec --name rspecTest
|
777
|
+
Using name `rspecTest' for generated test.
|
778
|
+
Using RSpec specification format.
|
779
|
+
|
780
|
+
Parsed module: counter
|
781
|
+
- Generated runner: counter_rspecTest_runner.rake
|
782
|
+
- Generated bench: counter_rspecTest_bench.v
|
783
|
+
- Generated bench: counter_rspecTest_bench.rb
|
784
|
+
- Generated design: counter_rspecTest_design.rb
|
785
|
+
- Generated prototype: counter_rspecTest_proto.rb
|
786
|
+
- Generated specification: counter_rspecTest_spec.rb
|
787
|
+
|
788
|
+
Figure 3.3. Generating a test with specification in unit test format
|
789
|
+
|
790
|
+
$ generate_test.rb counter.v --unit --name unitTest
|
791
|
+
Using name `unitTest' for generated test.
|
792
|
+
Using UnitTest specification format.
|
793
|
+
|
794
|
+
Parsed module: counter
|
795
|
+
- Generated runner: counter_unitTest_runner.rake
|
796
|
+
- Generated bench: counter_unitTest_bench.v
|
797
|
+
- Generated bench: counter_unitTest_bench.rb
|
798
|
+
- Generated design: counter_unitTest_design.rb
|
799
|
+
- Generated prototype: counter_unitTest_proto.rb
|
800
|
+
- Generated specification: counter_unitTest_spec.rb
|
801
|
+
|
802
|
+
Specify your expectations
|
803
|
+
|
804
|
+
So far, the test generation tool has created a basic foundation for our test.
|
805
|
+
Now we must build upon this foundation by identifying our expectations of the
|
806
|
+
design. That is, how do we expect the design to behave under certain
|
807
|
+
conditions?
|
808
|
+
|
809
|
+
The following is a reasonable set of expectations for our simple counter:
|
810
|
+
|
811
|
+
● A resetted counter's value should be zero.
|
812
|
+
|
813
|
+
● A resetted counter's value should increment by one count upon each rising
|
814
|
+
clock edge.
|
815
|
+
|
816
|
+
● A counter with the maximum value should overflow upon increment.
|
817
|
+
|
818
|
+
Now that we have identified a set of expectations for our design, we are ready
|
819
|
+
to implement them in our specification. Figure 3.4, “Specification implemented
|
820
|
+
in RSpec format” and Figure 3.5, “Specification implemented in unit test
|
821
|
+
format” illustrate this process. Note the striking similarities between our
|
822
|
+
expectations and their implementation.
|
823
|
+
|
824
|
+
[Important] Before we continue…
|
825
|
+
● Append the following code to the files named
|
826
|
+
counter_rspecTest_design.rb and counter_unitTest_design.rb.
|
827
|
+
|
828
|
+
class Counter
|
829
|
+
def reset!
|
830
|
+
@reset.intVal = 1
|
831
|
+
relay_verilog # advance the clock
|
832
|
+
@reset.intVal = 0
|
833
|
+
end
|
834
|
+
end
|
835
|
+
|
836
|
+
● Replace the contents of the file named
|
837
|
+
counter_rspecTest_spec.rb with the source code shown in
|
838
|
+
Figure 3.4, “Specification implemented in RSpec format”.
|
839
|
+
|
840
|
+
● Replace the contents of the file named counter_unitTest_spec.rb
|
841
|
+
with the source code shown in Figure 3.5, “Specification
|
842
|
+
implemented in unit test format”.
|
843
|
+
|
844
|
+
Figure 3.4. Specification implemented in RSpec format
|
845
|
+
|
846
|
+
LIMIT = 2 ** Counter::Size # lowest upper bound of counter's value
|
847
|
+
MAX = LIMIT - 1 # maximum allowed value for a counter
|
848
|
+
|
849
|
+
include Vpi
|
850
|
+
|
851
|
+
context "A resetted counter's value" do
|
852
|
+
setup do
|
853
|
+
@design = Counter.new
|
854
|
+
@design.reset!
|
855
|
+
end
|
856
|
+
|
857
|
+
specify "should be zero" do
|
858
|
+
@design.count.intVal.should_equal 0
|
859
|
+
end
|
860
|
+
|
861
|
+
specify "should increment by one count upon each rising clock edge" do
|
862
|
+
LIMIT.times do |i|
|
863
|
+
@design.count.intVal.should_equal i
|
864
|
+
relay_verilog # advance the clock
|
865
|
+
end
|
866
|
+
end
|
867
|
+
end
|
868
|
+
|
869
|
+
context "A counter with the maximum value" do
|
870
|
+
setup do
|
871
|
+
@design = Counter.new
|
872
|
+
@design.reset!
|
873
|
+
|
874
|
+
# increment the counter to maximum value
|
875
|
+
MAX.times do relay_verilog end
|
876
|
+
@design.count.intVal.should_equal MAX
|
877
|
+
end
|
878
|
+
|
879
|
+
specify "should overflow upon increment" do
|
880
|
+
relay_verilog # increment the counter
|
881
|
+
@design.count.intVal.should_equal 0
|
882
|
+
end
|
883
|
+
end
|
884
|
+
|
885
|
+
Figure 3.5. Specification implemented in unit test format
|
886
|
+
|
887
|
+
LIMIT = 2 ** Counter::Size # lowest upper bound of counter's value
|
888
|
+
MAX = LIMIT - 1 # maximum allowed value for a counter
|
889
|
+
|
890
|
+
class ResettedCounterValue < Test::Unit::TestCase
|
891
|
+
include Vpi
|
892
|
+
|
893
|
+
def setup
|
894
|
+
@design = Counter.new
|
895
|
+
@design.reset!
|
896
|
+
end
|
897
|
+
|
898
|
+
def test_zero
|
899
|
+
assert_equal 0, @design.count.intVal
|
900
|
+
end
|
901
|
+
|
902
|
+
def test_increment
|
903
|
+
LIMIT.times do |i|
|
904
|
+
assert_equal i, @design.count.intVal
|
905
|
+
relay_verilog # advance the clock
|
906
|
+
end
|
907
|
+
end
|
908
|
+
end
|
909
|
+
|
910
|
+
class MaximumCounterValue < Test::Unit::TestCase
|
911
|
+
include Vpi
|
912
|
+
|
913
|
+
def setup
|
914
|
+
@design = Counter.new
|
915
|
+
@design.reset!
|
916
|
+
|
917
|
+
# increment the counter to maximum value
|
918
|
+
MAX.times do relay_verilog end
|
919
|
+
assert_equal MAX, @design.count.intVal
|
920
|
+
end
|
921
|
+
|
922
|
+
def test_overflow
|
923
|
+
relay_verilog # increment the counter
|
924
|
+
assert_equal 0, @design.count.intVal
|
925
|
+
end
|
926
|
+
end
|
927
|
+
|
928
|
+
Implement the prototype
|
929
|
+
|
930
|
+
Now that we have a specification against which to verify our design, let us
|
931
|
+
build a prototype of our design. By doing so, we exercise our specification,
|
932
|
+
experience potential problems that may arise when we later implement our design
|
933
|
+
in Verilog, and gain confidence in our work. Figure 3.6, “Ruby prototype of our
|
934
|
+
Verilog design” shows the completed prototype for our design.
|
935
|
+
|
936
|
+
[Important] Before we continue…
|
937
|
+
Replace the contents of the files named counter_rspecTest_proto.rb
|
938
|
+
and counter_unitTest_proto.rb with the source code shown in
|
939
|
+
Figure 3.6, “Ruby prototype of our Verilog design”.
|
940
|
+
|
941
|
+
Figure 3.6. Ruby prototype of our Verilog design
|
942
|
+
|
943
|
+
class CounterProto < Counter
|
944
|
+
def simulate!
|
945
|
+
if @reset.intVal == 1
|
946
|
+
@count.intVal = 0
|
947
|
+
else
|
948
|
+
@count.intVal += 1
|
949
|
+
end
|
950
|
+
end
|
951
|
+
end
|
952
|
+
|
953
|
+
Verify the prototype
|
954
|
+
|
955
|
+
Now that we have implemented our prototype, we are ready to verify it against
|
956
|
+
our specification by running the test. Figure 3.7, “Running a test with
|
957
|
+
specification in RSpec format” and Figure 3.8, “Running a test with
|
958
|
+
specification in unit test format” illustrate this process.
|
959
|
+
|
960
|
+
Here, the PROTO environment variable is set—any value is fine—before running
|
961
|
+
the test in order to replace the design with the prototype in the simulation.
|
962
|
+
Otherwise, our design will be verified—instead of our prototype—against our
|
963
|
+
specification. Furthermore, the manner in which the PROTO environment variable
|
964
|
+
is set in these figures follows the syntax of the GNU BASH shell. If you use a
|
965
|
+
different shell, you may have to use different syntax, or a different command
|
966
|
+
altogether, in order to set this variable. Finally, the Icarus Verilog
|
967
|
+
simulator, denoted by ivl, is used to simulate our design.
|
968
|
+
|
969
|
+
Figure 3.7. Running a test with specification in RSpec format
|
970
|
+
|
971
|
+
$ export PROTO=1
|
972
|
+
$ rake -f counter_rspecTest_runner.rake ivl
|
973
|
+
counter_rspecTest: verifying prototype instead of design
|
974
|
+
|
975
|
+
A resetted counter's value
|
976
|
+
- should be zero
|
977
|
+
- should increment by one count upon each rising clock edge
|
978
|
+
|
979
|
+
A counter with the maximum value
|
980
|
+
- should overflow upon increment
|
981
|
+
|
982
|
+
Finished in 0.018199 seconds
|
983
|
+
|
984
|
+
3 specifications, 0 failures
|
985
|
+
|
986
|
+
Figure 3.8. Running a test with specification in unit test format
|
987
|
+
|
988
|
+
$ export PROTO=1
|
989
|
+
$ rake -f counter_unitTest_runner.rake ivl
|
990
|
+
counter_unitTest: verifying prototype instead of design
|
991
|
+
|
992
|
+
Loaded suite counter_unitTest_bench
|
993
|
+
Started
|
994
|
+
...
|
995
|
+
Finished in 0.040668 seconds.
|
996
|
+
|
997
|
+
3 tests, 35 assertions, 0 failures, 0 errors
|
998
|
+
|
999
|
+
Implement the design
|
1000
|
+
|
1001
|
+
Now that we have implemented and verified our prototype, we are ready to
|
1002
|
+
implement our design. This is often quite simple because we translate existing
|
1003
|
+
code from Ruby into Verilog. Figure 3.9, “Implementation of a simple up-counter
|
1004
|
+
with synchronous reset” illustrates the result of this process.
|
1005
|
+
|
1006
|
+
[Important] Before we continue…
|
1007
|
+
Replace the contents of the file named counter.v with the source
|
1008
|
+
code shown in Figure 3.9, “Implementation of a simple up-counter
|
1009
|
+
with synchronous reset”.
|
1010
|
+
|
1011
|
+
Figure 3.9. Implementation of a simple up-counter with synchronous reset
|
1012
|
+
|
1013
|
+
module counter #(parameter Size = 5) (
|
1014
|
+
input clock,
|
1015
|
+
input reset,
|
1016
|
+
output reg [Size - 1 : 0] count
|
1017
|
+
);
|
1018
|
+
always @(posedge clock) begin
|
1019
|
+
if (reset)
|
1020
|
+
count <= 0;
|
1021
|
+
else
|
1022
|
+
count <= count + 1;
|
1023
|
+
end
|
1024
|
+
endmodule
|
1025
|
+
|
1026
|
+
Verify the design
|
1027
|
+
|
1028
|
+
Now that we have implemented our design, we are ready to verify it against our
|
1029
|
+
specification by running the test. Figure 3.10, “Running a test with
|
1030
|
+
specification in RSpec format” and Figure 3.11, “Running a test with
|
1031
|
+
specification in unit test format” illustrate this process.
|
1032
|
+
|
1033
|
+
Here, the PROTO environment variable is unset before the test is run in order
|
1034
|
+
to prevent the design from being replaced by the prototype. Otherwise, our
|
1035
|
+
prototype will be verified—instead of our design—against our specification.
|
1036
|
+
Furthermore, the manner in which the PROTO environment variable is unset in
|
1037
|
+
these figures follows the syntax of the GNU BASH shell. If you use a different
|
1038
|
+
shell, you may have to use different syntax, or a different command altogether,
|
1039
|
+
in order to set this variable. Finally, the Icarus Verilog simulator, denoted
|
1040
|
+
by ivl, is used to simulate our design.
|
1041
|
+
|
1042
|
+
Figure 3.10. Running a test with specification in RSpec format
|
1043
|
+
|
1044
|
+
$ unset PROTO
|
1045
|
+
$ rake -f counter_rspecTest_runner.rake ivl
|
1046
|
+
A resetted counter's value
|
1047
|
+
- should be zero
|
1048
|
+
- should increment by one count upon each rising clock edge
|
1049
|
+
|
1050
|
+
A counter with the maximum value
|
1051
|
+
- should overflow upon increment
|
1052
|
+
|
1053
|
+
Finished in 0.005628 seconds
|
1054
|
+
|
1055
|
+
3 specifications, 0 failures
|
1056
|
+
|
1057
|
+
Figure 3.11. Running a test with specification in unit test format
|
1058
|
+
|
1059
|
+
$ unset PROTO
|
1060
|
+
$ rake -f counter_unitTest_runner.rake ivl
|
1061
|
+
Loaded suite counter_unitTest_bench
|
1062
|
+
Started
|
1063
|
+
...
|
1064
|
+
Finished in 0.006766 seconds.
|
1065
|
+
|
1066
|
+
3 tests, 35 assertions, 0 failures, 0 errors
|
1067
|
+
|
1068
|
+
Chapter 4. Known problems
|
1069
|
+
|
1070
|
+
Table of Contents
|
1071
|
+
|
1072
|
+
Ruby
|
1073
|
+
|
1074
|
+
SystemStackError
|
1075
|
+
test/unit
|
1076
|
+
|
1077
|
+
Icarus Verilog
|
1078
|
+
|
1079
|
+
vpi_handle_by_name
|
1080
|
+
Vpi::reset
|
1081
|
+
|
1082
|
+
Mentor Modelsim
|
1083
|
+
|
1084
|
+
ruby_run()
|
1085
|
+
|
1086
|
+
This chapter presents known problems and possible solutions. In addition,
|
1087
|
+
previously solved problems have been retained for historical reference.
|
1088
|
+
|
1089
|
+
Ruby
|
1090
|
+
|
1091
|
+
SystemStackError
|
1092
|
+
|
1093
|
+
[Note] Problem solved
|
1094
|
+
This problem was fixed in release 2.0.0 (2006-04-17). If it still
|
1095
|
+
occurs, then please report it.
|
1096
|
+
|
1097
|
+
If a “stack level too deep (SystemStackError)” error occurs during the
|
1098
|
+
simulation, then increase the system-resource limit for stack-size by running
|
1099
|
+
the command ulimit -s unlimited before starting the simulation.
|
1100
|
+
|
1101
|
+
test/unit
|
1102
|
+
|
1103
|
+
[Note] Problem solved
|
1104
|
+
This problem was fixed in release 2.0.0 (2006-04-17). If it still
|
1105
|
+
occurs, then please report it.
|
1106
|
+
|
1107
|
+
If your specification employs Ruby's unit testing framework, then you will
|
1108
|
+
encounter the error: “[BUG] cross-thread violation on rb_gc()”.
|
1109
|
+
|
1110
|
+
Icarus Verilog
|
1111
|
+
|
1112
|
+
vpi_handle_by_name
|
1113
|
+
|
1114
|
+
Give full paths to Verilog objects
|
1115
|
+
|
1116
|
+
In version 0.8 of Icarus Verilog, the vpi_handle_by_name function requires an
|
1117
|
+
absolute path (including the name of the bench which instantiates the design)
|
1118
|
+
to a Verilog object.
|
1119
|
+
|
1120
|
+
For example, consider Example 4.1, “Part of a bench which instantiates a
|
1121
|
+
Verilog design”. Here, one needs to specify TestFoo.my_foo.clk instead of
|
1122
|
+
my_foo.clk in order to access the clk input of the my_foo module instance.
|
1123
|
+
|
1124
|
+
Example 4.1. Part of a bench which instantiates a Verilog design
|
1125
|
+
|
1126
|
+
module TestFoo;
|
1127
|
+
reg clk_reg;
|
1128
|
+
Foo my_foo(.clk(clk_reg));
|
1129
|
+
endmodule
|
1130
|
+
|
1131
|
+
Registers must be connected
|
1132
|
+
|
1133
|
+
In version 0.8 of Icarus Verilog, if you want to access a register in a design,
|
1134
|
+
then it must be connected to something (either assigned to a wire or passed as
|
1135
|
+
a parameter to a module instantiation). Otherwise, you will get a nil value as
|
1136
|
+
the result of vpi_handle_by_name method.
|
1137
|
+
|
1138
|
+
For example, suppose you wanted to access the clk_reg register, from the bench
|
1139
|
+
shown in Example 4.2, “Bad design with unconnected registers”. If you execute
|
1140
|
+
the statement clk_reg = vpi_handle_by_name("TestFoo.clk_reg", nil) in a
|
1141
|
+
specification, then you will discover that the vpi_handle_by_name method
|
1142
|
+
returns nil instead of a handle to the clk_reg register.
|
1143
|
+
|
1144
|
+
The solution is to change the design such that it appears like the one shown in
|
1145
|
+
Example 4.3, “Fixed design with wired registers” where the register is
|
1146
|
+
connected to a wire, or Example 4.1, “Part of a bench which instantiates a
|
1147
|
+
Verilog design” where the register is connected to a module instantiation.
|
1148
|
+
|
1149
|
+
Example 4.2. Bad design with unconnected registers
|
1150
|
+
|
1151
|
+
Here the clk_reg register is not connected to anything.
|
1152
|
+
|
1153
|
+
module TestFoo;
|
1154
|
+
reg clk_reg;
|
1155
|
+
endmodule
|
1156
|
+
|
1157
|
+
Example 4.3. Fixed design with wired registers
|
1158
|
+
|
1159
|
+
Here the clk_reg register is connected to the clk_wire wire.
|
1160
|
+
|
1161
|
+
module TestFoo;
|
1162
|
+
reg clk_reg;
|
1163
|
+
wire clk_wire;
|
1164
|
+
assign clk_wire = clk_reg;
|
1165
|
+
endmodule
|
1166
|
+
|
1167
|
+
Vpi::reset
|
1168
|
+
|
1169
|
+
[Caution] Deprecated method
|
1170
|
+
The vpi_control method was removed in release 3.0.0 (2006-04-23) of
|
1171
|
+
Ruby-VPI, and is deprecated. Please use Vpi::vpi_control(VpiReset)
|
1172
|
+
instead.
|
1173
|
+
|
1174
|
+
In version 0.8 of Icarus Verilog, the vpi_control(vpiReset) VPI function causes
|
1175
|
+
an assertion to fail inside the simulator. As a result, the simulation
|
1176
|
+
terminates and a core dump is produced.
|
1177
|
+
|
1178
|
+
Mentor Modelsim
|
1179
|
+
|
1180
|
+
ruby_run()
|
1181
|
+
|
1182
|
+
[Note] Problem solved
|
1183
|
+
This problem was fixed in release 2.0.0 (2006-04-17). If it still
|
1184
|
+
occurs, then please report it.
|
1185
|
+
|
1186
|
+
Version 6.1b of Mentor Modelsim doesn't play nicely with either an embedded
|
1187
|
+
Ruby interpreter or POSIX threads in a PLI application. When Ruby-VPI invokes
|
1188
|
+
the ruby_run function (which starts the Ruby interpreter), the simulator
|
1189
|
+
terminates immediately with an exit status of 0.
|
1190
|
+
|
1191
|
+
Glossary
|
1192
|
+
|
1193
|
+
B
|
1194
|
+
|
1195
|
+
Bench
|
1196
|
+
|
1197
|
+
An environment in which a design is verified against a specification.
|
1198
|
+
Often, it is used to emulate conditions in which the design will be
|
1199
|
+
eventually deployed.
|
1200
|
+
|
1201
|
+
BDD
|
1202
|
+
|
1203
|
+
Behavior driven development.
|
1204
|
+
|
1205
|
+
A software development methodology which emphasizes thinking in terms of
|
1206
|
+
behavior when designing, implementing, and verifying software. See the
|
1207
|
+
official wiki for more information.
|
1208
|
+
|
1209
|
+
See Also TDD, RSpec.
|
1210
|
+
|
1211
|
+
D
|
1212
|
+
|
1213
|
+
Design
|
1214
|
+
|
1215
|
+
An idea or entity that is verified against a specification in order to
|
1216
|
+
ensure correctness or soundness of its being.
|
1217
|
+
|
1218
|
+
H
|
1219
|
+
|
1220
|
+
Handle
|
1221
|
+
|
1222
|
+
An object in a Verilog simulation.
|
1223
|
+
|
1224
|
+
R
|
1225
|
+
|
1226
|
+
Rake
|
1227
|
+
Rake is a build tool, written in Ruby, using Ruby as a
|
1228
|
+
build language. Rake is similar to make in scope and
|
1229
|
+
purpose.
|
1230
|
+
|
1231
|
+
--Rake documentation
|
1232
|
+
|
1233
|
+
See the Rake website for more information.
|
1234
|
+
|
1235
|
+
RSpec
|
1236
|
+
|
1237
|
+
Ruby framework for BDD. See the RSpec website and RSpec tutorial for more
|
1238
|
+
information.
|
1239
|
+
|
1240
|
+
See Also BDD.
|
1241
|
+
|
1242
|
+
S
|
1243
|
+
|
1244
|
+
Specification
|
1245
|
+
|
1246
|
+
A collection of expectations that must be satisfied by a design when
|
1247
|
+
subjected to certain conditions.
|
1248
|
+
|
1249
|
+
T
|
1250
|
+
|
1251
|
+
TDD
|
1252
|
+
|
1253
|
+
Test Driven Development.
|
1254
|
+
|
1255
|
+
See Also BDD.
|
1256
|
+
|
1257
|
+
Test
|
1258
|
+
|
1259
|
+
The act of verifying a design against a specification in a bench.
|
1260
|
+
|
1261
|
+
See Also Test bench.
|
1262
|
+
|
1263
|
+
Test bench
|
1264
|
+
|
1265
|
+
An allusion to a bench in an electronics laboratory, or so it seems.
|
1266
|
+
|
1267
|
+
See Also Test.
|
1268
|
+
|
1269
|
+
GNU Free Documentation License
|
1270
|
+
|
1271
|
+
Version 1.2, November 2002
|
1272
|
+
|
1273
|
+
Copyright © 2000,2001,2002 Free Software Foundation, Inc.
|
1274
|
+
|
1275
|
+
Free Software Foundation, Inc.
|
1276
|
+
51 Franklin St, Fifth Floor,
|
1277
|
+
Boston,
|
1278
|
+
MA
|
1279
|
+
02110-1301
|
1280
|
+
USA
|
1281
|
+
|
1282
|
+
|
1283
|
+
Everyone is permitted to copy and distribute verbatim copies of this license
|
1284
|
+
document, but changing it is not allowed.
|
1285
|
+
|
1286
|
+
Version 1.2, November 2002
|
1287
|
+
|
1288
|
+
Table of Contents
|
1289
|
+
|
1290
|
+
PREAMBLE
|
1291
|
+
APPLICABILITY AND DEFINITIONS
|
1292
|
+
VERBATIM COPYING
|
1293
|
+
COPYING IN QUANTITY
|
1294
|
+
MODIFICATIONS
|
1295
|
+
COMBINING DOCUMENTS
|
1296
|
+
COLLECTIONS OF DOCUMENTS
|
1297
|
+
AGGREGATION WITH INDEPENDENT WORKS
|
1298
|
+
TRANSLATION
|
1299
|
+
TERMINATION
|
1300
|
+
FUTURE REVISIONS OF THIS LICENSE
|
1301
|
+
ADDENDUM: How to use this License for your documents
|
1302
|
+
|
1303
|
+
PREAMBLE
|
1304
|
+
|
1305
|
+
The purpose of this License is to make a manual, textbook, or other functional
|
1306
|
+
and useful document "free" in the sense of freedom: to assure everyone the
|
1307
|
+
effective freedom to copy and redistribute it, with or without modifying it,
|
1308
|
+
either commercially or noncommercially. Secondarily, this License preserves for
|
1309
|
+
the author and publisher a way to get credit for their work, while not being
|
1310
|
+
considered responsible for modifications made by others.
|
1311
|
+
|
1312
|
+
This License is a kind of "copyleft", which means that derivative works of the
|
1313
|
+
document must themselves be free in the same sense. It complements the GNU
|
1314
|
+
General Public License, which is a copyleft license designed for free software.
|
1315
|
+
|
1316
|
+
We have designed this License in order to use it for manuals for free software,
|
1317
|
+
because free software needs free documentation: a free program should come with
|
1318
|
+
manuals providing the same freedoms that the software does. But this License is
|
1319
|
+
not limited to software manuals; it can be used for any textual work,
|
1320
|
+
regardless of subject matter or whether it is published as a printed book. We
|
1321
|
+
recommend this License principally for works whose purpose is instruction or
|
1322
|
+
reference.
|
1323
|
+
|
1324
|
+
APPLICABILITY AND DEFINITIONS
|
1325
|
+
|
1326
|
+
This License applies to any manual or other work, in any medium, that contains
|
1327
|
+
a notice placed by the copyright holder saying it can be distributed under the
|
1328
|
+
terms of this License. Such a notice grants a world-wide, royalty-free license,
|
1329
|
+
unlimited in duration, to use that work under the conditions stated herein. The
|
1330
|
+
"Document", below, refers to any such manual or work. Any member of the public
|
1331
|
+
is a licensee, and is addressed as "you". You accept the license if you copy,
|
1332
|
+
modify or distribute the work in a way requiring permission under copyright
|
1333
|
+
law.
|
1334
|
+
|
1335
|
+
A "Modified Version" of the Document means any work containing the Document or
|
1336
|
+
a portion of it, either copied verbatim, or with modifications and/or
|
1337
|
+
translated into another language.
|
1338
|
+
|
1339
|
+
A "Secondary Section" is a named appendix or a front-matter section of the
|
1340
|
+
Document that deals exclusively with the relationship of the publishers or
|
1341
|
+
authors of the Document to the Document's overall subject (or to related
|
1342
|
+
matters) and contains nothing that could fall directly within that overall
|
1343
|
+
subject. (Thus, if the Document is in part a textbook of mathematics, a
|
1344
|
+
Secondary Section may not explain any mathematics.) The relationship could be a
|
1345
|
+
matter of historical connection with the subject or with related matters, or of
|
1346
|
+
legal, commercial, philosophical, ethical or political position regarding them.
|
1347
|
+
|
1348
|
+
The "Invariant Sections" are certain Secondary Sections whose titles are
|
1349
|
+
designated, as being those of Invariant Sections, in the notice that says that
|
1350
|
+
the Document is released under this License. If a section does not fit the
|
1351
|
+
above definition of Secondary then it is not allowed to be designated as
|
1352
|
+
Invariant. The Document may contain zero Invariant Sections. If the Document
|
1353
|
+
does not identify any Invariant Sections then there are none.
|
1354
|
+
|
1355
|
+
The "Cover Texts" are certain short passages of text that are listed, as
|
1356
|
+
Front-Cover Texts or Back-Cover Texts, in the notice that says that the
|
1357
|
+
Document is released under this License. A Front-Cover Text may be at most 5
|
1358
|
+
words, and a Back-Cover Text may be at most 25 words.
|
1359
|
+
|
1360
|
+
A "Transparent" copy of the Document means a machine-readable copy, represented
|
1361
|
+
in a format whose specification is available to the general public, that is
|
1362
|
+
suitable for revising the document straightforwardly with generic text editors
|
1363
|
+
or (for images composed of pixels) generic paint programs or (for drawings)
|
1364
|
+
some widely available drawing editor, and that is suitable for input to text
|
1365
|
+
formatters or for automatic translation to a variety of formats suitable for
|
1366
|
+
input to text formatters. A copy made in an otherwise Transparent file format
|
1367
|
+
whose markup, or absence of markup, has been arranged to thwart or discourage
|
1368
|
+
subsequent modification by readers is not Transparent. An image format is not
|
1369
|
+
Transparent if used for any substantial amount of text. A copy that is not
|
1370
|
+
"Transparent" is called "Opaque".
|
1371
|
+
|
1372
|
+
Examples of suitable formats for Transparent copies include plain ASCII without
|
1373
|
+
markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly
|
1374
|
+
available DTD, and standard-conforming simple HTML, PostScript or PDF designed
|
1375
|
+
for human modification. Examples of transparent image formats include PNG, XCF
|
1376
|
+
and JPG. Opaque formats include proprietary formats that can be read and edited
|
1377
|
+
only by proprietary word processors, SGML or XML for which the DTD and/or
|
1378
|
+
processing tools are not generally available, and the machine-generated HTML,
|
1379
|
+
PostScript or PDF produced by some word processors for output purposes only.
|
1380
|
+
|
1381
|
+
The "Title Page" means, for a printed book, the title page itself, plus such
|
1382
|
+
following pages as are needed to hold, legibly, the material this License
|
1383
|
+
requires to appear in the title page. For works in formats which do not have
|
1384
|
+
any title page as such, "Title Page" means the text near the most prominent
|
1385
|
+
appearance of the work's title, preceding the beginning of the body of the
|
1386
|
+
text.
|
1387
|
+
|
1388
|
+
A section "Entitled XYZ" means a named subunit of the Document whose title
|
1389
|
+
either is precisely XYZ or contains XYZ in parentheses following text that
|
1390
|
+
translates XYZ in another language. (Here XYZ stands for a specific section
|
1391
|
+
name mentioned below, such as "Acknowledgements", "Dedications",
|
1392
|
+
"Endorsements", or "History".) To "Preserve the Title" of such a section when
|
1393
|
+
you modify the Document means that it remains a section "Entitled XYZ"
|
1394
|
+
according to this definition.
|
1395
|
+
|
1396
|
+
The Document may include Warranty Disclaimers next to the notice which states
|
1397
|
+
that this License applies to the Document. These Warranty Disclaimers are
|
1398
|
+
considered to be included by reference in this License, but only as regards
|
1399
|
+
disclaiming warranties: any other implication that these Warranty Disclaimers
|
1400
|
+
may have is void and has no effect on the meaning of this License.
|
1401
|
+
|
1402
|
+
VERBATIM COPYING
|
1403
|
+
|
1404
|
+
You may copy and distribute the Document in any medium, either commercially or
|
1405
|
+
noncommercially, provided that this License, the copyright notices, and the
|
1406
|
+
license notice saying this License applies to the Document are reproduced in
|
1407
|
+
all copies, and that you add no other conditions whatsoever to those of this
|
1408
|
+
License. You may not use technical measures to obstruct or control the reading
|
1409
|
+
or further copying of the copies you make or distribute. However, you may
|
1410
|
+
accept compensation in exchange for copies. If you distribute a large enough
|
1411
|
+
number of copies you must also follow the conditions in section 3.
|
1412
|
+
|
1413
|
+
You may also lend copies, under the same conditions stated above, and you may
|
1414
|
+
publicly display copies.
|
1415
|
+
|
1416
|
+
COPYING IN QUANTITY
|
1417
|
+
|
1418
|
+
If you publish printed copies (or copies in media that commonly have printed
|
1419
|
+
covers) of the Document, numbering more than 100, and the Document's license
|
1420
|
+
notice requires Cover Texts, you must enclose the copies in covers that carry,
|
1421
|
+
clearly and legibly, all these Cover Texts: Front-Cover Texts on the front
|
1422
|
+
cover, and Back-Cover Texts on the back cover. Both covers must also clearly
|
1423
|
+
and legibly identify you as the publisher of these copies. The front cover must
|
1424
|
+
present the full title with all words of the title equally prominent and
|
1425
|
+
visible. You may add other material on the covers in addition. Copying with
|
1426
|
+
changes limited to the covers, as long as they preserve the title of the
|
1427
|
+
Document and satisfy these conditions, can be treated as verbatim copying in
|
1428
|
+
other respects.
|
1429
|
+
|
1430
|
+
If the required texts for either cover are too voluminous to fit legibly, you
|
1431
|
+
should put the first ones listed (as many as fit reasonably) on the actual
|
1432
|
+
cover, and continue the rest onto adjacent pages.
|
1433
|
+
|
1434
|
+
If you publish or distribute Opaque copies of the Document numbering more than
|
1435
|
+
100, you must either include a machine-readable Transparent copy along with
|
1436
|
+
each Opaque copy, or state in or with each Opaque copy a computer-network
|
1437
|
+
location from which the general network-using public has access to download
|
1438
|
+
using public-standard network protocols a complete Transparent copy of the
|
1439
|
+
Document, free of added material. If you use the latter option, you must take
|
1440
|
+
reasonably prudent steps, when you begin distribution of Opaque copies in
|
1441
|
+
quantity, to ensure that this Transparent copy will remain thus accessible at
|
1442
|
+
the stated location until at least one year after the last time you distribute
|
1443
|
+
an Opaque copy (directly or through your agents or retailers) of that edition
|
1444
|
+
to the public.
|
1445
|
+
|
1446
|
+
It is requested, but not required, that you contact the authors of the Document
|
1447
|
+
well before redistributing any large number of copies, to give them a chance to
|
1448
|
+
provide you with an updated version of the Document.
|
1449
|
+
|
1450
|
+
MODIFICATIONS
|
1451
|
+
|
1452
|
+
You may copy and distribute a Modified Version of the Document under the
|
1453
|
+
conditions of sections 2 and 3 above, provided that you release the Modified
|
1454
|
+
Version under precisely this License, with the Modified Version filling the
|
1455
|
+
role of the Document, thus licensing distribution and modification of the
|
1456
|
+
Modified Version to whoever possesses a copy of it. In addition, you must do
|
1457
|
+
these things in the Modified Version:
|
1458
|
+
|
1459
|
+
GNU FDL Modification Conditions
|
1460
|
+
|
1461
|
+
A. Use in the Title Page (and on the covers, if any) a title distinct from
|
1462
|
+
that of the Document, and from those of previous versions (which should, if
|
1463
|
+
there were any, be listed in the History section of the Document). You may
|
1464
|
+
use the same title as a previous version if the original publisher of that
|
1465
|
+
version gives permission.
|
1466
|
+
B. List on the Title Page, as authors, one or more persons or entities
|
1467
|
+
responsible for authorship of the modifications in the Modified Version,
|
1468
|
+
together with at least five of the principal authors of the Document (all
|
1469
|
+
of its principal authors, if it has fewer than five), unless they release
|
1470
|
+
you from this requirement.
|
1471
|
+
C. State on the Title page the name of the publisher of the Modified Version,
|
1472
|
+
as the publisher.
|
1473
|
+
D. Preserve all the copyright notices of the Document.
|
1474
|
+
E. Add an appropriate copyright notice for your modifications adjacent to the
|
1475
|
+
other copyright notices.
|
1476
|
+
F. Include, immediately after the copyright notices, a license notice giving
|
1477
|
+
the public permission to use the Modified Version under the terms of this
|
1478
|
+
License, in the form shown in the Addendum below.
|
1479
|
+
G. Preserve in that license notice the full lists of Invariant Sections and
|
1480
|
+
required Cover Texts given in the Document's license notice.
|
1481
|
+
H. Include an unaltered copy of this License.
|
1482
|
+
I. Preserve the section Entitled "History", Preserve its Title, and add to it
|
1483
|
+
an item stating at least the title, year, new authors, and publisher of the
|
1484
|
+
Modified Version as given on the Title Page. If there is no section
|
1485
|
+
Entitled "History" in the Document, create one stating the title, year,
|
1486
|
+
authors, and publisher of the Document as given on its Title Page, then add
|
1487
|
+
an item describing the Modified Version as stated in the previous sentence.
|
1488
|
+
J. Preserve the network location, if any, given in the Document for public
|
1489
|
+
access to a Transparent copy of the Document, and likewise the network
|
1490
|
+
locations given in the Document for previous versions it was based on.
|
1491
|
+
These may be placed in the "History" section. You may omit a network
|
1492
|
+
location for a work that was published at least four years before the
|
1493
|
+
Document itself, or if the original publisher of the version it refers to
|
1494
|
+
gives permission.
|
1495
|
+
K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the
|
1496
|
+
Title of the section, and preserve in the section all the substance and
|
1497
|
+
tone of each of the contributor acknowledgements and/or dedications given
|
1498
|
+
therein.
|
1499
|
+
L. Preserve all the Invariant Sections of the Document, unaltered in their
|
1500
|
+
text and in their titles. Section numbers or the equivalent are not
|
1501
|
+
considered part of the section titles.
|
1502
|
+
M. Delete any section Entitled "Endorsements". Such a section may not be
|
1503
|
+
included in the Modified Version.
|
1504
|
+
N. Do not retitle any existing section to be Entitled "Endorsements" or to
|
1505
|
+
conflict in title with any Invariant Section.
|
1506
|
+
O. Preserve any Warranty Disclaimers.
|
1507
|
+
|
1508
|
+
If the Modified Version includes new front-matter sections or appendices that
|
1509
|
+
qualify as Secondary Sections and contain no material copied from the Document,
|
1510
|
+
you may at your option designate some or all of these sections as invariant. To
|
1511
|
+
do this, add their titles to the list of Invariant Sections in the Modified
|
1512
|
+
Version's license notice. These titles must be distinct from any other section
|
1513
|
+
titles.
|
1514
|
+
|
1515
|
+
You may add a section Entitled "Endorsements", provided it contains nothing but
|
1516
|
+
endorsements of your Modified Version by various parties--for example,
|
1517
|
+
statements of peer review or that the text has been approved by an organization
|
1518
|
+
as the authoritative definition of a standard.
|
1519
|
+
|
1520
|
+
You may add a passage of up to five words as a Front-Cover Text, and a passage
|
1521
|
+
of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts
|
1522
|
+
in the Modified Version. Only one passage of Front-Cover Text and one of
|
1523
|
+
Back-Cover Text may be added by (or through arrangements made by) any one
|
1524
|
+
entity. If the Document already includes a cover text for the same cover,
|
1525
|
+
previously added by you or by arrangement made by the same entity you are
|
1526
|
+
acting on behalf of, you may not add another; but you may replace the old one,
|
1527
|
+
on explicit permission from the previous publisher that added the old one.
|
1528
|
+
|
1529
|
+
The author(s) and publisher(s) of the Document do not by this License give
|
1530
|
+
permission to use their names for publicity for or to assert or imply
|
1531
|
+
endorsement of any Modified Version.
|
1532
|
+
|
1533
|
+
COMBINING DOCUMENTS
|
1534
|
+
|
1535
|
+
You may combine the Document with other documents released under this License,
|
1536
|
+
under the terms defined in section 4 above for modified versions, provided that
|
1537
|
+
you include in the combination all of the Invariant Sections of all of the
|
1538
|
+
original documents, unmodified, and list them all as Invariant Sections of your
|
1539
|
+
combined work in its license notice, and that you preserve all their Warranty
|
1540
|
+
Disclaimers.
|
1541
|
+
|
1542
|
+
The combined work need only contain one copy of this License, and multiple
|
1543
|
+
identical Invariant Sections may be replaced with a single copy. If there are
|
1544
|
+
multiple Invariant Sections with the same name but different contents, make the
|
1545
|
+
title of each such section unique by adding at the end of it, in parentheses,
|
1546
|
+
the name of the original author or publisher of that section if known, or else
|
1547
|
+
a unique number. Make the same adjustment to the section titles in the list of
|
1548
|
+
Invariant Sections in the license notice of the combined work.
|
1549
|
+
|
1550
|
+
In the combination, you must combine any sections Entitled "History" in the
|
1551
|
+
various original documents, forming one section Entitled "History"; likewise
|
1552
|
+
combine any sections Entitled "Acknowledgements", and any sections Entitled
|
1553
|
+
"Dedications". You must delete all sections Entitled "Endorsements".
|
1554
|
+
|
1555
|
+
COLLECTIONS OF DOCUMENTS
|
1556
|
+
|
1557
|
+
You may make a collection consisting of the Document and other documents
|
1558
|
+
released under this License, and replace the individual copies of this License
|
1559
|
+
in the various documents with a single copy that is included in the collection,
|
1560
|
+
provided that you follow the rules of this License for verbatim copying of each
|
1561
|
+
of the documents in all other respects.
|
1562
|
+
|
1563
|
+
You may extract a single document from such a collection, and distribute it
|
1564
|
+
individually under this License, provided you insert a copy of this License
|
1565
|
+
into the extracted document, and follow this License in all other respects
|
1566
|
+
regarding verbatim copying of that document.
|
1567
|
+
|
1568
|
+
AGGREGATION WITH INDEPENDENT WORKS
|
1569
|
+
|
1570
|
+
A compilation of the Document or its derivatives with other separate and
|
1571
|
+
independent documents or works, in or on a volume of a storage or distribution
|
1572
|
+
medium, is called an "aggregate" if the copyright resulting from the
|
1573
|
+
compilation is not used to limit the legal rights of the compilation's users
|
1574
|
+
beyond what the individual works permit. When the Document is included in an
|
1575
|
+
aggregate, this License does not apply to the other works in the aggregate
|
1576
|
+
which are not themselves derivative works of the Document.
|
1577
|
+
|
1578
|
+
If the Cover Text requirement of section 3 is applicable to these copies of the
|
1579
|
+
Document, then if the Document is less than one half of the entire aggregate,
|
1580
|
+
the Document's Cover Texts may be placed on covers that bracket the Document
|
1581
|
+
within the aggregate, or the electronic equivalent of covers if the Document is
|
1582
|
+
in electronic form. Otherwise they must appear on printed covers that bracket
|
1583
|
+
the whole aggregate.
|
1584
|
+
|
1585
|
+
TRANSLATION
|
1586
|
+
|
1587
|
+
Translation is considered a kind of modification, so you may distribute
|
1588
|
+
translations of the Document under the terms of section 4. Replacing Invariant
|
1589
|
+
Sections with translations requires special permission from their copyright
|
1590
|
+
holders, but you may include translations of some or all Invariant Sections in
|
1591
|
+
addition to the original versions of these Invariant Sections. You may include
|
1592
|
+
a translation of this License, and all the license notices in the Document, and
|
1593
|
+
any Warranty Disclaimers, provided that you also include the original English
|
1594
|
+
version of this License and the original versions of those notices and
|
1595
|
+
disclaimers. In case of a disagreement between the translation and the original
|
1596
|
+
version of this License or a notice or disclaimer, the original version will
|
1597
|
+
prevail.
|
1598
|
+
|
1599
|
+
If a section in the Document is Entitled "Acknowledgements", "Dedications", or
|
1600
|
+
"History", the requirement (section 4) to Preserve its Title (section 1) will
|
1601
|
+
typically require changing the actual title.
|
1602
|
+
|
1603
|
+
TERMINATION
|
1604
|
+
|
1605
|
+
You may not copy, modify, sublicense, or distribute the Document except as
|
1606
|
+
expressly provided for under this License. Any other attempt to copy, modify,
|
1607
|
+
sublicense or distribute the Document is void, and will automatically terminate
|
1608
|
+
your rights under this License. However, parties who have received copies, or
|
1609
|
+
rights, from you under this License will not have their licenses terminated so
|
1610
|
+
long as such parties remain in full compliance.
|
1611
|
+
|
1612
|
+
FUTURE REVISIONS OF THIS LICENSE
|
1613
|
+
|
1614
|
+
The Free Software Foundation may publish new, revised versions of the GNU Free
|
1615
|
+
Documentation License from time to time. Such new versions will be similar in
|
1616
|
+
spirit to the present version, but may differ in detail to address new problems
|
1617
|
+
or concerns. See http://www.gnu.org/copyleft/.
|
1618
|
+
|
1619
|
+
Each version of the License is given a distinguishing version number. If the
|
1620
|
+
Document specifies that a particular numbered version of this License "or any
|
1621
|
+
later version" applies to it, you have the option of following the terms and
|
1622
|
+
conditions either of that specified version or of any later version that has
|
1623
|
+
been published (not as a draft) by the Free Software Foundation. If the
|
1624
|
+
Document does not specify a version number of this License, you may choose any
|
1625
|
+
version ever published (not as a draft) by the Free Software Foundation.
|
1626
|
+
|
1627
|
+
ADDENDUM: How to use this License for your documents
|
1628
|
+
|
1629
|
+
To use this License in a document you have written, include a copy of the
|
1630
|
+
License in the document and put the following copyright and license notices
|
1631
|
+
just after the title page:
|
1632
|
+
|
1633
|
+
Sample Invariant Sections list
|
1634
|
+
|
1635
|
+
Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and
|
1636
|
+
/or modify this document under the terms of the GNU Free Documentation
|
1637
|
+
License, Version 1.2 or any later version published by the Free Software
|
1638
|
+
Foundation; with no Invariant Sections, no Front-Cover Texts, and no
|
1639
|
+
Back-Cover Texts. A copy of the license is included in the section entitled
|
1640
|
+
"GNU Free Documentation License".
|
1641
|
+
|
1642
|
+
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace
|
1643
|
+
the "with...Texts." line with this:
|
1644
|
+
|
1645
|
+
Sample Invariant Sections list
|
1646
|
+
|
1647
|
+
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover
|
1648
|
+
Texts being LIST, and with the Back-Cover Texts being LIST.
|
1649
|
+
|
1650
|
+
If you have Invariant Sections without Cover Texts, or some other combination
|
1651
|
+
of the three, merge those two alternatives to suit the situation.
|
1652
|
+
|
1653
|
+
If your document contains nontrivial examples of program code, we recommend
|
1654
|
+
releasing these examples in parallel under your choice of free software
|
1655
|
+
license, such as the GNU General Public License, to permit their use in free
|
1656
|
+
software.
|
1657
|
+
|