ruby-vpi 13.0.0 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. data/Rakefile +6 -1
  2. data/bin/generate_test_tpl/bench.rb +84 -1
  3. data/bin/generate_test_tpl/bench.v +8 -17
  4. data/bin/generate_test_tpl/proto.rb +1 -1
  5. data/doc/common.css +14 -41
  6. data/doc/common.tpl +1 -1
  7. data/doc/figures/figures.dia +274 -753
  8. data/doc/figures/organization_detailed.png +0 -0
  9. data/doc/figures/ruby_relay.png +0 -0
  10. data/doc/history.html +363 -276
  11. data/doc/history.yml +40 -0
  12. data/doc/intro.inc +37 -15
  13. data/doc/lib/doc_proxy.rb +24 -4
  14. data/doc/manual.doc +345 -196
  15. data/doc/manual.html +741 -497
  16. data/doc/memo.doc +15 -15
  17. data/doc/memo.html +28 -27
  18. data/doc/readme.doc +2 -2
  19. data/doc/readme.html +51 -15
  20. data/doc/rss.erb +1 -1
  21. data/doc/rss.xml +1624 -31
  22. data/ext/Rakefile +1 -6
  23. data/ext/main.c +8 -3
  24. data/ext/main.h +5 -0
  25. data/ext/relay.c +12 -12
  26. data/ext/relay.h +1 -6
  27. data/ext/swig_vpi.i +2 -2
  28. data/ext/swig_wrap.cin +37 -20
  29. data/ext/verilog.h +2 -2
  30. data/ext/vlog.c +10 -3
  31. data/ext/vlog.h +4 -4
  32. data/lib/ruby-vpi/vpi.rb +114 -0
  33. data/lib/ruby-vpi.rb +21 -59
  34. data/ref/c/annotated.html +1 -1
  35. data/ref/c/common_8h.html +1 -1
  36. data/ref/c/files.html +1 -1
  37. data/ref/c/functions.html +1 -1
  38. data/ref/c/functions_vars.html +1 -1
  39. data/ref/c/globals.html +1 -1
  40. data/ref/c/globals_0x63.html +1 -1
  41. data/ref/c/globals_0x65.html +1 -1
  42. data/ref/c/globals_0x66.html +1 -1
  43. data/ref/c/globals_0x6d.html +3 -2
  44. data/ref/c/globals_0x70.html +1 -1
  45. data/ref/c/globals_0x72.html +4 -5
  46. data/ref/c/globals_0x73.html +1 -1
  47. data/ref/c/globals_0x74.html +1 -1
  48. data/ref/c/globals_0x76.html +4 -2
  49. data/ref/c/globals_0x78.html +1 -1
  50. data/ref/c/globals_defs.html +1 -1
  51. data/ref/c/globals_defs_0x65.html +1 -1
  52. data/ref/c/globals_defs_0x70.html +1 -1
  53. data/ref/c/globals_defs_0x76.html +1 -1
  54. data/ref/c/globals_defs_0x78.html +1 -1
  55. data/ref/c/globals_enum.html +1 -1
  56. data/ref/c/globals_eval.html +1 -1
  57. data/ref/c/globals_func.html +8 -7
  58. data/ref/c/globals_type.html +1 -1
  59. data/ref/c/globals_vars.html +3 -2
  60. data/ref/c/index.html +1 -1
  61. data/ref/c/main_8c.html +26 -1
  62. data/ref/c/main_8h.html +26 -1
  63. data/ref/c/relay_8c.html +11 -35
  64. data/ref/c/relay_8h.html +3 -27
  65. data/ref/c/structt__cb__data.html +1 -1
  66. data/ref/c/structt__vpi__delay.html +1 -1
  67. data/ref/c/structt__vpi__error__info.html +1 -1
  68. data/ref/c/structt__vpi__strengthval.html +1 -1
  69. data/ref/c/structt__vpi__systf__data.html +1 -1
  70. data/ref/c/structt__vpi__time.html +1 -1
  71. data/ref/c/structt__vpi__value.html +1 -1
  72. data/ref/c/structt__vpi__vecval.html +1 -1
  73. data/ref/c/structt__vpi__vlog__info.html +1 -1
  74. data/ref/c/verilog_8h.html +5 -5
  75. data/ref/c/vlog_8c.html +44 -6
  76. data/ref/c/vlog_8h.html +7 -8
  77. data/ref/c/vpi__user_8h.html +1 -1
  78. data/ref/ruby/classes/RDoc.html +5 -5
  79. data/ref/ruby/classes/RDoc.src/{M000041.html → M000045.html} +0 -0
  80. data/ref/ruby/classes/RubyVpi.html +10 -28
  81. data/ref/ruby/classes/RubyVpi.src/M000029.html +101 -124
  82. data/ref/ruby/classes/Vpi/Handle.html +56 -56
  83. data/ref/ruby/classes/Vpi/Handle.src/M000034.html +5 -9
  84. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +5 -31
  85. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -74
  86. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -17
  87. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +9 -11
  88. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +44 -0
  89. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +74 -55
  90. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +30 -0
  91. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +24 -0
  92. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +68 -0
  93. data/ref/ruby/classes/Vpi.html +149 -0
  94. data/ref/ruby/classes/Vpi.src/M000030.html +28 -0
  95. data/ref/ruby/classes/Vpi.src/M000031.html +18 -0
  96. data/ref/ruby/classes/Vpi.src/M000032.html +39 -0
  97. data/ref/ruby/classes/Vpi.src/M000033.html +22 -0
  98. data/ref/ruby/created.rid +1 -1
  99. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  100. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -2
  101. data/ref/ruby/fr_method_index.html +18 -14
  102. data/samp/counter/counter_rspec_bench.rb +81 -1
  103. data/samp/counter/counter_rspec_bench.v +5 -12
  104. data/samp/counter/counter_rspec_design.rb +1 -2
  105. data/samp/counter/counter_rspec_proto.rb +1 -1
  106. data/samp/counter/counter_rspec_spec.rb +3 -3
  107. data/samp/counter/counter_xunit_bench.rb +81 -1
  108. data/samp/counter/counter_xunit_bench.v +5 -12
  109. data/samp/counter/counter_xunit_design.rb +1 -2
  110. data/samp/counter/counter_xunit_proto.rb +1 -1
  111. data/samp/counter/counter_xunit_spec.rb +3 -3
  112. data/samp/pipelined_alu/hw5_unit_test_bench.rb +81 -1
  113. data/samp/pipelined_alu/hw5_unit_test_bench.v +11 -18
  114. data/samp/pipelined_alu/hw5_unit_test_design.rb +1 -1
  115. data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
  116. data/samp/pipelined_alu/hw5_unit_test_spec.rb +1 -1
  117. metadata +12 -9
  118. data/doc/figures/ruby_init.png +0 -0
  119. data/ext/swig_vpi.h +0 -924
  120. data/ref/ruby/classes/Vpi/Handle.src/M000030.html +0 -18
  121. data/ref/ruby/classes/Vpi/Handle.src/M000031.html +0 -18
  122. data/ref/ruby/classes/Vpi/Handle.src/M000032.html +0 -18
  123. 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
- h1. Notes
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
- * When within Rake, rubygems is automatically available for use. no need to require() it again
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><a href="#anchor1">Pending tasks</a></li>
16
- <li><a href="#anchor2">Finished tasks</a></li>
17
- <li><a href="#anchor3">Obsolete tasks</a></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 &nbsp; 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></li>
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>need to dump signal values when expectation fails in rSpec
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>maybe a waveform dump will also help</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>add instructions for using <strong>ruby-debug</strong> with a graphical debugging tool or <span class="caps">IDE</span> like RadRails</li>
53
+ <li>clean up the teriminology section&#8230; unnecessary</li>
58
54
  </ul>
59
55
 
60
56
 
61
- <h1 id="anchor2">Finished tasks</h1>
57
+ <h1 id="anchor2">2 &nbsp; 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>smarter test generation, which adjusts to user modifications in previously generated output&#8212;just use a smart merging tool like <strong>kdiff3</strong></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 &nbsp; Obsolete tasks</h1>
126
+
127
+
132
128
  <ul>
133
- <li>interactive console <span class="caps">IRB</span> wrapper for spec (just like Breakpoints in Rails)
134
- <ul>
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
- <h1 id="anchor4">Notes</h1>
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>When within Rake, rubygems is automatically available for use. no need to require() it again</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
  &#8211; learn how to use Ruby-VPI quickly.</li>
@@ -71,16 +74,16 @@
71
74
 
72
75
  </div>
73
76
 
74
- <h1 id="anchor113">Welcome to Ruby-VPI
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 &nbsp; Welcome to Ruby-VPI</h1>
76
78
 
77
79
 
78
- <blockquote>
79
- <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">Verilog <span class="caps">VPI</span></a>. It lets you create complex Verilog test benches easily and wholly in Ruby.</p>
80
- </blockquote>
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 &nbsp; Features</h2>
81
84
 
82
85
 
83
- <h2 id="intro.features">Features</h2>
86
+ <h3 id="anchor123">1.1.1 &nbsp; 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>Compile <em>once</em> (during <a href="manual.html#setup.installation">installation</a>) and use forever!</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 &nbsp; 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 <em>readable</em>, portable, and executable.</li>
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 &nbsp; Powerful</h3>
126
+
127
+
118
128
  <ul>
119
- <li>Utilizes the <a href="http://www.ruby-lang.org/en/about/">power and elegance</a> of Ruby:
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 &nbsp; 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
- <h3 id="intro.applications">Applications</h3>
154
+ <h2 id="intro.applications">1.2 &nbsp; 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
- <p>Here is a modest sampling of tasks, paraphrased from <a href="http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/">Pin Hong</a>, that Ruby-VPI can be used to perform.</p>
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&#8217;s</a> observations:
141
176
  <ul>
142
177
  <li>Writing hardware models in Ruby</li>
143
- <li>Dumping/processing netlist data from Verilog database</li>
144
- <li>Dumping/processing simulation data</li>
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
- <h3 id="intro.appetizers">Appetizers</h3>
188
+ <h2 id="intro.appetizers">1.3 &nbsp; 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 { relay_verilog }</code></p>
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['Summary'].redcloth %></description>
25
+ <description><%=ERB::Util.h format_history_entry(entry).to_html %></description>
26
26
  <pubDate><%= rfc822 %></pubDate>
27
27
  </item>
28
28
  <% end %>