ruby-vpi 7.3.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HEADER +19 -4
- data/HISTORY +34 -1
- data/MEMO +2 -2
- data/README +14 -1
- data/Rakefile +39 -66
- data/bin/generate_test.rb +5 -23
- data/bin/generate_test_tpl/bench.rb +1 -1
- data/bin/generate_test_tpl/bench.v +2 -2
- data/bin/generate_test_tpl/proto.rb +8 -3
- data/bin/header_to_ruby.rb +3 -3
- data/doc/Rakefile +9 -26
- data/doc/{xhtml/background.html → background.html} +1 -1
- data/doc/{xhtml/background.methodology.html → background.methodology.html} +1 -1
- data/doc/{xhtml/background.organization.html → background.organization.html} +1 -1
- data/doc/{xhtml/background.running-tests.html → background.running-tests.html} +0 -0
- data/doc/{xhtml/background.terminology.html → background.terminology.html} +0 -0
- data/doc/{src/figures → figures}/organization.png +0 -0
- data/doc/{src/figures → figures}/organization_detailed.png +0 -0
- data/doc/{src/figures → figures}/ruby_init.png +0 -0
- data/doc/{src/figures → figures}/ruby_relay.png +0 -0
- data/doc/{xhtml/gfdl-0.html → gfdl-0.html} +0 -0
- data/doc/{xhtml/gfdl-1.html → gfdl-1.html} +0 -0
- data/doc/{xhtml/gfdl-10.html → gfdl-10.html} +0 -0
- data/doc/{xhtml/gfdl-2.html → gfdl-2.html} +0 -0
- data/doc/{xhtml/gfdl-3.html → gfdl-3.html} +0 -0
- data/doc/{xhtml/gfdl-4.html → gfdl-4.html} +0 -0
- data/doc/{xhtml/gfdl-5.html → gfdl-5.html} +0 -0
- data/doc/{xhtml/gfdl-6.html → gfdl-6.html} +0 -0
- data/doc/{xhtml/gfdl-7.html → gfdl-7.html} +0 -0
- data/doc/{xhtml/gfdl-8.html → gfdl-8.html} +0 -0
- data/doc/{xhtml/gfdl-9.html → gfdl-9.html} +0 -0
- data/doc/{xhtml/gfdl-addendum.html → gfdl-addendum.html} +0 -0
- data/doc/{xhtml/gfdl.html → gfdl.html} +0 -0
- data/doc/glossary.html +3 -0
- data/doc/{src/images → images}/COPYING +0 -0
- data/doc/{src/images → images}/ChangeLog +0 -0
- data/doc/{src/images → images}/blank.png +0 -0
- data/doc/{src/images → images}/callouts/1.png +0 -0
- data/doc/{src/images → images}/callouts/10.png +0 -0
- data/doc/{src/images → images}/callouts/11.png +0 -0
- data/doc/{src/images → images}/callouts/12.png +0 -0
- data/doc/{src/images → images}/callouts/13.png +0 -0
- data/doc/{src/images → images}/callouts/14.png +0 -0
- data/doc/{src/images → images}/callouts/15.png +0 -0
- data/doc/{src/images → images}/callouts/2.png +0 -0
- data/doc/{src/images → images}/callouts/3.png +0 -0
- data/doc/{src/images → images}/callouts/4.png +0 -0
- data/doc/{src/images → images}/callouts/5.png +0 -0
- data/doc/{src/images → images}/callouts/6.png +0 -0
- data/doc/{src/images → images}/callouts/7.png +0 -0
- data/doc/{src/images → images}/callouts/8.png +0 -0
- data/doc/{src/images → images}/callouts/9.png +0 -0
- data/doc/{src/images → images}/callouts/ChangeLog +0 -0
- data/doc/{src/images → images}/caution.png +0 -0
- data/doc/{src/images → images}/caution.svg +0 -0
- data/doc/{src/images → images}/copyright +0 -0
- data/doc/{src/images → images}/draft.png +0 -0
- data/doc/{src/images → images}/home.png +0 -0
- data/doc/{src/images → images}/home.svg +0 -0
- data/doc/{src/images → images}/important.png +0 -0
- data/doc/{src/images → images}/important.svg +0 -0
- data/doc/{src/images → images}/next.png +0 -0
- data/doc/{src/images → images}/next.svg +0 -0
- data/doc/{src/images → images}/note.png +0 -0
- data/doc/{src/images → images}/note.svg +0 -0
- data/doc/{src/images → images}/prev.png +0 -0
- data/doc/{src/images → images}/prev.svg +0 -0
- data/doc/{src/images → images}/tip.png +0 -0
- data/doc/{src/images → images}/tip.svg +0 -0
- data/doc/{src/images → images}/toc-blank.png +0 -0
- data/doc/{src/images → images}/toc-minus.png +0 -0
- data/doc/{src/images → images}/toc-plus.png +0 -0
- data/doc/{src/images → images}/up.png +0 -0
- data/doc/{src/images → images}/up.svg +0 -0
- data/doc/{src/images → images}/warning.png +0 -0
- data/doc/{src/images → images}/warning.svg +0 -0
- data/doc/{xhtml/index.html → index.html} +2 -2
- data/doc/{xhtml/introduction.html → introduction.html} +0 -0
- data/doc/{xhtml/introduction.license.html → introduction.license.html} +0 -0
- data/doc/{xhtml/introduction.manifest.html → introduction.manifest.html} +1 -1
- data/doc/{xhtml/introduction.related-works.html → introduction.related-works.html} +0 -0
- data/doc/{xhtml/introduction.resources.html → introduction.resources.html} +1 -1
- data/doc/{txt/manual.txt → manual.txt} +50 -49
- data/doc/{xhtml/problem.ivl.html → problem.ivl.html} +0 -0
- data/doc/{xhtml/problems.html → problems.html} +0 -0
- data/doc/{xhtml/problems.ruby.html → problems.ruby.html} +0 -0
- data/doc/{xhtml/problems.vsim.html → problems.vsim.html} +0 -0
- data/doc/src/manual.xml +53 -39
- data/doc/src/shared.dtd +1 -2
- data/doc/{xhtml/styles → styles}/manual.css +6 -10
- data/doc/{xhtml/usage.examples.html → usage.examples.html} +0 -0
- data/doc/{xhtml/usage.html → usage.html} +0 -0
- data/doc/{xhtml/usage.installation.html → usage.installation.html} +0 -0
- data/doc/{xhtml/usage.requirements.html → usage.requirements.html} +0 -0
- data/doc/{xhtml/usage.tools.html → usage.tools.html} +0 -0
- data/doc/{xhtml/usage.tutorial.html → usage.tutorial.html} +14 -18
- data/gem_extconf.rb +1 -1
- data/header.html +18 -4
- data/header.part.html +18 -4
- data/history.html +87 -5
- data/history.part.html +69 -1
- data/lib/ruby-vpi.rb +5 -5
- data/lib/ruby-vpi/rcov.rb +2 -2
- data/lib/ruby-vpi/runner.rb +4 -7
- data/lib/ruby-vpi/vpi_util.rb +2 -2
- data/memo.html +23 -9
- data/memo.part.html +5 -5
- data/readme.html +40 -5
- data/readme.part.html +22 -1
- data/ref/c/annotated.html +1 -1
- data/ref/c/common_8h.html +1 -1
- data/ref/c/files.html +1 -1
- data/ref/c/functions.html +1 -1
- data/ref/c/functions_vars.html +1 -1
- data/ref/c/globals.html +1 -1
- data/ref/c/globals_0x63.html +1 -1
- data/ref/c/globals_0x65.html +1 -1
- data/ref/c/globals_0x66.html +1 -1
- data/ref/c/globals_0x70.html +1 -1
- data/ref/c/globals_0x72.html +1 -1
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +1 -1
- data/ref/c/globals_0x78.html +1 -1
- data/ref/c/globals_defs.html +1 -1
- data/ref/c/globals_defs_0x65.html +1 -1
- data/ref/c/globals_defs_0x70.html +1 -1
- data/ref/c/globals_defs_0x76.html +1 -1
- data/ref/c/globals_defs_0x78.html +1 -1
- data/ref/c/globals_enum.html +1 -1
- data/ref/c/globals_eval.html +1 -1
- data/ref/c/globals_func.html +1 -1
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +1 -1
- data/ref/c/hierarchy.html +1 -1
- data/ref/c/index.html +1 -1
- data/ref/c/relay_8cin.html +1 -1
- data/ref/c/relay_8hin.html +1 -1
- data/ref/c/ruby-vpi_8c.html +1 -1
- data/ref/c/structrelay____RubyOptions____def.html +1 -1
- data/ref/c/structt__cb__data.html +1 -1
- data/ref/c/structt__vpi__delay.html +1 -1
- data/ref/c/structt__vpi__error__info.html +1 -1
- data/ref/c/structt__vpi__strengthval.html +1 -1
- data/ref/c/structt__vpi__systf__data.html +1 -1
- data/ref/c/structt__vpi__time.html +1 -1
- data/ref/c/structt__vpi__value.html +1 -1
- data/ref/c/structt__vpi__vecval.html +1 -1
- data/ref/c/structt__vpi__vlog__info.html +1 -1
- data/ref/c/swig_8cin.html +1 -1
- data/ref/c/swig_8hin.html +1 -1
- data/ref/c/verilog_8h.html +1 -1
- data/ref/c/vlog_8cin.html +1 -1
- data/ref/c/vlog_8hin.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/OutputInfo.src/M000014.html +36 -36
- data/ref/ruby/classes/{RubyVPI.html → RubyVpi.html} +6 -6
- data/ref/ruby/classes/{RubyVPI.src → RubyVpi.src}/M000075.html +5 -5
- data/ref/ruby/classes/{RubyVPI.src → RubyVpi.src}/M000076.html +2 -2
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000070.html +2 -2
- data/ref/ruby/classes/Template.src/M000015.html +4 -4
- data/ref/ruby/classes/XX.html +4 -4
- data/ref/ruby/classes/XX/XHTML.html +5 -5
- data/ref/ruby/classes/XX/XHTML.src/{M000024.html → M000023.html} +0 -0
- data/ref/ruby/classes/XX/XHTML/Strict.html +5 -5
- data/ref/ruby/classes/XX/XHTML/Strict.src/{M000026.html → M000025.html} +0 -0
- data/ref/ruby/classes/XX/XHTML/Transitional.html +5 -5
- data/ref/ruby/classes/XX/XHTML/Transitional.src/{M000025.html → M000024.html} +0 -0
- data/ref/ruby/classes/XX/XMLish.html +5 -5
- data/ref/ruby/classes/XX/XMLish.src/{M000023.html → M000026.html} +0 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +7 -39
- data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +15 -15
- data/ref/ruby/files/bin/header_to_ruby_rb.html +12 -4
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +2 -7
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000002.html +6 -6
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/fr_class_index.html +1 -1
- data/ref/ruby/fr_method_index.html +10 -10
- data/samp/counter/counter_rspecTest_bench.rb +1 -1
- data/samp/counter/counter_rspecTest_proto.rb +1 -1
- data/samp/counter/counter_unitTest_bench.rb +1 -1
- data/samp/counter/counter_unitTest_proto.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
- metadata +183 -237
- data/doc/src/styles/manual.css +0 -87
- 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/glossary.html +0 -3
- data/doc/xhtml/images/COPYING +0 -67
- data/doc/xhtml/images/ChangeLog +0 -27
- 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 +0 -15
- data/doc/xhtml/images/caution.png +0 -0
- data/doc/xhtml/images/caution.svg +0 -290
- data/doc/xhtml/images/copyright +0 -55
- data/doc/xhtml/images/draft.png +0 -0
- data/doc/xhtml/images/home.png +0 -0
- data/doc/xhtml/images/home.svg +0 -386
- data/doc/xhtml/images/important.png +0 -0
- data/doc/xhtml/images/important.svg +0 -163
- data/doc/xhtml/images/next.png +0 -0
- data/doc/xhtml/images/next.svg +0 -191
- data/doc/xhtml/images/note.png +0 -0
- data/doc/xhtml/images/note.svg +0 -483
- data/doc/xhtml/images/prev.png +0 -0
- data/doc/xhtml/images/prev.svg +0 -852
- data/doc/xhtml/images/tip.png +0 -0
- data/doc/xhtml/images/tip.svg +0 -1145
- 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 +0 -195
- data/doc/xhtml/images/warning.png +0 -0
- data/doc/xhtml/images/warning.svg +0 -334
data/HEADER
CHANGED
@@ -9,8 +9,9 @@ Ruby-VPI is a "Ruby interface":http://ruby-lang.org to "Verilog VPI":http://ieee
|
|
9
9
|
h2. Features
|
10
10
|
|
11
11
|
* Prototype and verify designs _quickly_ using "BDD(behavior-driven development)":http://behaviour-driven.org/, "TDD(test-driven development)":http://www.agiledata.org/essays/tdd.html, and more.
|
12
|
-
* Specifications are executable _and_ human-readable. (See this <a href="./doc/usage.tutorial.html#fig..counter_rspecTest_spec.rb">example specification</a> and its <a href="./doc/usage.tutorial.html#fig..test-proto.rspec">boss-friendly output</a>.)
|
13
12
|
* Reuse the _same_ specification to verify both prototype and design.
|
13
|
+
* Specifications are executable _and_ human-readable. (See this <a href="./doc/usage.tutorial.html#fig..counter_rspecTest_spec.rb">example specification</a> and its <a href="./doc/usage.tutorial.html#fig..test-proto.rspec">boss-friendly output</a>.)
|
14
|
+
|
14
15
|
|
15
16
|
* Utilize Ruby's power and elegance. ("Why choose Ruby?":http://www.ruby-doc.org/whyruby)
|
16
17
|
** Built-in support for unlimited length integers, regular expressions, networking, multi-threading, system calls, _ad infinium_!
|
@@ -38,7 +39,16 @@ h2. Features
|
|
38
39
|
</span>
|
39
40
|
</dt>
|
40
41
|
<dd>
|
41
|
-
<p>Complete documentation for users.
|
42
|
+
<p>Complete documentation for users. _Start here!_</p>
|
43
|
+
</dd>
|
44
|
+
|
45
|
+
<dt>
|
46
|
+
<span class="term">
|
47
|
+
<a href="./ref/" target="_top">Reference</a>
|
48
|
+
</span>
|
49
|
+
</dt>
|
50
|
+
<dd>
|
51
|
+
<p>API reference documentation for Ruby libraries and C extension.</p>
|
42
52
|
</dd>
|
43
53
|
|
44
54
|
<dt>
|
@@ -53,9 +63,10 @@ Access project facilities, hosted generously by <a href="http://rubyforge.org" t
|
|
53
63
|
RubyForge</a>.
|
54
64
|
</p>
|
55
65
|
</dd>
|
66
|
+
|
56
67
|
<dt>
|
57
68
|
<span class="term">
|
58
|
-
<a href="http://rubyforge.org/
|
69
|
+
<a href="http://rubyforge.org/tracker/?group_id=1339" target="_top">
|
59
70
|
Tracker</a>
|
60
71
|
</span>
|
61
72
|
</dt>
|
@@ -63,6 +74,7 @@ Tracker</a>
|
|
63
74
|
<p>
|
64
75
|
Report problems, contribute patches, and more.</p>
|
65
76
|
</dd>
|
77
|
+
|
66
78
|
<dt>
|
67
79
|
<span class="term">
|
68
80
|
<a href="http://rubyforge.org/frs/?group_id=1339" target="_top">
|
@@ -73,9 +85,10 @@ Releases</a>
|
|
73
85
|
<p>
|
74
86
|
Download the newest releases.</p>
|
75
87
|
</dd>
|
88
|
+
|
76
89
|
<dt>
|
77
90
|
<span class="term">
|
78
|
-
<a href="http://rubyforge.org/
|
91
|
+
<a href="http://ruby-vpi.rubyforge.org/src/ruby-vpi" target="_top">
|
79
92
|
Sources</a>
|
80
93
|
</span>
|
81
94
|
</dt>
|
@@ -83,6 +96,7 @@ Sources</a>
|
|
83
96
|
<p>
|
84
97
|
Browse or access the source code repository.</p>
|
85
98
|
</dd>
|
99
|
+
|
86
100
|
<dt>
|
87
101
|
<span class="term">
|
88
102
|
<a href="http://rubyforge.org/forum/?group_id=1339" target="_top">
|
@@ -93,6 +107,7 @@ Forums</a>
|
|
93
107
|
<p>
|
94
108
|
Ask for help, give feedback, or discuss.</p>
|
95
109
|
</dd>
|
110
|
+
|
96
111
|
</dl>
|
97
112
|
</div>
|
98
113
|
</div>
|
data/HISTORY
CHANGED
@@ -12,11 +12,44 @@ We _strictly_ follow the RubyGems project's "rational versioning policy":http://
|
|
12
12
|
fn1. C. Gross, "Explaining Open Source Version Numbers", [Online document], 2005 Nov 28, [cited 2006 Aug 27], Available HTTP: "http://ablog.apress.com/?p=738":http://ablog.apress.com/?p=738
|
13
13
|
|
14
14
|
|
15
|
+
h1. Version 8.0.0 (2006-10-13)
|
16
|
+
|
17
|
+
h2. Summary
|
18
|
+
|
19
|
+
This release renames some identifiers for consistency, updates the documentation, and improves integration with RubyGems.
|
20
|
+
|
21
|
+
h2. Notice
|
22
|
+
|
23
|
+
* The @RubyVPI@ module has been renamed to @RubyVpi@.
|
24
|
+
|
25
|
+
* The @PROTO@ environment variable has been renamed to @PROTOTYPE@.
|
26
|
+
** In addition to using @unset@, you can now disable simulation of the prototype by assigning an empty value to this variable.
|
27
|
+
|
28
|
+
h2. Details
|
29
|
+
|
30
|
+
* We now use "Darcs":http://darcs.net for revision control, instead of Subversion. The source repository can now be accessed at "http://ruby-vpi.rubyforge.org/src/ruby-vpi":http://ruby-vpi.rubyforge.org/src/ruby-vpi.
|
31
|
+
|
32
|
+
* The source code is now distributed in tar.gz and zip form, in addition to gem.
|
33
|
+
|
34
|
+
* Some identifiers have been renamed for better consistency.
|
35
|
+
|
36
|
+
* The user manual now resides directly within the @doc/@ directory.
|
37
|
+
** The integration of documentation in @gem_server@ has been improved.
|
38
|
+
|
39
|
+
* The glossary and tutorial in the user manual have been revised.
|
40
|
+
|
41
|
+
|
15
42
|
h1. Version 7.3.0 (2006-09-30)
|
16
43
|
|
17
44
|
h2. Summary
|
18
45
|
|
19
|
-
This release fixes a bug in generated Verilog benches
|
46
|
+
This release fixes a bug in generated Verilog benches, includes parsed constants in generated tests, and adds new methods to handles.
|
47
|
+
|
48
|
+
h2. Notice
|
49
|
+
|
50
|
+
* Handles now have two new methods:
|
51
|
+
** @handle.x?@ -- checks if the logic value is "don't care"
|
52
|
+
** @handle.z?@ -- checks if the logic value is high impedance
|
20
53
|
|
21
54
|
h2. Details
|
22
55
|
|
data/MEMO
CHANGED
@@ -13,8 +13,6 @@ h1. Pending tasks
|
|
13
13
|
* GHDL simulator supports VPI
|
14
14
|
** need way to invoke VPI tasks from VHDL, like @$ruby_init();@
|
15
15
|
|
16
|
-
* smarter test generation, which adjusts to user modifications in previously generated output
|
17
|
-
|
18
16
|
|
19
17
|
h1. Finished tasks
|
20
18
|
|
@@ -40,3 +38,5 @@ h1. Obsolete tasks
|
|
40
38
|
|
41
39
|
* file bug report for Icarus 0.8 (l0_dcache)
|
42
40
|
** try new icarus snapshot
|
41
|
+
|
42
|
+
* smarter test generation, which adjusts to user modifications in previously generated output -- just use a smart merging tool like *kdiff3*
|
data/README
CHANGED
@@ -1,9 +1,22 @@
|
|
1
1
|
h1. Getting started
|
2
2
|
|
3
|
-
* See the "user manual":./doc
|
3
|
+
* See the "user manual":./doc to begin using Ruby-VPI.
|
4
4
|
|
5
5
|
* See the "release history":./history.html to see what is new in this release.
|
6
6
|
|
7
7
|
* See API documentation for the "C extension":./ref/c or "Ruby-VPI libraries":./ref/ruby.
|
8
8
|
|
9
9
|
* Visit the "project website":http://ruby-vpi.rubyforge.org for additional resources.
|
10
|
+
|
11
|
+
|
12
|
+
h1. Compiling from source
|
13
|
+
|
14
|
+
In addition to the "normal requirements":./doc/usage.requirements.html, you need the following software to compile from source:
|
15
|
+
|
16
|
+
* "DocBook-XML":http://www.docbook.org/
|
17
|
+
** xsltproc
|
18
|
+
** xmlto
|
19
|
+
* "RedCloth":http://rubyforge.org/projects/redcloth/
|
20
|
+
* "SWIG":http://www.swig.org/
|
21
|
+
|
22
|
+
Once you have satisfied these requirements, you can run @rake release@ to build the release packages. Also, see the output of @rake -T@ for more build options.
|
data/Rakefile
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
|
21
21
|
require 'rake/clean'
|
22
22
|
require 'rake/rdoctask'
|
23
|
+
require 'rake/gempackagetask'
|
23
24
|
|
24
25
|
require 'tempfile'
|
25
26
|
require 'rbconfig'
|
@@ -35,6 +36,9 @@ PROJECT_SUMMARY = "Ruby interface to Verilog VPI."
|
|
35
36
|
PROJECT_DETAIL = "#{PROJECT_NAME} is a #{PROJECT_SUMMARY}. It lets you create complex Verilog test benches easily and wholly in Ruby."
|
36
37
|
PROJECT_SSH_URL = "snk@rubyforge.org:/var/www/gforge-projects/#{PROJECT_ID}"
|
37
38
|
|
39
|
+
File.read('HISTORY') =~ /Version\s+([\d\.]+)\s*\((.*?)\)/
|
40
|
+
PROJECT_VERSION = $1
|
41
|
+
PROJECT_BIRTHDAY = $2
|
38
42
|
|
39
43
|
|
40
44
|
# Returns a temporary, unique path ready for use. No file exists at the returned path.
|
@@ -43,23 +47,9 @@ def generate_temp_path
|
|
43
47
|
path
|
44
48
|
end
|
45
49
|
|
46
|
-
# uploads the given sources
|
47
|
-
def
|
48
|
-
|
49
|
-
mkdir tmpDir
|
50
|
-
|
51
|
-
tmpSources = aSources.map do |src|
|
52
|
-
cp_r src, tmpDir, :preserve => true
|
53
|
-
File.join(tmpDir, File.basename(src))
|
54
|
-
end
|
55
|
-
|
56
|
-
# remove SVN meta-data from sources
|
57
|
-
sh "find #{tmpDir} -name .svn | xargs rm -rf"
|
58
|
-
|
59
|
-
# upload sources
|
60
|
-
sh 'scp', '-Cr', *(tmpSources + [aDestUrl])
|
61
|
-
|
62
|
-
rm_rf tmpDir
|
50
|
+
# uploads the given sources to the given destination URL
|
51
|
+
def upload aDestUrl, *aSources
|
52
|
+
sh 'scp', '-Cr', aSources, aDestUrl
|
63
53
|
end
|
64
54
|
|
65
55
|
|
@@ -67,7 +57,8 @@ end
|
|
67
57
|
task :default => :build
|
68
58
|
|
69
59
|
task :clobber do |t|
|
70
|
-
files = FileList['**/Rakefile'].
|
60
|
+
files = FileList['**/Rakefile'].exclude('_darcs')
|
61
|
+
files.shift # avoid infinite loop on _this_ file
|
71
62
|
|
72
63
|
files.each do |f|
|
73
64
|
cd File.dirname(f) do
|
@@ -208,21 +199,21 @@ end
|
|
208
199
|
|
209
200
|
|
210
201
|
desc 'Publish documentation to website.'
|
211
|
-
task :web => [:
|
202
|
+
task :web => [:web_info, :web_ref, :web_doc]
|
212
203
|
|
213
204
|
desc "Publish distribution info."
|
214
|
-
task :
|
215
|
-
|
205
|
+
task :web_info => ['style.css', *distDocs] do |t|
|
206
|
+
upload PROJECT_SSH_URL, *t.prerequisites
|
216
207
|
end
|
217
208
|
|
218
209
|
desc "Publish reference documentation."
|
219
210
|
task :web_ref => 'ref' do |t|
|
220
|
-
|
211
|
+
upload PROJECT_SSH_URL, *t.prerequisites
|
221
212
|
end
|
222
213
|
|
223
214
|
desc "Publish user documentation."
|
224
215
|
task :web_doc => :doc do |t|
|
225
|
-
|
216
|
+
upload PROJECT_SSH_URL, *t.prerequisites
|
226
217
|
end
|
227
218
|
|
228
219
|
desc 'Connect to website FTP.'
|
@@ -232,56 +223,38 @@ end
|
|
232
223
|
|
233
224
|
|
234
225
|
desc "Generate release packages."
|
235
|
-
task :
|
236
|
-
|
237
|
-
|
238
|
-
releaseVersion = $1
|
239
|
-
puts "release version is: #{releaseVersion}"
|
240
|
-
|
241
|
-
mkdir tmpDir = generate_temp_path
|
242
|
-
cp_r '.', tmpDir
|
243
|
-
|
244
|
-
cd tmpDir do
|
245
|
-
# clean up
|
246
|
-
sh "svn st | awk '/^\\?/ {print $2}' | xargs rm -rf"
|
247
|
-
sh "svn up"
|
248
|
-
sh "find -name .svn | xargs rm -rf"
|
249
|
-
|
250
|
-
sh "rake dist"
|
251
|
-
|
252
|
-
# make gem package
|
253
|
-
spec = Gem::Specification.new do |s|
|
254
|
-
s.name = s.rubyforge_project = PROJECT_ID
|
255
|
-
s.summary = PROJECT_SUMMARY
|
256
|
-
s.description = PROJECT_DETAIL
|
257
|
-
s.homepage = PROJECT_URL
|
258
|
-
s.version = releaseVersion
|
259
|
-
|
260
|
-
s.add_dependency 'rspec', '>= 0.5.4'
|
261
|
-
s.add_dependency 'rake', '>= 0.7.0'
|
262
|
-
s.add_dependency 'rcov', '>= 0.7.0'
|
263
|
-
|
264
|
-
s.requirements << "POSIX threads library"
|
265
|
-
s.requirements << "C language compiler"
|
266
|
-
|
267
|
-
s.files = FileList['**/*']
|
268
|
-
s.autorequire = PROJECT_ID
|
269
|
-
s.executables = FileList['bin/*'].select {|f| File.executable?( f ) && File.file?( f )}.map {|f| File.basename f}
|
270
|
-
s.extensions << t.prerequisites[1]
|
271
|
-
end
|
226
|
+
task :release => [:clobber, :dist] do
|
227
|
+
sh 'rake package'
|
228
|
+
end
|
272
229
|
|
273
|
-
|
274
|
-
|
230
|
+
spec = Gem::Specification.new do |s|
|
231
|
+
s.name = s.rubyforge_project = PROJECT_ID
|
232
|
+
s.summary = PROJECT_SUMMARY
|
233
|
+
s.description = PROJECT_DETAIL
|
234
|
+
s.homepage = PROJECT_URL
|
235
|
+
s.version = PROJECT_VERSION
|
275
236
|
|
276
|
-
|
277
|
-
|
237
|
+
s.add_dependency 'rspec', '>= 0.5.4'
|
238
|
+
s.add_dependency 'rake', '>= 0.7.0'
|
239
|
+
s.add_dependency 'rcov', '>= 0.7.0'
|
240
|
+
|
241
|
+
s.requirements << "POSIX threads library"
|
242
|
+
s.requirements << "C language compiler"
|
243
|
+
|
244
|
+
s.files = FileList['**/*'].exclude('_darcs')
|
245
|
+
s.autorequire = PROJECT_ID
|
246
|
+
s.executables = FileList['bin/*'].select {|f| File.executable?( f ) && File.file?( f )}.map {|f| File.basename f}
|
247
|
+
s.extensions << 'gem_extconf.rb'
|
248
|
+
end
|
278
249
|
|
279
|
-
|
250
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
251
|
+
pkg.need_zip = true
|
252
|
+
pkg.need_tar = true
|
280
253
|
end
|
281
254
|
|
282
255
|
|
283
256
|
desc "Configures the gem during installation."
|
284
|
-
task :
|
257
|
+
task :gem_config_inst => 'readme.html' do |t|
|
285
258
|
# make documentation available to gem_server
|
286
259
|
gemDir = File.dirname(__FILE__)
|
287
260
|
gemName = File.basename(gemDir)
|
data/bin/generate_test.rb
CHANGED
@@ -1,25 +1,7 @@
|
|
1
1
|
#!/usr/bin/ruby -w
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# Runner:: Written in Rake, this file builds and runs the test bench.
|
7
|
-
#
|
8
|
-
# Bench:: Written in Verilog and Ruby, these files define the testing environment.
|
9
|
-
#
|
10
|
-
# Design:: Written in Ruby, this file provides an interface to the Verilog module under test.
|
11
|
-
#
|
12
|
-
# Prototype:: Written in Ruby, this file defines a prototype of the design under test.
|
13
|
-
#
|
14
|
-
# Specification:: Written in Ruby, this file verifies the design.
|
15
|
-
#
|
16
|
-
# The reason for dividing a single test into these parts is mainly to decouple the design from the specification. This allows humans to focus on writing the specification while the remainder is automatically generated by this tool.
|
17
|
-
#
|
18
|
-
# For example, when the interface of a Verilog module changes, you would simply re-run this tool to incorporate those changes into the test without diverting your focus from the specification.
|
19
|
-
#
|
20
|
-
# == Notes
|
21
|
-
# * If no input files are specified, then the standard input stream will be read instead.
|
22
|
-
# * The first signal parameter in a module's declaration is assumed to be the clocking signal.
|
2
|
+
# Generates Ruby-VPI tests from Verilog 2001 module declarations.
|
3
|
+
# * If no input files are specified, then the standard input stream is assumed to be the input.
|
4
|
+
# * The first input signal in a module's declaration is assumed to be the clocking signal.
|
23
5
|
# * Existing output files will be backed-up before being over-written. A backed-up file has a tilde (~) appended to its name.
|
24
6
|
|
25
7
|
=begin
|
@@ -119,7 +101,7 @@ class OutputInfo
|
|
119
101
|
@specPath = @specName + RUBY_EXT
|
120
102
|
|
121
103
|
@designClassName = aModuleName.to_ruby_const_name
|
122
|
-
@protoClassName = @designClassName + '
|
104
|
+
@protoClassName = @designClassName + 'Prototype'
|
123
105
|
@specClassName = @specName.to_ruby_const_name
|
124
106
|
|
125
107
|
@runnerName = aModuleName + @runnerSuffix
|
@@ -170,7 +152,7 @@ if File.basename($0) == File.basename(__FILE__)
|
|
170
152
|
|
171
153
|
opts.parse! ARGV
|
172
154
|
|
173
|
-
puts "Using name
|
155
|
+
puts "Using name #{optTestName.inspect} for generated test."
|
174
156
|
puts "Using #{optSpecFmt} specification format."
|
175
157
|
|
176
158
|
|
@@ -14,7 +14,7 @@ require 'ruby-vpi/rspec'
|
|
14
14
|
end
|
15
15
|
%>
|
16
16
|
|
17
|
-
|
17
|
+
RubyVpi.init_bench '<%= aModuleInfo.name + aOutputInfo.suffix %>', :<%= aOutputInfo.protoClassName %>
|
18
18
|
|
19
19
|
# service the $ruby_relay callback
|
20
20
|
<%
|
@@ -26,10 +26,10 @@ module <%= aOutputInfo.verilogBenchName %>;
|
|
26
26
|
instConfigDecl = make_inst_param_decl(aModuleInfo.parameters)
|
27
27
|
|
28
28
|
unless instConfigDecl.empty?
|
29
|
-
|
29
|
+
%>#(<%= instConfigDecl %>)<%
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
%> <%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
|
33
33
|
|
34
34
|
// connect to the Ruby side of this bench
|
35
35
|
initial begin
|
@@ -1,8 +1,13 @@
|
|
1
1
|
# A prototype of the design under test.
|
2
2
|
class <%= aOutputInfo.protoClassName %> < <%= aOutputInfo.designClassName %>
|
3
3
|
def simulate!
|
4
|
-
#
|
5
|
-
|
6
|
-
|
4
|
+
# discard old outputs
|
5
|
+
<% aModuleInfo.ports.reject { |p| p.input? }.each do |port| %>
|
6
|
+
@<%= port.name %>.hexStrVal = 'x'
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
# process new inputs
|
10
|
+
|
11
|
+
# produce new outputs
|
7
12
|
end
|
8
13
|
end
|
data/bin/header_to_ruby.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/ruby -w
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
2
|
+
# Transforms Verilog header files into Ruby.
|
3
|
+
# * If no input files are specified, then the standard input stream is assumed to be the input.
|
4
|
+
# * The resulting output is emitted to the standard output stream.
|
5
5
|
|
6
6
|
=begin
|
7
7
|
Copyright 2006 Suraj N. Kurapati
|
data/doc/Rakefile
CHANGED
@@ -21,35 +21,18 @@
|
|
21
21
|
require 'rake/clean'
|
22
22
|
|
23
23
|
FORMATS = {
|
24
|
-
#
|
25
|
-
'html' =>
|
26
|
-
'text' =>
|
24
|
+
# format => xsltproc flag
|
25
|
+
'html' => 'xhtml',
|
26
|
+
'text' => 'txt',
|
27
27
|
}
|
28
28
|
|
29
29
|
task :default => FORMATS.keys
|
30
30
|
|
31
|
-
FORMATS.each_pair do |
|
32
|
-
desc "Generate documentation in #{
|
33
|
-
|
34
|
-
sh %{xmlto #{
|
31
|
+
FORMATS.each_pair do |fmt, flag|
|
32
|
+
desc "Generate documentation in #{fmt} format."
|
33
|
+
task fmt => ['src/manual.xml', 'src/manual.xsl'] do |t|
|
34
|
+
sh %{xmlto #{flag} -m #{t.prerequisites[1]} #{t.prerequisites[0]}}
|
35
35
|
end
|
36
|
-
|
37
|
-
CLOBBER.include fmtFlag
|
38
|
-
|
39
|
-
task fmtName => fmtFlag
|
40
|
-
|
41
|
-
# copy additional resources to output directory
|
42
|
-
if needsResources
|
43
|
-
FileList['src/*/'].each do |path|
|
44
|
-
dst = File.join(fmtFlag, File.basename(path))
|
45
|
-
|
46
|
-
file dst => [path, fmtFlag] do
|
47
|
-
cp_r path, dst
|
48
|
-
end
|
49
|
-
|
50
|
-
CLEAN.include dst
|
51
|
-
|
52
|
-
task fmtName => dst
|
53
|
-
end
|
54
|
-
end
|
55
36
|
end
|
37
|
+
|
38
|
+
CLOBBER.include '*.html', '*.txt'
|