ruby-vpi 17.0.0 → 18.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +8 -6
- data/Rakefile +4 -4
- data/doc/common.css +6 -9
- data/doc/common.inc +3 -3
- data/doc/common.tpl +14 -6
- data/doc/history.html +152 -44
- data/doc/history.inc +55 -3
- data/doc/history.yaml +62 -2
- data/doc/intro.inc +20 -16
- data/doc/manual.doc +23 -9
- data/doc/manual.html +232 -200
- data/doc/memo.doc +7 -6
- data/doc/memo.html +28 -17
- data/doc/readme.doc +1 -1
- data/doc/readme.html +51 -35
- data/doc/rss.xml +96 -70
- data/ext/Rakefile +24 -11
- data/ext/swig_vpi.h +1 -1
- data/ext/swig_wrap.cin +17 -42
- data/lib/ruby-vpi/pli.tab +1 -0
- data/lib/ruby-vpi/runner.rb +34 -10
- data/lib/ruby-vpi/vpi.rb +483 -438
- 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 +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/index.html +1 -1
- data/ref/c/main_8c.html +1 -1
- data/ref/c/main_8h.html +1 -1
- data/ref/c/relay_8c.html +1 -1
- data/ref/c/relay_8h.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/verilog_8h.html +1 -1
- data/ref/c/vlog_8c.html +1 -1
- data/ref/c/vlog_8h.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000058.html → M000061.html} +0 -0
- data/ref/ruby/classes/String.html +24 -24
- data/ref/ruby/classes/String.src/M000022.html +23 -5
- data/ref/ruby/classes/String.src/M000023.html +28 -5
- data/ref/ruby/classes/String.src/M000024.html +5 -23
- data/ref/ruby/classes/String.src/M000025.html +5 -28
- data/ref/ruby/classes/Vpi/Handle.html +94 -49
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000043.html +7 -7
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +7 -7
- data/ref/ruby/classes/Vpi/Handle.src/M000045.html +8 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +36 -30
- data/ref/ruby/classes/Vpi/Handle.src/M000047.html +72 -67
- data/ref/ruby/classes/Vpi/Handle.src/M000048.html +6 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000049.html +19 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000050.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000051.html +16 -10
- data/ref/ruby/classes/Vpi/Handle.src/M000053.html +5 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000054.html +11 -76
- data/ref/ruby/classes/Vpi/Handle.src/M000056.html +31 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000057.html +40 -0
- data/ref/ruby/classes/Vpi/S_vpi_time.html +16 -16
- data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000055.html → M000058.html} +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000059.html +19 -0
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000032.html +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +4 -4
- data/ref/ruby/classes/Vpi.html +0 -7
- data/ref/ruby/classes/Vpi.src/M000029.html +14 -14
- data/ref/ruby/classes/Vpi.src/M000030.html +25 -24
- data/ref/ruby/classes/Vpi.src/M000031.html +6 -6
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/convert_rb.html +1 -1
- data/ref/ruby/files/bin/generate_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_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/runner_boot_loader_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 +1 -1
- data/ref/ruby/files/lib/ruby-vpi/util_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +8 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/fr_method_index.html +19 -16
- data/samp/register_file/register_file.v +1 -1
- data/samp/register_file/register_file_spec.rb +9 -5
- metadata +42 -38
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000056.html +0 -19
data/doc/memo.doc
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
<doc_proxy_include common.inc>
|
2
2
|
|
3
3
|
<% section "Pending tasks" do %>
|
4
|
-
* add
|
4
|
+
* add support for multiple Ruby prototypes so that you can do integration testing and ESL stuff
|
5
5
|
|
6
|
-
*
|
7
|
-
** need way to invoke VPI tasks from VHDL, like @$ruby_init();@
|
6
|
+
* add shortcuts for reading & writing VPI delay values
|
8
7
|
|
9
|
-
|
8
|
+
* add support for GHDL simulator (and thereby VHDL!) because it supports VPI
|
10
9
|
|
11
10
|
* add instructions for using *ruby-debug* with a graphical debugging tool or IDE like RadRails
|
12
11
|
|
13
12
|
* write section about code coverage and prototyping in manual
|
14
13
|
|
15
|
-
* clean up the teriminology section... unnecessary
|
16
|
-
|
17
14
|
* write unit tests for the non-VPI libraries like integer.rb and float.rb
|
18
15
|
<% end %>
|
19
16
|
|
@@ -44,6 +41,10 @@
|
|
44
41
|
* make RCov correctly profile the code and report useful coverage metrics...
|
45
42
|
|
46
43
|
* add support for VPI callbacks which execute Ruby blocks
|
44
|
+
|
45
|
+
* write section about code coverage and prototyping in manual
|
46
|
+
|
47
|
+
* clean up the teriminology section... unnecessary
|
47
48
|
<% end %>
|
48
49
|
|
49
50
|
|
data/doc/memo.html
CHANGED
@@ -8,10 +8,16 @@
|
|
8
8
|
<title>Pending tasks</title>
|
9
9
|
</head>
|
10
10
|
<body>
|
11
|
+
<div id="site-links">
|
12
|
+
<a href="readme.html">Home</a>
|
13
|
+
· <a href="manual.html">Manual</a>
|
14
|
+
· <a href="memo.html">Memo</a>
|
15
|
+
· <a href="history.html">History</a>
|
16
|
+
<hr style="display: none"/>
|
17
|
+
</div>
|
18
|
+
|
11
19
|
<div id="toc-links">
|
12
|
-
|
13
|
-
|
14
|
-
<a href="readme.html" style="color: green; font-size: larger;">Home page</a>
|
20
|
+
<a href="#toc:contents">Contents</a>
|
15
21
|
</div>
|
16
22
|
|
17
23
|
<div id="body"><p>
|
@@ -19,7 +25,7 @@
|
|
19
25
|
|
20
26
|
<div id="Pending_tasks" class="section">
|
21
27
|
<h1 class="title">
|
22
|
-
<a href="#a-
|
28
|
+
<a href="#a-607907898">1</a>
|
23
29
|
|
24
30
|
|
25
31
|
|
@@ -27,32 +33,27 @@
|
|
27
33
|
</h1>
|
28
34
|
|
29
35
|
<ul>
|
30
|
-
<li>add
|
36
|
+
<li>add support for multiple Ruby prototypes so that you can do integration testing and ESL stuff</li>
|
31
37
|
</ul>
|
32
38
|
|
33
39
|
|
34
40
|
<ul>
|
35
|
-
<li>
|
36
|
-
<ul>
|
37
|
-
<li>need way to invoke VPI tasks from VHDL, like <code class="code"><span style="color:#d70; font-weight:bold">$ruby_init</span>();</code>
|
38
|
-
|
39
|
-
<p><ins>No need for system tasks/functions. Ruby-VPI uses callbacks now!</ins></p></li>
|
40
|
-
</ul></li>
|
41
|
+
<li>add shortcuts for reading & writing VPI delay values</li>
|
41
42
|
</ul>
|
42
43
|
|
43
44
|
|
44
45
|
<ul>
|
45
|
-
<li>add
|
46
|
+
<li>add support for GHDL simulator (and thereby VHDL!) because it supports VPI</li>
|
46
47
|
</ul>
|
47
48
|
|
48
49
|
|
49
50
|
<ul>
|
50
|
-
<li>
|
51
|
+
<li>add instructions for using <strong>ruby-debug</strong> with a graphical debugging tool or IDE like RadRails</li>
|
51
52
|
</ul>
|
52
53
|
|
53
54
|
|
54
55
|
<ul>
|
55
|
-
<li>
|
56
|
+
<li>write section about code coverage and prototyping in manual</li>
|
56
57
|
</ul>
|
57
58
|
|
58
59
|
|
@@ -69,7 +70,7 @@
|
|
69
70
|
|
70
71
|
<div id="Finished_tasks" class="section">
|
71
72
|
<h1 class="title">
|
72
|
-
<a href="#a-
|
73
|
+
<a href="#a-607910698">2</a>
|
73
74
|
|
74
75
|
|
75
76
|
|
@@ -140,6 +141,16 @@
|
|
140
141
|
<li>add support for VPI callbacks which execute Ruby blocks</li>
|
141
142
|
</ul>
|
142
143
|
|
144
|
+
|
145
|
+
<ul>
|
146
|
+
<li>write section about code coverage and prototyping in manual</li>
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
<ul>
|
151
|
+
<li>clean up the teriminology section… unnecessary</li>
|
152
|
+
</ul>
|
153
|
+
|
143
154
|
</div>
|
144
155
|
</p>
|
145
156
|
|
@@ -149,7 +160,7 @@
|
|
149
160
|
|
150
161
|
<div id="Obsolete_tasks" class="section">
|
151
162
|
<h1 class="title">
|
152
|
-
<a href="#a-
|
163
|
+
<a href="#a-607913238">3</a>
|
153
164
|
|
154
165
|
|
155
166
|
|
@@ -188,7 +199,7 @@
|
|
188
199
|
<hr style="display: none"/>
|
189
200
|
<div id="toc">
|
190
201
|
<h1 id="toc:contents">Contents</h1>
|
191
|
-
<ul><li><span class="hide">1 </span><a id="a-
|
202
|
+
<ul><li><span class="hide">1 </span><a id="a-607907898" href="#Pending_tasks">Pending tasks</a></li><li><span class="hide">2 </span><a id="a-607910698" href="#Finished_tasks">Finished tasks</a></li><li><span class="hide">3 </span><a id="a-607913238" href="#Obsolete_tasks">Obsolete tasks</a></li></ul>
|
192
203
|
|
193
204
|
</div>
|
194
205
|
</body>
|
data/doc/readme.doc
CHANGED
@@ -7,6 +7,6 @@
|
|
7
7
|
<div style="float: right">Version <%= version %></div>
|
8
8
|
<h1 style="padding-top: 0">Ruby-VPI</h1>
|
9
9
|
|
10
|
-
<a href="http://www.ruby-lang.org"><img src="images/ruby/logo-reflection.png" alt="Logo of the Ruby programming language" style="margin: 0; margin-left: 2em; float: right"/></a>
|
10
|
+
<a href="http://www.ruby-lang.org"><img src="images/ruby/logo-reflection.png" alt="Logo of the Ruby programming language" style="margin: 0; margin-left: 2em; margin-bottom: 1em; float: right"/></a>
|
11
11
|
|
12
12
|
<doc_proxy_include intro.inc>
|
data/doc/readme.html
CHANGED
@@ -8,11 +8,19 @@
|
|
8
8
|
<title>Ruby-VPI: Ruby interface to Verilog VPI</title>
|
9
9
|
</head>
|
10
10
|
<body>
|
11
|
+
<div id="site-links">
|
12
|
+
<a href="readme.html">Home</a>
|
13
|
+
· <a href="manual.html">Manual</a>
|
14
|
+
· <a href="memo.html">Memo</a>
|
15
|
+
· <a href="history.html">History</a>
|
16
|
+
<hr style="display: none"/>
|
17
|
+
</div>
|
18
|
+
|
11
19
|
|
12
|
-
<div id="body"><div style="float: right">Version
|
20
|
+
<div id="body"><div style="float: right">Version 18.0.0</div>
|
13
21
|
<h1 style="padding-top: 0">Ruby-VPI</h1>
|
14
22
|
|
15
|
-
<p><a href="http://www.ruby-lang.org"><img src="images/ruby/logo-reflection.png" alt="Logo of the Ruby programming language" style="margin: 0; margin-left: 2em; float: right"/></a></p>
|
23
|
+
<p><a href="http://www.ruby-lang.org"><img src="images/ruby/logo-reflection.png" alt="Logo of the Ruby programming language" style="margin: 0; margin-left: 2em; margin-bottom: 1em; float: right"/></a></p>
|
16
24
|
|
17
25
|
|
18
26
|
<p>Ruby-VPI is a platform for unit testing, rapid prototyping, and systems integration of Verilog modules through the <a href="http://www.ruby-lang.org">Ruby programming language</a>. It lets you:</p>
|
@@ -34,7 +42,7 @@
|
|
34
42
|
|
35
43
|
<div id="resources" class="section">
|
36
44
|
<h1 class="title">
|
37
|
-
<a href="#a-
|
45
|
+
<a href="#a-607398468">1</a>
|
38
46
|
|
39
47
|
|
40
48
|
|
@@ -44,20 +52,22 @@
|
|
44
52
|
|
45
53
|
<div id="Records" class="paragraph">
|
46
54
|
<p class="title">Records</p>
|
47
|
-
<
|
48
|
-
|
49
|
-
|
55
|
+
<ul>
|
56
|
+
<li><a href="history.html#a18.0.0">What’s new</a>
|
57
|
+
– release notes for version 18.0.0.
|
50
58
|
<ul>
|
51
|
-
<li><a href="history.html">
|
52
|
-
– a
|
59
|
+
<li><a href="history.html">History</a>
|
60
|
+
– a record of all release notes.</li>
|
61
|
+
<li><a type="application/rss+xml" href="http://ruby-vpi.rubyforge.org/doc/rss.xml"><img src="images/feed-icon-28x28.png" alt="RSS feed for release announcements" style="float: right"/></a> <a href="http://ruby-vpi.rubyforge.org/doc/rss.xml">RSS feed</a>
|
62
|
+
– keep track of new releases at your leisure.</li>
|
63
|
+
</ul>
|
64
|
+
</li>
|
53
65
|
<li><a href="memo.html">Plans</a>
|
54
66
|
– pending tasks for future releases.</li>
|
55
67
|
<li><a href="http://ruby-vpi.rubyforge.org/talks/">Talks</a>
|
56
68
|
– materials from presentations and seminars.</li>
|
57
69
|
<li><a href="http://ruby-vpi.rubyforge.org/papers/">Papers</a>
|
58
70
|
– research publications.</li>
|
59
|
-
<li><a href="http://ruby-vpi.rubyforge.org/papers/masters_thesis.html#tth_sEc5.2">Motivation</a>
|
60
|
-
– why does Ruby-VPI exist?</li>
|
61
71
|
</ul>
|
62
72
|
</div>
|
63
73
|
|
@@ -65,8 +75,10 @@
|
|
65
75
|
<div id="Documentation" class="paragraph">
|
66
76
|
<p class="title">Documentation</p>
|
67
77
|
<ul>
|
68
|
-
<li><a href="
|
69
|
-
–
|
78
|
+
<li><a href="http://ruby-vpi.rubyforge.org/papers/masters_thesis.html#tth_sEc5.2">Motivation</a>
|
79
|
+
– why was Ruby-VPI developed?</li>
|
80
|
+
<li><a href="manual.html">User manual</a>
|
81
|
+
– complete documentation for users.
|
70
82
|
<ul>
|
71
83
|
<li><a href="manual.html#usage.tutorial">Tutorial</a>
|
72
84
|
– learn how to use Ruby-VPI quickly.</li>
|
@@ -83,7 +95,7 @@
|
|
83
95
|
<ul>
|
84
96
|
<li><a href="http://rubyforge.org/frs/?group_id=1339">Downloads</a>
|
85
97
|
– obtain release packages</li>
|
86
|
-
<li><a href="http://ruby-vpi.rubyforge.org/src/ruby-vpi">Source code</a>
|
98
|
+
<li><a href="http://ruby-vpi.rubyforge.org/src/ruby-vpi/">Source code</a>
|
87
99
|
– browse online or obtain with <a href="http://darcs.net">Darcs</a>.</li>
|
88
100
|
<li><a href="http://rubyforge.org/forum/?group_id=1339">Forums</a>
|
89
101
|
– discuss things and ask questions.</li>
|
@@ -93,7 +105,7 @@
|
|
93
105
|
– submit patches to source code.</li>
|
94
106
|
<li><a href="http://rubyforge.org/tracker/?group_id=1339">Requests</a>
|
95
107
|
– request new features or get support.</li>
|
96
|
-
<li><a href="http://rubyforge.org/projects/ruby-vpi">Project portal</a>
|
108
|
+
<li><a href="http://rubyforge.org/projects/ruby-vpi/">Project portal</a>
|
97
109
|
– hosted generously by <a href="http://rubyforge.org">RubyForge</a>.</li>
|
98
110
|
</ul>
|
99
111
|
</div>
|
@@ -108,7 +120,7 @@
|
|
108
120
|
|
109
121
|
<div id="intro.features" class="section">
|
110
122
|
<h1 class="title">
|
111
|
-
<a href="#a-
|
123
|
+
<a href="#a-607410618">2</a>
|
112
124
|
|
113
125
|
|
114
126
|
|
@@ -121,7 +133,7 @@
|
|
121
133
|
<ul>
|
122
134
|
<li>Supports the <em>entire</em> <a href="http://ieeexplore.ieee.org/xpl/standardstoc.jsp?isnumber=33945"><span class="caps">IEEE 1364</span>-2005 Verilog VPI</a> standard.</li>
|
123
135
|
<li>Works with all <a href="#intro.reqs">major Verilog simulators</a> available today.</li>
|
124
|
-
<li>Compiled <em>just once</em> during <a href="manual.html#setup.
|
136
|
+
<li>Compiled <em>just once</em> during <a href="manual.html#setup.inst">installation</a> and used forever!</li>
|
125
137
|
</ul>
|
126
138
|
</div>
|
127
139
|
|
@@ -142,7 +154,7 @@
|
|
142
154
|
<li>Eliminates unneccesary work:
|
143
155
|
<ul>
|
144
156
|
<li><a href="manual.html#usage.tutorial.specification">Specifications</a> are readable, portable, and <em>executable</em>.</li>
|
145
|
-
<li>The <a href="manual.html#usage.tools.generate
|
157
|
+
<li>The <a href="manual.html#usage.tools.generate">automated test generator</a> helps you accomodate design changes with <em>minimal</em> effort.</li>
|
146
158
|
<li>There is absolutely <em>no compiling</em>!</li>
|
147
159
|
</ul></li>
|
148
160
|
</ul>
|
@@ -179,7 +191,7 @@
|
|
179
191
|
|
180
192
|
<div id="intro.reqs" class="section">
|
181
193
|
<h1 class="title">
|
182
|
-
<a href="#a-
|
194
|
+
<a href="#a-607422318">3</a>
|
183
195
|
|
184
196
|
|
185
197
|
|
@@ -200,12 +212,12 @@
|
|
200
212
|
– any version that supports the <tt>-load</tt> option is acceptable.</li>
|
201
213
|
<li><a href="http://www.model.com">Mentor Modelsim</a>
|
202
214
|
– any version that supports the <tt>-pli</tt> option is acceptable.</li>
|
203
|
-
<li><a href="http://www.cadence.com/products/functional_ver/nc-verilog/">Cadence NC-Sim
|
204
|
-
– any version that supports the <tt>+loadvpi</tt> option is acceptable
|
215
|
+
<li><a href="http://www.cadence.com/products/functional_ver/nc-verilog/">Cadence NC-Sim</a>
|
216
|
+
– any version that supports the <tt>+loadvpi</tt> option is <em>mostly</em> acceptable because you <strong>will not</strong> be able to <a href="manual.html#problem.ncsim.vpiForceFlag">force values onto wires</a>.</li>
|
205
217
|
<li><a href="http://www.pragmatic-c.com/gpl-cver/">GPL Cver</a>
|
206
218
|
– version 2.11a or newer is acceptable.</li>
|
207
|
-
<li><a href="http://www.
|
208
|
-
– version 0.8 is <em>mostly</em> acceptable
|
219
|
+
<li><a href="http://www.geda.seul.org/tools/icarus/index.html">Icarus Verilog</a>
|
220
|
+
– version 0.8 is <em>mostly</em> acceptable because you <strong>will not</strong> be able to <a href="manual.html#Accessing_a_handle_s_relatives">access child handles through method calls</a>. The reason for this limitation is explained <a href="manual.html#problems.ivl.vpi_handle_by_name.absolute-paths">in the user manual</a>.</li>
|
209
221
|
</ul>
|
210
222
|
</div>
|
211
223
|
|
@@ -217,8 +229,10 @@
|
|
217
229
|
– any flavor should be acceptable.</li>
|
218
230
|
<li>C compiler
|
219
231
|
– the <a href="http://www.gnu.org/software/gcc/" title="GCC">GNU Compiler Collection</a> is preferred, but any C compiler should be acceptable.</li>
|
220
|
-
<li><a href="http://www.
|
221
|
-
– version 1.
|
232
|
+
<li><a href="http://www.swig.org/download.html">SWIG</a>
|
233
|
+
– version 1.3.29 or newer is necessary.</li>
|
234
|
+
<li><a href="http://www.ruby-lang.org/en/downloads/">Ruby</a>
|
235
|
+
– version 1.8 or newer, including header and linkable object files for building extensions, is necessary. You can install Ruby by following <a href="http://www.ruby-lang.org/en/downloads/">these instructions</a>.</li>
|
222
236
|
</ul>
|
223
237
|
</div>
|
224
238
|
|
@@ -243,7 +257,7 @@
|
|
243
257
|
|
244
258
|
<div id="intro.applications" class="section">
|
245
259
|
<h1 class="title">
|
246
|
-
<a href="#a-
|
260
|
+
<a href="#a-607424848">4</a>
|
247
261
|
|
248
262
|
|
249
263
|
|
@@ -289,7 +303,7 @@
|
|
289
303
|
|
290
304
|
<div id="intro.appetizers" class="section">
|
291
305
|
<h1 class="title">
|
292
|
-
<a href="#a-
|
306
|
+
<a href="#a-607427418">5</a>
|
293
307
|
|
294
308
|
|
295
309
|
|
@@ -357,14 +371,15 @@
|
|
357
371
|
|
358
372
|
<div id="intro.license" class="section">
|
359
373
|
<h1 class="title">
|
360
|
-
<a href="#a-
|
374
|
+
<a href="#a-607430248">6</a>
|
361
375
|
|
362
376
|
|
363
377
|
|
364
378
|
License
|
365
379
|
</h1>
|
366
380
|
|
367
|
-
<p>Copyright 2006 Suraj N. Kurapati <
|
381
|
+
<p>Copyright 2006 Suraj N. Kurapati <SNK at GNA dot ORG><br/>
|
382
|
+
Copyright 1999 Kazuhiro HIWADA <HIWADA at KUEE dot KYOTO-U dot AC dot JP><br/></p>
|
368
383
|
|
369
384
|
|
370
385
|
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of
|
@@ -375,13 +390,14 @@ the Software, and to permit persons to whom the Software is furnished to do so,
|
|
375
390
|
subject to the following conditions:</p>
|
376
391
|
|
377
392
|
|
378
|
-
<p>1. All
|
379
|
-
(the "Derivatives") and their corresponding machine-readable
|
380
|
-
"Code") must include the above copyright notice and this
|
393
|
+
<p>1. All copies and substantial portions of the Software, whether modified or
|
394
|
+
unmodified, (the "Derivatives") and their corresponding machine-readable
|
395
|
+
source code (the "Code") must include the above copyright notice and this
|
396
|
+
permission notice.</p>
|
381
397
|
|
382
398
|
|
383
|
-
<p>2.
|
384
|
-
|
399
|
+
<p>2. The Derivatives, upon distribution, must be accompanied by the Code or, if
|
400
|
+
the Code is obtainable for no more than the cost of distribution plus a
|
385
401
|
nominal fee, by information on how to obtain the Code.</p>
|
386
402
|
|
387
403
|
|
@@ -401,7 +417,7 @@ IMPLIED, INCLUDING <span class="caps">BUT NOT LIMITED TO THE WARRANTIES OF MERCH
|
|
401
417
|
|
402
418
|
<div id="intro.related-works" class="section">
|
403
419
|
<h1 class="title">
|
404
|
-
<a href="#a-
|
420
|
+
<a href="#a-607435548">7</a>
|
405
421
|
|
406
422
|
|
407
423
|
|
@@ -422,7 +438,7 @@ IMPLIED, INCLUDING <span class="caps">BUT NOT LIMITED TO THE WARRANTIES OF MERCH
|
|
422
438
|
|
423
439
|
<div id="intro.related-works.pli" class="section">
|
424
440
|
<h2 class="title">
|
425
|
-
<a href="#a-
|
441
|
+
<a href="#a-607432668">7.1</a>
|
426
442
|
|
427
443
|
|
428
444
|
|
data/doc/rss.xml
CHANGED
@@ -4,6 +4,102 @@
|
|
4
4
|
<title>Ruby-VPI</title>
|
5
5
|
<link>http://ruby-vpi.rubyforge.org</link>
|
6
6
|
<description>Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI and a platform for unit testing, rapid prototyping, and systems integration of Verilog modules through Ruby. It lets you create complex Verilog test benches easily and wholly in Ruby.</description>
|
7
|
+
<item>
|
8
|
+
<title>Version 18.0.0 released</title>
|
9
|
+
<link>http://ruby-vpi.rubyforge.org/doc/history.html#a18.0.0</link>
|
10
|
+
<guid>http://ruby-vpi.rubyforge.org/doc/history.html#a18.0.0</guid>
|
11
|
+
<description><h1 id="18.0.0">Version 18.0.0 (2007-07-31)</h1>
|
12
|
+
|
13
|
+
<p>This release restores support for Synopsys VCS and Cadence NC-Sim, improves portability and performance, and enhances the VPI abstraction layer.</p>
|
14
|
+
|
15
|
+
|
16
|
+
<h2>Thanks</h2>
|
17
|
+
|
18
|
+
|
19
|
+
<ul>
|
20
|
+
<li>Calvin Wong discovered <a href="http://rubyforge.org/forum/message.php?msg_id=25691">how to bypass the following error</a> emitted by Synopsys VCS when loading the Ruby-VPI shared object file.
|
21
|
+
|
22
|
+
<pre>
|
23
|
+
Could not open library specified in -load option obj/vcs
|
24
|
+
obj/vcs: undefined symbol: vpi_put_data
|
25
|
+
</pre></li>
|
26
|
+
</ul>
|
27
|
+
|
28
|
+
|
29
|
+
<h2>Caution</h2>
|
30
|
+
|
31
|
+
|
32
|
+
<ul>
|
33
|
+
<li><a href="http://www.swig.org/">SWIG</a> is now required in order to compile and install Ruby-VPI.</li>
|
34
|
+
</ul>
|
35
|
+
|
36
|
+
|
37
|
+
<ul>
|
38
|
+
<li><code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.put_value</code> no longer checks whether the value written matches the value read back after writing because that only works when there is no VPI delay associated with the write.</li>
|
39
|
+
</ul>
|
40
|
+
|
41
|
+
|
42
|
+
<ul>
|
43
|
+
<li>When <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.put_value</code> is used to write a value to a wire (VpiNet), it now <em>forces</em> the value. This is done to ensure portability:
|
44
|
+
|
45
|
+
<p>Synopsys VCS and Cadence NC-Sim forget the value written to a wire during the next simulation time step, whereas Mentor Modelsim and GPL Cver remember the value (thereby treating wires as registers).</p>
|
46
|
+
|
47
|
+
|
48
|
+
<p>Note that you have to release a forced value (using <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.release_value</code>) on a wire after writing to the wire if you want the design under test have the ability to update the value of the wire later on:</p>
|
49
|
+
|
50
|
+
|
51
|
+
<pre class="code">
|
52
|
+
your_wire.intVal = <span style="color:#00D; font-weight:bold">15</span>
|
53
|
+
your_wire.release_value
|
54
|
+
advance_time <span style="color:#888"># let the Verilog DUT modify your_wire</span>
|
55
|
+
</pre>
|
56
|
+
|
57
|
+
|
58
|
+
<p>In addition, you can check if a wire has a forced value using the <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.value_forced?</code> method.</p></li>
|
59
|
+
</ul>
|
60
|
+
|
61
|
+
|
62
|
+
<ul>
|
63
|
+
<li>If the format is not specified, <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.get_value</code> now assumes that you want to read the value in VpiIntVal format (because this is the most common case).</li>
|
64
|
+
</ul>
|
65
|
+
|
66
|
+
|
67
|
+
<ul>
|
68
|
+
<li>The definition of &#8220;Derivatives&#8221; has been reworded for clarity in the <a href="readme.html#intro.license">project license</a>.</li>
|
69
|
+
</ul>
|
70
|
+
|
71
|
+
|
72
|
+
<h2>Repairs</h2>
|
73
|
+
|
74
|
+
|
75
|
+
<ul>
|
76
|
+
<li>Synopsys VCS and Cadence NC-Sim simulators now correctly load Ruby-VPI. Also, the 64-bit versions of these simulators are now supported.</li>
|
77
|
+
</ul>
|
78
|
+
|
79
|
+
|
80
|
+
<h2>Improvements</h2>
|
81
|
+
|
82
|
+
|
83
|
+
<ul>
|
84
|
+
<li>Added &#8220;force_value&#8221;, &#8220;release_value&#8221;, and &#8220;value_forced?&#8221; methods to the <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span></code> class.</li>
|
85
|
+
</ul>
|
86
|
+
|
87
|
+
|
88
|
+
<ul>
|
89
|
+
<li><code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.put_value</code> now tries to automatically detect the format of the value to be written. As a result, you can now write <code class="code">your_handle.put_value <span style="color:#00D; font-weight:bold">35</span></code> in lieu of writing <code class="code">your_handle.intVal = <span style="color:#00D; font-weight:bold">35</span></code>.</li>
|
90
|
+
</ul>
|
91
|
+
|
92
|
+
|
93
|
+
<ul>
|
94
|
+
<li><code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.inspect</code> now shows the hexStrVal of the handle (because it is a common case to want to see a handle&#8217;s logic value along with its other information).</li>
|
95
|
+
</ul>
|
96
|
+
|
97
|
+
|
98
|
+
<ul>
|
99
|
+
<li>Added method caching (memoizing) for VPI property accesses on handles.</li>
|
100
|
+
</ul></description>
|
101
|
+
<pubDate>Tue, 31 Jul 2007 00:00:00 PDT</pubDate>
|
102
|
+
</item>
|
7
103
|
<item>
|
8
104
|
<title>Version 17.0.0 released</title>
|
9
105
|
<link>http://ruby-vpi.rubyforge.org/doc/history.html#a17.0.0</link>
|
@@ -165,75 +261,5 @@
|
|
165
261
|
</ul></description>
|
166
262
|
<pubDate>Sun, 27 May 2007 00:00:00 PDT</pubDate>
|
167
263
|
</item>
|
168
|
-
<item>
|
169
|
-
<title>Version 16.0.0 released</title>
|
170
|
-
<link>http://ruby-vpi.rubyforge.org/doc/history.html#a16.0.0</link>
|
171
|
-
<guid>http://ruby-vpi.rubyforge.org/doc/history.html#a16.0.0</guid>
|
172
|
-
<description><h1 id="16.0.0">Version 16.0.0 (2007-05-02)</h1>
|
173
|
-
|
174
|
-
<p>This release adds support for the <a href="http://www.cadence.com/products/functional_ver/nc-verilog/">Cadence NC-Sim / NC-Verilog</a> simulator, improves the project website and documentation, simplifies interaction with VPI, and comes with a more permissive license.</p>
|
175
|
-
|
176
|
-
|
177
|
-
<h2>Caution</h2>
|
178
|
-
|
179
|
-
|
180
|
-
<ul>
|
181
|
-
<li>The <code class="code"><span style="color:#036; font-weight:bold">Integer</span>.ensure_min</code> and <code class="code"><span style="color:#036; font-weight:bold">Integer</span>.ensure_max</code> methods have been removed from the <tt>ruby-vpi/integer.rb</tt> library because Ruby already has idioms for these operations: <pre>
|
182
|
-
&gt;&gt; 5.ensure_min 10
|
183
|
-
=&gt; 10
|
184
|
-
&gt;&gt; [5, 10].max
|
185
|
-
=&gt; 10
|
186
|
-
|
187
|
-
&gt;&gt; 5.ensure_max 10
|
188
|
-
=&gt; 5
|
189
|
-
&gt;&gt; [5, 10].min
|
190
|
-
=&gt; 5
|
191
|
-
</pre></li>
|
192
|
-
</ul>
|
193
|
-
|
194
|
-
|
195
|
-
<ul>
|
196
|
-
<li>Ruby-VPI is now developed under a <a href="readme.html#intro.license">more permissive license</a> that better reflects my ethical beliefs than <a href="http://www.gnu.org/copyleft/gpl.html">the previous license</a>.</li>
|
197
|
-
</ul>
|
198
|
-
|
199
|
-
|
200
|
-
<h2>New features</h2>
|
201
|
-
|
202
|
-
|
203
|
-
<ul>
|
204
|
-
<li>The <a href="http://www.cadence.com/products/functional_ver/nc-verilog/">Cadence NC-Sim / NC-Verilog</a> (ncsim) simulator is now supported.</li>
|
205
|
-
</ul>
|
206
|
-
|
207
|
-
|
208
|
-
<ul>
|
209
|
-
<li>VPI structures (whose names begin with &#8220;S_&#8221;) now allow initialization of their members through their constructor, in the style of Ruby on Rails. For example, the expression <code class="code">time = <span style="color:#036; font-weight:bold">S_vpi_time</span>.new <span style="color:#A60">:type</span> =&gt; <span style="color:#036; font-weight:bold">VpiSuppressTime</span></code> is equivalent to: <pre class="code">
|
210
|
-
time = <span style="color:#036; font-weight:bold">S_vpi_time</span>.new
|
211
|
-
time.type = <span style="color:#036; font-weight:bold">VpiSuppressTime</span>
|
212
|
-
</pre></li>
|
213
|
-
</ul>
|
214
|
-
|
215
|
-
|
216
|
-
<ul>
|
217
|
-
<li>Added the <code class="code"><span style="color:#036; font-weight:bold">Vpi</span>::<span style="color:#036; font-weight:bold">Handle</span>.cbValueChange</code> method which simplifies the registration of a value-change callback for a particular VPI handle. For instance, the user manual&#8217;s <a href="manual.html#ex..callback">example of setting up a value-change callback</a> can now be written as follows: <pre class="code">
|
218
|
-
<span style="color:#036; font-weight:bold">Counter</span>.count.cbValueChange <span style="color:#080; font-weight:bold">do</span> |s_cb_data|
|
219
|
-
puts <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">hello from callback! time=</span><span style="background: #eee"><span style="font-weight: bold; color: #888">#{</span>s_cb_data.time.to_i<span style="font-weight: bold; color: #888">}</span></span><span style="color:#D20"> count=</span><span style="background: #eee"><span style="font-weight: bold; color: #888">#{</span>s_cb_data.obj.intVal<span style="font-weight: bold; color: #888">}</span></span><span style="color:#710">&quot;</span></span>
|
220
|
-
<span style="color:#080; font-weight:bold">end</span>
|
221
|
-
</pre></li>
|
222
|
-
</ul>
|
223
|
-
|
224
|
-
|
225
|
-
<h2>Details</h2>
|
226
|
-
|
227
|
-
|
228
|
-
<ul>
|
229
|
-
<li>Revised the project website according to the <a href="http://producingoss.com">Producing OSS</a> guidelines.</li>
|
230
|
-
</ul>
|
231
|
-
|
232
|
-
|
233
|
-
<ul>
|
234
|
-
<li>Added instructions for checking out source code and generating documentation.</li>
|
235
|
-
</ul></description>
|
236
|
-
<pubDate>Wed, 02 May 2007 00:00:00 PDT</pubDate>
|
237
|
-
</item>
|
238
264
|
</channel>
|
239
265
|
</rss>
|
data/ext/Rakefile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Build file for the native C extension.
|
2
2
|
#
|
3
3
|
# = Environment variables
|
4
|
-
# CFLAGS::
|
5
|
-
# LDFLAGS::
|
4
|
+
# CFLAGS:: Arguments to the compiler.
|
5
|
+
# LDFLAGS:: Arguments to the linker.
|
6
|
+
# SIMULATOR:: ID of the simulator.
|
6
7
|
#--
|
7
8
|
# Copyright 2006 Suraj N. Kurapati
|
8
9
|
# See the file named LICENSE for details.
|
@@ -23,29 +24,41 @@ file 'Makefile' => [:swig, 'extconf.rb'] do |t|
|
|
23
24
|
ruby t.prerequisites[1], "--with-cflags=#{ENV['CFLAGS']}", "--with-ldflags=#{ENV['LDFLAGS']}"
|
24
25
|
end
|
25
26
|
|
26
|
-
CLEAN.include 'Makefile', 'mkmf.log', '*.o',
|
27
|
+
CLEAN.include 'Makefile', 'mkmf.log', '*.o', "*.#{Config::CONFIG['DLEXT']}"
|
27
28
|
|
28
29
|
|
29
30
|
desc 'Generate Ruby wrapper for VPI.'
|
30
31
|
task :swig => 'swig_wrap.cin'
|
31
32
|
|
32
33
|
file 'swig_wrap.cin' => 'swig_vpi.i' do |t|
|
33
|
-
sh %w
|
34
|
+
sh %w[swig -Werror -w801 -ruby -o], t.name, t.prerequisites[0]
|
34
35
|
end
|
35
36
|
|
36
37
|
file 'swig_vpi.i' => 'swig_vpi.h'
|
37
38
|
|
38
|
-
#
|
39
|
-
#
|
39
|
+
# create a custom version of the standard vpi_user.h file to
|
40
|
+
# accomodate quirks in C compilers and Verilog simulators
|
40
41
|
file 'swig_vpi.h' => 'vpi_user.h' do |t|
|
41
42
|
src, dst = t.prerequisites[0], t.name
|
42
43
|
|
43
44
|
File.open(dst, 'w') do |f|
|
44
|
-
|
45
|
+
input = File.read(src)
|
46
|
+
|
47
|
+
# this is only relevant for the C language VPI interface
|
48
|
+
input.gsub! %r{^.*vlog_startup_routines.*$}, ''
|
49
|
+
|
50
|
+
# avoid compilation errors due to va_list, which is used
|
51
|
+
# in the SWIG-generated wrapper for VPI vprintf functions
|
52
|
+
input.gsub! %r{\bva_list\b}, 'void*'
|
53
|
+
|
54
|
+
# VCS does not load the Ruby-VPI shared object file if it contains
|
55
|
+
# references to the vpi_put_data and vpi_get_data symbols
|
56
|
+
if ENV['SIMULATOR'] == 'vcs'
|
57
|
+
input.gsub! %r{^.*vpi_(get|put)_data[^;]+;}, ''
|
58
|
+
end
|
59
|
+
|
60
|
+
f << input
|
45
61
|
end
|
46
62
|
end
|
47
63
|
|
48
|
-
|
49
|
-
# we should not clobber these generated files
|
50
|
-
#
|
51
|
-
#CLOBBER.include 'swig_wrap.cin', 'swig_vpi.h'
|
64
|
+
CLEAN.include 'swig_wrap.cin', 'swig_vpi.h'
|
data/ext/swig_vpi.h
CHANGED
@@ -894,7 +894,7 @@ XXTERN vpiHandle vpi_handle_by_multi_index PROTO_PARAMS((vpiHandle obj,
|
|
894
894
|
|
895
895
|
/****************************** GLOBAL VARIABLES ******************************/
|
896
896
|
|
897
|
-
|
897
|
+
|
898
898
|
|
899
899
|
/* array of function pointers, last pointer should be null */
|
900
900
|
|