ruby-vpi 18.0.2 → 19.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. data/Rakefile +15 -19
  2. data/bin/generate/proto.rb +15 -10
  3. data/bin/ruby-vpi +2 -0
  4. data/doc/README +3 -5
  5. data/doc/Rakefile +3 -3
  6. data/doc/common.css +24 -136
  7. data/doc/common.tpl +48 -37
  8. data/doc/figures/figures.dia +19 -19
  9. data/doc/figures/ruby_relay.png +0 -0
  10. data/doc/history.html +252 -67
  11. data/doc/history.inc +98 -1
  12. data/doc/history.yaml +105 -0
  13. data/doc/intro.inc +43 -32
  14. data/doc/lib/doc_format.rb +19 -13
  15. data/doc/lib/doc_proxy.rb +7 -7
  16. data/doc/manual.doc +156 -117
  17. data/doc/manual.html +601 -560
  18. data/doc/memo.html +29 -25
  19. data/doc/print.css +63 -4
  20. data/doc/readme.doc +4 -6
  21. data/doc/readme.html +129 -111
  22. data/doc/rss.xml +168 -7
  23. data/doc/screen.css +146 -0
  24. data/doc/spacing.css +57 -0
  25. data/{samp → examples}/counter/RSpec/Rakefile +0 -0
  26. data/{samp → examples}/counter/RSpec/counter_design.rb +0 -0
  27. data/examples/counter/RSpec/counter_proto.rb +9 -0
  28. data/{samp → examples}/counter/RSpec/counter_runner.rake +0 -0
  29. data/{samp → examples}/counter/RSpec/counter_spec.rb +0 -0
  30. data/{samp → examples}/counter/Rakefile +0 -0
  31. data/{samp → examples}/counter/counter.v +0 -0
  32. data/{samp → examples}/counter/xUnit/Rakefile +0 -0
  33. data/{samp → examples}/counter/xUnit/counter_bench.rb +0 -0
  34. data/{samp → examples}/counter/xUnit/counter_bench.v +0 -0
  35. data/{samp → examples}/counter/xUnit/counter_design.rb +0 -0
  36. data/examples/counter/xUnit/counter_proto.rb +9 -0
  37. data/{samp → examples}/counter/xUnit/counter_runner.rake +0 -0
  38. data/{samp → examples}/counter/xUnit/counter_spec.rb +0 -0
  39. data/{samp → examples}/pipelined_alu/Hw5UnitModel.rb +0 -0
  40. data/{samp → examples}/pipelined_alu/README +0 -0
  41. data/{samp → examples}/pipelined_alu/Rakefile +0 -0
  42. data/{samp → examples}/pipelined_alu/TestHw5UnitModel.rb +0 -0
  43. data/{samp → examples}/pipelined_alu/hw5_unit.v +0 -0
  44. data/{samp → examples}/pipelined_alu/hw5_unit_design.rb +0 -7
  45. data/examples/pipelined_alu/hw5_unit_proto.rb +2 -0
  46. data/{samp → examples}/pipelined_alu/hw5_unit_runner.rake +0 -0
  47. data/{samp → examples}/pipelined_alu/hw5_unit_spec.rb +0 -0
  48. data/{samp → examples}/pipelined_alu/int_gen.rb +0 -0
  49. data/{samp → examples}/register_file/LICENSE +0 -0
  50. data/{samp → examples}/register_file/README +0 -0
  51. data/{samp → examples}/register_file/Rakefile +0 -0
  52. data/{samp → examples}/register_file/register_file.v +0 -0
  53. data/{samp → examples}/register_file/register_file_design.rb +0 -0
  54. data/examples/register_file/register_file_proto.rb +11 -0
  55. data/{samp → examples}/register_file/register_file_runner.rake +0 -0
  56. data/{samp → examples}/register_file/register_file_spec.rb +0 -0
  57. data/ext/main.c +5 -5
  58. data/ext/swig_vpi.i +6 -2
  59. data/lib/ruby-vpi/core/callback.rb +142 -0
  60. data/lib/ruby-vpi/core/edge.rb +128 -0
  61. data/lib/ruby-vpi/core/handle.rb +421 -0
  62. data/lib/ruby-vpi/core/scheduler.rb +244 -0
  63. data/lib/ruby-vpi/core/struct.rb +123 -0
  64. data/lib/ruby-vpi/core.rb +41 -0
  65. data/lib/ruby-vpi/rcov.rb +25 -12
  66. data/lib/ruby-vpi/runner.rb +30 -26
  67. data/lib/ruby-vpi/runner_boot_loader.rb +67 -37
  68. data/lib/ruby-vpi.rb +2 -2
  69. data/ref/c/annotated.html +1 -1
  70. data/ref/c/common_8h.html +1 -1
  71. data/ref/c/files.html +1 -1
  72. data/ref/c/functions.html +1 -1
  73. data/ref/c/functions_vars.html +1 -1
  74. data/ref/c/globals.html +1 -1
  75. data/ref/c/globals_0x63.html +1 -1
  76. data/ref/c/globals_0x65.html +1 -1
  77. data/ref/c/globals_0x66.html +1 -1
  78. data/ref/c/globals_0x6d.html +1 -1
  79. data/ref/c/globals_0x70.html +1 -1
  80. data/ref/c/globals_0x72.html +1 -1
  81. data/ref/c/globals_0x73.html +1 -1
  82. data/ref/c/globals_0x74.html +1 -1
  83. data/ref/c/globals_0x76.html +1 -1
  84. data/ref/c/globals_0x78.html +1 -1
  85. data/ref/c/globals_defs.html +1 -1
  86. data/ref/c/globals_defs_0x65.html +1 -1
  87. data/ref/c/globals_defs_0x70.html +1 -1
  88. data/ref/c/globals_defs_0x76.html +1 -1
  89. data/ref/c/globals_defs_0x78.html +1 -1
  90. data/ref/c/globals_enum.html +1 -1
  91. data/ref/c/globals_eval.html +1 -1
  92. data/ref/c/globals_func.html +1 -1
  93. data/ref/c/globals_type.html +1 -1
  94. data/ref/c/globals_vars.html +1 -1
  95. data/ref/c/index.html +1 -1
  96. data/ref/c/main_8c.html +1 -1
  97. data/ref/c/main_8h.html +1 -1
  98. data/ref/c/relay_8c.html +1 -1
  99. data/ref/c/relay_8h.html +1 -1
  100. data/ref/c/structt__cb__data.html +1 -1
  101. data/ref/c/structt__vpi__delay.html +1 -1
  102. data/ref/c/structt__vpi__error__info.html +1 -1
  103. data/ref/c/structt__vpi__strengthval.html +1 -1
  104. data/ref/c/structt__vpi__systf__data.html +1 -1
  105. data/ref/c/structt__vpi__time.html +1 -1
  106. data/ref/c/structt__vpi__value.html +1 -1
  107. data/ref/c/structt__vpi__vecval.html +1 -1
  108. data/ref/c/structt__vpi__vlog__info.html +1 -1
  109. data/ref/c/verilog_8h.html +1 -1
  110. data/ref/c/vlog_8c.html +1 -1
  111. data/ref/c/vlog_8h.html +1 -1
  112. data/ref/c/vpi__user_8h.html +1 -1
  113. data/ref/ruby/classes/ERB.html +7 -5
  114. data/ref/ruby/classes/ERB.src/{M000026.html → M000024.html} +0 -0
  115. data/ref/ruby/classes/FileUtils.html +11 -11
  116. data/ref/ruby/classes/FileUtils.src/{M000027.html → M000025.html} +0 -0
  117. data/ref/ruby/classes/FileUtils.src/{M000028.html → M000026.html} +0 -0
  118. data/ref/ruby/classes/Float.html +8 -6
  119. data/ref/ruby/classes/Float.src/{M000021.html → M000019.html} +0 -0
  120. data/ref/ruby/classes/Integer.html +67 -65
  121. data/ref/ruby/classes/Integer.src/M000007.html +25 -0
  122. data/ref/ruby/classes/Integer.src/{M000014.html → M000008.html} +5 -5
  123. data/ref/ruby/classes/Integer.src/M000009.html +5 -12
  124. data/ref/ruby/classes/Integer.src/M000010.html +5 -5
  125. data/ref/ruby/classes/Integer.src/M000011.html +5 -5
  126. data/ref/ruby/classes/Integer.src/M000012.html +5 -5
  127. data/ref/ruby/classes/Integer.src/M000015.html +25 -0
  128. data/ref/ruby/classes/Integer.src/M000016.html +31 -0
  129. data/ref/ruby/classes/Integer.src/M000017.html +12 -12
  130. data/ref/ruby/classes/Integer.src/M000018.html +17 -18
  131. data/ref/ruby/classes/Object.html +126 -0
  132. data/ref/ruby/classes/RDoc.html +5 -5
  133. data/ref/ruby/classes/RDoc.src/{M000061.html → M000081.html} +0 -0
  134. data/ref/ruby/classes/RubyVPI.html +50 -9
  135. data/ref/ruby/classes/String.html +22 -20
  136. data/ref/ruby/classes/String.src/M000020.html +36 -0
  137. data/ref/ruby/classes/String.src/M000021.html +41 -0
  138. data/ref/ruby/classes/String.src/M000022.html +5 -23
  139. data/ref/ruby/classes/String.src/M000023.html +5 -28
  140. data/ref/ruby/classes/{Vpi → VPI}/Handle.html +442 -140
  141. data/ref/ruby/classes/{Vpi/Handle.src/M000042.html → VPI/Handle.src/M000037.html} +4 -4
  142. data/ref/ruby/classes/VPI/Handle.src/M000038.html +21 -0
  143. data/ref/ruby/classes/VPI/Handle.src/M000039.html +18 -0
  144. data/ref/ruby/classes/{Vpi/Handle.src/M000036.html → VPI/Handle.src/M000040.html} +5 -5
  145. data/ref/ruby/classes/VPI/Handle.src/M000045.html +18 -0
  146. data/ref/ruby/classes/{Vpi/Handle.src/M000038.html → VPI/Handle.src/M000046.html} +5 -5
  147. data/ref/ruby/classes/VPI/Handle.src/M000057.html +18 -0
  148. data/ref/ruby/classes/{Vpi/Handle.src/M000040.html → VPI/Handle.src/M000058.html} +5 -5
  149. data/ref/ruby/classes/VPI/Handle.src/M000061.html +18 -0
  150. data/ref/ruby/classes/VPI/Handle.src/M000062.html +18 -0
  151. data/ref/ruby/classes/{Vpi/Handle.src/M000054.html → VPI/Handle.src/M000065.html} +11 -11
  152. data/ref/ruby/classes/VPI/Handle.src/M000067.html +21 -0
  153. data/ref/ruby/classes/VPI/Handle.src/M000068.html +28 -0
  154. data/ref/ruby/classes/VPI/Handle.src/M000069.html +50 -0
  155. data/ref/ruby/classes/{Vpi/Handle.src/M000048.html → VPI/Handle.src/M000070.html} +6 -6
  156. data/ref/ruby/classes/{Vpi/Handle.src/M000049.html → VPI/Handle.src/M000071.html} +6 -6
  157. data/ref/ruby/classes/{Vpi/Handle.src/M000050.html → VPI/Handle.src/M000072.html} +5 -5
  158. data/ref/ruby/classes/{Vpi/Handle.src/M000051.html → VPI/Handle.src/M000073.html} +17 -17
  159. data/ref/ruby/classes/VPI/Handle.src/M000075.html +18 -0
  160. data/ref/ruby/classes/VPI/Handle.src/M000076.html +40 -0
  161. data/ref/ruby/classes/{Vpi/Handle.src/M000056.html → VPI/Handle.src/M000077.html} +18 -18
  162. data/ref/ruby/classes/{Vpi → VPI}/S_vpi_time.html +22 -20
  163. data/ref/ruby/classes/VPI/S_vpi_time.src/M000078.html +18 -0
  164. data/ref/ruby/classes/VPI/S_vpi_time.src/M000079.html +19 -0
  165. data/ref/ruby/classes/{Vpi → VPI}/S_vpi_value.html +37 -23
  166. data/ref/ruby/classes/VPI/S_vpi_value.src/M000034.html +35 -0
  167. data/ref/ruby/classes/VPI/S_vpi_value.src/M000035.html +42 -0
  168. data/ref/ruby/classes/VPI/S_vpi_value.src/M000036.html +42 -0
  169. data/ref/ruby/classes/{Vpi.html → VPI.html} +129 -34
  170. data/ref/ruby/classes/VPI.src/M000027.html +19 -0
  171. data/ref/ruby/classes/VPI.src/M000028.html +18 -0
  172. data/ref/ruby/classes/VPI.src/M000029.html +19 -0
  173. data/ref/ruby/classes/VPI.src/M000031.html +25 -0
  174. data/ref/ruby/classes/VPI.src/M000032.html +26 -0
  175. data/ref/ruby/classes/VerilogParser/Module/Port.html +17 -15
  176. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html +23 -0
  177. data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000007.html → M000005.html} +0 -0
  178. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +5 -10
  179. data/ref/ruby/classes/VerilogParser/Module.html +7 -5
  180. data/ref/ruby/classes/VerilogParser/Module.src/{M000005.html → M000003.html} +0 -0
  181. data/ref/ruby/classes/VerilogParser.html +7 -5
  182. data/ref/ruby/classes/VerilogParser.src/{M000004.html → M000002.html} +0 -0
  183. data/ref/ruby/created.rid +1 -1
  184. data/ref/ruby/files/bin/generate_rb.html +2 -2
  185. data/ref/ruby/files/lib/ruby-vpi/{vpi_rb.html → core/callback_rb.html} +7 -8
  186. data/ref/ruby/files/lib/ruby-vpi/core/edge_rb.html +114 -0
  187. data/ref/ruby/files/lib/ruby-vpi/core/handle_rb.html +107 -0
  188. data/ref/ruby/files/lib/ruby-vpi/core/scheduler_rb.html +114 -0
  189. data/ref/ruby/files/lib/ruby-vpi/core/struct_rb.html +108 -0
  190. data/ref/ruby/files/lib/ruby-vpi/core_rb.html +121 -0
  191. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
  192. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.html +5 -41
  193. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000001.html +3 -3
  194. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
  195. data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
  196. data/ref/ruby/fr_class_index.html +5 -4
  197. data/ref/ruby/fr_file_index.html +6 -1
  198. data/ref/ruby/fr_method_index.html +80 -60
  199. metadata +126 -103
  200. data/ext/swig_vpi.h +0 -924
  201. data/ext/swig_wrap.cin +0 -7083
  202. data/lib/ruby-vpi/vpi.rb +0 -651
  203. data/ref/ruby/classes/Integer.src/M000013.html +0 -18
  204. data/ref/ruby/classes/Integer.src/M000019.html +0 -25
  205. data/ref/ruby/classes/Integer.src/M000020.html +0 -30
  206. data/ref/ruby/classes/String.src/M000024.html +0 -18
  207. data/ref/ruby/classes/String.src/M000025.html +0 -18
  208. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +0 -18
  209. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +0 -18
  210. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +0 -18
  211. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +0 -18
  212. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +0 -18
  213. data/ref/ruby/classes/Vpi/Handle.src/M000043.html +0 -21
  214. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +0 -21
  215. data/ref/ruby/classes/Vpi/Handle.src/M000045.html +0 -22
  216. data/ref/ruby/classes/Vpi/Handle.src/M000046.html +0 -50
  217. data/ref/ruby/classes/Vpi/Handle.src/M000047.html +0 -91
  218. data/ref/ruby/classes/Vpi/Handle.src/M000053.html +0 -18
  219. data/ref/ruby/classes/Vpi/Handle.src/M000057.html +0 -40
  220. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000058.html +0 -18
  221. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000059.html +0 -19
  222. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000032.html +0 -18
  223. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +0 -18
  224. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +0 -18
  225. data/ref/ruby/classes/Vpi.src/M000029.html +0 -28
  226. data/ref/ruby/classes/Vpi.src/M000030.html +0 -39
  227. data/ref/ruby/classes/Vpi.src/M000031.html +0 -20
  228. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000002.html +0 -18
  229. data/samp/counter/RSpec/counter_proto.rb +0 -10
  230. data/samp/counter/xUnit/counter_proto.rb +0 -10
  231. data/samp/pipelined_alu/hw5_unit_proto.rb +0 -4
  232. data/samp/register_file/register_file_proto.rb +0 -11
data/doc/history.inc CHANGED
@@ -1,4 +1,101 @@
1
- <% section "Version 18.0.2 (2007-08-03)", "18.0.2" do %>This release fixes a bug in error reporting.
1
+ <% section "Version 19.0.0 (2007-08-27)", "19.0.0" do %>This release restores support for Cadence NC-Sim, breaks support for Mentor Modelsim, adds support for concurrent processes which simplify implementing Ruby prototypess, and offers numerous other improvements.
2
+
3
+ *Mentor Modelsim users, take note*: this release does not work very well with Mentor Modelsim, so do not upgrade until compatibility is restored in a future release. In the mean time, consider using this release with another simulator, such as "GPL Cver":http://www.pragmatic-c.com/gpl-cver/.
4
+
5
+
6
+ h2. Thanks
7
+
8
+ * Calvin Wong "requested the concurrent processes feature":http://rubyforge.org/pipermail/ruby-vpi-discuss/2007-August/000046.html, helped test it, and provided useful feedback.
9
+
10
+
11
+ h2. Caution
12
+
13
+ * Prototypes no longer have a @feign!@ method. Instead, they emulate the behavior of the real Verilog DUT using the new "concurrency model":manual.html#usage.concurrency.
14
+
15
+ * All "initial" blocks in Verilog code are now evaluated _before_ the specification begins executing. This allows you to set the initial value of registers in Verilog before the specification interacts with them.
16
+
17
+ * The @Vpi@ module has been renamed to @VPI@ for consistency with the project name.
18
+
19
+ * The @VPI::simulation_time@ method has been renamed to @VPI::current_time@.
20
+
21
+ * The @VPI::Handle.value_forced?@ method has been renamed to @VPI::Handle.force?@
22
+
23
+ * The <tt>samp/</tt> directory has been renamed to <tt>examples/</tt>.
24
+
25
+ * Code coverage analysis results are now produced only in plain-text format.
26
+
27
+
28
+ h2. Repairs
29
+
30
+ * You can now access VPI constants using their original uncapitalized names. For example, you can now write "vpiIntVal" instead of having to write "VpiIntVal". However, note that the capitalized names are still supported, so you are not required to change your code.
31
+
32
+ * Value change / edge detection for VPI handles was previously incorrect: if you called the @VPI::Handle.posedge?@ function twice in the same time step, it would give you two different answers.
33
+
34
+ * The problem of not being able to write values to nets in Cadence NC-Sim has been fixed.
35
+
36
+
37
+ h2. Additions
38
+
39
+ * Added support for "concurrent processes":manual.html#usage.concurrency, which make Ruby prototypes appear more like Verilog code and also give the ability to write parallel tests.
40
+
41
+ * Added support for performance profiling using the "ruby-prof":http://ruby-prof.rubyforge.org project. The profiler can be enabled by setting the @PROFILER@ environment variable to "1" before running a Ruby-VPI test.
42
+
43
+ * Added new method aliases to @VPI::Handle@ for value detection. The complete list of aliases is now:
44
+ ** Tests if the logic value of this handle is unknown (x).
45
+ *** x?
46
+ *** unknown?
47
+ *** dont_care?
48
+ ** Sets the logic value of this handle to unknown (x).
49
+ *** x!
50
+ *** unknown!
51
+ *** dont_care!
52
+ ** Tests if the logic value of this handle is high impedance (z).
53
+ *** z?
54
+ *** hi_z?
55
+ *** high_z?
56
+ *** high_impedance?
57
+ *** tri_state?
58
+ *** floating?
59
+ ** Sets the logic value of this handle to high impedance (z).
60
+ *** z!
61
+ *** hi_z!
62
+ *** high_z!
63
+ *** high_impedance!
64
+ *** tri_state!
65
+ *** floating!
66
+ ** Tests if the logic value of this handle is at "logic high" level.
67
+ *** high?
68
+ *** one?
69
+ ** Sets the logic value of this handle to "logic high" level.
70
+ *** high!
71
+ *** one!
72
+ ** Tests if the logic value of this handle is at "logic low" level.
73
+ *** low?
74
+ *** zero?
75
+ ** Sets the logic value of this handle to "logic low" level.
76
+ *** low!
77
+ *** zero!
78
+
79
+ * Added new methods to @VPI::Handle@ for value change / edge detection:
80
+ ** edge? - detects positive and negative edges
81
+ ** change? - detects any kind of value change
82
+ ** change_00? - detects a value change from 0 to 0
83
+ ** change_01? - detects a value change from 0 to 1
84
+ ** change_0x? - detects a value change from 0 to unknown
85
+ ** change_0z? - detects a value change from 0 to high-Z
86
+ ** change_10? - detects a value change from 1 to 0
87
+ ** change_11? - detects a value change from 1 to 1
88
+ ** change_1x? - detects a value change from 1 to unknown
89
+ ** change_1z? - detects a value change from 1 to high-Z
90
+ ** change_x0? - detects a value change from unknown to 0
91
+ ** change_x1? - detects a value change from unknown to 1
92
+ ** change_xx? - detects a value change from unknown to unknown
93
+ ** change_xz? - detects a value change from unknown to high-Z
94
+ ** change_z0? - detects a value change from high-Z to 0
95
+ ** change_z1? - detects a value change from high-Z to 1
96
+ ** change_zx? - detects a value change from high-Z to unknown
97
+ ** change_zz? - detects a value change from high-Z to high-Z
98
+ <% end %><% section "Version 18.0.2 (2007-08-03)", "18.0.2" do %>This release fixes a bug in error reporting.
2
99
 
3
100
 
4
101
  h2. Repairs
data/doc/history.yaml CHANGED
@@ -1,3 +1,108 @@
1
+ -
2
+ Version: 19.0.0
3
+
4
+ Date: 2007-08-27
5
+
6
+ Record: |
7
+ This release restores support for Cadence NC-Sim, breaks support for Mentor Modelsim, adds support for concurrent processes which simplify implementing Ruby prototypess, and offers numerous other improvements.
8
+
9
+ *Mentor Modelsim users, take note*: this release does not work very well with Mentor Modelsim, so do not upgrade until compatibility is restored in a future release. In the mean time, consider using this release with another simulator, such as "GPL Cver":http://www.pragmatic-c.com/gpl-cver/.
10
+
11
+
12
+ h2. Thanks
13
+
14
+ * Calvin Wong "requested the concurrent processes feature":http://rubyforge.org/pipermail/ruby-vpi-discuss/2007-August/000046.html, helped test it, and provided useful feedback.
15
+
16
+
17
+ h2. Caution
18
+
19
+ * Prototypes no longer have a @feign!@ method. Instead, they emulate the behavior of the real Verilog DUT using the new "concurrency model":manual.html#usage.concurrency.
20
+
21
+ * All "initial" blocks in Verilog code are now evaluated _before_ the specification begins executing. This allows you to set the initial value of registers in Verilog before the specification interacts with them.
22
+
23
+ * The @Vpi@ module has been renamed to @VPI@ for consistency with the project name.
24
+
25
+ * The @VPI::simulation_time@ method has been renamed to @VPI::current_time@.
26
+
27
+ * The @VPI::Handle.value_forced?@ method has been renamed to @VPI::Handle.force?@
28
+
29
+ * The <tt>samp/</tt> directory has been renamed to <tt>examples/</tt>.
30
+
31
+ * Code coverage analysis results are now produced only in plain-text format.
32
+
33
+
34
+ h2. Repairs
35
+
36
+ * You can now access VPI constants using their original uncapitalized names. For example, you can now write "vpiIntVal" instead of having to write "VpiIntVal". However, note that the capitalized names are still supported, so you are not required to change your code.
37
+
38
+ * Value change / edge detection for VPI handles was previously incorrect: if you called the @VPI::Handle.posedge?@ function twice in the same time step, it would give you two different answers.
39
+
40
+ * The problem of not being able to write values to nets in Cadence NC-Sim has been fixed.
41
+
42
+
43
+ h2. Additions
44
+
45
+ * Added support for "concurrent processes":manual.html#usage.concurrency, which make Ruby prototypes appear more like Verilog code and also give the ability to write parallel tests.
46
+
47
+ * Added support for performance profiling using the "ruby-prof":http://ruby-prof.rubyforge.org project. The profiler can be enabled by setting the @PROFILER@ environment variable to "1" before running a Ruby-VPI test.
48
+
49
+ * Added new method aliases to @VPI::Handle@ for value detection. The complete list of aliases is now:
50
+ ** Tests if the logic value of this handle is unknown (x).
51
+ *** x?
52
+ *** unknown?
53
+ *** dont_care?
54
+ ** Sets the logic value of this handle to unknown (x).
55
+ *** x!
56
+ *** unknown!
57
+ *** dont_care!
58
+ ** Tests if the logic value of this handle is high impedance (z).
59
+ *** z?
60
+ *** hi_z?
61
+ *** high_z?
62
+ *** high_impedance?
63
+ *** tri_state?
64
+ *** floating?
65
+ ** Sets the logic value of this handle to high impedance (z).
66
+ *** z!
67
+ *** hi_z!
68
+ *** high_z!
69
+ *** high_impedance!
70
+ *** tri_state!
71
+ *** floating!
72
+ ** Tests if the logic value of this handle is at "logic high" level.
73
+ *** high?
74
+ *** one?
75
+ ** Sets the logic value of this handle to "logic high" level.
76
+ *** high!
77
+ *** one!
78
+ ** Tests if the logic value of this handle is at "logic low" level.
79
+ *** low?
80
+ *** zero?
81
+ ** Sets the logic value of this handle to "logic low" level.
82
+ *** low!
83
+ *** zero!
84
+
85
+ * Added new methods to @VPI::Handle@ for value change / edge detection:
86
+ ** edge? - detects positive and negative edges
87
+ ** change? - detects any kind of value change
88
+ ** change_00? - detects a value change from 0 to 0
89
+ ** change_01? - detects a value change from 0 to 1
90
+ ** change_0x? - detects a value change from 0 to unknown
91
+ ** change_0z? - detects a value change from 0 to high-Z
92
+ ** change_10? - detects a value change from 1 to 0
93
+ ** change_11? - detects a value change from 1 to 1
94
+ ** change_1x? - detects a value change from 1 to unknown
95
+ ** change_1z? - detects a value change from 1 to high-Z
96
+ ** change_x0? - detects a value change from unknown to 0
97
+ ** change_x1? - detects a value change from unknown to 1
98
+ ** change_xx? - detects a value change from unknown to unknown
99
+ ** change_xz? - detects a value change from unknown to high-Z
100
+ ** change_z0? - detects a value change from high-Z to 0
101
+ ** change_z1? - detects a value change from high-Z to 1
102
+ ** change_zx? - detects a value change from high-Z to unknown
103
+ ** change_zz? - detects a value change from high-Z to high-Z
104
+
105
+
1
106
  -
2
107
  Version: 18.0.2
3
108
 
data/doc/intro.inc CHANGED
@@ -102,7 +102,7 @@ Ruby-VPI is "open source software":http://en.wikipedia.org/wiki/Open_source_soft
102
102
  - any version that supports the <tt>-pli</tt> option is acceptable.
103
103
 
104
104
  * "Cadence NC-Sim":http://www.cadence.com/products/functional_ver/nc-verilog/
105
- - any version that supports the <tt>+loadvpi</tt> option should be acceptable. However, version 05.83-s003 is _mostly_ acceptable because you *will not* be able to "force values onto wires":manual.html#problem.ncsim.vpiForceFlag.
105
+ - any version that supports the <tt>+loadvpi</tt> option should be acceptable.
106
106
 
107
107
  * "GPL Cver":http://www.pragmatic-c.com/gpl-cver/
108
108
  - version 2.11a or newer is acceptable.
@@ -135,6 +135,41 @@ Ruby-VPI is "open source software":http://en.wikipedia.org/wiki/Open_source_soft
135
135
  <% end %>
136
136
 
137
137
 
138
+ <% section "Appetizers", "intro.appetizers" do %>
139
+ Here is a tiny sampling of code to whet your appetite. See "the tutorial":manual.html#usage.tutorial for more samples.
140
+
141
+ * Assign the value 2^2048^ to a register:
142
+ ** @your_register.intVal = 2 ** 2048@
143
+ ** @your_register.put_value 2 ** 2048@
144
+
145
+ * Check if all nets in a module are at high impedance:
146
+ ** @your_module.all_net? { |your_net| your_net.z? }@
147
+ ** <code>
148
+ your_nets = your_module.net_a
149
+ your_nets.all? { |net| net.z? }
150
+ </code>
151
+
152
+ * See a register's path, width, and location (file & line number):
153
+ ** @puts your_register@
154
+ ** <code>
155
+ p :path => your_register.fullName
156
+ p :width => your_register.size
157
+ p :file => your_register.fileName
158
+ p :file => your_register.lineNo
159
+ </code>
160
+
161
+ * Access the first five elements in a memory:
162
+ ** @your_memory.memoryWord_a.first(5)@
163
+ ** @your_memory.memoryWord_a[0..4]@
164
+ ** @your_memory.memoryWord_a[0, 5]@
165
+
166
+ * Clear a memory by filling it with zeroes:
167
+ ** @your_memory.each_memoryWord { |w| w.zero! }@
168
+ ** @your_memory.each_memoryWord { |w| w.intVal = 0 }@
169
+ ** @your_memory.each_memoryWord { |w| w.put_value 0 }@
170
+ <% end %>
171
+
172
+
138
173
  <% section "Applications", "intro.applications" do %>
139
174
  Examples of tasks that can be performed with Ruby-VPI are:
140
175
 
@@ -158,39 +193,10 @@ Ruby-VPI is "open source software":http://en.wikipedia.org/wiki/Open_source_soft
158
193
  <% end %>
159
194
 
160
195
 
161
- <% section "Appetizers", "intro.appetizers" do %>
162
- Here is a tiny sampling of code to whet your appetite. See "the tutorial":manual.html#usage.tutorial for more samples.
163
-
164
- * Assign the value 2^2048^ to a register:
165
-
166
- bq. @your_register.intVal = 2 ** 2048@
167
-
168
- * Check if all nets in a module are at high impedance:
169
-
170
- bq. @your_module.all_net? { |net| net.z? }@
171
-
172
- * See a register's path, width, and location (file & line number):
173
-
174
- bq. @puts your_register@
175
-
176
- * Access the first five elements in a memory:
177
-
178
- bq. @your_memory.memoryWord_a[0..4]@
179
-
180
- * Clear a memory by filling it with zeroes:
181
-
182
- bq. @your_memory.each_memoryWord {|w| w.intVal = 0}@
183
- <% end %>
184
-
185
-
186
- <% section "License", "intro.license" do %>
187
- <%= h(File.read('../LICENSE')).gsub(/^Copyright.*$/, '\&<br/>') %>
188
- <% end %>
189
-
190
-
191
196
  <% section "Related works", "intro.related-works" do %>
192
- * "JOVE":http://jove.sourceforge.net is a Java interface to VPI.
197
+ * "ANVIL":http://anvil.sourceforge.net is a C++ interface to VPI.
193
198
  * "Teal":http://teal.sourceforge.net is a C++ interface to VPI.
199
+ * "JOVE":http://jove.sourceforge.net is a Java interface to VPI.
194
200
  * "ScriptEDA":http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/ is a Perl, Python, and Tcl interface to VPI.
195
201
  * "RHDL":http://rhdl.rubyforge.org is a hardware description and verification language based on Ruby.
196
202
  * "MyHDL":http://myhdl.jandecaluwe.com is a hardware description and verification language based on Python, which features conversion to Verilog and co-simulation.
@@ -202,3 +208,8 @@ Ruby-VPI is "open source software":http://en.wikipedia.org/wiki/Open_source_soft
202
208
  * "Verilog::Pli":http://www.veripool.com/verilog-pli.html is a Perl interface to PLI.
203
209
  <% end %>
204
210
  <% end %>
211
+
212
+
213
+ <% section "License", "intro.license" do %>
214
+ <%= h(File.read('../LICENSE')).gsub(/^Copyright.*$/, '\&<br/>') %>
215
+ <% end %>
@@ -48,8 +48,8 @@ class String
48
48
  end
49
49
 
50
50
 
51
- ## fix annoyances in Textile conversion
52
-
51
+ ## fix annoyances in Textile conversion
52
+
53
53
  # redcloth wraps indented text within <pre> tags
54
54
  html.gsub! %r{(<pre>)\s*<code>(.*?)\s*</code>\s*(</pre>)}m, '\1\2\3'
55
55
  html.gsub! %r{(<pre>)\s*<pre>(.*?)</pre>\s*(</pre>)}m, '\1\2\3'
@@ -85,25 +85,31 @@ class String
85
85
  # Otherwise, the programming language is assumed to be ruby.
86
86
  def coderay
87
87
  gsub %r{<(code)(.*?)>(.*?)</\1>}m do
88
- code = CGI.unescapeHTML $3
89
- atts = $2
88
+ matches = $~
90
89
 
91
- lang =
92
- if $2 =~ /lang=('|")(.*?)\1/i
93
- $2
94
- else
95
- :ruby
96
- end
90
+ atts = matches[2]
91
+ lang = if atts =~ /lang=('|")(.*?)\1/i then $2 else :ruby end
92
+
93
+ # obtain the raw source code w/o extraneous indentation
94
+ code = CGI.unescapeHTML(matches[3]).rstrip
95
+
96
+ if matches.pre_match =~ /^[ \t]+$/
97
+ code.gsub! %r/^#{$&}/, ''
98
+ end
99
+
100
+ # convert the code into HTML
101
+ html = CodeRay.scan(code, lang).html(:css => :style)
102
+
103
+ # perform smart sizing (block vs. inline) of the code
104
+ trailingText = matches.post_match[/^.*$/].to_s.strip
97
105
 
98
106
  tag =
99
- if code =~ /\n/
107
+ if code =~ /\n/ or trailingText.empty? or trailingText =~ %r{^</(p|div|body)}
100
108
  :pre
101
109
  else
102
110
  :code
103
111
  end
104
112
 
105
- html = CodeRay.scan(code, lang).html(:css => :style)
106
-
107
113
  %{<#{tag} class="code"#{atts}>#{html}</#{tag}>}
108
114
  end
109
115
  end
data/doc/lib/doc_proxy.rb CHANGED
@@ -64,7 +64,7 @@ class DocProxy < ErbProxy
64
64
  end
65
65
  }
66
66
 
67
- <p class="title"><a href="##{node.tocAnchor}">#{type.to_s.capitalize} #{node.number}</a>. &nbsp; #{node.title.to_html}</p>
67
+ <p class="title"><a href="##{node.tocAnchor}" class="ref">#{type.to_s.capitalize} #{node.number}</a>. &nbsp; #{node.title.to_html}</p>
68
68
 
69
69
  #{content.to_html}
70
70
  </div>
@@ -93,7 +93,7 @@ class DocProxy < ErbProxy
93
93
 
94
94
  <div id="#{node.anchor}" class="part">
95
95
  <h1 class="title">
96
- Part <a href="##{node.tocAnchor}">#{node.number}</a>
96
+ Part <a href="##{node.tocAnchor}" class="ref">#{node.number}</a>
97
97
 
98
98
  <br/><br/>
99
99
 
@@ -112,7 +112,7 @@ class DocProxy < ErbProxy
112
112
 
113
113
  <div id="#{node.anchor}" class="chapter">
114
114
  <h1 class="title">
115
- Chapter <a href="##{node.tocAnchor}">#{node.latexNumber}</a>
115
+ Chapter <a href="##{node.tocAnchor}" class="ref">#{node.latexNumber}</a>
116
116
 
117
117
  <br/><br/>
118
118
 
@@ -132,7 +132,7 @@ class DocProxy < ErbProxy
132
132
 
133
133
  <div id="#{node.anchor}" class="section">
134
134
  <h#{level} class="title">
135
- <a href="##{node.tocAnchor}">#{node.latexNumber}</a>
135
+ <a href="##{node.tocAnchor}" class="ref">#{node.latexNumber}</a>
136
136
 
137
137
  &nbsp;
138
138
 
@@ -192,7 +192,7 @@ class DocProxy < ErbProxy
192
192
 
193
193
  if node
194
194
  words = [
195
- %{<a href="##{node.anchor}">Reference #{node.number}</a>},
195
+ %{<a href="##{node.anchor}" class="ref">Reference #{node.number}</a>},
196
196
 
197
197
  # extra information about the citation (page #, etc.)
198
198
  *args.map {|s| s.to_html}
@@ -213,7 +213,7 @@ class DocProxy < ErbProxy
213
213
 
214
214
  if target
215
215
  title = aTitle || "#{target.type.to_s.capitalize} #{target.latexNumber || target.number}"
216
- %{<a href="##{target.anchor}">#{title.to_html}</a>}
216
+ %{<a href="##{target.anchor}" class="ref">#{title.to_html}</a>}
217
217
  else
218
218
  warn "invalid xref to #{aTarget.inspect}"
219
219
  ''
@@ -520,7 +520,7 @@ class DocProxy < ErbProxy
520
520
 
521
521
 
522
522
  # generate hyperlink for traveling from TOC to heading
523
- toc << %{<li><span class="hide">#{node.latexNumber} </span><a id="#{node.tocAnchor}" href="##{node.anchor}">#{node.title.to_html}</a></li>}
523
+ toc << %{<li>#{node.latexNumber} <a id="#{node.tocAnchor}" href="##{node.anchor}" class="ref">#{node.title.to_html}</a></li>}
524
524
  end
525
525
 
526
526
  if prevIndex.empty?