ruby-vpi 16.0.1 → 17.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. data/LICENSE +19 -19
  2. data/README +1 -1
  3. data/Rakefile +35 -32
  4. data/bin/convert.rb +28 -0
  5. data/bin/generate/design.rb +16 -0
  6. data/bin/generate/proto.rb +13 -0
  7. data/bin/generate/runner.rake +33 -0
  8. data/bin/generate/spec.rb +45 -0
  9. data/bin/generate.rb +177 -0
  10. data/bin/ruby-vpi +56 -0
  11. data/doc/Rakefile +20 -4
  12. data/doc/common.css +92 -33
  13. data/doc/common.inc +13 -0
  14. data/doc/common.tpl +42 -28
  15. data/doc/history.doc +11 -11
  16. data/doc/history.html +769 -248
  17. data/doc/history.inc +909 -0
  18. data/doc/history.rb +9 -0
  19. data/doc/history.yaml +69 -0
  20. data/doc/intro.inc +170 -178
  21. data/doc/lib/doc_format.rb +57 -144
  22. data/doc/lib/doc_proxy.rb +504 -88
  23. data/doc/lib/erb_content.rb +8 -8
  24. data/doc/lib/erb_proxy.rb +17 -17
  25. data/doc/manual.doc +626 -777
  26. data/doc/manual.html +1541 -1031
  27. data/doc/memo.doc +38 -36
  28. data/doc/memo.html +64 -28
  29. data/doc/readme.doc +4 -31
  30. data/doc/readme.html +221 -163
  31. data/doc/rss.erb +1 -1
  32. data/doc/rss.xml +73 -1761
  33. data/ext/Rakefile +6 -5
  34. data/ext/main.c +17 -15
  35. data/ext/relay.c +4 -7
  36. data/ext/relay.h +2 -2
  37. data/ext/swig_vpi.h +2 -2
  38. data/ext/swig_vpi.i +1 -2
  39. data/ext/swig_wrap.cin +12 -16
  40. data/ext/vlog.c +5 -5
  41. data/ext/vlog.h +2 -2
  42. data/lib/ruby-vpi/erb.rb +3 -3
  43. data/lib/ruby-vpi/float.rb +2 -2
  44. data/lib/ruby-vpi/rcov.rb +5 -7
  45. data/lib/ruby-vpi/runner.rb +43 -41
  46. data/lib/ruby-vpi/runner_boot_loader.rb +117 -0
  47. data/lib/ruby-vpi/runner_proxy.rb +6 -8
  48. data/lib/ruby-vpi/util.rb +10 -0
  49. data/lib/ruby-vpi/verilog_parser.rb +28 -56
  50. data/lib/ruby-vpi/vpi.rb +168 -123
  51. data/lib/ruby-vpi.rb +22 -143
  52. data/ref/c/annotated.html +1 -1
  53. data/ref/c/common_8h.html +1 -1
  54. data/ref/c/files.html +1 -1
  55. data/ref/c/functions.html +1 -1
  56. data/ref/c/functions_vars.html +1 -1
  57. data/ref/c/globals.html +1 -1
  58. data/ref/c/globals_0x63.html +1 -1
  59. data/ref/c/globals_0x65.html +1 -1
  60. data/ref/c/globals_0x66.html +1 -1
  61. data/ref/c/globals_0x6d.html +1 -1
  62. data/ref/c/globals_0x70.html +1 -1
  63. data/ref/c/globals_0x72.html +1 -1
  64. data/ref/c/globals_0x73.html +1 -1
  65. data/ref/c/globals_0x74.html +1 -1
  66. data/ref/c/globals_0x76.html +1 -1
  67. data/ref/c/globals_0x78.html +1 -1
  68. data/ref/c/globals_defs.html +1 -1
  69. data/ref/c/globals_defs_0x65.html +1 -1
  70. data/ref/c/globals_defs_0x70.html +1 -1
  71. data/ref/c/globals_defs_0x76.html +1 -1
  72. data/ref/c/globals_defs_0x78.html +1 -1
  73. data/ref/c/globals_enum.html +1 -1
  74. data/ref/c/globals_eval.html +1 -1
  75. data/ref/c/globals_func.html +1 -1
  76. data/ref/c/globals_type.html +1 -1
  77. data/ref/c/globals_vars.html +1 -1
  78. data/ref/c/index.html +1 -1
  79. data/ref/c/main_8c.html +1 -1
  80. data/ref/c/main_8h.html +1 -1
  81. data/ref/c/relay_8c.html +1 -1
  82. data/ref/c/relay_8h.html +1 -1
  83. data/ref/c/structt__cb__data.html +1 -1
  84. data/ref/c/structt__vpi__delay.html +1 -1
  85. data/ref/c/structt__vpi__error__info.html +1 -1
  86. data/ref/c/structt__vpi__strengthval.html +1 -1
  87. data/ref/c/structt__vpi__systf__data.html +1 -1
  88. data/ref/c/structt__vpi__time.html +1 -1
  89. data/ref/c/structt__vpi__value.html +1 -1
  90. data/ref/c/structt__vpi__vecval.html +1 -1
  91. data/ref/c/structt__vpi__vlog__info.html +1 -1
  92. data/ref/c/verilog_8h.html +1 -1
  93. data/ref/c/vlog_8c.html +1 -1
  94. data/ref/c/vlog_8h.html +1 -1
  95. data/ref/c/vpi__user_8h.html +1 -1
  96. data/ref/ruby/classes/ERB.html +5 -5
  97. data/ref/ruby/classes/ERB.src/{M000024.html → M000026.html} +0 -0
  98. data/ref/ruby/classes/FileUtils.html +11 -11
  99. data/ref/ruby/classes/FileUtils.src/{M000025.html → M000027.html} +0 -0
  100. data/ref/ruby/classes/FileUtils.src/{M000026.html → M000028.html} +0 -0
  101. data/ref/ruby/classes/Float.html +6 -6
  102. data/ref/ruby/classes/Float.src/{M000020.html → M000021.html} +0 -0
  103. data/ref/ruby/classes/Integer.html +65 -65
  104. data/ref/ruby/classes/Integer.src/M000009.html +12 -5
  105. data/ref/ruby/classes/Integer.src/M000010.html +5 -5
  106. data/ref/ruby/classes/Integer.src/M000011.html +5 -5
  107. data/ref/ruby/classes/Integer.src/M000012.html +5 -5
  108. data/ref/ruby/classes/Integer.src/M000013.html +5 -5
  109. data/ref/ruby/classes/Integer.src/M000014.html +18 -0
  110. data/ref/ruby/classes/Integer.src/M000017.html +12 -18
  111. data/ref/ruby/classes/Integer.src/M000018.html +18 -12
  112. data/ref/ruby/classes/Integer.src/M000019.html +12 -17
  113. data/ref/ruby/classes/Integer.src/M000020.html +30 -0
  114. data/ref/ruby/classes/RDoc.html +5 -5
  115. data/ref/ruby/classes/RDoc.src/{M000053.html → M000058.html} +0 -0
  116. data/ref/ruby/classes/{RubyVpi/Config.html → RubyVPI.html} +20 -6
  117. data/ref/ruby/classes/String.html +34 -15
  118. data/ref/ruby/classes/String.src/M000022.html +5 -28
  119. data/ref/ruby/classes/String.src/M000023.html +5 -5
  120. data/ref/ruby/classes/String.src/{M000021.html → M000024.html} +0 -0
  121. data/ref/ruby/classes/String.src/M000025.html +41 -0
  122. data/ref/ruby/classes/VerilogParser/Module/Port.html +16 -36
  123. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +10 -5
  124. data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000004.html → M000007.html} +4 -4
  125. data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000005.html → M000008.html} +4 -4
  126. data/ref/ruby/classes/VerilogParser/Module.html +28 -9
  127. data/ref/ruby/classes/VerilogParser/Module.src/M000005.html +29 -0
  128. data/ref/ruby/classes/VerilogParser.html +5 -39
  129. data/ref/ruby/classes/VerilogParser.src/M000004.html +26 -0
  130. data/ref/ruby/classes/Vpi/Handle.html +179 -77
  131. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +18 -0
  132. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -5
  133. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
  134. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -5
  135. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -5
  136. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +5 -8
  137. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +5 -8
  138. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +5 -9
  139. data/ref/ruby/classes/Vpi/Handle.src/M000043.html +8 -31
  140. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +8 -74
  141. data/ref/ruby/classes/Vpi/Handle.src/M000045.html +9 -17
  142. data/ref/ruby/classes/Vpi/Handle.src/M000046.html +31 -11
  143. data/ref/ruby/classes/Vpi/Handle.src/M000047.html +86 -0
  144. data/ref/ruby/classes/Vpi/Handle.src/M000048.html +17 -18
  145. data/ref/ruby/classes/Vpi/Handle.src/M000050.html +18 -0
  146. data/ref/ruby/classes/Vpi/Handle.src/M000051.html +24 -0
  147. data/ref/ruby/classes/Vpi/Handle.src/M000053.html +31 -0
  148. data/ref/ruby/classes/Vpi/Handle.src/M000054.html +89 -0
  149. data/ref/ruby/classes/Vpi/S_vpi_time.html +16 -16
  150. data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000050.html → M000055.html} +4 -4
  151. data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000051.html → M000056.html} +5 -5
  152. data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
  153. data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000035.html → M000032.html} +5 -5
  154. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +5 -5
  155. data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
  156. data/ref/ruby/classes/Vpi.html +6 -42
  157. data/ref/ruby/classes/Vpi.src/M000029.html +15 -5
  158. data/ref/ruby/classes/Vpi.src/M000030.html +24 -24
  159. data/ref/ruby/classes/Vpi.src/M000031.html +6 -8
  160. data/ref/ruby/created.rid +1 -1
  161. data/ref/ruby/files/bin/{header_to_ruby_rb.html → convert_rb.html} +5 -5
  162. data/ref/ruby/files/bin/{generate_test_rb.html → generate_rb.html} +8 -21
  163. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
  164. data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
  165. data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
  166. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
  167. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
  168. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  169. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.html +197 -0
  170. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000001.html +17 -0
  171. data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000002.html +18 -0
  172. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  173. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +6 -19
  174. data/ref/ruby/files/lib/ruby-vpi/util_rb.html +101 -0
  175. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +8 -1
  176. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  177. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -14
  178. data/ref/ruby/fr_class_index.html +1 -3
  179. data/ref/ruby/fr_file_index.html +4 -2
  180. data/ref/ruby/fr_method_index.html +56 -51
  181. data/ref/ruby/index.html +1 -1
  182. data/samp/counter/RSpec/Rakefile +1 -0
  183. data/samp/counter/RSpec/counter_design.rb +15 -0
  184. data/samp/counter/RSpec/counter_proto.rb +10 -0
  185. data/samp/counter/RSpec/counter_runner.rake +44 -0
  186. data/samp/counter/RSpec/counter_spec.rb +39 -0
  187. data/samp/counter/Rakefile +1 -1
  188. data/samp/counter/counter.v +7 -7
  189. data/samp/counter/xUnit/Rakefile +1 -0
  190. data/samp/counter/xUnit/counter_bench.rb +95 -0
  191. data/samp/counter/{counter_xunit_bench.v → xUnit/counter_bench.v} +0 -0
  192. data/samp/counter/xUnit/counter_design.rb +15 -0
  193. data/samp/counter/xUnit/counter_proto.rb +10 -0
  194. data/samp/counter/xUnit/counter_runner.rake +44 -0
  195. data/samp/counter/{counter_xunit_spec.rb → xUnit/counter_spec.rb} +9 -9
  196. data/samp/pipelined_alu/Rakefile +1 -1
  197. data/samp/pipelined_alu/TestHw5UnitModel.rb +4 -5
  198. data/samp/pipelined_alu/hw5_unit.v +55 -85
  199. data/samp/pipelined_alu/hw5_unit_design.rb +51 -0
  200. data/samp/pipelined_alu/hw5_unit_proto.rb +4 -0
  201. data/samp/pipelined_alu/hw5_unit_runner.rake +43 -0
  202. data/samp/pipelined_alu/hw5_unit_spec.rb +64 -0
  203. data/samp/register_file/LICENSE +20 -0
  204. data/samp/register_file/README +4 -0
  205. data/samp/register_file/Rakefile +1 -0
  206. data/samp/register_file/register_file.v +18 -0
  207. data/samp/register_file/register_file_design.rb +11 -0
  208. data/samp/register_file/register_file_proto.rb +11 -0
  209. data/samp/register_file/register_file_runner.rake +43 -0
  210. data/samp/register_file/register_file_spec.rb +58 -0
  211. metadata +78 -66
  212. data/bin/generate_test.rb +0 -200
  213. data/bin/generate_test_tpl/bench.rb +0 -89
  214. data/bin/generate_test_tpl/bench.v +0 -26
  215. data/bin/generate_test_tpl/design.rb +0 -11
  216. data/bin/generate_test_tpl/proto.rb +0 -16
  217. data/bin/generate_test_tpl/runner.rake +0 -42
  218. data/bin/generate_test_tpl/spec.rb +0 -37
  219. data/bin/header_to_ruby.rb +0 -27
  220. data/ref/ruby/classes/Integer.src/M000008.html +0 -25
  221. data/ref/ruby/classes/Integer.src/M000016.html +0 -25
  222. data/ref/ruby/classes/RubyVpi.html +0 -199
  223. data/ref/ruby/classes/RubyVpi.src/M000027.html +0 -121
  224. data/ref/ruby/classes/VerilogParser/Module/Parameter.html +0 -160
  225. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +0 -19
  226. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +0 -21
  227. data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +0 -34
  228. data/ref/ruby/classes/VerilogParser.src/M000001.html +0 -34
  229. data/ref/ruby/classes/Vpi/Handle.src/M000049.html +0 -69
  230. data/ref/ruby/classes/Vpi.src/M000028.html +0 -28
  231. data/ref/ruby/classes/Vpi.src/M000032.html +0 -22
  232. data/samp/counter/counter_rspec_bench.rb +0 -86
  233. data/samp/counter/counter_rspec_bench.v +0 -9
  234. data/samp/counter/counter_rspec_design.rb +0 -8
  235. data/samp/counter/counter_rspec_proto.rb +0 -13
  236. data/samp/counter/counter_rspec_runner.rake +0 -52
  237. data/samp/counter/counter_rspec_spec.rb +0 -39
  238. data/samp/counter/counter_xunit_bench.rb +0 -86
  239. data/samp/counter/counter_xunit_design.rb +0 -8
  240. data/samp/counter/counter_xunit_proto.rb +0 -13
  241. data/samp/counter/counter_xunit_runner.rake +0 -52
  242. data/samp/pipelined_alu/hw5_unit_test_bench.rb +0 -86
  243. data/samp/pipelined_alu/hw5_unit_test_bench.v +0 -14
  244. data/samp/pipelined_alu/hw5_unit_test_design.rb +0 -61
  245. data/samp/pipelined_alu/hw5_unit_test_proto.rb +0 -7
  246. data/samp/pipelined_alu/hw5_unit_test_runner.rake +0 -52
  247. data/samp/pipelined_alu/hw5_unit_test_spec.rb +0 -68
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: ruby-vpi
5
5
  version: !ruby/object:Gem::Version
6
- version: 16.0.1
7
- date: 2007-05-27 00:00:00 -07:00
6
+ version: 17.0.0
7
+ date: 2007-07-22 00:00:00 -07:00
8
8
  summary: Ruby interface to IEEE 1364-2005 Verilog VPI
9
9
  require_paths:
10
10
  - lib
@@ -31,7 +31,6 @@ authors: []
31
31
  files:
32
32
  - LICENSE
33
33
  - ext
34
- - README
35
34
  - bin
36
35
  - lib
37
36
  - Rakefile
@@ -39,6 +38,7 @@ files:
39
38
  - index.html
40
39
  - samp
41
40
  - gem_extconf.rb
41
+ - README
42
42
  - ref
43
43
  - ext/swig_vpi.i
44
44
  - ext/vlog.c
@@ -47,27 +47,27 @@ files:
47
47
  - ext/extconf.rb
48
48
  - ext/relay.h
49
49
  - ext/main.h
50
- - ext/main.c
51
50
  - ext/verilog.h
52
51
  - ext/vlog.h
53
52
  - ext/relay.c
54
53
  - ext/Doxyfile
55
54
  - ext/vpi_user.h
55
+ - ext/main.c
56
56
  - ext/swig_vpi.h
57
57
  - ext/swig_wrap.cin
58
- - bin/generate_test.rb
59
- - bin/generate_test_tpl
60
- - bin/header_to_ruby.rb
61
- - bin/generate_test_tpl/runner.rake
62
- - bin/generate_test_tpl/bench.rb
63
- - bin/generate_test_tpl/bench.v
64
- - bin/generate_test_tpl/design.rb
65
- - bin/generate_test_tpl/proto.rb
66
- - bin/generate_test_tpl/spec.rb
58
+ - bin/generate
59
+ - bin/convert.rb
60
+ - bin/ruby-vpi
61
+ - bin/generate.rb
62
+ - bin/generate/runner.rake
63
+ - bin/generate/design.rb
64
+ - bin/generate/proto.rb
65
+ - bin/generate/spec.rb
67
66
  - lib/ruby-vpi.rb
68
67
  - lib/ruby-vpi
69
68
  - lib/ruby-vpi/erb.rb
70
69
  - lib/ruby-vpi/rake.rb
70
+ - lib/ruby-vpi/util.rb
71
71
  - lib/ruby-vpi/runner.rb
72
72
  - lib/ruby-vpi/integer.rb
73
73
  - lib/ruby-vpi/rdoc.rb
@@ -76,6 +76,8 @@ files:
76
76
  - lib/ruby-vpi/rcov.rb
77
77
  - lib/ruby-vpi/vpi.rb
78
78
  - lib/ruby-vpi/verilog_parser.rb
79
+ - lib/ruby-vpi/runner_boot_loader.rb
80
+ - doc/common.inc
79
81
  - doc/Rakefile
80
82
  - doc/figures
81
83
  - doc/images
@@ -83,15 +85,16 @@ files:
83
85
  - doc/memo.doc
84
86
  - doc/manual.doc
85
87
  - doc/history.doc
86
- - doc/README
87
88
  - doc/common.css
88
89
  - doc/readme.doc
89
90
  - doc/common.tpl
90
91
  - doc/history.rb
91
92
  - doc/intro.inc
92
93
  - doc/lib
94
+ - doc/README
93
95
  - doc/print.css
94
96
  - doc/history.yaml
97
+ - doc/history.inc
95
98
  - doc/memo.html
96
99
  - doc/manual.html
97
100
  - doc/history.html
@@ -133,32 +136,41 @@ files:
133
136
  - doc/lib/erb_proxy.rb
134
137
  - samp/pipelined_alu
135
138
  - samp/counter
139
+ - samp/register_file
136
140
  - samp/pipelined_alu/TestHw5UnitModel.rb
137
141
  - samp/pipelined_alu/Hw5UnitModel.rb
138
142
  - samp/pipelined_alu/README
139
143
  - samp/pipelined_alu/int_gen.rb
140
144
  - samp/pipelined_alu/hw5_unit.v
141
145
  - samp/pipelined_alu/Rakefile
142
- - samp/pipelined_alu/hw5_unit_test_spec.rb
143
- - samp/pipelined_alu/hw5_unit_test_bench.v
144
- - samp/pipelined_alu/hw5_unit_test_runner.rake
145
- - samp/pipelined_alu/hw5_unit_test_bench.rb
146
- - samp/pipelined_alu/hw5_unit_test_design.rb
147
- - samp/pipelined_alu/hw5_unit_test_proto.rb
146
+ - samp/pipelined_alu/hw5_unit_design.rb
147
+ - samp/pipelined_alu/hw5_unit_spec.rb
148
+ - samp/pipelined_alu/hw5_unit_proto.rb
149
+ - samp/pipelined_alu/hw5_unit_runner.rake
148
150
  - samp/counter/counter.v
149
- - samp/counter/counter_rspec_bench.rb
150
- - samp/counter/counter_rspec_bench.v
151
+ - samp/counter/xUnit
151
152
  - samp/counter/Rakefile
152
- - samp/counter/counter_rspec_spec.rb
153
- - samp/counter/counter_rspec_design.rb
154
- - samp/counter/counter_xunit_bench.rb
155
- - samp/counter/counter_xunit_bench.v
156
- - samp/counter/counter_rspec_proto.rb
157
- - samp/counter/counter_rspec_runner.rake
158
- - samp/counter/counter_xunit_design.rb
159
- - samp/counter/counter_xunit_proto.rb
160
- - samp/counter/counter_xunit_runner.rake
161
- - samp/counter/counter_xunit_spec.rb
153
+ - samp/counter/RSpec
154
+ - samp/counter/xUnit/counter_bench.rb
155
+ - samp/counter/xUnit/counter_bench.v
156
+ - samp/counter/xUnit/counter_design.rb
157
+ - samp/counter/xUnit/counter_proto.rb
158
+ - samp/counter/xUnit/counter_runner.rake
159
+ - samp/counter/xUnit/counter_spec.rb
160
+ - samp/counter/xUnit/Rakefile
161
+ - samp/counter/RSpec/counter_design.rb
162
+ - samp/counter/RSpec/counter_proto.rb
163
+ - samp/counter/RSpec/counter_runner.rake
164
+ - samp/counter/RSpec/counter_spec.rb
165
+ - samp/counter/RSpec/Rakefile
166
+ - samp/register_file/LICENSE
167
+ - samp/register_file/Rakefile
168
+ - samp/register_file/README
169
+ - samp/register_file/register_file.v
170
+ - samp/register_file/register_file_design.rb
171
+ - samp/register_file/register_file_proto.rb
172
+ - samp/register_file/register_file_runner.rake
173
+ - samp/register_file/register_file_spec.rb
162
174
  - ref/c
163
175
  - ref/ruby
164
176
  - ref/c/doxygen.png
@@ -219,14 +231,14 @@ files:
219
231
  - ref/ruby/fr_class_index.html
220
232
  - ref/ruby/fr_method_index.html
221
233
  - ref/ruby/index.html
222
- - ref/ruby/files/bin
223
234
  - ref/ruby/files/lib
224
- - ref/ruby/files/bin/generate_test_rb.html
225
- - ref/ruby/files/bin/header_to_ruby_rb.html
226
- - ref/ruby/files/lib/ruby-vpi_rb.html
235
+ - ref/ruby/files/bin
227
236
  - ref/ruby/files/lib/ruby-vpi
237
+ - ref/ruby/files/lib/ruby-vpi_rb.html
238
+ - ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src
228
239
  - ref/ruby/files/lib/ruby-vpi/erb_rb.html
229
240
  - ref/ruby/files/lib/ruby-vpi/rake_rb.html
241
+ - ref/ruby/files/lib/ruby-vpi/util_rb.html
230
242
  - ref/ruby/files/lib/ruby-vpi/runner_rb.html
231
243
  - ref/ruby/files/lib/ruby-vpi/integer_rb.html
232
244
  - ref/ruby/files/lib/ruby-vpi/rdoc_rb.html
@@ -235,6 +247,11 @@ files:
235
247
  - ref/ruby/files/lib/ruby-vpi/rcov_rb.html
236
248
  - ref/ruby/files/lib/ruby-vpi/vpi_rb.html
237
249
  - ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html
250
+ - ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.html
251
+ - ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000001.html
252
+ - ref/ruby/files/lib/ruby-vpi/runner_boot_loader_rb.src/M000002.html
253
+ - ref/ruby/files/bin/convert_rb.html
254
+ - ref/ruby/files/bin/generate_rb.html
238
255
  - ref/ruby/classes/VerilogParser.src
239
256
  - ref/ruby/classes/VerilogParser
240
257
  - ref/ruby/classes/Integer.src
@@ -242,7 +259,6 @@ files:
242
259
  - ref/ruby/classes/String.src
243
260
  - ref/ruby/classes/ERB.src
244
261
  - ref/ruby/classes/FileUtils.src
245
- - ref/ruby/classes/RubyVpi.src
246
262
  - ref/ruby/classes/Vpi.src
247
263
  - ref/ruby/classes/Vpi
248
264
  - ref/ruby/classes/RDoc.src
@@ -252,56 +268,50 @@ files:
252
268
  - ref/ruby/classes/String.html
253
269
  - ref/ruby/classes/ERB.html
254
270
  - ref/ruby/classes/FileUtils.html
255
- - ref/ruby/classes/RubyVpi.html
256
- - ref/ruby/classes/RubyVpi
271
+ - ref/ruby/classes/RubyVPI.html
257
272
  - ref/ruby/classes/Vpi.html
258
273
  - ref/ruby/classes/RDoc.html
259
- - ref/ruby/classes/VerilogParser.src/M000001.html
274
+ - ref/ruby/classes/VerilogParser.src/M000004.html
260
275
  - ref/ruby/classes/VerilogParser/Module.src
261
276
  - ref/ruby/classes/VerilogParser/Module
262
277
  - ref/ruby/classes/VerilogParser/Module.html
263
- - ref/ruby/classes/VerilogParser/Module.src/M000002.html
278
+ - ref/ruby/classes/VerilogParser/Module.src/M000005.html
264
279
  - ref/ruby/classes/VerilogParser/Module/Port.src
265
- - ref/ruby/classes/VerilogParser/Module/Parameter.src
266
280
  - ref/ruby/classes/VerilogParser/Module/Port.html
267
- - ref/ruby/classes/VerilogParser/Module/Parameter.html
268
- - ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html
269
- - ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html
270
- - ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html
271
281
  - ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html
272
- - ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html
273
- - ref/ruby/classes/Integer.src/M000008.html
282
+ - ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html
283
+ - ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html
274
284
  - ref/ruby/classes/Integer.src/M000009.html
275
285
  - ref/ruby/classes/Integer.src/M000010.html
276
286
  - ref/ruby/classes/Integer.src/M000011.html
277
287
  - ref/ruby/classes/Integer.src/M000012.html
278
288
  - ref/ruby/classes/Integer.src/M000013.html
279
- - ref/ruby/classes/Integer.src/M000016.html
289
+ - ref/ruby/classes/Integer.src/M000014.html
280
290
  - ref/ruby/classes/Integer.src/M000017.html
281
291
  - ref/ruby/classes/Integer.src/M000018.html
282
292
  - ref/ruby/classes/Integer.src/M000019.html
283
- - ref/ruby/classes/Float.src/M000020.html
284
- - ref/ruby/classes/String.src/M000021.html
293
+ - ref/ruby/classes/Integer.src/M000020.html
294
+ - ref/ruby/classes/Float.src/M000021.html
285
295
  - ref/ruby/classes/String.src/M000022.html
286
296
  - ref/ruby/classes/String.src/M000023.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
297
+ - ref/ruby/classes/String.src/M000024.html
298
+ - ref/ruby/classes/String.src/M000025.html
299
+ - ref/ruby/classes/ERB.src/M000026.html
300
+ - ref/ruby/classes/FileUtils.src/M000027.html
301
+ - ref/ruby/classes/FileUtils.src/M000028.html
292
302
  - ref/ruby/classes/Vpi.src/M000029.html
293
303
  - ref/ruby/classes/Vpi.src/M000030.html
294
304
  - ref/ruby/classes/Vpi.src/M000031.html
295
- - ref/ruby/classes/Vpi.src/M000032.html
296
305
  - ref/ruby/classes/Vpi/S_vpi_value.src
297
306
  - ref/ruby/classes/Vpi/Handle.src
298
307
  - ref/ruby/classes/Vpi/S_vpi_time.src
299
308
  - ref/ruby/classes/Vpi/S_vpi_value.html
300
309
  - ref/ruby/classes/Vpi/Handle.html
301
310
  - ref/ruby/classes/Vpi/S_vpi_time.html
311
+ - ref/ruby/classes/Vpi/S_vpi_value.src/M000032.html
302
312
  - ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html
303
313
  - ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html
304
- - ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html
314
+ - ref/ruby/classes/Vpi/Handle.src/M000035.html
305
315
  - ref/ruby/classes/Vpi/Handle.src/M000036.html
306
316
  - ref/ruby/classes/Vpi/Handle.src/M000037.html
307
317
  - ref/ruby/classes/Vpi/Handle.src/M000038.html
@@ -313,12 +323,15 @@ files:
313
323
  - ref/ruby/classes/Vpi/Handle.src/M000044.html
314
324
  - ref/ruby/classes/Vpi/Handle.src/M000045.html
315
325
  - ref/ruby/classes/Vpi/Handle.src/M000046.html
326
+ - ref/ruby/classes/Vpi/Handle.src/M000047.html
316
327
  - ref/ruby/classes/Vpi/Handle.src/M000048.html
317
- - ref/ruby/classes/Vpi/Handle.src/M000049.html
318
- - ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html
319
- - ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html
320
- - ref/ruby/classes/RDoc.src/M000053.html
321
- - ref/ruby/classes/RubyVpi/Config.html
328
+ - ref/ruby/classes/Vpi/Handle.src/M000050.html
329
+ - ref/ruby/classes/Vpi/Handle.src/M000051.html
330
+ - ref/ruby/classes/Vpi/Handle.src/M000053.html
331
+ - ref/ruby/classes/Vpi/Handle.src/M000054.html
332
+ - ref/ruby/classes/Vpi/S_vpi_time.src/M000055.html
333
+ - ref/ruby/classes/Vpi/S_vpi_time.src/M000056.html
334
+ - ref/ruby/classes/RDoc.src/M000058.html
322
335
  test_files: []
323
336
 
324
337
  rdoc_options: []
@@ -326,8 +339,7 @@ rdoc_options: []
326
339
  extra_rdoc_files: []
327
340
 
328
341
  executables:
329
- - generate_test.rb
330
- - header_to_ruby.rb
342
+ - ruby-vpi
331
343
  extensions:
332
344
  - gem_extconf.rb
333
345
  requirements:
@@ -350,7 +362,7 @@ dependencies:
350
362
  requirements:
351
363
  - - ">="
352
364
  - !ruby/object:Gem::Version
353
- version: 0.7.0
365
+ version: 1.0.0
354
366
  version:
355
367
  - !ruby/object:Gem::Dependency
356
368
  name: rcov
data/bin/generate_test.rb DELETED
@@ -1,200 +0,0 @@
1
- # Generates Ruby-VPI tests from Verilog 2001 module declarations.
2
- #
3
- # * The standard input stream is read if no input files are specified.
4
- #
5
- # * The first input signal in a module's declaration is assumed to be the
6
- # clocking signal.
7
- #
8
- #
9
- # = Progress indicators
10
- #
11
- # module:: A Verilog module has been identified.
12
- #
13
- # create:: A file is being created because it does not exist.
14
- #
15
- # skip:: A file is being skipped because it is already up to date.
16
- #
17
- # update:: A file will be updated because it is out of date. A text merging
18
- # tool (see MERGER) will be launched to transfer content from the old
19
- # file (*.old) and the new file (*.new) to the out of date file. If a
20
- # text merging tool is not specified, then you will have to do the
21
- # merging by hand.
22
- #
23
- #
24
- # = Environment variables
25
- #
26
- # MERGER:: A command that invokes a text merging tool with three arguments: (1)
27
- # old file, (2) new file, (3) output file. The tool's output should be
28
- # written to the output file.
29
- #
30
- #--
31
- # Copyright 2006 Suraj N. Kurapati
32
- # See the file named LICENSE for details.
33
-
34
- require 'ruby-vpi' # for project info
35
- require 'ruby-vpi/verilog_parser'
36
- require 'fileutils'
37
- require 'digest/md5'
38
-
39
-
40
- # Notify the user about some action being performed.
41
- def notify *args # :nodoc:
42
- printf "%8s %s\n", *args
43
- end
44
-
45
- # Writes the given contents to the file at the given path. If the given path
46
- # already exists, then a backup is created before invoking the merging tool.
47
- def write_file aPath, aContent # :nodoc:
48
- if File.exist? aPath
49
- oldDigest = Digest::MD5.digest(File.read(aPath))
50
- newDigest = Digest::MD5.digest(aContent)
51
-
52
- if oldDigest == newDigest
53
- notify :skip, aPath
54
- else
55
- notify :update, aPath
56
- cur, old, new = aPath, "#{aPath}.old", "#{aPath}.new"
57
-
58
- FileUtils.cp cur, old, :preserve => true
59
- File.open(new, 'w') {|f| f << aContent}
60
-
61
- if m = ENV['MERGER']
62
- system "#{m} #{old.inspect} #{new.inspect} #{cur.inspect}"
63
- end
64
- end
65
- else
66
- notify :create, aPath
67
- File.open(aPath, 'w') {|f| f << aContent}
68
- end
69
- end
70
-
71
-
72
- require 'ruby-vpi/erb'
73
-
74
- # Template used for generating output.
75
- class Template < ERB # :nodoc:
76
- TEMPLATE_PATH = __FILE__.sub %r{\.rb$}, '_tpl'
77
-
78
- def initialize aName
79
- super File.read(File.join(TEMPLATE_PATH, aName))
80
- end
81
- end
82
-
83
-
84
-
85
- # Holds information about the output destinations of a parsed Verilog module.
86
- class OutputInfo # :nodoc:
87
- RUBY_EXT = '.rb'
88
- VERILOG_EXT = '.v'
89
- RUNNER_EXT = '.rake'
90
-
91
- SPEC_FORMATS = [:rSpec, :tSpec, :xUnit, :generic]
92
-
93
- attr_reader :verilogBenchName, :verilogBenchPath, :rubyBenchName, :rubyBenchPath, :designName, :designClassName, :designPath, :specName, :specClassName, :specFormat, :specPath, :rubyVpiPath, :runnerName, :runnerPath, :protoName, :protoPath
94
-
95
- attr_reader :testName, :suffix, :benchSuffix, :designSuffix, :specSuffix, :runnerSuffix, :protoSuffix
96
-
97
- def initialize aModuleName, aSpecFormat, aTestName, aRubyVpiPath
98
- raise ArgumentError unless SPEC_FORMATS.include? aSpecFormat
99
- @specFormat = aSpecFormat
100
- @testName = aTestName
101
-
102
- @suffix = '_' + @testName
103
- @benchSuffix = @suffix + '_bench'
104
- @designSuffix = @suffix + '_design'
105
- @specSuffix = @suffix + '_spec'
106
- @runnerSuffix = @suffix + '_runner'
107
- @protoSuffix = @suffix + '_proto'
108
-
109
- @rubyVpiPath = aRubyVpiPath
110
-
111
- @verilogBenchName = aModuleName + @benchSuffix
112
- @verilogBenchPath = @verilogBenchName + VERILOG_EXT
113
-
114
- @rubyBenchName = aModuleName + @benchSuffix
115
- @rubyBenchPath = @rubyBenchName + RUBY_EXT
116
-
117
- @designName = aModuleName + @designSuffix
118
- @designPath = @designName + RUBY_EXT
119
-
120
- @protoName = aModuleName + @protoSuffix
121
- @protoPath = @protoName + RUBY_EXT
122
-
123
- @specName = aModuleName + @specSuffix
124
- @specPath = @specName + RUBY_EXT
125
-
126
- @designClassName = aModuleName.to_ruby_const_name
127
- @specClassName = @specName.to_ruby_const_name
128
-
129
- @runnerName = aModuleName + @runnerSuffix
130
- @runnerPath = @runnerName + RUNNER_EXT
131
- end
132
- end
133
-
134
-
135
-
136
- if File.basename($0) == File.basename(__FILE__)
137
- # obtain templates for output generation
138
- VERILOG_BENCH_TEMPLATE = Template.new('bench.v')
139
- RUBY_BENCH_TEMPLATE = Template.new('bench.rb')
140
- DESIGN_TEMPLATE = Template.new('design.rb')
141
- PROTO_TEMPLATE = Template.new('proto.rb')
142
- SPEC_TEMPLATE = Template.new('spec.rb')
143
- RUNNER_TEMPLATE = Template.new('runner.rake')
144
-
145
-
146
- # parse command-line options
147
- require 'optparse'
148
-
149
- optSpecFmt = :generic
150
- optTestName = 'test'
151
-
152
- opts = OptionParser.new
153
- opts.banner = "Usage: #{File.basename __FILE__} [options] [files]"
154
-
155
- opts.on '-h', '--help', 'show this help message' do
156
- require 'ruby-vpi/rdoc'
157
- RDoc.usage_from_file __FILE__
158
-
159
- puts opts
160
- exit
161
- end
162
-
163
- opts.on '--xunit', '--test-unit', 'use xUnit (Test::Unit) specification format' do |val|
164
- optSpecFmt = :xUnit if val
165
- end
166
-
167
- opts.on '--rspec', 'use rSpec specification format' do |val|
168
- optSpecFmt = :rSpec if val
169
- end
170
-
171
- opts.on '--tspec', '--test-spec', 'use test/spec specification format' do |val|
172
- optSpecFmt = :tSpec if val
173
- end
174
-
175
- opts.on '-n', '--name NAME', 'insert NAME into the names of generated files' do |val|
176
- optTestName = val
177
- end
178
-
179
- opts.parse! ARGV
180
-
181
-
182
- v = VerilogParser.new(ARGF.read)
183
-
184
- v.modules.each do |m|
185
- puts
186
- notify :module, m.name
187
-
188
- o = OutputInfo.new(m.name, optSpecFmt, optTestName, File.dirname(File.dirname(__FILE__)))
189
-
190
- # generate output
191
- aParseInfo, aModuleInfo, aOutputInfo = v.freeze, m.freeze, o.freeze
192
-
193
- write_file o.runnerPath, RUNNER_TEMPLATE.result(binding)
194
- write_file o.verilogBenchPath, VERILOG_BENCH_TEMPLATE.result(binding)
195
- write_file o.rubyBenchPath, RUBY_BENCH_TEMPLATE.result(binding)
196
- write_file o.designPath, DESIGN_TEMPLATE.result(binding)
197
- write_file o.protoPath, PROTO_TEMPLATE.result(binding)
198
- write_file o.specPath, SPEC_TEMPLATE.result(binding)
199
- end
200
- end
@@ -1,89 +0,0 @@
1
- <%
2
- clock = aOutputInfo.designClassName + '.' + aModuleInfo.ports.first.name
3
- %>
4
- # This file is the Ruby side of the bench.
5
-
6
- require 'rubygems'
7
- require 'ruby-vpi'
8
-
9
- RubyVpi.init_bench :<%= aOutputInfo.designClassName %>, :<%= aOutputInfo.specFormat %> do
10
- ##
11
- # This block is executed whenever Vpi::simulate is invoked.
12
- #
13
- # It simulates the design under test. This is typically done
14
- # by toggling the clock signal, as demonstrated below.
15
- ##
16
-
17
- ##
18
- # We are currently here (marked by the ! signs):
19
- #
20
- # !
21
- # !
22
- # ! ____ ____ ____ ____
23
- # ___!/ \____/ \____/ \____/ \
24
- # !
25
- # !
26
- #
27
- ##
28
-
29
- <%= clock %>.intVal = 1
30
-
31
- ##
32
- # After setting the clock signal to high, we are here:
33
- #
34
- # !
35
- # !
36
- # !____ ____ ____ ____
37
- # ____/! \____/ \____/ \____/ \
38
- # !
39
- # !
40
- #
41
- ##
42
-
43
- advance_time
44
-
45
- ##
46
- # After advancing the time, we are here:
47
- #
48
- # !
49
- # !
50
- # ____! ____ ____ ____
51
- # ____/ !\____/ \____/ \____/ \
52
- # !
53
- # !
54
- #
55
- ##
56
-
57
- <%= clock %>.intVal = 0
58
-
59
- ##
60
- # After setting the clock signal to low, we are here:
61
- #
62
- # !
63
- # !
64
- # ____ ! ____ ____ ____
65
- # ____/ \!____/ \____/ \____/ \
66
- # !
67
- # !
68
- #
69
- ##
70
-
71
- advance_time
72
-
73
- ##
74
- # After advancing the time, we are here:
75
- #
76
- #
77
- # !
78
- # !
79
- # ____ ! ____ ____ ____
80
- # ____/ \____!/ \____/ \____/ \
81
- # !
82
- # !
83
- #
84
- ##
85
-
86
- ##
87
- # This process repeats when Vpi::simulate is invoked again.
88
- ##
89
- end
@@ -1,26 +0,0 @@
1
- <%
2
- # Returns a comma-separated string of parameter declarations in Verilog module instantiation format.
3
- def make_inst_param_decl aParams
4
- aParams.map do |param|
5
- ".#{param.name}(#{param.name})"
6
- end.join(', ')
7
- end
8
- %>
9
- // This file is the Verilog side of the bench.
10
- module <%= aOutputInfo.verilogBenchName %>;
11
- <% aModuleInfo.parameters.each do |param| %>
12
- parameter <%= param.decl %>;
13
- <% end %>
14
- <% aModuleInfo.ports.each do |port| %>
15
- <%= port.input? ? 'reg' : 'wire' %> <%= port.size %> <%= port.name %>;
16
- <% end %>
17
-
18
- <%= aModuleInfo.name %> <%
19
- instConfigDecl = make_inst_param_decl(aModuleInfo.parameters)
20
-
21
- unless instConfigDecl.empty?
22
- %>#(<%= instConfigDecl %>)<%
23
- end
24
-
25
- %> <%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
26
- endmodule
@@ -1,11 +0,0 @@
1
- # This is a Ruby interface to the design under test.
2
- <% aParseInfo.constants.each do |var| %>
3
- <%= var.name.to_ruby_const_name %> = <%= var.value.verilog_to_ruby %>
4
- <% end %>
5
-
6
- # This method resets the design under test.
7
- def <%= aOutputInfo.designClassName %>.reset!
8
- <% aModuleInfo.ports.select { |p| p.input? }[1..-1].each do |port| # using [1..] because the first signal is the clock %>
9
- <%= port.name %>.hexStrVal = 'x'
10
- <% end %>
11
- end
@@ -1,16 +0,0 @@
1
- # This is a prototype of the design under test.
2
-
3
- # When prototyping is enabled, Vpi::advance_time invokes this
4
- # method instead of transferring control to the Verilog simulator.
5
- def <%= aOutputInfo.designClassName %>.simulate!
6
- if <%= aModuleInfo.ports.first.name %>.intVal == 1
7
- # discard old outputs
8
- <% aModuleInfo.ports.reject { |p| p.input? }.each do |port| %>
9
- <%= port.name %>.hexStrVal = 'x'
10
- <% end %>
11
-
12
- # process new inputs
13
-
14
- # produce new outputs
15
- end
16
- end
@@ -1,42 +0,0 @@
1
- # This file runs the test.
2
-
3
- # These are Verilog source files that need to be loaded
4
- # by the simulator before they can be simulated.
5
- SIMULATOR_SOURCES = [
6
- '<%= aModuleInfo.name %>.v',
7
- '<%= aOutputInfo.verilogBenchPath %>',
8
- ]
9
-
10
- # These are paths to directories which contain the
11
- # sources listed above, the files they `include, or both.
12
- SIMULATOR_INCLUDES = []
13
-
14
- # This specifies the "top module" that is to be simulated.
15
- SIMULATOR_TARGET = '<%= aOutputInfo.verilogBenchName %>'
16
-
17
- # These are command-line arguments for the simulator.
18
- # They can be specified as a string or an array of strings:
19
- #
20
- # :cver => "this is one single argument",
21
- # :cver => ['these', 'are', 'separate', 'arguments'],
22
- # :cver => %w[these are also separate arguments],
23
- #
24
- SIMULATOR_ARGUMENTS = {
25
- <% RubyVpi::Config::SIMULATORS.each_pair do |id, sim| %>
26
- # <%= sim.name %>
27
- :<%= id %> => '',
28
-
29
- <% end %>
30
- }
31
-
32
- # This task is invoked _before_ the simulator runs.
33
- # It can be used to make preprations, such as converting
34
- # Verilog header files into Ruby, for the simulation.
35
- task :setup do
36
- # To learn how to write Rake tasks, please see:
37
- # http://docs.rubyrake.org/read/chapter/4#page16
38
- end
39
-
40
- # This command loads the Ruby-VPI runner template, which
41
- # runs the simulator according to the information above.
42
- require 'ruby-vpi/runner'