ruby-vpi 13.0.0 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +6 -1
- data/bin/generate_test_tpl/bench.rb +84 -1
- data/bin/generate_test_tpl/bench.v +8 -17
- data/bin/generate_test_tpl/proto.rb +1 -1
- data/doc/common.css +14 -41
- data/doc/common.tpl +1 -1
- data/doc/figures/figures.dia +274 -753
- data/doc/figures/organization_detailed.png +0 -0
- data/doc/figures/ruby_relay.png +0 -0
- data/doc/history.html +363 -276
- data/doc/history.yml +40 -0
- data/doc/intro.inc +37 -15
- data/doc/lib/doc_proxy.rb +24 -4
- data/doc/manual.doc +345 -196
- data/doc/manual.html +741 -497
- data/doc/memo.doc +15 -15
- data/doc/memo.html +28 -27
- data/doc/readme.doc +2 -2
- data/doc/readme.html +51 -15
- data/doc/rss.erb +1 -1
- data/doc/rss.xml +1624 -31
- data/ext/Rakefile +1 -6
- data/ext/main.c +8 -3
- data/ext/main.h +5 -0
- data/ext/relay.c +12 -12
- data/ext/relay.h +1 -6
- data/ext/swig_vpi.i +2 -2
- data/ext/swig_wrap.cin +37 -20
- data/ext/verilog.h +2 -2
- data/ext/vlog.c +10 -3
- data/ext/vlog.h +4 -4
- data/lib/ruby-vpi/vpi.rb +114 -0
- data/lib/ruby-vpi.rb +21 -59
- 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_0x6d.html +3 -2
- data/ref/c/globals_0x70.html +1 -1
- data/ref/c/globals_0x72.html +4 -5
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +4 -2
- 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 +8 -7
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +3 -2
- data/ref/c/index.html +1 -1
- data/ref/c/main_8c.html +26 -1
- data/ref/c/main_8h.html +26 -1
- data/ref/c/relay_8c.html +11 -35
- data/ref/c/relay_8h.html +3 -27
- 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/verilog_8h.html +5 -5
- data/ref/c/vlog_8c.html +44 -6
- data/ref/c/vlog_8h.html +7 -8
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000041.html → M000045.html} +0 -0
- data/ref/ruby/classes/RubyVpi.html +10 -28
- data/ref/ruby/classes/RubyVpi.src/M000029.html +101 -124
- data/ref/ruby/classes/Vpi/Handle.html +56 -56
- data/ref/ruby/classes/Vpi/Handle.src/M000034.html +5 -9
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +5 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +9 -11
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +44 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +74 -55
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +30 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +24 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +68 -0
- data/ref/ruby/classes/Vpi.html +149 -0
- data/ref/ruby/classes/Vpi.src/M000030.html +28 -0
- data/ref/ruby/classes/Vpi.src/M000031.html +18 -0
- data/ref/ruby/classes/Vpi.src/M000032.html +39 -0
- data/ref/ruby/classes/Vpi.src/M000033.html +22 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -2
- data/ref/ruby/fr_method_index.html +18 -14
- data/samp/counter/counter_rspec_bench.rb +81 -1
- data/samp/counter/counter_rspec_bench.v +5 -12
- data/samp/counter/counter_rspec_design.rb +1 -2
- data/samp/counter/counter_rspec_proto.rb +1 -1
- data/samp/counter/counter_rspec_spec.rb +3 -3
- data/samp/counter/counter_xunit_bench.rb +81 -1
- data/samp/counter/counter_xunit_bench.v +5 -12
- data/samp/counter/counter_xunit_design.rb +1 -2
- data/samp/counter/counter_xunit_proto.rb +1 -1
- data/samp/counter/counter_xunit_spec.rb +3 -3
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +81 -1
- data/samp/pipelined_alu/hw5_unit_test_bench.v +11 -18
- data/samp/pipelined_alu/hw5_unit_test_design.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +1 -1
- metadata +12 -9
- data/doc/figures/ruby_init.png +0 -0
- data/ext/swig_vpi.h +0 -924
- data/ref/ruby/classes/Vpi/Handle.src/M000030.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000031.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000032.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000033.html +0 -18
data/doc/memo.doc
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
h1. Pending tasks
|
2
2
|
|
3
|
-
* add support for VPI callbacks which execute Ruby blocks
|
4
|
-
|
5
3
|
* add support for reading & writing VPI delay values
|
6
4
|
|
7
5
|
* GHDL simulator supports VPI
|
8
|
-
** need way to invoke VPI tasks from VHDL, like @$ruby_init()
|
9
|
-
|
10
|
-
* need to dump signal values when expectation fails in rSpec
|
11
|
-
** maybe a waveform dump will also help
|
12
|
-
** this will help in debugging the problem
|
6
|
+
** -need way to invoke VPI tasks from VHDL, like @$ruby_init();@-
|
7
|
+
No need for tasks; Ruby-VPI uses callbacks now!
|
13
8
|
|
14
9
|
* add instructions for using *ruby-debug* with a graphical debugging tool or IDE like RadRails
|
15
10
|
|
11
|
+
* write section about code coverage and prototyping in manual
|
12
|
+
|
13
|
+
* clean up the teriminology section... unnecessary
|
14
|
+
|
16
15
|
|
17
16
|
h1. Finished tasks
|
18
17
|
|
@@ -40,16 +39,17 @@ h1. Finished tasks
|
|
40
39
|
|
41
40
|
* make RCov correctly profile the code and report useful coverage metrics...
|
42
41
|
|
42
|
+
* add support for VPI callbacks which execute Ruby blocks
|
43
43
|
|
44
|
-
h1. Obsolete tasks
|
45
|
-
|
46
|
-
* smarter test generation, which adjusts to user modifications in previously generated output -- just use a smart merging tool like *kdiff3*
|
47
|
-
|
48
|
-
* interactive console IRB wrapper for spec (just like Breakpoints in Rails)
|
49
|
-
** use the *ruby-debug* library with "*debugger* command for breakpoints":http://www.datanoise.com/articles/category/ruby-debug instead!
|
50
44
|
|
45
|
+
h1. Obsolete tasks
|
51
46
|
|
52
|
-
|
47
|
+
* -smarter test generation, which adjusts to user modifications in previously generated output-
|
48
|
+
Just use a smart merging tool like *kdiff3*.
|
53
49
|
|
54
|
-
*
|
50
|
+
* -interactive console IRB wrapper for spec (just like Breakpoints in Rails)- Use the *ruby-debug* library with "*debugger* command for breakpoints":http://www.datanoise.com/articles/category/ruby-debug instead!
|
55
51
|
|
52
|
+
* -need to dump signal values when expectation fails in rSpec-
|
53
|
+
You can use the interactive debugger instead.
|
54
|
+
** -maybe a waveform dump will also help-
|
55
|
+
After reading some RTL verification books, this is not necessarily true.
|
data/doc/memo.html
CHANGED
@@ -12,10 +12,9 @@
|
|
12
12
|
|
13
13
|
<h1>Contents</h1>
|
14
14
|
<ul>
|
15
|
-
<li
|
16
|
-
<li
|
17
|
-
<li
|
18
|
-
<li><a href="#anchor4">Notes</a></li>
|
15
|
+
<li>1 <a href="#anchor1">Pending tasks</a></li>
|
16
|
+
<li>2 <a href="#anchor2">Finished tasks</a></li>
|
17
|
+
<li>3 <a href="#anchor3">Obsolete tasks</a></li>
|
19
18
|
</ul>
|
20
19
|
|
21
20
|
<h1>Admonitions</h1>
|
@@ -23,12 +22,7 @@
|
|
23
22
|
<h1>Formals</h1>
|
24
23
|
|
25
24
|
</div>
|
26
|
-
<h1 id="anchor1">Pending tasks</h1>
|
27
|
-
|
28
|
-
|
29
|
-
<ul>
|
30
|
-
<li>add support for <span class="caps">VPI</span> callbacks which execute Ruby blocks</li>
|
31
|
-
</ul>
|
25
|
+
<h1 id="anchor1">1 Pending tasks</h1>
|
32
26
|
|
33
27
|
|
34
28
|
<ul>
|
@@ -39,26 +33,28 @@
|
|
39
33
|
<ul>
|
40
34
|
<li><span class="caps">GHDL</span> simulator supports <span class="caps">VPI</span>
|
41
35
|
<ul>
|
42
|
-
<li>need way to invoke <span class="caps">VPI</span> tasks from <span class="caps">VHDL</span>, like <code class="code"><span style="color:#d70; font-weight:bold">$ruby_init</span>();</code></
|
36
|
+
<li><del>need way to invoke <span class="caps">VPI</span> tasks from <span class="caps">VHDL</span>, like <code class="code"><span style="color:#d70; font-weight:bold">$ruby_init</span>();</code></del>
|
37
|
+
No need for tasks; Ruby-VPI uses callbacks now!</li>
|
43
38
|
</ul></li>
|
44
39
|
</ul>
|
45
40
|
|
46
41
|
|
47
42
|
<ul>
|
48
|
-
<li>
|
43
|
+
<li>add instructions for using <strong>ruby-debug</strong> with a graphical debugging tool or <span class="caps">IDE</span> like RadRails</li>
|
44
|
+
</ul>
|
45
|
+
|
46
|
+
|
49
47
|
<ul>
|
50
|
-
<li>
|
51
|
-
<li>this will help in debugging the problem</li>
|
52
|
-
</ul></li>
|
48
|
+
<li>write section about code coverage and prototyping in manual</li>
|
53
49
|
</ul>
|
54
50
|
|
55
51
|
|
56
52
|
<ul>
|
57
|
-
<li>
|
53
|
+
<li>clean up the teriminology section… unnecessary</li>
|
58
54
|
</ul>
|
59
55
|
|
60
56
|
|
61
|
-
<h1 id="anchor2">Finished tasks</h1>
|
57
|
+
<h1 id="anchor2">2 Finished tasks</h1>
|
62
58
|
|
63
59
|
|
64
60
|
<ul>
|
@@ -121,27 +117,32 @@
|
|
121
117
|
</ul>
|
122
118
|
|
123
119
|
|
124
|
-
<h1 id="anchor3">Obsolete tasks</h1>
|
125
|
-
|
126
|
-
|
127
120
|
<ul>
|
128
|
-
<li>
|
121
|
+
<li>add support for <span class="caps">VPI</span> callbacks which execute Ruby blocks</li>
|
129
122
|
</ul>
|
130
123
|
|
131
124
|
|
125
|
+
<h1 id="anchor3">3 Obsolete tasks</h1>
|
126
|
+
|
127
|
+
|
132
128
|
<ul>
|
133
|
-
<li>
|
134
|
-
|
135
|
-
<li>use the <strong>ruby-debug</strong> library with <a href="http://www.datanoise.com/articles/category/ruby-debug"><strong>debugger</strong> command for breakpoints</a> instead!</li>
|
136
|
-
</ul></li>
|
129
|
+
<li><del>smarter test generation, which adjusts to user modifications in previously generated output</del>
|
130
|
+
Just use a smart merging tool like <strong>kdiff3</strong>.</li>
|
137
131
|
</ul>
|
138
132
|
|
139
133
|
|
140
|
-
<
|
134
|
+
<ul>
|
135
|
+
<li><del>interactive console <span class="caps">IRB</span> wrapper for spec (just like Breakpoints in Rails)</del> Use the <strong>ruby-debug</strong> library with <a href="http://www.datanoise.com/articles/category/ruby-debug"><strong>debugger</strong> command for breakpoints</a> instead!</li>
|
136
|
+
</ul>
|
141
137
|
|
142
138
|
|
143
139
|
<ul>
|
144
|
-
<li>
|
140
|
+
<li><del>need to dump signal values when expectation fails in rSpec</del>
|
141
|
+
You can use the interactive debugger instead.
|
142
|
+
<ul>
|
143
|
+
<li><del>maybe a waveform dump will also help</del>
|
144
|
+
After reading some <span class="caps">RTL</span> verification books, this is not necessarily true.</li>
|
145
|
+
</ul></li>
|
145
146
|
</ul>
|
146
147
|
</body>
|
147
148
|
</html>
|
data/doc/readme.doc
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
<% table_of_contents = false %>
|
2
2
|
<div id="navigation">
|
3
3
|
|
4
|
+
<a type="application/rss+xml" href="<%= RSS_URL %>">!images/feed-icon.png(<%= RSS_INFO %>)!</a>
|
5
|
+
|
4
6
|
* "Tutorial":manual.html#usage.tutorial
|
5
7
|
- learn how to use Ruby-VPI quickly.
|
6
8
|
|
@@ -40,7 +42,5 @@
|
|
40
42
|
|
41
43
|
|
42
44
|
h1. Welcome to Ruby-VPI
|
43
|
-
<a type="application/rss+xml" href="<%= RSS_URL %>">!images/feed-icon.png(<%= RSS_INFO %>)!</a>
|
44
|
-
|
45
45
|
|
46
46
|
<%= File.read 'intro.inc' %>
|
data/doc/readme.html
CHANGED
@@ -9,6 +9,9 @@
|
|
9
9
|
<body>
|
10
10
|
<div id="navigation">
|
11
11
|
|
12
|
+
<p><a type="application/rss+xml" href="http://ruby-vpi.rubyforge.org/doc/rss.xml"><img src="images/feed-icon.png" title="RSS feed for this project." alt="RSS feed for this project." /></a></p>
|
13
|
+
|
14
|
+
|
12
15
|
<ul>
|
13
16
|
<li><a href="manual.html#usage.tutorial">Tutorial</a>
|
14
17
|
– learn how to use Ruby-VPI quickly.</li>
|
@@ -71,16 +74,16 @@
|
|
71
74
|
|
72
75
|
</div>
|
73
76
|
|
74
|
-
<h1 id="
|
75
|
-
<a type="application/rss+xml" href="http://ruby-vpi.rubyforge.org/doc/rss.xml"><img src="images/feed-icon.png" title="RSS feed for this project." alt="RSS feed for this project." /></a></h1>
|
77
|
+
<h1 id="anchor122">1 Welcome to Ruby-VPI</h1>
|
76
78
|
|
77
79
|
|
78
|
-
<
|
79
|
-
|
80
|
-
|
80
|
+
<p>Ruby-VPI is a <a href="http://www.ruby-lang.org">Ruby</a> interface to <a href="http://ieeexplore.ieee.org/xpl/standardstoc.jsp?isnumber=33945"><span class="caps">IEEE 1364</span>-2005 Verilog <span class="caps">VPI</span></a>. It lets you create complex Verilog test benches easily and wholly in Ruby.</p>
|
81
|
+
|
82
|
+
|
83
|
+
<h2 id="intro.features">1.1 Features</h2>
|
81
84
|
|
82
85
|
|
83
|
-
<
|
86
|
+
<h3 id="anchor123">1.1.1 Portable</h3>
|
84
87
|
|
85
88
|
|
86
89
|
<ul>
|
@@ -91,11 +94,14 @@
|
|
91
94
|
<ul>
|
92
95
|
<li>Works with all <a href="manual.html#setup.reqs">major Verilog simulators</a> available today.
|
93
96
|
<ul>
|
94
|
-
<li>
|
97
|
+
<li>Compiled <em>just once</em> during <a href="manual.html#setup.installation">installation</a> and used forever!</li>
|
95
98
|
</ul></li>
|
96
99
|
</ul>
|
97
100
|
|
98
101
|
|
102
|
+
<h3 id="anchor124">1.1.2 Agile</h3>
|
103
|
+
|
104
|
+
|
99
105
|
<ul>
|
100
106
|
<li>Enables <a href="http://agilemanifesto.org/">agile practices</a> such as
|
101
107
|
<ul>
|
@@ -109,14 +115,18 @@
|
|
109
115
|
<ul>
|
110
116
|
<li>Eliminates unneccesary work:
|
111
117
|
<ul>
|
112
|
-
<li><a href="manual.html#usage.tutorial.specification">Specifications</a> are
|
118
|
+
<li><a href="manual.html#usage.tutorial.specification">Specifications</a> are readable, portable, and <em>executable</em>.</li>
|
113
119
|
<li>The <a href="manual.html#usage.tools.generate-test">automated test generator</a> helps you accomodate design changes with <em>minimal</em> effort.</li>
|
120
|
+
<li>There is absolutely <em>no compiling</em>!</li>
|
114
121
|
</ul></li>
|
115
122
|
</ul>
|
116
123
|
|
117
124
|
|
125
|
+
<h3 id="anchor125">1.1.3 Powerful</h3>
|
126
|
+
|
127
|
+
|
118
128
|
<ul>
|
119
|
-
<li>
|
129
|
+
<li>Inherits the <a href="http://www.ruby-lang.org/en/about/">power and elegance</a> of Ruby:
|
120
130
|
<ul>
|
121
131
|
<li>Unlimited length integers</li>
|
122
132
|
<li>Regular expressions</li>
|
@@ -127,29 +137,55 @@
|
|
127
137
|
</ul>
|
128
138
|
|
129
139
|
|
140
|
+
<ul>
|
141
|
+
<li>Uses <a href="http://rubyforge.org/projects/ruby-debug/">ruby-debug</a> for <a href="manual.html#usage.debugger">interactive debugging</a>.</li>
|
142
|
+
<li>Uses <a href="http://eigenclass.org/hiki.rb?rcov">rcov</a> for test <a href="manual.html#usage.test-runner.env-vars">coverage analysis and report generation</a>.</li>
|
143
|
+
</ul>
|
144
|
+
|
145
|
+
|
146
|
+
<h3 id="anchor126">1.1.4 Free</h3>
|
147
|
+
|
148
|
+
|
130
149
|
<ul>
|
131
150
|
<li>Gives you the <em>freedom</em> to study, modify, and distribute this software, in accordance with the <a href="http://www.gnu.org/copyleft/gpl.html"><span class="caps">GNU</span> General Public License</a>.</li>
|
132
151
|
</ul>
|
133
152
|
|
134
153
|
|
135
|
-
<
|
154
|
+
<h2 id="intro.applications">1.2 Applications</h2>
|
155
|
+
|
156
|
+
|
157
|
+
<p>Here is a modest sampling of tasks that Ruby-VPI can be used to perform.</p>
|
136
158
|
|
137
159
|
|
138
|
-
<
|
160
|
+
<ul>
|
161
|
+
<li>From the second edition of <a href="http://www.sutherland-hdl.com/publications.html"><em>The Verilog <span class="caps">PLI</span> Handbook</em></a>:
|
162
|
+
<ul>
|
163
|
+
<li>C language bus-functional models</li>
|
164
|
+
<li>Reading test vector files</li>
|
165
|
+
<li>Delay calculation</li>
|
166
|
+
<li>Custom output displays</li>
|
167
|
+
<li>Co-simulation</li>
|
168
|
+
<li>Design debug utilities</li>
|
169
|
+
<li>Simulation analysis</li>
|
170
|
+
</ul></li>
|
171
|
+
</ul>
|
139
172
|
|
140
173
|
|
174
|
+
<ul>
|
175
|
+
<li>Adapted from <a href="http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/">Pin Hong’s</a> observations:
|
141
176
|
<ul>
|
142
177
|
<li>Writing hardware models in Ruby</li>
|
143
|
-
<li>Dumping
|
144
|
-
<li>Dumping
|
178
|
+
<li>Dumping or processing netlist data from Verilog database</li>
|
179
|
+
<li>Dumping or processing simulation data</li>
|
145
180
|
<li>Feeding dynamic simulation stimuli</li>
|
146
181
|
<li>Back-annotating delay information</li>
|
147
182
|
<li>Interactive logic simulation</li>
|
148
183
|
<li>Building a distributed simulation</li>
|
184
|
+
</ul></li>
|
149
185
|
</ul>
|
150
186
|
|
151
187
|
|
152
|
-
<
|
188
|
+
<h2 id="intro.appetizers">1.3 Appetizers</h2>
|
153
189
|
|
154
190
|
|
155
191
|
<p>Here is a modest sampling of code to whet your appetite.</p>
|
@@ -191,7 +227,7 @@
|
|
191
227
|
|
192
228
|
|
193
229
|
<blockquote>
|
194
|
-
<p><code class="code"><span style="color:#00D; font-weight:bold">15</span>.times {
|
230
|
+
<p><code class="code"><span style="color:#00D; font-weight:bold">15</span>.times { simulate }</code></p>
|
195
231
|
</blockquote>
|
196
232
|
</body>
|
197
233
|
</html>
|
data/doc/rss.erb
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
<title>Version <%= entry['Version'] %> released</title>
|
23
23
|
<link><%= link %></link>
|
24
24
|
<guid><%= link %></guid>
|
25
|
-
<description><%=ERB::Util.h entry
|
25
|
+
<description><%=ERB::Util.h format_history_entry(entry).to_html %></description>
|
26
26
|
<pubDate><%= rfc822 %></pubDate>
|
27
27
|
</item>
|
28
28
|
<% end %>
|