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.
Files changed (243) hide show
  1. data/HEADER +19 -4
  2. data/HISTORY +34 -1
  3. data/MEMO +2 -2
  4. data/README +14 -1
  5. data/Rakefile +39 -66
  6. data/bin/generate_test.rb +5 -23
  7. data/bin/generate_test_tpl/bench.rb +1 -1
  8. data/bin/generate_test_tpl/bench.v +2 -2
  9. data/bin/generate_test_tpl/proto.rb +8 -3
  10. data/bin/header_to_ruby.rb +3 -3
  11. data/doc/Rakefile +9 -26
  12. data/doc/{xhtml/background.html → background.html} +1 -1
  13. data/doc/{xhtml/background.methodology.html → background.methodology.html} +1 -1
  14. data/doc/{xhtml/background.organization.html → background.organization.html} +1 -1
  15. data/doc/{xhtml/background.running-tests.html → background.running-tests.html} +0 -0
  16. data/doc/{xhtml/background.terminology.html → background.terminology.html} +0 -0
  17. data/doc/{src/figures → figures}/organization.png +0 -0
  18. data/doc/{src/figures → figures}/organization_detailed.png +0 -0
  19. data/doc/{src/figures → figures}/ruby_init.png +0 -0
  20. data/doc/{src/figures → figures}/ruby_relay.png +0 -0
  21. data/doc/{xhtml/gfdl-0.html → gfdl-0.html} +0 -0
  22. data/doc/{xhtml/gfdl-1.html → gfdl-1.html} +0 -0
  23. data/doc/{xhtml/gfdl-10.html → gfdl-10.html} +0 -0
  24. data/doc/{xhtml/gfdl-2.html → gfdl-2.html} +0 -0
  25. data/doc/{xhtml/gfdl-3.html → gfdl-3.html} +0 -0
  26. data/doc/{xhtml/gfdl-4.html → gfdl-4.html} +0 -0
  27. data/doc/{xhtml/gfdl-5.html → gfdl-5.html} +0 -0
  28. data/doc/{xhtml/gfdl-6.html → gfdl-6.html} +0 -0
  29. data/doc/{xhtml/gfdl-7.html → gfdl-7.html} +0 -0
  30. data/doc/{xhtml/gfdl-8.html → gfdl-8.html} +0 -0
  31. data/doc/{xhtml/gfdl-9.html → gfdl-9.html} +0 -0
  32. data/doc/{xhtml/gfdl-addendum.html → gfdl-addendum.html} +0 -0
  33. data/doc/{xhtml/gfdl.html → gfdl.html} +0 -0
  34. data/doc/glossary.html +3 -0
  35. data/doc/{src/images → images}/COPYING +0 -0
  36. data/doc/{src/images → images}/ChangeLog +0 -0
  37. data/doc/{src/images → images}/blank.png +0 -0
  38. data/doc/{src/images → images}/callouts/1.png +0 -0
  39. data/doc/{src/images → images}/callouts/10.png +0 -0
  40. data/doc/{src/images → images}/callouts/11.png +0 -0
  41. data/doc/{src/images → images}/callouts/12.png +0 -0
  42. data/doc/{src/images → images}/callouts/13.png +0 -0
  43. data/doc/{src/images → images}/callouts/14.png +0 -0
  44. data/doc/{src/images → images}/callouts/15.png +0 -0
  45. data/doc/{src/images → images}/callouts/2.png +0 -0
  46. data/doc/{src/images → images}/callouts/3.png +0 -0
  47. data/doc/{src/images → images}/callouts/4.png +0 -0
  48. data/doc/{src/images → images}/callouts/5.png +0 -0
  49. data/doc/{src/images → images}/callouts/6.png +0 -0
  50. data/doc/{src/images → images}/callouts/7.png +0 -0
  51. data/doc/{src/images → images}/callouts/8.png +0 -0
  52. data/doc/{src/images → images}/callouts/9.png +0 -0
  53. data/doc/{src/images → images}/callouts/ChangeLog +0 -0
  54. data/doc/{src/images → images}/caution.png +0 -0
  55. data/doc/{src/images → images}/caution.svg +0 -0
  56. data/doc/{src/images → images}/copyright +0 -0
  57. data/doc/{src/images → images}/draft.png +0 -0
  58. data/doc/{src/images → images}/home.png +0 -0
  59. data/doc/{src/images → images}/home.svg +0 -0
  60. data/doc/{src/images → images}/important.png +0 -0
  61. data/doc/{src/images → images}/important.svg +0 -0
  62. data/doc/{src/images → images}/next.png +0 -0
  63. data/doc/{src/images → images}/next.svg +0 -0
  64. data/doc/{src/images → images}/note.png +0 -0
  65. data/doc/{src/images → images}/note.svg +0 -0
  66. data/doc/{src/images → images}/prev.png +0 -0
  67. data/doc/{src/images → images}/prev.svg +0 -0
  68. data/doc/{src/images → images}/tip.png +0 -0
  69. data/doc/{src/images → images}/tip.svg +0 -0
  70. data/doc/{src/images → images}/toc-blank.png +0 -0
  71. data/doc/{src/images → images}/toc-minus.png +0 -0
  72. data/doc/{src/images → images}/toc-plus.png +0 -0
  73. data/doc/{src/images → images}/up.png +0 -0
  74. data/doc/{src/images → images}/up.svg +0 -0
  75. data/doc/{src/images → images}/warning.png +0 -0
  76. data/doc/{src/images → images}/warning.svg +0 -0
  77. data/doc/{xhtml/index.html → index.html} +2 -2
  78. data/doc/{xhtml/introduction.html → introduction.html} +0 -0
  79. data/doc/{xhtml/introduction.license.html → introduction.license.html} +0 -0
  80. data/doc/{xhtml/introduction.manifest.html → introduction.manifest.html} +1 -1
  81. data/doc/{xhtml/introduction.related-works.html → introduction.related-works.html} +0 -0
  82. data/doc/{xhtml/introduction.resources.html → introduction.resources.html} +1 -1
  83. data/doc/{txt/manual.txt → manual.txt} +50 -49
  84. data/doc/{xhtml/problem.ivl.html → problem.ivl.html} +0 -0
  85. data/doc/{xhtml/problems.html → problems.html} +0 -0
  86. data/doc/{xhtml/problems.ruby.html → problems.ruby.html} +0 -0
  87. data/doc/{xhtml/problems.vsim.html → problems.vsim.html} +0 -0
  88. data/doc/src/manual.xml +53 -39
  89. data/doc/src/shared.dtd +1 -2
  90. data/doc/{xhtml/styles → styles}/manual.css +6 -10
  91. data/doc/{xhtml/usage.examples.html → usage.examples.html} +0 -0
  92. data/doc/{xhtml/usage.html → usage.html} +0 -0
  93. data/doc/{xhtml/usage.installation.html → usage.installation.html} +0 -0
  94. data/doc/{xhtml/usage.requirements.html → usage.requirements.html} +0 -0
  95. data/doc/{xhtml/usage.tools.html → usage.tools.html} +0 -0
  96. data/doc/{xhtml/usage.tutorial.html → usage.tutorial.html} +14 -18
  97. data/gem_extconf.rb +1 -1
  98. data/header.html +18 -4
  99. data/header.part.html +18 -4
  100. data/history.html +87 -5
  101. data/history.part.html +69 -1
  102. data/lib/ruby-vpi.rb +5 -5
  103. data/lib/ruby-vpi/rcov.rb +2 -2
  104. data/lib/ruby-vpi/runner.rb +4 -7
  105. data/lib/ruby-vpi/vpi_util.rb +2 -2
  106. data/memo.html +23 -9
  107. data/memo.part.html +5 -5
  108. data/readme.html +40 -5
  109. data/readme.part.html +22 -1
  110. data/ref/c/annotated.html +1 -1
  111. data/ref/c/common_8h.html +1 -1
  112. data/ref/c/files.html +1 -1
  113. data/ref/c/functions.html +1 -1
  114. data/ref/c/functions_vars.html +1 -1
  115. data/ref/c/globals.html +1 -1
  116. data/ref/c/globals_0x63.html +1 -1
  117. data/ref/c/globals_0x65.html +1 -1
  118. data/ref/c/globals_0x66.html +1 -1
  119. data/ref/c/globals_0x70.html +1 -1
  120. data/ref/c/globals_0x72.html +1 -1
  121. data/ref/c/globals_0x73.html +1 -1
  122. data/ref/c/globals_0x74.html +1 -1
  123. data/ref/c/globals_0x76.html +1 -1
  124. data/ref/c/globals_0x78.html +1 -1
  125. data/ref/c/globals_defs.html +1 -1
  126. data/ref/c/globals_defs_0x65.html +1 -1
  127. data/ref/c/globals_defs_0x70.html +1 -1
  128. data/ref/c/globals_defs_0x76.html +1 -1
  129. data/ref/c/globals_defs_0x78.html +1 -1
  130. data/ref/c/globals_enum.html +1 -1
  131. data/ref/c/globals_eval.html +1 -1
  132. data/ref/c/globals_func.html +1 -1
  133. data/ref/c/globals_type.html +1 -1
  134. data/ref/c/globals_vars.html +1 -1
  135. data/ref/c/hierarchy.html +1 -1
  136. data/ref/c/index.html +1 -1
  137. data/ref/c/relay_8cin.html +1 -1
  138. data/ref/c/relay_8hin.html +1 -1
  139. data/ref/c/ruby-vpi_8c.html +1 -1
  140. data/ref/c/structrelay____RubyOptions____def.html +1 -1
  141. data/ref/c/structt__cb__data.html +1 -1
  142. data/ref/c/structt__vpi__delay.html +1 -1
  143. data/ref/c/structt__vpi__error__info.html +1 -1
  144. data/ref/c/structt__vpi__strengthval.html +1 -1
  145. data/ref/c/structt__vpi__systf__data.html +1 -1
  146. data/ref/c/structt__vpi__time.html +1 -1
  147. data/ref/c/structt__vpi__value.html +1 -1
  148. data/ref/c/structt__vpi__vecval.html +1 -1
  149. data/ref/c/structt__vpi__vlog__info.html +1 -1
  150. data/ref/c/swig_8cin.html +1 -1
  151. data/ref/c/swig_8hin.html +1 -1
  152. data/ref/c/verilog_8h.html +1 -1
  153. data/ref/c/vlog_8cin.html +1 -1
  154. data/ref/c/vlog_8hin.html +1 -1
  155. data/ref/c/vpi__user_8h.html +1 -1
  156. data/ref/ruby/classes/OutputInfo.src/M000014.html +36 -36
  157. data/ref/ruby/classes/{RubyVPI.html → RubyVpi.html} +6 -6
  158. data/ref/ruby/classes/{RubyVPI.src → RubyVpi.src}/M000075.html +5 -5
  159. data/ref/ruby/classes/{RubyVPI.src → RubyVpi.src}/M000076.html +2 -2
  160. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000070.html +2 -2
  161. data/ref/ruby/classes/Template.src/M000015.html +4 -4
  162. data/ref/ruby/classes/XX.html +4 -4
  163. data/ref/ruby/classes/XX/XHTML.html +5 -5
  164. data/ref/ruby/classes/XX/XHTML.src/{M000024.html → M000023.html} +0 -0
  165. data/ref/ruby/classes/XX/XHTML/Strict.html +5 -5
  166. data/ref/ruby/classes/XX/XHTML/Strict.src/{M000026.html → M000025.html} +0 -0
  167. data/ref/ruby/classes/XX/XHTML/Transitional.html +5 -5
  168. data/ref/ruby/classes/XX/XHTML/Transitional.src/{M000025.html → M000024.html} +0 -0
  169. data/ref/ruby/classes/XX/XMLish.html +5 -5
  170. data/ref/ruby/classes/XX/XMLish.src/{M000023.html → M000026.html} +0 -0
  171. data/ref/ruby/created.rid +1 -1
  172. data/ref/ruby/files/bin/generate_test_rb.html +7 -39
  173. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +15 -15
  174. data/ref/ruby/files/bin/header_to_ruby_rb.html +12 -4
  175. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
  176. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
  177. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
  178. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  179. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
  180. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  181. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +2 -7
  182. data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000002.html +6 -6
  183. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
  184. data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
  185. data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +1 -1
  186. data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
  187. data/ref/ruby/fr_class_index.html +1 -1
  188. data/ref/ruby/fr_method_index.html +10 -10
  189. data/samp/counter/counter_rspecTest_bench.rb +1 -1
  190. data/samp/counter/counter_rspecTest_proto.rb +1 -1
  191. data/samp/counter/counter_unitTest_bench.rb +1 -1
  192. data/samp/counter/counter_unitTest_proto.rb +1 -1
  193. data/samp/pipelined_alu/hw5_unit_test_bench.rb +1 -1
  194. data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
  195. metadata +183 -237
  196. data/doc/src/styles/manual.css +0 -87
  197. data/doc/xhtml/figures/organization.png +0 -0
  198. data/doc/xhtml/figures/organization_detailed.png +0 -0
  199. data/doc/xhtml/figures/ruby_init.png +0 -0
  200. data/doc/xhtml/figures/ruby_relay.png +0 -0
  201. data/doc/xhtml/glossary.html +0 -3
  202. data/doc/xhtml/images/COPYING +0 -67
  203. data/doc/xhtml/images/ChangeLog +0 -27
  204. data/doc/xhtml/images/blank.png +0 -0
  205. data/doc/xhtml/images/callouts/1.png +0 -0
  206. data/doc/xhtml/images/callouts/10.png +0 -0
  207. data/doc/xhtml/images/callouts/11.png +0 -0
  208. data/doc/xhtml/images/callouts/12.png +0 -0
  209. data/doc/xhtml/images/callouts/13.png +0 -0
  210. data/doc/xhtml/images/callouts/14.png +0 -0
  211. data/doc/xhtml/images/callouts/15.png +0 -0
  212. data/doc/xhtml/images/callouts/2.png +0 -0
  213. data/doc/xhtml/images/callouts/3.png +0 -0
  214. data/doc/xhtml/images/callouts/4.png +0 -0
  215. data/doc/xhtml/images/callouts/5.png +0 -0
  216. data/doc/xhtml/images/callouts/6.png +0 -0
  217. data/doc/xhtml/images/callouts/7.png +0 -0
  218. data/doc/xhtml/images/callouts/8.png +0 -0
  219. data/doc/xhtml/images/callouts/9.png +0 -0
  220. data/doc/xhtml/images/callouts/ChangeLog +0 -15
  221. data/doc/xhtml/images/caution.png +0 -0
  222. data/doc/xhtml/images/caution.svg +0 -290
  223. data/doc/xhtml/images/copyright +0 -55
  224. data/doc/xhtml/images/draft.png +0 -0
  225. data/doc/xhtml/images/home.png +0 -0
  226. data/doc/xhtml/images/home.svg +0 -386
  227. data/doc/xhtml/images/important.png +0 -0
  228. data/doc/xhtml/images/important.svg +0 -163
  229. data/doc/xhtml/images/next.png +0 -0
  230. data/doc/xhtml/images/next.svg +0 -191
  231. data/doc/xhtml/images/note.png +0 -0
  232. data/doc/xhtml/images/note.svg +0 -483
  233. data/doc/xhtml/images/prev.png +0 -0
  234. data/doc/xhtml/images/prev.svg +0 -852
  235. data/doc/xhtml/images/tip.png +0 -0
  236. data/doc/xhtml/images/tip.svg +0 -1145
  237. data/doc/xhtml/images/toc-blank.png +0 -0
  238. data/doc/xhtml/images/toc-minus.png +0 -0
  239. data/doc/xhtml/images/toc-plus.png +0 -0
  240. data/doc/xhtml/images/up.png +0 -0
  241. data/doc/xhtml/images/up.svg +0 -195
  242. data/doc/xhtml/images/warning.png +0 -0
  243. 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. Start here!</p>
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/projects/ruby-vpi" target="_top">
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/scm/?group_id=1339" target="_top">
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 and adds parsed constants to generated Verilog benches and Ruby designs.
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/xhtml to begin using Ruby-VPI.
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 without their SVN meta-data to the given destination URL
47
- def upload_without_svn aDestUrl, *aSources
48
- tmpDir = generate_temp_path
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'].reject {|f| File.expand_path(f) == __FILE__}
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 => [:web_dist, :web_ref, :web_doc]
202
+ task :web => [:web_info, :web_ref, :web_doc]
212
203
 
213
204
  desc "Publish distribution info."
214
- task :web_dist => ['style.css', *distDocs] do |t|
215
- upload_without_svn PROJECT_SSH_URL, *t.prerequisites
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
- upload_without_svn PROJECT_SSH_URL, *t.prerequisites
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
- upload_without_svn "#{PROJECT_SSH_URL}/doc/", *FileList['doc/xhtml/*']
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 :pkg => ['HISTORY', 'gem_extconf.rb'] do |t|
236
- # determine release version
237
- File.read(t.prerequisites[0]) =~ /Version\s+([\d\.]+)/
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
- Gem::manage_gems
274
- Gem::Builder.new(spec).build
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
- mv *(FileList['*.gem'] << File.dirname(__FILE__))
277
- end
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
- rm_r tmpDir
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 :config_gem_install => 'readme.html' do |t|
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
- # == Synopsis
4
- # Generates Ruby-VPI tests from Verilog 2001 module declarations. A generated test is composed of the following parts.
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 + 'Proto'
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 `#{optTestName}' for generated test."
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
- RubyVPI.init_bench '<%= aModuleInfo.name + aOutputInfo.suffix %>', :<%= aOutputInfo.protoClassName %>
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
- %>#(<%= instConfigDecl %>)<%
29
+ %>#(<%= instConfigDecl %>)<%
30
30
  end
31
31
 
32
- %><%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
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
- # read inputs
5
- # simulate design's behavior
6
- # produce outputs
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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/ruby -w
2
- #
3
- # == Synopsis
4
- # Transforms Verilog header files into Ruby syntax.
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
- # task name => [xsltproc flag, needs resources?]
25
- 'html' => ['xhtml', true],
26
- 'text' => ['txt', false],
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 |fmtName, (fmtFlag, needsResources)|
32
- desc "Generate documentation in #{fmtName} format."
33
- file fmtFlag => ['src/manual.xml', 'src/manual.xsl'] do |t|
34
- sh %{xmlto #{fmtFlag} -o #{fmtFlag} -m #{t.prerequisites[1]} #{t.prerequisites[0]}}
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'