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
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Template)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File bin/generate_test.rb, line 73</span>
|
14
|
+
73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">aName</span>
|
15
|
+
74: <span class="ruby-keyword kw">super</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">TEMPLATE_PATH</span>, <span class="ruby-identifier">aName</span>))
|
16
|
+
75: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,180 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: TestHw5UnitModel</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">TestHw5UnitModel</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/samp/pipelined_alu/TestHw5UnitModel_rb.html">
|
59
|
+
samp/pipelined_alu/TestHw5UnitModel.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Test::Unit::TestCase
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000020">setup</a>
|
90
|
+
<a href="#M000022">testModel</a>
|
91
|
+
<a href="#M000021">test_reset</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
<div id="constants-list">
|
104
|
+
<h3 class="section-bar">Constants</h3>
|
105
|
+
|
106
|
+
<div class="name-list">
|
107
|
+
<table summary="Constants">
|
108
|
+
<tr class="top-aligned-row context-row">
|
109
|
+
<td class="context-item-name">NUM_VECTORS</td>
|
110
|
+
<td>=</td>
|
111
|
+
<td class="context-item-value">4000</td>
|
112
|
+
</tr>
|
113
|
+
</table>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<!-- if method_list -->
|
123
|
+
<div id="methods">
|
124
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
125
|
+
|
126
|
+
<div id="method-M000020" class="method-detail">
|
127
|
+
<a name="M000020"></a>
|
128
|
+
|
129
|
+
<div class="method-heading">
|
130
|
+
<a href="TestHw5UnitModel.src/M000020.html" target="Code" class="method-signature"
|
131
|
+
onclick="popupCode('TestHw5UnitModel.src/M000020.html');return false;">
|
132
|
+
<span class="method-name">setup</span><span class="method-args">()</span>
|
133
|
+
</a>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<div class="method-description">
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
<div id="method-M000022" class="method-detail">
|
141
|
+
<a name="M000022"></a>
|
142
|
+
|
143
|
+
<div class="method-heading">
|
144
|
+
<a href="TestHw5UnitModel.src/M000022.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('TestHw5UnitModel.src/M000022.html');return false;">
|
146
|
+
<span class="method-name">testModel</span><span class="method-args">()</span>
|
147
|
+
</a>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-description">
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div id="method-M000021" class="method-detail">
|
155
|
+
<a name="M000021"></a>
|
156
|
+
|
157
|
+
<div class="method-heading">
|
158
|
+
<a href="TestHw5UnitModel.src/M000021.html" target="Code" class="method-signature"
|
159
|
+
onclick="popupCode('TestHw5UnitModel.src/M000021.html');return false;">
|
160
|
+
<span class="method-name">test_reset</span><span class="method-args">()</span>
|
161
|
+
</a>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
<div class="method-description">
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
|
169
|
+
</div>
|
170
|
+
|
171
|
+
|
172
|
+
</div>
|
173
|
+
|
174
|
+
|
175
|
+
<div id="validator-badges">
|
176
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
</body>
|
180
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>setup (TestHw5UnitModel)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/TestHw5UnitModel.rb, line 29</span>
|
14
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
15
|
+
30: <span class="ruby-ivar">@model</span> = <span class="ruby-constant">Hw5UnitModel</span>.<span class="ruby-identifier">new</span>
|
16
|
+
31: <span class="ruby-ivar">@ingen</span> = <span class="ruby-constant">InputGenerator</span>.<span class="ruby-identifier">new</span> <span class="ruby-value">32</span>
|
17
|
+
32: <span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_reset (TestHw5UnitModel)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/TestHw5UnitModel.rb, line 34</span>
|
14
|
+
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_reset</span>
|
15
|
+
35: <span class="ruby-ivar">@model</span>.<span class="ruby-identifier">reset</span>
|
16
|
+
36: <span class="ruby-identifier">assert_same</span> <span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">NOP</span>, <span class="ruby-ivar">@model</span>.<span class="ruby-identifier">output</span>
|
17
|
+
37: <span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>testModel (TestHw5UnitModel)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/TestHw5UnitModel.rb, line 39</span>
|
14
|
+
39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testModel</span>
|
15
|
+
40: <span class="ruby-comment cmt"># generate input for module</span>
|
16
|
+
41: <span class="ruby-identifier">inputQueue</span> = []
|
17
|
+
42:
|
18
|
+
43: <span class="ruby-constant">NUM_VECTORS</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
19
|
+
44: <span class="ruby-identifier">inputQueue</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">Operation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">OPERATIONS</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">OPERATIONS</span>.<span class="ruby-identifier">size</span>)], <span class="ruby-identifier">i</span>, <span class="ruby-ivar">@ingen</span>.<span class="ruby-identifier">gen</span>.<span class="ruby-identifier">abs</span>, <span class="ruby-ivar">@ingen</span>.<span class="ruby-identifier">gen</span>.<span class="ruby-identifier">abs</span>)
|
20
|
+
45: <span class="ruby-keyword kw">end</span>
|
21
|
+
46:
|
22
|
+
47:
|
23
|
+
48: <span class="ruby-comment cmt"># test the module</span>
|
24
|
+
49: <span class="ruby-identifier">outputQueue</span> = []
|
25
|
+
50: <span class="ruby-identifier">cycle</span> = <span class="ruby-value">0</span>
|
26
|
+
51:
|
27
|
+
52: <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">inputQueue</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">outputQueue</span>.<span class="ruby-identifier">length</span>
|
28
|
+
53: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
29
|
+
54: <span class="ruby-identifier">print</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator">*</span> <span class="ruby-value">3</span>
|
30
|
+
55: <span class="ruby-identifier">p</span> <span class="ruby-node">">> cycle #{cycle}"</span>
|
31
|
+
56: <span class="ruby-keyword kw">end</span>
|
32
|
+
57:
|
33
|
+
58:
|
34
|
+
59: <span class="ruby-comment cmt"># start a new operation</span>
|
35
|
+
60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cycle</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">inputQueue</span>.<span class="ruby-identifier">length</span>
|
36
|
+
61: <span class="ruby-ivar">@model</span>.<span class="ruby-identifier">startOperation</span> <span class="ruby-identifier">inputQueue</span>[<span class="ruby-identifier">cycle</span>]
|
37
|
+
62: <span class="ruby-identifier">cycle</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
38
|
+
63: <span class="ruby-keyword kw">end</span>
|
39
|
+
64:
|
40
|
+
65:
|
41
|
+
66: <span class="ruby-comment cmt"># simulate a clock cycle</span>
|
42
|
+
67: <span class="ruby-ivar">@model</span>.<span class="ruby-identifier">cycle</span>
|
43
|
+
68:
|
44
|
+
69:
|
45
|
+
70: <span class="ruby-comment cmt"># verify the output</span>
|
46
|
+
71: <span class="ruby-identifier">output</span> = <span class="ruby-ivar">@model</span>.<span class="ruby-identifier">output</span>
|
47
|
+
72: <span class="ruby-identifier">p</span> <span class="ruby-value str">"output:"</span>, <span class="ruby-identifier">output</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
48
|
+
73:
|
49
|
+
74: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">NOP</span>
|
50
|
+
75: <span class="ruby-identifier">assert_not_nil</span> <span class="ruby-identifier">inputQueue</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">op</span><span class="ruby-operator">|</span> <span class="ruby-identifier">op</span>.<span class="ruby-identifier">tag</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">output</span>.<span class="ruby-identifier">tag</span> }, <span class="ruby-node">"unknown tag on result: #{output.tag}"</span>
|
51
|
+
76: <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">output</span>.<span class="ruby-identifier">compute</span>, <span class="ruby-identifier">output</span>.<span class="ruby-identifier">result</span>, <span class="ruby-value str">"incorrect result"</span>
|
52
|
+
77:
|
53
|
+
78: <span class="ruby-identifier">outputQueue</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">output</span>
|
54
|
+
79: <span class="ruby-keyword kw">end</span>
|
55
|
+
80:
|
56
|
+
81:
|
57
|
+
82: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
58
|
+
83: <span class="ruby-identifier">puts</span>
|
59
|
+
84: <span class="ruby-identifier">pp</span> <span class="ruby-ivar">@model</span>
|
60
|
+
85: <span class="ruby-keyword kw">end</span>
|
61
|
+
86: <span class="ruby-keyword kw">end</span>
|
62
|
+
87: <span class="ruby-keyword kw">end</span></pre>
|
63
|
+
</body>
|
64
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
Tue Aug 29 11:48:55 PDT 2006
|
@@ -0,0 +1,236 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: generate_test.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>generate_test.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>bin/generate_test.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Tue Aug 29 11:48:52 PDT 2006</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<h2>Synopsis</h2>
|
73
|
+
<p>
|
74
|
+
Generates Ruby-VPI tests from Verilog 2001 module declarations. A generated
|
75
|
+
test is composed of the following parts.
|
76
|
+
</p>
|
77
|
+
<table>
|
78
|
+
<tr><td valign="top">Runner:</td><td>Written in Rake, this file builds and runs the test bench.
|
79
|
+
|
80
|
+
</td></tr>
|
81
|
+
<tr><td valign="top">Bench:</td><td>Written in Verilog and Ruby, these files define the testing environment.
|
82
|
+
|
83
|
+
</td></tr>
|
84
|
+
<tr><td valign="top">Design:</td><td>Written in Ruby, this file provides an interface to the Verilog module
|
85
|
+
under test.
|
86
|
+
|
87
|
+
</td></tr>
|
88
|
+
<tr><td valign="top">Prototype:</td><td>Written in Ruby, this file defines a prototype of the design under test.
|
89
|
+
|
90
|
+
</td></tr>
|
91
|
+
<tr><td valign="top">Specification:</td><td>Written in Ruby, this file verifies the design.
|
92
|
+
|
93
|
+
</td></tr>
|
94
|
+
</table>
|
95
|
+
<p>
|
96
|
+
The reason for dividing a single test into these parts is mainly to
|
97
|
+
decouple the design from the specification. This allows humans to focus on
|
98
|
+
writing the specification while the remainder is automatically generated by
|
99
|
+
this tool.
|
100
|
+
</p>
|
101
|
+
<p>
|
102
|
+
For example, when the interface of a Verilog module changes, you would
|
103
|
+
simply re-run this tool to incorporate those changes into the test without
|
104
|
+
diverting your focus from the specification.
|
105
|
+
</p>
|
106
|
+
<h2>Notes</h2>
|
107
|
+
<ul>
|
108
|
+
<li>If no input files are specified, then the standard input stream will be
|
109
|
+
read instead.
|
110
|
+
|
111
|
+
</li>
|
112
|
+
<li>The first signal parameter in a module’s declaration is assumed to be
|
113
|
+
the clocking signal.
|
114
|
+
|
115
|
+
</li>
|
116
|
+
<li>Existing output files will be backed-up before being over-written. A
|
117
|
+
backed-up file has a tilde (~) appended to its name.
|
118
|
+
|
119
|
+
</li>
|
120
|
+
</ul>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
<div id="requires-list">
|
125
|
+
<h3 class="section-bar">Required files</h3>
|
126
|
+
|
127
|
+
<div class="name-list">
|
128
|
+
fileutils
|
129
|
+
ruby-vpi/erb
|
130
|
+
optparse
|
131
|
+
ruby-vpi/rdoc
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div id="method-list">
|
138
|
+
<h3 class="section-bar">Methods</h3>
|
139
|
+
|
140
|
+
<div class="name-list">
|
141
|
+
<a href="#M000001">write_file</a>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
|
148
|
+
<!-- if includes -->
|
149
|
+
|
150
|
+
<div id="section">
|
151
|
+
|
152
|
+
|
153
|
+
<div id="constants-list">
|
154
|
+
<h3 class="section-bar">Constants</h3>
|
155
|
+
|
156
|
+
<div class="name-list">
|
157
|
+
<table summary="Constants">
|
158
|
+
<tr class="top-aligned-row context-row">
|
159
|
+
<td class="context-item-name">VERILOG_BENCH_TEMPLATE</td>
|
160
|
+
<td>=</td>
|
161
|
+
<td class="context-item-value">Template.new('bench.v')</td>
|
162
|
+
<td width="3em"> </td>
|
163
|
+
<td class="context-item-desc">
|
164
|
+
obtain templates for output generation
|
165
|
+
|
166
|
+
</td>
|
167
|
+
</tr>
|
168
|
+
<tr class="top-aligned-row context-row">
|
169
|
+
<td class="context-item-name">RUBY_BENCH_TEMPLATE</td>
|
170
|
+
<td>=</td>
|
171
|
+
<td class="context-item-value">Template.new('bench.rb')</td>
|
172
|
+
</tr>
|
173
|
+
<tr class="top-aligned-row context-row">
|
174
|
+
<td class="context-item-name">DESIGN_TEMPLATE</td>
|
175
|
+
<td>=</td>
|
176
|
+
<td class="context-item-value">Template.new('design.rb')</td>
|
177
|
+
</tr>
|
178
|
+
<tr class="top-aligned-row context-row">
|
179
|
+
<td class="context-item-name">PROTO_TEMPLATE</td>
|
180
|
+
<td>=</td>
|
181
|
+
<td class="context-item-value">Template.new('proto.rb')</td>
|
182
|
+
</tr>
|
183
|
+
<tr class="top-aligned-row context-row">
|
184
|
+
<td class="context-item-name">SPEC_TEMPLATE</td>
|
185
|
+
<td>=</td>
|
186
|
+
<td class="context-item-value">Template.new('spec.rb')</td>
|
187
|
+
</tr>
|
188
|
+
<tr class="top-aligned-row context-row">
|
189
|
+
<td class="context-item-name">RUNNER_TEMPLATE</td>
|
190
|
+
<td>=</td>
|
191
|
+
<td class="context-item-value">Template.new('runner.rake')</td>
|
192
|
+
</tr>
|
193
|
+
</table>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<!-- if method_list -->
|
203
|
+
<div id="methods">
|
204
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
205
|
+
|
206
|
+
<div id="method-M000001" class="method-detail">
|
207
|
+
<a name="M000001"></a>
|
208
|
+
|
209
|
+
<div class="method-heading">
|
210
|
+
<a href="generate_test_rb.src/M000001.html" target="Code" class="method-signature"
|
211
|
+
onclick="popupCode('generate_test_rb.src/M000001.html');return false;">
|
212
|
+
<span class="method-name">write_file</span><span class="method-args">(aPath, aContent)</span>
|
213
|
+
</a>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<div class="method-description">
|
217
|
+
<p>
|
218
|
+
Writes the given contents to the file at the given path. If the given path
|
219
|
+
already exists, then a backup is created before proceeding.
|
220
|
+
</p>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
|
228
|
+
</div>
|
229
|
+
|
230
|
+
|
231
|
+
<div id="validator-badges">
|
232
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
</body>
|
236
|
+
</html>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>write_file (bin/generate_test.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File bin/generate_test.rb, line 50</span>
|
14
|
+
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_file</span> <span class="ruby-identifier">aPath</span>, <span class="ruby-identifier">aContent</span>
|
15
|
+
51: <span class="ruby-comment cmt"># create a backup</span>
|
16
|
+
52: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">aPath</span>
|
17
|
+
53: <span class="ruby-identifier">backupPath</span> = <span class="ruby-identifier">aPath</span>.<span class="ruby-identifier">dup</span>
|
18
|
+
54:
|
19
|
+
55: <span class="ruby-keyword kw">while</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">backupPath</span>
|
20
|
+
56: <span class="ruby-identifier">backupPath</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'~'</span>
|
21
|
+
57: <span class="ruby-keyword kw">end</span>
|
22
|
+
58:
|
23
|
+
59: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">cp</span> <span class="ruby-identifier">aPath</span>, <span class="ruby-identifier">backupPath</span>, <span class="ruby-identifier">:preserve</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>
|
24
|
+
60: <span class="ruby-keyword kw">end</span>
|
25
|
+
61:
|
26
|
+
62: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">aPath</span>, <span class="ruby-value str">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">aContent</span>}
|
27
|
+
63: <span class="ruby-keyword kw">end</span></pre>
|
28
|
+
</body>
|
29
|
+
</html>
|