ruby-vpi 15.0.2 → 16.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 (208) hide show
  1. data/LICENSE +23 -340
  2. data/Rakefile +169 -192
  3. data/bin/generate_test.rb +26 -25
  4. data/bin/generate_test_tpl/runner.rake +4 -10
  5. data/bin/header_to_ruby.rb +3 -20
  6. data/doc/README +11 -0
  7. data/doc/Rakefile +8 -21
  8. data/doc/common.css +44 -10
  9. data/doc/common.tpl +5 -10
  10. data/doc/history.doc +8 -7
  11. data/doc/history.html +228 -560
  12. data/doc/history.rb +7 -11
  13. data/doc/{history.yml → history.yaml} +325 -128
  14. data/doc/images/{feed-icon.png → feed-icon-28x28.png} +0 -0
  15. data/doc/images/ruby/LICENSE +15 -0
  16. data/doc/images/ruby/logo-reflection.png +0 -0
  17. data/doc/images/ruby/logo-reflection.xcf +0 -0
  18. data/doc/images/ruby/logo.png +0 -0
  19. data/doc/images/{LICENSE → tango/LICENSE} +0 -0
  20. data/doc/images/{caution.png → tango/caution.png} +0 -0
  21. data/doc/images/{caution.svg → tango/caution.svg} +0 -0
  22. data/doc/images/{home.png → tango/home.png} +0 -0
  23. data/doc/images/{home.svg → tango/home.svg} +0 -0
  24. data/doc/images/{important.png → tango/important.png} +0 -0
  25. data/doc/images/{important.svg → tango/important.svg} +0 -0
  26. data/doc/images/{next.png → tango/next.png} +0 -0
  27. data/doc/images/{next.svg → tango/next.svg} +0 -0
  28. data/doc/images/{note.png → tango/note.png} +0 -0
  29. data/doc/images/{note.svg → tango/note.svg} +0 -0
  30. data/doc/images/{prev.png → tango/prev.png} +0 -0
  31. data/doc/images/{prev.svg → tango/prev.svg} +0 -0
  32. data/doc/images/{tip.png → tango/tip.png} +0 -0
  33. data/doc/images/{tip.svg → tango/tip.svg} +0 -0
  34. data/doc/images/{up.png → tango/up.png} +0 -0
  35. data/doc/images/{up.svg → tango/up.svg} +0 -0
  36. data/doc/images/{warning.png → tango/warning.png} +0 -0
  37. data/doc/images/{warning.svg → tango/warning.svg} +0 -0
  38. data/doc/intro.inc +105 -36
  39. data/doc/lib/doc_format.rb +151 -29
  40. data/doc/lib/doc_proxy.rb +28 -69
  41. data/doc/lib/erb_content.rb +10 -22
  42. data/doc/lib/erb_proxy.rb +13 -24
  43. data/doc/manual.doc +16 -60
  44. data/doc/manual.html +257 -340
  45. data/doc/memo.doc +2 -0
  46. data/doc/memo.html +11 -11
  47. data/doc/readme.doc +36 -2
  48. data/doc/readme.html +214 -51
  49. data/doc/rss.erb +3 -3
  50. data/doc/rss.xml +217 -269
  51. data/ext/Rakefile +7 -22
  52. data/ext/common.h +10 -21
  53. data/ext/extconf.rb +5 -0
  54. data/ext/main.c +2 -18
  55. data/ext/main.h +1 -16
  56. data/ext/relay.c +3 -17
  57. data/ext/relay.h +3 -17
  58. data/ext/verilog.h +6 -18
  59. data/ext/vlog.c +3 -21
  60. data/ext/vlog.h +3 -17
  61. data/lib/ruby-vpi/erb.rb +7 -20
  62. data/lib/ruby-vpi/float.rb +6 -20
  63. data/lib/ruby-vpi/integer.rb +27 -47
  64. data/lib/ruby-vpi/rake.rb +4 -19
  65. data/lib/ruby-vpi/rcov.rb +6 -21
  66. data/lib/ruby-vpi/rdoc.rb +3 -21
  67. data/lib/ruby-vpi/runner.rb +28 -29
  68. data/lib/ruby-vpi/runner_proxy.rb +5 -21
  69. data/lib/ruby-vpi/verilog_parser.rb +5 -20
  70. data/lib/ruby-vpi/vpi.rb +420 -376
  71. data/lib/ruby-vpi.rb +26 -32
  72. data/ref/c/annotated.html +1 -1
  73. data/ref/c/common_8h.html +1 -1
  74. data/ref/c/files.html +1 -1
  75. data/ref/c/functions.html +1 -1
  76. data/ref/c/functions_vars.html +1 -1
  77. data/ref/c/globals.html +1 -1
  78. data/ref/c/globals_0x63.html +1 -1
  79. data/ref/c/globals_0x65.html +1 -1
  80. data/ref/c/globals_0x66.html +1 -1
  81. data/ref/c/globals_0x6d.html +1 -1
  82. data/ref/c/globals_0x70.html +1 -1
  83. data/ref/c/globals_0x72.html +1 -1
  84. data/ref/c/globals_0x73.html +1 -1
  85. data/ref/c/globals_0x74.html +1 -1
  86. data/ref/c/globals_0x76.html +1 -1
  87. data/ref/c/globals_0x78.html +1 -1
  88. data/ref/c/globals_defs.html +1 -1
  89. data/ref/c/globals_defs_0x65.html +1 -1
  90. data/ref/c/globals_defs_0x70.html +1 -1
  91. data/ref/c/globals_defs_0x76.html +1 -1
  92. data/ref/c/globals_defs_0x78.html +1 -1
  93. data/ref/c/globals_enum.html +1 -1
  94. data/ref/c/globals_eval.html +1 -1
  95. data/ref/c/globals_func.html +1 -1
  96. data/ref/c/globals_type.html +1 -1
  97. data/ref/c/globals_vars.html +1 -1
  98. data/ref/c/index.html +1 -1
  99. data/ref/c/main_8c.html +1 -1
  100. data/ref/c/main_8h.html +1 -1
  101. data/ref/c/relay_8c.html +1 -1
  102. data/ref/c/relay_8h.html +1 -1
  103. data/ref/c/structt__cb__data.html +1 -1
  104. data/ref/c/structt__vpi__delay.html +1 -1
  105. data/ref/c/structt__vpi__error__info.html +1 -1
  106. data/ref/c/structt__vpi__strengthval.html +1 -1
  107. data/ref/c/structt__vpi__systf__data.html +1 -1
  108. data/ref/c/structt__vpi__time.html +1 -1
  109. data/ref/c/structt__vpi__value.html +1 -1
  110. data/ref/c/structt__vpi__vecval.html +1 -1
  111. data/ref/c/structt__vpi__vlog__info.html +1 -1
  112. data/ref/c/verilog_8h.html +1 -1
  113. data/ref/c/vlog_8c.html +1 -1
  114. data/ref/c/vlog_8h.html +1 -1
  115. data/ref/c/vpi__user_8h.html +1 -1
  116. data/ref/ruby/classes/ERB.html +5 -5
  117. data/ref/ruby/classes/ERB.src/{M000026.html → M000024.html} +15 -15
  118. data/ref/ruby/classes/FileUtils.html +10 -10
  119. data/ref/ruby/classes/FileUtils.src/{M000027.html → M000025.html} +4 -4
  120. data/ref/ruby/classes/FileUtils.src/{M000028.html → M000026.html} +4 -4
  121. data/ref/ruby/classes/Float.html +5 -5
  122. data/ref/ruby/classes/Float.src/{M000022.html → M000020.html} +5 -5
  123. data/ref/ruby/classes/Integer.html +20 -56
  124. data/ref/ruby/classes/Integer.src/M000008.html +11 -11
  125. data/ref/ruby/classes/Integer.src/M000009.html +4 -4
  126. data/ref/ruby/classes/Integer.src/M000010.html +4 -4
  127. data/ref/ruby/classes/Integer.src/M000011.html +4 -4
  128. data/ref/ruby/classes/Integer.src/M000012.html +4 -4
  129. data/ref/ruby/classes/Integer.src/M000013.html +4 -4
  130. data/ref/ruby/classes/Integer.src/M000016.html +12 -9
  131. data/ref/ruby/classes/Integer.src/M000017.html +18 -9
  132. data/ref/ruby/classes/Integer.src/M000018.html +12 -12
  133. data/ref/ruby/classes/Integer.src/M000019.html +17 -18
  134. data/ref/ruby/classes/RDoc.src/M000053.html +25 -25
  135. data/ref/ruby/classes/RubyVpi/Config.html +3 -3
  136. data/ref/ruby/classes/RubyVpi.html +11 -5
  137. data/ref/ruby/classes/RubyVpi.src/{M000029.html → M000027.html} +103 -101
  138. data/ref/ruby/classes/String.html +21 -15
  139. data/ref/ruby/classes/String.src/M000021.html +36 -0
  140. data/ref/ruby/classes/String.src/{M000024.html → M000022.html} +24 -24
  141. data/ref/ruby/classes/String.src/M000023.html +5 -23
  142. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +5 -5
  143. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +7 -7
  144. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html +4 -4
  145. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +4 -4
  146. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +4 -4
  147. data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +20 -20
  148. data/ref/ruby/classes/VerilogParser.html +6 -0
  149. data/ref/ruby/classes/VerilogParser.src/M000001.html +20 -20
  150. data/ref/ruby/classes/Vpi/Handle.html +89 -88
  151. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +18 -0
  152. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
  153. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -5
  154. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -5
  155. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +8 -5
  156. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +8 -8
  157. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +7 -6
  158. data/ref/ruby/classes/Vpi/Handle.src/M000043.html +31 -9
  159. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +74 -31
  160. data/ref/ruby/classes/Vpi/Handle.src/M000045.html +17 -74
  161. data/ref/ruby/classes/Vpi/Handle.src/M000046.html +11 -17
  162. data/ref/ruby/classes/Vpi/Handle.src/M000048.html +31 -0
  163. data/ref/ruby/classes/Vpi/Handle.src/M000049.html +53 -52
  164. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html +4 -4
  165. data/ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html +5 -5
  166. data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
  167. data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000036.html → M000033.html} +5 -5
  168. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
  169. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html +5 -5
  170. data/ref/ruby/classes/Vpi.html +48 -19
  171. data/ref/ruby/classes/Vpi.src/M000028.html +28 -0
  172. data/ref/ruby/classes/Vpi.src/M000029.html +18 -0
  173. data/ref/ruby/classes/Vpi.src/M000030.html +25 -15
  174. data/ref/ruby/classes/Vpi.src/M000031.html +9 -5
  175. data/ref/ruby/classes/Vpi.src/M000032.html +9 -25
  176. data/ref/ruby/created.rid +1 -1
  177. data/ref/ruby/files/bin/generate_test_rb.html +2 -1
  178. data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
  179. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +7 -1
  180. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +7 -1
  181. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +7 -1
  182. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +7 -1
  183. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +7 -1
  184. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  185. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  186. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
  187. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
  188. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  189. data/ref/ruby/files/lib/ruby-vpi_rb.html +7 -1
  190. data/ref/ruby/fr_method_index.html +34 -34
  191. data/samp/counter/counter_rspec_runner.rake +4 -0
  192. data/samp/counter/counter_xunit_runner.rake +4 -0
  193. data/samp/pipelined_alu/Hw5UnitModel.rb +3 -19
  194. data/samp/pipelined_alu/README +38 -13
  195. data/samp/pipelined_alu/TestHw5UnitModel.rb +9 -20
  196. data/samp/pipelined_alu/hw5_unit.v +1 -16
  197. data/samp/pipelined_alu/hw5_unit_test_runner.rake +4 -0
  198. data/samp/pipelined_alu/hw5_unit_test_spec.rb +3 -20
  199. data/samp/pipelined_alu/int_gen.rb +6 -20
  200. metadata +47 -43
  201. data/doc/LICENSE +0 -397
  202. data/doc/images/feed-icon.LICENSE +0 -2
  203. data/doc/images/feed-icon.svg +0 -18
  204. data/ref/ruby/classes/Integer.src/M000020.html +0 -25
  205. data/ref/ruby/classes/Integer.src/M000021.html +0 -30
  206. data/ref/ruby/classes/String.src/M000025.html +0 -18
  207. data/ref/ruby/classes/Vpi/Handle.src/M000047.html +0 -24
  208. data/ref/ruby/classes/Vpi.src/M000033.html +0 -22
@@ -20,59 +20,59 @@
20
20
  <div id="index">
21
21
  <h1 class="section-bar">Methods</h1>
22
22
  <div id="index-entries">
23
- <a href="classes/Vpi/Handle.html#M000046">[] (Vpi::Handle)</a><br />
24
- <a href="classes/Vpi.html#M000032">advance_time (Vpi)</a><br />
25
- <a href="classes/FileUtils.html#M000028">collect_args (FileUtils)</a><br />
26
- <a href="classes/Integer.html#M000017">ensure_max (Integer)</a><br />
27
- <a href="classes/Integer.html#M000016">ensure_min (Integer)</a><br />
28
- <a href="classes/Integer.html#M000020">extend_sign (Integer)</a><br />
29
- <a href="classes/Vpi/Handle.html#M000044">get_value (Vpi::Handle)</a><br />
30
- <a href="classes/Vpi/Handle.html#M000043">get_value_wrapper (Vpi::Handle)</a><br />
31
- <a href="classes/RubyVpi.html#M000029">init_bench (RubyVpi)</a><br />
23
+ <a href="classes/Vpi/Handle.html#M000045">[] (Vpi::Handle)</a><br />
24
+ <a href="classes/Vpi.html#M000030">advance_time (Vpi)</a><br />
25
+ <a href="classes/Vpi/Handle.html#M000048">cbValueChange (Vpi::Handle)</a><br />
26
+ <a href="classes/FileUtils.html#M000026">collect_args (FileUtils)</a><br />
27
+ <a href="classes/Integer.html#M000018">extend_sign (Integer)</a><br />
28
+ <a href="classes/Vpi/Handle.html#M000043">get_value (Vpi::Handle)</a><br />
29
+ <a href="classes/Vpi/Handle.html#M000042">get_value_wrapper (Vpi::Handle)</a><br />
30
+ <a href="classes/RubyVpi.html#M000027">init_bench (RubyVpi)</a><br />
32
31
  <a href="classes/VerilogParser/Module/Port.html#M000004">input? (VerilogParser::Module::Port)</a><br />
33
- <a href="classes/Vpi/Handle.html#M000047">inspect (Vpi::Handle)</a><br />
32
+ <a href="classes/Vpi/Handle.html#M000046">inspect (Vpi::Handle)</a><br />
34
33
  <a href="classes/Vpi/S_vpi_time.html#M000050">integer (Vpi::S_vpi_time)</a><br />
35
34
  <a href="classes/Vpi/S_vpi_time.html#M000051">integer= (Vpi::S_vpi_time)</a><br />
36
35
  <a href="classes/Integer.html#M000009">length (Integer)</a><br />
37
36
  <a href="classes/Integer.html#M000010">limit (Integer)</a><br />
38
37
  <a href="classes/Integer.html#M000008">log2 (Integer)</a><br />
39
- <a href="classes/Float.html#M000022">mantissa (Float)</a><br />
38
+ <a href="classes/Float.html#M000020">mantissa (Float)</a><br />
40
39
  <a href="classes/Integer.html#M000012">mask (Integer)</a><br />
41
40
  <a href="classes/Integer.html#M000014">max (Integer)</a><br />
42
41
  <a href="classes/Vpi/Handle.html#M000049">method_missing (Vpi::Handle)</a><br />
43
- <a href="classes/Vpi/Handle.html#M000042">negedge? (Vpi::Handle)</a><br />
42
+ <a href="classes/Vpi/Handle.html#M000041">negedge? (Vpi::Handle)</a><br />
44
43
  <a href="classes/VerilogParser.html#M000001">new (VerilogParser)</a><br />
44
+ <a href="classes/VerilogParser/Module/Parameter.html#M000007">new (VerilogParser::Module::Parameter)</a><br />
45
+ <a href="classes/Vpi.html#M000032">new (Vpi)</a><br />
46
+ <a href="classes/ERB.html#M000024">new (ERB)</a><br />
45
47
  <a href="classes/VerilogParser/Module/Port.html#M000003">new (VerilogParser::Module::Port)</a><br />
46
48
  <a href="classes/VerilogParser/Module.html#M000002">new (VerilogParser::Module)</a><br />
47
- <a href="classes/VerilogParser/Module/Parameter.html#M000007">new (VerilogParser::Module::Parameter)</a><br />
48
- <a href="classes/ERB.html#M000026">new (ERB)</a><br />
49
49
  <a href="classes/VerilogParser/Module/Port.html#M000005">output? (VerilogParser::Module::Port)</a><br />
50
- <a href="classes/Integer.html#M000018">pack (Integer)</a><br />
51
- <a href="classes/Vpi/Handle.html#M000041">posedge? (Vpi::Handle)</a><br />
52
- <a href="classes/Vpi/Handle.html#M000045">put_value (Vpi::Handle)</a><br />
50
+ <a href="classes/Integer.html#M000016">pack (Integer)</a><br />
51
+ <a href="classes/Vpi/Handle.html#M000040">posedge? (Vpi::Handle)</a><br />
52
+ <a href="classes/Vpi/Handle.html#M000044">put_value (Vpi::Handle)</a><br />
53
53
  <a href="classes/VerilogParser/Module/Port.html#M000006">reg? (VerilogParser::Module::Port)</a><br />
54
- <a href="classes/FileUtils.html#M000027">sh (FileUtils)</a><br />
55
- <a href="classes/Vpi.html#M000031">simulate (Vpi)</a><br />
56
- <a href="classes/Vpi.html#M000033">simulation_time (Vpi)</a><br />
57
- <a href="classes/Integer.html#M000021">split (Integer)</a><br />
58
- <a href="classes/Vpi/S_vpi_value.html#M000035">to_f (Vpi::S_vpi_value)</a><br />
59
- <a href="classes/String.html#M000023">to_f (String)</a><br />
54
+ <a href="classes/FileUtils.html#M000025">sh (FileUtils)</a><br />
55
+ <a href="classes/Vpi.html#M000029">simulate (Vpi)</a><br />
56
+ <a href="classes/Vpi.html#M000031">simulation_time (Vpi)</a><br />
57
+ <a href="classes/Integer.html#M000019">split (Integer)</a><br />
58
+ <a href="classes/Vpi/S_vpi_value.html#M000034">to_f (Vpi::S_vpi_value)</a><br />
59
+ <a href="classes/String.html#M000021">to_f (String)</a><br />
60
60
  <a href="classes/Vpi/S_vpi_time.html#M000052">to_i (Vpi::S_vpi_time)</a><br />
61
- <a href="classes/Vpi/S_vpi_value.html#M000034">to_i (Vpi::S_vpi_value)</a><br />
61
+ <a href="classes/Vpi/S_vpi_value.html#M000033">to_i (Vpi::S_vpi_value)</a><br />
62
62
  <a href="classes/Integer.html#M000011">to_limit (Integer)</a><br />
63
63
  <a href="classes/Integer.html#M000013">to_mask (Integer)</a><br />
64
64
  <a href="classes/Integer.html#M000015">to_max (Integer)</a><br />
65
- <a href="classes/String.html#M000025">to_ruby_const_name (String)</a><br />
66
- <a href="classes/Vpi/Handle.html#M000048">to_s (Vpi::Handle)</a><br />
67
- <a href="classes/Vpi/S_vpi_value.html#M000036">to_s (Vpi::S_vpi_value)</a><br />
68
- <a href="classes/Integer.html#M000019">unpack (Integer)</a><br />
65
+ <a href="classes/String.html#M000023">to_ruby_const_name (String)</a><br />
66
+ <a href="classes/Vpi/Handle.html#M000047">to_s (Vpi::Handle)</a><br />
67
+ <a href="classes/Vpi/S_vpi_value.html#M000035">to_s (Vpi::S_vpi_value)</a><br />
68
+ <a href="classes/Integer.html#M000017">unpack (Integer)</a><br />
69
69
  <a href="classes/RDoc.html#M000053">usage_from_file (RDoc)</a><br />
70
- <a href="classes/String.html#M000024">verilog_to_ruby (String)</a><br />
71
- <a href="classes/Vpi.html#M000030">vpi_register_cb (Vpi)</a><br />
72
- <a href="classes/Vpi/Handle.html#M000038">x! (Vpi::Handle)</a><br />
73
- <a href="classes/Vpi/Handle.html#M000037">x? (Vpi::Handle)</a><br />
74
- <a href="classes/Vpi/Handle.html#M000040">z! (Vpi::Handle)</a><br />
75
- <a href="classes/Vpi/Handle.html#M000039">z? (Vpi::Handle)</a><br />
70
+ <a href="classes/String.html#M000022">verilog_to_ruby (String)</a><br />
71
+ <a href="classes/Vpi.html#M000028">vpi_register_cb (Vpi)</a><br />
72
+ <a href="classes/Vpi/Handle.html#M000037">x! (Vpi::Handle)</a><br />
73
+ <a href="classes/Vpi/Handle.html#M000036">x? (Vpi::Handle)</a><br />
74
+ <a href="classes/Vpi/Handle.html#M000039">z! (Vpi::Handle)</a><br />
75
+ <a href="classes/Vpi/Handle.html#M000038">z? (Vpi::Handle)</a><br />
76
76
  </div>
77
77
  </div>
78
78
  </body>
@@ -33,6 +33,10 @@ SIMULATOR_ARGUMENTS = {
33
33
 
34
34
  # Mentor Modelsim
35
35
  :vsim => '',
36
+
37
+ # Cadence NC-Sim
38
+ :ncsim => '',
39
+
36
40
  }
37
41
 
38
42
  # This task is invoked _before_ the simulator runs.
@@ -33,6 +33,10 @@ SIMULATOR_ARGUMENTS = {
33
33
 
34
34
  # Mentor Modelsim
35
35
  :vsim => '',
36
+
37
+ # Cadence NC-Sim
38
+ :ncsim => '',
39
+
36
40
  }
37
41
 
38
42
  # This task is invoked _before_ the simulator runs.
@@ -1,22 +1,6 @@
1
- =begin
2
- Copyright 2006 Suraj N. Kurapati
3
-
4
- This file is part of Ruby-VPI.
5
-
6
- Ruby-VPI is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU General Public License
8
- as published by the Free Software Foundation; either version 2
9
- of the License, or (at your option) any later version.
10
-
11
- Ruby-VPI is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Ruby-VPI; if not, write to the Free Software Foundation,
18
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
- =end
1
+ #--
2
+ # Copyright 2006 Suraj N. Kurapati
3
+ # See the file named LICENSE for details.
20
4
 
21
5
  # Behavioral model of the hw5_unit Verilog module.
22
6
  class Hw5UnitModel
@@ -1,6 +1,9 @@
1
1
  PIPELINED ALU
2
2
 
3
- This example is my solution to a homework assignment for an Advanced Logic Design class I had taken during the Winter of 2006 at University of California, Santa Cruz. Relevant portions of the problem have been revised and reproduced here with permission from the instructor: professor Jose Renau.
3
+ This example is my solution to a homework assignment for an Advanced Logic
4
+ Design class I had taken during the Winter of 2006 at University of
5
+ California, Santa Cruz. Relevant portions of the problem have been revised and
6
+ reproduced here with permission from the instructor: professor Jose Renau.
4
7
 
5
8
 
6
9
 
@@ -44,13 +47,20 @@ PROBLEM
44
47
 
45
48
  5. OP_MULT must have 3 cycles latency.
46
49
 
47
- 6. There is only one result (res). Since three operations can finish every cycle, you need to buffer the other two. Note that since at most one operation starts per cycle, a 3-entry buffer should be enough.
50
+ 6. There is only one result (res). Since three operations can finish every
51
+ cycle, you need to buffer the other two. Note that since at most one operation
52
+ starts per cycle, a 3-entry buffer should be enough.
48
53
 
49
- 7. Each operation has an associated tag (in_databits) which you must pass back with the result (out_databits). For example, if a OP_MULT operation is started with parameters a=2, b=4, in_databits=3; then after the multiplication finishes three cycles later, the outputs should be res=8, out_databits=3, out_op=OP_MULT.
54
+ 7. Each operation has an associated tag (in_databits) which you must pass back
55
+ with the result (out_databits). For example, if a OP_MULT operation is started
56
+ with parameters a=2, b=4, in_databits=3; then after the multiplication
57
+ finishes three cycles later, the outputs should be res=8, out_databits=3,
58
+ out_op=OP_MULT.
50
59
 
51
60
  8. The testbench used to verify this module must:
52
61
 
53
- a. Test random combinations of positive, zero, one, prime numbers, power-of-two values from powers 1 to 32, and random numbers.
62
+ a. Test random combinations of positive, zero, one, prime numbers,
63
+ power-of-two values from powers 1 to 32, and random numbers.
54
64
 
55
65
  b. Execute random combinations of add, subtract, and multiply operations.
56
66
 
@@ -60,7 +70,10 @@ PROBLEM
60
70
 
61
71
  DESIGN
62
72
 
63
- From the start, my approach was to use a single queue to solve the resource conflict (only one ALU can give an output per cycle). After drawing some sketches and understanding the problem, I wrote the following algorithm to solve the resource conflict:
73
+ From the start, my approach was to use a single queue to solve the resource
74
+ conflict (only one ALU can give an output per cycle). After drawing some
75
+ sketches and understanding the problem, I wrote the following algorithm to
76
+ solve the resource conflict:
64
77
 
65
78
  def queue_results(a, b, c)
66
79
  output a
@@ -68,7 +81,10 @@ DESIGN
68
81
  end
69
82
 
70
83
 
71
- We cannot perform all the operations in the queue_results method using only one cycle. However, if the queue_results method is not implemented as shown, then the design will not work---it will be chaotic and produce incoherent results.
84
+ We cannot perform all the operations in the queue_results method using only
85
+ one cycle. However, if the queue_results method is not implemented as shown,
86
+ then the design will not work---it will be chaotic and produce incoherent
87
+ results.
72
88
 
73
89
  The trick is to satisfy the post-conditions of the queue_results method (one result is outputted and the other two have been queued) using multiple clock cycles:
74
90
 
@@ -88,15 +104,23 @@ DESIGN
88
104
  2. enqueue c; output a
89
105
  (nothing to remember)
90
106
 
91
- Note that we cannot output the 'a' result during the first cycle because that would violate the post-conditions.
107
+ Note that we cannot output the 'a' result during the first cycle because that
108
+ would violate the post-conditions.
92
109
 
93
110
 
94
- After gaining this understanding, I realized that a separate queue was wholly unnecessary. Instead, I could simply use pipeline registers to remember values until they were needed (i.e. the 'a' result is output only in the last cycle).
111
+ After gaining this understanding, I realized that a separate queue was wholly
112
+ unnecessary. Instead, I could simply use pipeline registers to remember values
113
+ until they were needed (i.e. the 'a' result is output only in the last cycle).
95
114
 
96
- This approach uses exactly the same number of pipeline registers (three in this case) as the size of the queue suggested by the Professor. Also, this approach uses less storage than the three-queues (one for each ALU output; therefore 9 registers) approach suggested by the Professor.
115
+ This approach uses exactly the same number of pipeline registers (three in
116
+ this case) as the size of the queue suggested by the Professor. Also, this
117
+ approach uses less storage than the three-queues (one for each ALU output;
118
+ therefore 9 registers) approach suggested by the Professor.
97
119
 
98
120
 
99
- Finally, I wrote a behavioral model (see MODEL section) of the RTL using Ruby and verified both my initial approach (magical single-cycle queueing of multiple items) and its later improvement (the pipeline-register approach).
121
+ Finally, I wrote a behavioral model (see MODEL section) of the RTL using Ruby
122
+ and verified both my initial approach (magical single-cycle queueing of
123
+ multiple items) and its later improvement (the pipeline-register approach).
100
124
 
101
125
 
102
126
 
@@ -106,7 +130,8 @@ MODEL
106
130
  $ ruby -w TestHw5UnitModel.rb # use the "-d" option for details
107
131
 
108
132
 
109
- The model is written in Ruby and comes with a unit test which is similar to the Ruby-VPI test bench I wrote for the RTL implementation.
133
+ The model is written in Ruby and comes with a unit test which is similar to
134
+ the Ruby-VPI test bench I wrote for the RTL implementation.
110
135
 
111
136
 
112
137
 
@@ -123,5 +148,5 @@ TEST BENCH
123
148
 
124
149
 
125
150
 
126
- The test bench structure was ported from my unit test for the behavioral model of hw5_unit.
127
-
151
+ The test bench structure was ported from my unit test for the behavioral model
152
+ of hw5_unit.
@@ -1,22 +1,6 @@
1
- =begin
2
- Copyright 2006 Suraj N. Kurapati
3
-
4
- This file is part of Ruby-VPI.
5
-
6
- Ruby-VPI is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU General Public License
8
- as published by the Free Software Foundation; either version 2
9
- of the License, or (at your option) any later version.
10
-
11
- Ruby-VPI is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Ruby-VPI; if not, write to the Free Software Foundation,
18
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
- =end
1
+ #--
2
+ # Copyright 2006 Suraj N. Kurapati
3
+ # See the file named LICENSE for details.
20
4
 
21
5
  require 'InputGenerator'
22
6
  require 'Hw5UnitModel'
@@ -41,7 +25,12 @@ class TestHw5UnitModel < Test::Unit::TestCase
41
25
  inputQueue = []
42
26
 
43
27
  NUM_VECTORS.times do |i|
44
- inputQueue << Hw5UnitModel::Operation.new(Hw5UnitModel::OPERATIONS[rand(Hw5UnitModel::OPERATIONS.size)], i, @ingen.gen.abs, @ingen.gen.abs)
28
+ inputQueue << Hw5UnitModel::Operation.new(
29
+ Hw5UnitModel::OPERATIONS[rand(Hw5UnitModel::OPERATIONS.size)],
30
+ i,
31
+ @ingen.gen.abs,
32
+ @ingen.gen.abs
33
+ )
45
34
  end
46
35
 
47
36
 
@@ -1,21 +1,6 @@
1
1
  /*
2
2
  Copyright 2006 Suraj N. Kurapati
3
-
4
- This file is part of Ruby-VPI.
5
-
6
- Ruby-VPI is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU General Public License
8
- as published by the Free Software Foundation; either version 2
9
- of the License, or (at your option) any later version.
10
-
11
- Ruby-VPI is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Ruby-VPI; if not, write to the Free Software Foundation,
18
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3
+ See the file named LICENSE for details.
19
4
  */
20
5
 
21
6
  `define WIDTH 32
@@ -33,6 +33,10 @@ SIMULATOR_ARGUMENTS = {
33
33
 
34
34
  # Mentor Modelsim
35
35
  :vsim => '',
36
+
37
+ # Cadence NC-Sim
38
+ :ncsim => '',
39
+
36
40
  }
37
41
 
38
42
  # This task is invoked _before_ the simulator runs.
@@ -1,24 +1,7 @@
1
- =begin
2
- Copyright 2006 Suraj N. Kurapati
3
-
4
- This file is part of Ruby-VPI.
5
-
6
- Ruby-VPI is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU General Public License
8
- as published by the Free Software Foundation; either version 2
9
- of the License, or (at your option) any later version.
10
-
11
- Ruby-VPI is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Ruby-VPI; if not, write to the Free Software Foundation,
18
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
- =end
20
-
21
1
  # This file is a behavioral specification for the design under test.
2
+ #--
3
+ # Copyright 2006 Suraj N. Kurapati
4
+ # See the file named LICENSE for details.
22
5
 
23
6
  require 'int_gen'
24
7
 
@@ -1,22 +1,7 @@
1
- =begin
2
- Copyright 2006 Suraj N. Kurapati
3
-
4
- This file is part of Ruby-VPI.
5
-
6
- Ruby-VPI is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU General Public License
8
- as published by the Free Software Foundation; either version 2
9
- of the License, or (at your option) any later version.
10
-
11
- Ruby-VPI is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Ruby-VPI; if not, write to the Free Software Foundation,
18
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
- =end
1
+ # Library for generating integers.
2
+ #--
3
+ # Copyright 2006 Suraj N. Kurapati
4
+ # See the file named LICENSE for details.
20
5
 
21
6
  # Generates random integers of configurable length.
22
7
  class IntegerGenerator
@@ -27,7 +12,8 @@ class IntegerGenerator
27
12
 
28
13
  attr_reader :bits
29
14
 
30
- # Generates random integers that are representable by the given number of bits.
15
+ # Generates random integers that are representable by the given number of
16
+ # bits.
31
17
  def initialize aBits
32
18
  @bits = aBits
33
19
  @limit = 2 ** @bits
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ruby-vpi
5
5
  version: !ruby/object:Gem::Version
6
- version: 15.0.2
7
- date: 2007-01-22 00:00:00 -08:00
6
+ version: 16.0.0
7
+ date: 2007-05-02 00:00:00 -07:00
8
8
  summary: Ruby interface to IEEE 1364-2005 Verilog VPI
9
9
  require_paths:
10
10
  - lib
11
11
  email:
12
12
  homepage: http://ruby-vpi.rubyforge.org
13
13
  rubyforge_project: ruby-vpi
14
- description: Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby.
14
+ description: Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI and a platform for unit testing, rapid prototyping, and systems integration of Verilog modules through Ruby. It lets you create complex Verilog test benches easily and wholly in Ruby.
15
15
  autorequire: ruby-vpi
16
16
  default_executable:
17
17
  bindir: bin
@@ -76,53 +76,57 @@ files:
76
76
  - lib/ruby-vpi/float.rb
77
77
  - lib/ruby-vpi/vpi.rb
78
78
  - lib/ruby-vpi/verilog_parser.rb
79
- - doc/history.yml
79
+ - doc/history.rb
80
80
  - doc/Rakefile
81
81
  - doc/figures
82
82
  - doc/images
83
83
  - doc/rss.erb
84
- - doc/LICENSE
84
+ - doc/rss.xml
85
85
  - doc/memo.doc
86
86
  - doc/manual.doc
87
87
  - doc/history.doc
88
88
  - doc/common.css
89
89
  - doc/readme.doc
90
90
  - doc/common.tpl
91
- - doc/history.rb
91
+ - doc/memo.html
92
92
  - doc/intro.inc
93
93
  - doc/lib
94
- - doc/memo.html
95
94
  - doc/manual.html
96
95
  - doc/history.html
97
96
  - doc/readme.html
98
- - doc/rss.xml
97
+ - doc/history.yaml
98
+ - doc/README
99
99
  - doc/print.css
100
100
  - doc/figures/figures.dia
101
101
  - doc/figures/ruby_relay.png
102
102
  - doc/figures/organization.png
103
103
  - doc/figures/organization_detailed.png
104
- - doc/images/LICENSE
105
- - doc/images/feed-icon.LICENSE
106
- - doc/images/feed-icon.png
107
- - doc/images/caution.png
108
- - doc/images/caution.svg
109
- - doc/images/feed-icon.svg
110
- - doc/images/home.png
111
- - doc/images/home.svg
112
- - doc/images/important.png
113
- - doc/images/important.svg
114
- - doc/images/next.png
115
- - doc/images/next.svg
116
- - doc/images/note.png
117
- - doc/images/note.svg
118
- - doc/images/prev.png
119
- - doc/images/prev.svg
120
- - doc/images/tip.png
121
- - doc/images/tip.svg
122
- - doc/images/up.png
123
- - doc/images/up.svg
124
- - doc/images/warning.png
125
- - doc/images/warning.svg
104
+ - doc/images/feed-icon-28x28.png
105
+ - doc/images/ruby
106
+ - doc/images/tango
107
+ - doc/images/ruby/logo.png
108
+ - doc/images/ruby/LICENSE
109
+ - doc/images/ruby/logo-reflection.png
110
+ - doc/images/ruby/logo-reflection.xcf
111
+ - doc/images/tango/caution.png
112
+ - doc/images/tango/home.png
113
+ - doc/images/tango/important.png
114
+ - doc/images/tango/next.png
115
+ - doc/images/tango/note.png
116
+ - doc/images/tango/prev.png
117
+ - doc/images/tango/tip.png
118
+ - doc/images/tango/up.png
119
+ - doc/images/tango/warning.png
120
+ - doc/images/tango/caution.svg
121
+ - doc/images/tango/home.svg
122
+ - doc/images/tango/important.svg
123
+ - doc/images/tango/next.svg
124
+ - doc/images/tango/note.svg
125
+ - doc/images/tango/prev.svg
126
+ - doc/images/tango/tip.svg
127
+ - doc/images/tango/up.svg
128
+ - doc/images/tango/warning.svg
129
+ - doc/images/tango/LICENSE
126
130
  - doc/lib/doc_format.rb
127
131
  - doc/lib/doc_proxy.rb
128
132
  - doc/lib/erb_content.rb
@@ -276,29 +280,29 @@ files:
276
280
  - ref/ruby/classes/Integer.src/M000017.html
277
281
  - ref/ruby/classes/Integer.src/M000018.html
278
282
  - ref/ruby/classes/Integer.src/M000019.html
279
- - ref/ruby/classes/Integer.src/M000020.html
280
- - ref/ruby/classes/Integer.src/M000021.html
281
- - ref/ruby/classes/Float.src/M000022.html
283
+ - ref/ruby/classes/Float.src/M000020.html
284
+ - ref/ruby/classes/String.src/M000021.html
285
+ - ref/ruby/classes/String.src/M000022.html
282
286
  - ref/ruby/classes/String.src/M000023.html
283
- - ref/ruby/classes/String.src/M000024.html
284
- - ref/ruby/classes/String.src/M000025.html
285
- - ref/ruby/classes/ERB.src/M000026.html
286
- - ref/ruby/classes/FileUtils.src/M000027.html
287
- - ref/ruby/classes/FileUtils.src/M000028.html
288
- - ref/ruby/classes/RubyVpi.src/M000029.html
287
+ - ref/ruby/classes/ERB.src/M000024.html
288
+ - ref/ruby/classes/FileUtils.src/M000025.html
289
+ - ref/ruby/classes/FileUtils.src/M000026.html
290
+ - ref/ruby/classes/RubyVpi.src/M000027.html
291
+ - ref/ruby/classes/Vpi.src/M000028.html
292
+ - ref/ruby/classes/Vpi.src/M000029.html
289
293
  - ref/ruby/classes/Vpi.src/M000030.html
290
294
  - ref/ruby/classes/Vpi.src/M000031.html
291
295
  - ref/ruby/classes/Vpi.src/M000032.html
292
- - ref/ruby/classes/Vpi.src/M000033.html
293
296
  - ref/ruby/classes/Vpi/S_vpi_value.src
294
297
  - ref/ruby/classes/Vpi/Handle.src
295
298
  - ref/ruby/classes/Vpi/S_vpi_time.src
296
299
  - ref/ruby/classes/Vpi/S_vpi_value.html
297
300
  - ref/ruby/classes/Vpi/Handle.html
298
301
  - ref/ruby/classes/Vpi/S_vpi_time.html
302
+ - ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html
299
303
  - ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html
300
304
  - ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html
301
- - ref/ruby/classes/Vpi/S_vpi_value.src/M000036.html
305
+ - ref/ruby/classes/Vpi/Handle.src/M000036.html
302
306
  - ref/ruby/classes/Vpi/Handle.src/M000037.html
303
307
  - ref/ruby/classes/Vpi/Handle.src/M000038.html
304
308
  - ref/ruby/classes/Vpi/Handle.src/M000039.html
@@ -309,7 +313,7 @@ files:
309
313
  - ref/ruby/classes/Vpi/Handle.src/M000044.html
310
314
  - ref/ruby/classes/Vpi/Handle.src/M000045.html
311
315
  - ref/ruby/classes/Vpi/Handle.src/M000046.html
312
- - ref/ruby/classes/Vpi/Handle.src/M000047.html
316
+ - ref/ruby/classes/Vpi/Handle.src/M000048.html
313
317
  - ref/ruby/classes/Vpi/Handle.src/M000049.html
314
318
  - ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html
315
319
  - ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html