ruby-vpi 15.0.0 → 15.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/Rakefile +2 -2
  2. data/doc/common.css +10 -18
  3. data/doc/common.tpl +28 -15
  4. data/doc/history.doc +4 -6
  5. data/doc/history.html +327 -286
  6. data/doc/history.yml +19 -0
  7. data/doc/intro.inc +47 -2
  8. data/doc/lib/doc_proxy.rb +16 -0
  9. data/doc/lib/erb_proxy.rb +5 -0
  10. data/doc/manual.doc +35 -26
  11. data/doc/manual.html +152 -100
  12. data/doc/memo.doc +16 -10
  13. data/doc/memo.html +29 -18
  14. data/doc/print.css +10 -0
  15. data/doc/readme.doc +2 -43
  16. data/doc/readme.html +42 -49
  17. data/doc/rss.xml +37 -0
  18. data/ext/Rakefile +10 -1
  19. data/ext/swig_vpi.h +924 -0
  20. data/ext/swig_vpi.i +2 -3
  21. data/ext/swig_wrap.cin +20 -37
  22. data/ref/c/annotated.html +1 -1
  23. data/ref/c/common_8h.html +1 -1
  24. data/ref/c/files.html +2 -1
  25. data/ref/c/functions.html +17 -17
  26. data/ref/c/functions_vars.html +17 -17
  27. data/ref/c/globals.html +3 -5
  28. data/ref/c/globals_0x62.html +1 -1
  29. data/ref/c/globals_0x63.html +30 -30
  30. data/ref/c/globals_0x65.html +2 -2
  31. data/ref/c/globals_0x66.html +1 -1
  32. data/ref/c/globals_0x67.html +1 -1
  33. data/ref/c/globals_0x69.html +1 -1
  34. data/ref/c/globals_0x6c.html +1 -1
  35. data/ref/c/globals_0x6d.html +1 -1
  36. data/ref/c/globals_0x6e.html +1 -1
  37. data/ref/c/globals_0x70.html +18 -18
  38. data/ref/c/globals_0x72.html +1 -1
  39. data/ref/c/globals_0x73.html +12 -13
  40. data/ref/c/globals_0x74.html +1 -1
  41. data/ref/c/globals_0x75.html +1 -1
  42. data/ref/c/globals_0x76.html +413 -413
  43. data/ref/c/globals_0x78.html +2 -2
  44. data/ref/c/globals_defs.html +30 -30
  45. data/ref/c/globals_defs_0x65.html +2 -2
  46. data/ref/c/globals_defs_0x6c.html +1 -1
  47. data/ref/c/globals_defs_0x6e.html +1 -1
  48. data/ref/c/globals_defs_0x70.html +3 -3
  49. data/ref/c/globals_defs_0x72.html +1 -1
  50. data/ref/c/globals_defs_0x73.html +2 -3
  51. data/ref/c/globals_defs_0x75.html +1 -1
  52. data/ref/c/globals_defs_0x76.html +411 -411
  53. data/ref/c/globals_defs_0x78.html +2 -2
  54. data/ref/c/globals_enum.html +1 -1
  55. data/ref/c/globals_eval.html +1 -1
  56. data/ref/c/globals_func.html +1 -1
  57. data/ref/c/globals_func_0x66.html +1 -1
  58. data/ref/c/globals_func_0x67.html +1 -1
  59. data/ref/c/globals_func_0x69.html +1 -1
  60. data/ref/c/globals_func_0x6d.html +1 -1
  61. data/ref/c/globals_func_0x70.html +2 -2
  62. data/ref/c/globals_func_0x72.html +1 -1
  63. data/ref/c/globals_func_0x73.html +1 -1
  64. data/ref/c/globals_func_0x76.html +1 -1
  65. data/ref/c/globals_type.html +26 -26
  66. data/ref/c/globals_vars.html +5 -7
  67. data/ref/c/index.html +1 -1
  68. data/ref/c/main_8c.html +1 -1
  69. data/ref/c/main_8h.html +1 -1
  70. data/ref/c/relay_8c.html +1 -1
  71. data/ref/c/relay_8h.html +1 -1
  72. data/ref/c/structswig__cast__info.html +1 -1
  73. data/ref/c/structswig__class.html +1 -1
  74. data/ref/c/structswig__module__info.html +1 -1
  75. data/ref/c/structswig__type__info.html +1 -1
  76. data/ref/c/structt__cb__data.html +23 -6
  77. data/ref/c/structt__vpi__delay.html +20 -3
  78. data/ref/c/structt__vpi__error__info.html +71 -3
  79. data/ref/c/structt__vpi__strengthval.html +3 -3
  80. data/ref/c/structt__vpi__systf__data.html +46 -12
  81. data/ref/c/structt__vpi__time.html +3 -3
  82. data/ref/c/structt__vpi__value.html +113 -3
  83. data/ref/c/structt__vpi__vecval.html +3 -3
  84. data/ref/c/structt__vpi__vlog__info.html +54 -3
  85. data/ref/c/swig__vpi_8h.html +8739 -0
  86. data/ref/c/swig__wrap_8cin.html +49 -102
  87. data/ref/c/unions__vpi__value__value.html +1 -1
  88. data/ref/c/verilog_8h.html +1 -1
  89. data/ref/c/vlog_8c.html +1 -1
  90. data/ref/c/vlog_8h.html +1 -1
  91. data/ref/c/vpi__user_8h.html +16 -16
  92. data/ref/ruby/created.rid +1 -1
  93. metadata +5 -2
data/doc/history.yml CHANGED
@@ -1,3 +1,22 @@
1
+ -
2
+ Version: 15.0.1
3
+
4
+ Date: 2007-01-15
5
+
6
+ Summary: |
7
+ This release fixes a problem with compilation of the C extension and improves the user documentation's appearance.
8
+
9
+ Acknowledgment: |
10
+ Thanks to Derek Graham for reporting the problem.
11
+
12
+ Details: |
13
+ * Restored the monkey patch, which was removed in release 14.0.0, for the SWIG @va_list@ problem.
14
+
15
+ * Made table of contents in-line with the content in user documentation.
16
+
17
+ * Added printer-friendly stylesheet for user documentation.
18
+
19
+
1
20
  -
2
21
  Version: 15.0.0
3
22
 
data/doc/intro.inc CHANGED
@@ -1,7 +1,53 @@
1
1
  Ruby-VPI is a "Ruby":http://www.ruby-lang.org interface to "IEEE 1364-2005 Verilog VPI":http://ieeexplore.ieee.org/xpl/standardstoc.jsp?isnumber=33945. It lets you create complex Verilog test benches easily and wholly in Ruby.
2
2
 
3
3
 
4
- h2(#intro.features). Features
4
+ p(title). Documentation
5
+
6
+ * "Tutorial":manual.html#usage.tutorial
7
+ - learn how to use Ruby-VPI quickly.
8
+ * "Manual":manual.html
9
+ - complete documentation for users. _Start here!_
10
+ * "Reference":../ref/
11
+ - API documentation for Ruby libraries and C extension.
12
+
13
+
14
+ p(title). Records
15
+
16
+ * <a type="application/rss+xml" href="<%= RSS_URL %>">!images/feed-icon.png(RSS feed icon)! RSS feed</a>
17
+ - keep track of new releases at your leisure.
18
+ * "Release history":history.html
19
+ - record of all release notes.
20
+ * "Memorandum":memo.html
21
+ - pending tasks for future releases.
22
+
23
+
24
+ p(title). Facilities
25
+
26
+ * "Project portal":http://rubyforge.org/projects/ruby-vpi
27
+ - hosted generously by "RubyForge":http://rubyforge.org.
28
+ * "Source code":http://ruby-vpi.rubyforge.org/src/ruby-vpi
29
+ - browse online or obtain through "Darcs":http://abridgegame.org/darcs/.
30
+ * "Downloads":http://rubyforge.org/frs/?group_id=1339
31
+ - obtain release packages.
32
+ * "Bugs":http://rubyforge.org/tracker/?group_id=1339
33
+ - report defects in the software.
34
+ * "Patches":http://rubyforge.org/tracker/?group_id=1339
35
+ - submit patches to source code.
36
+ * "Requests":http://rubyforge.org/tracker/?group_id=1339
37
+ - request new features or get support.
38
+ * "Forums":http://rubyforge.org/forum/?group_id=1339
39
+ - discuss things and ask questions.
40
+
41
+
42
+ p(title). Outreach
43
+
44
+ * "News":http://ruby-vpi.rubyforge.org/news
45
+ - see what's cooking for the next release.
46
+ * "Talks":http://ruby-vpi.rubyforge.org/talks
47
+ - materials from presentations and seminars.
48
+
49
+
50
+ h2(#intro.features). Prominent features
5
51
 
6
52
  h3. Portable
7
53
 
@@ -81,4 +127,3 @@ bq. @puts some_register@
81
127
  * Simulate fifteen clock cycles:
82
128
 
83
129
  bq. @15.times { simulate }@
84
-
data/doc/lib/doc_proxy.rb CHANGED
@@ -24,6 +24,7 @@ require 'erb_proxy'
24
24
  class DocProxy < ErbProxy
25
25
  Block = Struct.new :anchor, :title, :type
26
26
  Heading = Struct.new :anchor, :title, :depth, :index
27
+ Index = Struct.new :name, :items
27
28
  @@anchorNum = 0
28
29
 
29
30
  CATEGORIES = {
@@ -40,6 +41,7 @@ class DocProxy < ErbProxy
40
41
 
41
42
  @blocks = Hash.new {|h,k| h[k] = []}
42
43
  @headings = []
44
+ @indexes = Hash.new {|h,k| h[k] = []}
43
45
 
44
46
  CATEGORIES[:admonition].each do |type|
45
47
  add_block_handler :admonition, type do |index, title, text|
@@ -122,6 +124,20 @@ class DocProxy < ErbProxy
122
124
  end
123
125
  end
124
126
 
127
+ # determine index listings
128
+ DocProxy::CATEGORIES.each_pair do |cat, types|
129
+ category = cat.to_s.capitalize << 's'
130
+
131
+ types.each do |type|
132
+ items = @blocks[type]
133
+
134
+ unless items.empty?
135
+ name = type.to_s.capitalize << 's'
136
+ @indexes[category] << Index.new(name, items)
137
+ end
138
+ end
139
+ end
140
+
125
141
  buffer
126
142
  end
127
143
 
data/doc/lib/erb_proxy.rb CHANGED
@@ -45,4 +45,9 @@ class ErbProxy
45
45
  end
46
46
  }
47
47
  end
48
+
49
+ # Evaluates the given ERB template. Used to dynamically include one template within another.
50
+ def import aErbFile
51
+ ERB.new(File.read(aErbFile)).result
52
+ end
48
53
  end
data/doc/manual.doc CHANGED
@@ -11,7 +11,7 @@ _Happy reading!_
11
11
 
12
12
  h2(#terms). Terms
13
13
 
14
- Copyright (c) 2006 Suraj N. Kurapati.
14
+ Copyright (c) 2006, 2007 Suraj N. Kurapati.
15
15
 
16
16
  Permission is granted to copy, distribute and/or modify this document under the terms of the "GNU Free Documentation License":http://www.gnu.org/copyleft/fdl.html, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the the file named "LICENSE":./LICENSE.
17
17
 
@@ -20,7 +20,7 @@ The admonition and navigation graphics used in this manual are Copyright (c) 200
20
20
 
21
21
  h1(#intro). Introduction
22
22
 
23
- <%= File.read 'intro.inc' %>
23
+ <%= import 'intro.inc' %>
24
24
 
25
25
 
26
26
  h2(#intro.license). License
@@ -56,7 +56,7 @@ Ruby-VPI presents an open-ended interface to VPI. Thus, you can use any methodol
56
56
 
57
57
  h2(#background.vocab). Terminology
58
58
 
59
- <% note do %>
59
+ <% note "Glossary has definitions" do %>
60
60
  Have a look at the "glossary":#glossary for definitions of terms used in this manual.
61
61
  <% end %>
62
62
 
@@ -213,9 +213,7 @@ h2(#setup.maintenance). Maintenance
213
213
  * You can uninstall Ruby-VPI by running the <pre>gem uninstall ruby-vpi</pre> command.
214
214
  * You can upgrade to the latest release of Ruby-VPI by running the <pre>gem update ruby-vpi</pre> command.
215
215
 
216
- <% note do %>
217
216
  Learn more about using and manipulating RubyGems in "the RubyGems user manual":http://www.rubygems.org.
218
- <% end %>
219
217
 
220
218
 
221
219
  h1(#usage). Usage
@@ -223,18 +221,37 @@ h1(#usage). Usage
223
221
 
224
222
  h2(#usage.vpi). VPI in Ruby
225
223
 
226
- The _entire_ IEEE Std 1364-2005 VPI interface is available in Ruby, but with one minor difference: the names of all VPI types, structures, and constants become _capitalized_ because Ruby requires that the names of constants begin with a capital letter.
224
+ The _entire_ IEEE Std 1364-2005 VPI interface is available in Ruby, but with a few minor differences.
225
+
226
+ p(title). Capitalize those names!
227
+
228
+ The names of all VPI types, structures, and constants become _capitalized_ because Ruby requires that the names of constants begin with a capital letter.
227
229
 
228
230
  For example, the @s_vpi_value@ structure becomes the @S_vpi_value@ class in Ruby. Likewise, the @vpiIntVal@ constant becomes the @VpiIntVal@ constant in Ruby.
229
231
 
230
- Note that this capitalization rule does _not_ apply to VPI functions; their names remain unchanged in Ruby.
232
+ <% note "No capitalization for VPI functions" do %>
233
+ Ruby's capitalization rule does _not_ apply to VPI functions--their names remain unchanged in Ruby.
234
+ <% end %>
235
+
236
+ p(title). Use Ruby's @printf@
237
+
238
+ The VPI functions @vpi_vprintf@ and @vpi_mcd_vprintf@ are not made accessible to Ruby. However, this isn't a big problem because you can use Ruby's @printf@ method instead.
239
+
240
+ The reason for this limitation is that some C compilers have trouble with pointers to the @va_list@ type. For these compilers, the third line of source code shown below causes a "type mismatch" error.
241
+
242
+ <code lang="c">
243
+ #include <stdarg.h>
244
+ void foo(va_list ap) {
245
+ va_list *p = &ap;
246
+ }
247
+ </code>
231
248
 
232
249
 
233
250
  h3(#usage.vpi.handles). Handles
234
251
 
235
252
  A _handle_ is a reference to an object, such as a module, register, wire, and so on, inside the Verilog simulation. In short, handles allow you to inspect and manipulate the design under test and its components.
236
253
 
237
- <% note do %>
254
+ <% note "@Vpi::Handle@ heritage" do %>
238
255
  Handles are instances of the @Vpi::Handle@ class (see "reference documentation":../ref/ruby/classes/Vpi/Handle.html for details) in Ruby-VPI.
239
256
  <% end %>
240
257
 
@@ -297,31 +314,31 @@ To access a handle's properties, invoke the property name, using the following f
297
314
  <% end %>
298
315
 
299
316
  <% example "Examples of accessing a handle's properties", "ex..properties" do %>
300
- |_/2. Ruby expression |_\6. Parts of speech |_/2. Description |
317
+ |_/2. Ruby expression |_\6. Method naming format |_/2. Description |
301
318
  ||_. Operation |_. _ |_. Property |_. _ |_. Accessor |_. Addendum ||
302
- | @handle.vpiIntVal@ | &nbsp; | &nbsp; | vpiIntVal | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the logic value of the handle's vpiIntVal property. |
319
+ | @handle.vpiIntVal@ | &nbsp; | &nbsp; | vpiIntVal | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the *logic value* of the handle's @VpiIntVal@ property. |
303
320
  | @handle.vpiIntVal_l@ | &nbsp; | &nbsp; | vpiIntVal | _ | l | &nbsp; |
304
321
  | @handle.intVal@ | &nbsp; | &nbsp; | intVal | &nbsp; | &nbsp; | &nbsp; |
305
322
  | @handle.intVal_l@ | &nbsp; | &nbsp; | intVal | _ | l | &nbsp; |
306
- | @handle.vpiIntVal = 15@ | &nbsp; | &nbsp; | vpiIntVal | &nbsp; | &nbsp; | = |/4. These expressions assign the number 15 to the logic value of the handle's vpiIntVal property. |
323
+ | @handle.vpiIntVal = 15@ | &nbsp; | &nbsp; | vpiIntVal | &nbsp; | &nbsp; | = |/4. These expressions assign the number 15 to the *logic value* of the handle's @VpiIntVal@ property. |
307
324
  | @handle.vpiIntVal_l = 15@ | &nbsp; | &nbsp; | vpiIntVal | _ | l | = |
308
325
  | @handle.intVal = 15@ | &nbsp; | &nbsp; | intVal | &nbsp; | &nbsp; | = |
309
326
  | @handle.intVal_l = 15@ | &nbsp; | &nbsp; | intVal | _ | l | = |
310
- | @handle.vpiType@ | &nbsp; | &nbsp; | vpiType | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the integer value of the handle's vpiType property. |
327
+ | @handle.vpiType@ | &nbsp; | &nbsp; | vpiType | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the *integer value* of the handle's @VpiType@ property. |
311
328
  | @handle.vpiType_i@ | &nbsp; | &nbsp; | vpiType | _ | i | &nbsp; |
312
329
  | @handle.type@ | &nbsp; | &nbsp; | type | &nbsp; | &nbsp; | &nbsp; |
313
330
  | @handle.type_i@ | &nbsp; | &nbsp; | type | _ | i | &nbsp; |
314
- | @handle.vpiProtected@ | &nbsp; | &nbsp; | vpiProtected | &nbsp; | &nbsp; | &nbsp; |/6. These expressions access the boolean value of the handle's vpiProtected property. |
331
+ | @handle.vpiProtected@ | &nbsp; | &nbsp; | vpiProtected | &nbsp; | &nbsp; | &nbsp; |/6. These expressions access the *boolean value* of the handle's @VpiProtected@ property. |
315
332
  | @handle.vpiProtected_b@ | &nbsp; | &nbsp; | vpiProtected | _ | b | &nbsp; |
316
333
  | @handle.vpiProtected?@ | &nbsp; | &nbsp; | vpiProtected | &nbsp; | &nbsp; | ? |
317
334
  | @handle.protected@ | &nbsp; | &nbsp; | protected | &nbsp; | &nbsp; | &nbsp; |
318
335
  | @handle.protected_b@ | &nbsp; | &nbsp; | protected | _ | b | &nbsp; |
319
336
  | @handle.protected?@ | &nbsp; | &nbsp; | protected | &nbsp; | &nbsp; | ? |
320
- | @handle.vpiFullName@ | &nbsp; | &nbsp; | vpiFullName | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the string value of the handle's vpiFullName property. |
337
+ | @handle.vpiFullName@ | &nbsp; | &nbsp; | vpiFullName | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the *string value* of the handle's @VpiFullName@ property. |
321
338
  | @handle.vpiFullName_s@ | &nbsp; | &nbsp; | vpiFullName | _ | s | &nbsp; |
322
339
  | @handle.fullName@ | &nbsp; | &nbsp; | fullName | &nbsp; | &nbsp; | &nbsp; |
323
340
  | @handle.fullName_s@ | &nbsp; | &nbsp; | fullName | _ | s | &nbsp; |
324
- | @handle.vpiParent@ | &nbsp; | &nbsp; | vpiParent | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the handle value of the handle's vpiParent property. |
341
+ | @handle.vpiParent@ | &nbsp; | &nbsp; | vpiParent | &nbsp; | &nbsp; | &nbsp; |/4. These expressions access the *handle value* of the handle's @VpiParent@ property. |
325
342
  | @handle.vpiParent_h@ | &nbsp; | &nbsp; | vpiParent | _ | h | &nbsp; |
326
343
  | @handle.parent@ | &nbsp; | &nbsp; | parent | &nbsp; | &nbsp; | &nbsp; |
327
344
  | @handle.parent_h@ | &nbsp; | &nbsp; | parent | _ | h | &nbsp; |
@@ -369,11 +386,7 @@ cbHandle = vpi_register_cb(cbData) do |data|
369
386
  end
370
387
  </code>
371
388
 
372
- To see this code in action, append it to the <tt>counter_rspec_spec.rb</tt> and <tt>counter_xunit_spec.rb</tt> files, which are provided in <xref#usage.examples> and discussed in <xref#usage.tutorial.specification>.
373
- <% end %>
374
-
375
- <% figure "Output from <xref#ex..callback>" do %>
376
- Shown below is the output from running the "counter_rspec test":#usage.tutorial after appending the code shown in <xref#ex..callback> to the <tt>counter_rspec_spec.rb</tt> file.
389
+ Shown below is the result of appending this code to the <tt>counter_rspec_spec.rb</tt> file (provided in <xref#usage.examples> and discussed in <xref#usage.tutorial.specification>) and running the "counter_rspec test":#usage.tutorial.
377
390
 
378
391
  <pre>
379
392
  $ rake -f counter_rspec_runner.rake cver
@@ -474,7 +487,7 @@ h2(#usage.prototyping). Prototyping
474
487
 
475
488
  Ruby-VPI enables you to rapidly prototype your designs in Ruby without having to do full-scale implementations in Verilog. This lets you explore and evaluate different design choices quickly.
476
489
 
477
- In order to create a prototype,
490
+ To create a prototype,
478
491
  # "Determine the *interface*":#usage.tutorial.declare-design (Verilog module declaration) of your design.
479
492
  # "Generate a test":#usage.tutorial.generate-test for that interface.
480
493
  # "Implement the prototype":#usage.tutorial.implement-proto in the generated <tt>proto.rb</tt> file.
@@ -603,7 +616,7 @@ By converting Verilog header files into Ruby, your "test":#glossary.test can uti
603
616
 
604
617
  h2(#usage.tutorial). Tutorial
605
618
 
606
- # "Declare the design":#usage.tutorial.declare-design, which is a Verilog module, using Verilog 2001 syntax.
619
+ # "Declare a design":#usage.tutorial.declare-design using Verilog 2001 syntax.
607
620
  # "Generate a test":#usage.tutorial.generate-test for the design using the "automated test generator":#usage.tools.generate-test tool.
608
621
  # "Identify your expectations":#usage.tutorial.specification for the design and implement them in the specification.
609
622
  # (Optional) "Implement the prototype":#usage.tutorial.implement-proto of the design in Ruby.
@@ -910,10 +923,6 @@ Here the @clk_reg@ register is connected to the @clk_wire@ wire.
910
923
 
911
924
  h3(#problems.ivl.vpi_reset). Vpi::reset
912
925
 
913
- <% caution do %>
914
- The @vpi_control@ method was removed in release 3.0.0 (2006-04-23). Please use @Vpi::vpi_control(VpiReset)@ instead.
915
- <% end %>
916
-
917
926
  In version 0.8 of Icarus Verilog, the @vpi_control(vpiReset)@ VPI function causes an assertion to fail inside the simulator. As a result, the simulation terminates and a core dump is produced.
918
927
 
919
928