ruby-vpi 7.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 (364) hide show
  1. data/HISTORY +398 -0
  2. data/LICENSE +340 -0
  3. data/MEMO +38 -0
  4. data/README +9 -0
  5. data/Rakefile +271 -0
  6. data/bin/generate_test.rb +258 -0
  7. data/bin/generate_test_tpl/bench.rb +31 -0
  8. data/bin/generate_test_tpl/bench.v +54 -0
  9. data/bin/generate_test_tpl/design.rb +26 -0
  10. data/bin/generate_test_tpl/proto.rb +8 -0
  11. data/bin/generate_test_tpl/runner.rake +28 -0
  12. data/bin/generate_test_tpl/spec.rb +46 -0
  13. data/bin/header_to_ruby.rb +70 -0
  14. data/doc/Rakefile +55 -0
  15. data/doc/src/LICENSE +397 -0
  16. data/doc/src/figures/organization.png +0 -0
  17. data/doc/src/figures/organization_detailed.png +0 -0
  18. data/doc/src/figures/ruby_init.png +0 -0
  19. data/doc/src/figures/ruby_relay.png +0 -0
  20. data/doc/src/figures.dia +0 -0
  21. data/doc/src/images/COPYING +67 -0
  22. data/doc/src/images/ChangeLog +27 -0
  23. data/doc/src/images/blank.png +0 -0
  24. data/doc/src/images/callouts/1.png +0 -0
  25. data/doc/src/images/callouts/10.png +0 -0
  26. data/doc/src/images/callouts/11.png +0 -0
  27. data/doc/src/images/callouts/12.png +0 -0
  28. data/doc/src/images/callouts/13.png +0 -0
  29. data/doc/src/images/callouts/14.png +0 -0
  30. data/doc/src/images/callouts/15.png +0 -0
  31. data/doc/src/images/callouts/2.png +0 -0
  32. data/doc/src/images/callouts/3.png +0 -0
  33. data/doc/src/images/callouts/4.png +0 -0
  34. data/doc/src/images/callouts/5.png +0 -0
  35. data/doc/src/images/callouts/6.png +0 -0
  36. data/doc/src/images/callouts/7.png +0 -0
  37. data/doc/src/images/callouts/8.png +0 -0
  38. data/doc/src/images/callouts/9.png +0 -0
  39. data/doc/src/images/callouts/ChangeLog +15 -0
  40. data/doc/src/images/caution.png +0 -0
  41. data/doc/src/images/caution.svg +290 -0
  42. data/doc/src/images/copyright +55 -0
  43. data/doc/src/images/draft.png +0 -0
  44. data/doc/src/images/home.png +0 -0
  45. data/doc/src/images/home.svg +386 -0
  46. data/doc/src/images/important.png +0 -0
  47. data/doc/src/images/important.svg +163 -0
  48. data/doc/src/images/next.png +0 -0
  49. data/doc/src/images/next.svg +191 -0
  50. data/doc/src/images/note.png +0 -0
  51. data/doc/src/images/note.svg +483 -0
  52. data/doc/src/images/prev.png +0 -0
  53. data/doc/src/images/prev.svg +852 -0
  54. data/doc/src/images/tip.png +0 -0
  55. data/doc/src/images/tip.svg +1145 -0
  56. data/doc/src/images/toc-blank.png +0 -0
  57. data/doc/src/images/toc-minus.png +0 -0
  58. data/doc/src/images/toc-plus.png +0 -0
  59. data/doc/src/images/up.png +0 -0
  60. data/doc/src/images/up.svg +195 -0
  61. data/doc/src/images/warning.png +0 -0
  62. data/doc/src/images/warning.svg +334 -0
  63. data/doc/src/license.xml +446 -0
  64. data/doc/src/manual.xml +1582 -0
  65. data/doc/src/manual.xsl +23 -0
  66. data/doc/src/shared.dtd +63 -0
  67. data/doc/src/styles/manual.css +87 -0
  68. data/doc/txt/manual.txt +1657 -0
  69. data/doc/xhtml/background.html +3 -0
  70. data/doc/xhtml/background.methodology.html +3 -0
  71. data/doc/xhtml/background.organization.html +10 -0
  72. data/doc/xhtml/background.running-tests.html +3 -0
  73. data/doc/xhtml/background.terminology.html +3 -0
  74. data/doc/xhtml/figures/organization.png +0 -0
  75. data/doc/xhtml/figures/organization_detailed.png +0 -0
  76. data/doc/xhtml/figures/ruby_init.png +0 -0
  77. data/doc/xhtml/figures/ruby_relay.png +0 -0
  78. data/doc/xhtml/gfdl-0.html +18 -0
  79. data/doc/xhtml/gfdl-1.html +70 -0
  80. data/doc/xhtml/gfdl-10.html +15 -0
  81. data/doc/xhtml/gfdl-2.html +13 -0
  82. data/doc/xhtml/gfdl-3.html +31 -0
  83. data/doc/xhtml/gfdl-4.html +75 -0
  84. data/doc/xhtml/gfdl-5.html +20 -0
  85. data/doc/xhtml/gfdl-6.html +12 -0
  86. data/doc/xhtml/gfdl-7.html +16 -0
  87. data/doc/xhtml/gfdl-8.html +17 -0
  88. data/doc/xhtml/gfdl-9.html +9 -0
  89. data/doc/xhtml/gfdl-addendum.html +25 -0
  90. data/doc/xhtml/gfdl.html +11 -0
  91. data/doc/xhtml/glossary.html +3 -0
  92. data/doc/xhtml/images/COPYING +67 -0
  93. data/doc/xhtml/images/ChangeLog +27 -0
  94. data/doc/xhtml/images/blank.png +0 -0
  95. data/doc/xhtml/images/callouts/1.png +0 -0
  96. data/doc/xhtml/images/callouts/10.png +0 -0
  97. data/doc/xhtml/images/callouts/11.png +0 -0
  98. data/doc/xhtml/images/callouts/12.png +0 -0
  99. data/doc/xhtml/images/callouts/13.png +0 -0
  100. data/doc/xhtml/images/callouts/14.png +0 -0
  101. data/doc/xhtml/images/callouts/15.png +0 -0
  102. data/doc/xhtml/images/callouts/2.png +0 -0
  103. data/doc/xhtml/images/callouts/3.png +0 -0
  104. data/doc/xhtml/images/callouts/4.png +0 -0
  105. data/doc/xhtml/images/callouts/5.png +0 -0
  106. data/doc/xhtml/images/callouts/6.png +0 -0
  107. data/doc/xhtml/images/callouts/7.png +0 -0
  108. data/doc/xhtml/images/callouts/8.png +0 -0
  109. data/doc/xhtml/images/callouts/9.png +0 -0
  110. data/doc/xhtml/images/callouts/ChangeLog +15 -0
  111. data/doc/xhtml/images/caution.png +0 -0
  112. data/doc/xhtml/images/caution.svg +290 -0
  113. data/doc/xhtml/images/copyright +55 -0
  114. data/doc/xhtml/images/draft.png +0 -0
  115. data/doc/xhtml/images/home.png +0 -0
  116. data/doc/xhtml/images/home.svg +386 -0
  117. data/doc/xhtml/images/important.png +0 -0
  118. data/doc/xhtml/images/important.svg +163 -0
  119. data/doc/xhtml/images/next.png +0 -0
  120. data/doc/xhtml/images/next.svg +191 -0
  121. data/doc/xhtml/images/note.png +0 -0
  122. data/doc/xhtml/images/note.svg +483 -0
  123. data/doc/xhtml/images/prev.png +0 -0
  124. data/doc/xhtml/images/prev.svg +852 -0
  125. data/doc/xhtml/images/tip.png +0 -0
  126. data/doc/xhtml/images/tip.svg +1145 -0
  127. data/doc/xhtml/images/toc-blank.png +0 -0
  128. data/doc/xhtml/images/toc-minus.png +0 -0
  129. data/doc/xhtml/images/toc-plus.png +0 -0
  130. data/doc/xhtml/images/up.png +0 -0
  131. data/doc/xhtml/images/up.svg +195 -0
  132. data/doc/xhtml/images/warning.png +0 -0
  133. data/doc/xhtml/images/warning.svg +334 -0
  134. data/doc/xhtml/index.html +4 -0
  135. data/doc/xhtml/introduction.html +3 -0
  136. data/doc/xhtml/introduction.license.html +3 -0
  137. data/doc/xhtml/introduction.manifest.html +3 -0
  138. data/doc/xhtml/introduction.related-works.html +3 -0
  139. data/doc/xhtml/introduction.resources.html +3 -0
  140. data/doc/xhtml/problem.ivl.html +18 -0
  141. data/doc/xhtml/problems.html +3 -0
  142. data/doc/xhtml/problems.ruby.html +3 -0
  143. data/doc/xhtml/problems.vsim.html +3 -0
  144. data/doc/xhtml/styles/manual.css +87 -0
  145. data/doc/xhtml/usage.examples.html +3 -0
  146. data/doc/xhtml/usage.html +3 -0
  147. data/doc/xhtml/usage.installation.html +3 -0
  148. data/doc/xhtml/usage.requirements.html +3 -0
  149. data/doc/xhtml/usage.tools.html +3 -0
  150. data/doc/xhtml/usage.tutorial.html +199 -0
  151. data/ext/Doxyfile +272 -0
  152. data/ext/README +124 -0
  153. data/ext/Rakefile +65 -0
  154. data/ext/common.h +56 -0
  155. data/ext/extconf.rb +4 -0
  156. data/ext/relay.cin +146 -0
  157. data/ext/relay.hin +48 -0
  158. data/ext/ruby-vpi.c +36 -0
  159. data/ext/swig.cin +38 -0
  160. data/ext/swig.hin +39 -0
  161. data/ext/swig_vpi.h +924 -0
  162. data/ext/swig_vpi.i +8 -0
  163. data/ext/swig_wrap.cin +4613 -0
  164. data/ext/verilog.h +59 -0
  165. data/ext/vlog.cin +92 -0
  166. data/ext/vlog.hin +57 -0
  167. data/ext/vpi_user.h +924 -0
  168. data/gem_extconf.rb +8 -0
  169. data/history.html +809 -0
  170. data/lib/ruby-vpi/erb.rb +41 -0
  171. data/lib/ruby-vpi/rake.rb +35 -0
  172. data/lib/ruby-vpi/rdoc.rb +51 -0
  173. data/lib/ruby-vpi/rspec.rb +32 -0
  174. data/lib/ruby-vpi/runner.rb +22 -0
  175. data/lib/ruby-vpi/vpi_util.rb +310 -0
  176. data/lib/ruby-vpi.rb +58 -0
  177. data/memo.html +86 -0
  178. data/readme.html +19 -0
  179. data/ref/c/annotated.html +36 -0
  180. data/ref/c/common_8h.html +178 -0
  181. data/ref/c/doxygen.css +310 -0
  182. data/ref/c/doxygen.png +0 -0
  183. data/ref/c/files.html +35 -0
  184. data/ref/c/functions.html +135 -0
  185. data/ref/c/functions_vars.html +135 -0
  186. data/ref/c/globals.html +55 -0
  187. data/ref/c/globals_0x63.html +86 -0
  188. data/ref/c/globals_0x65.html +55 -0
  189. data/ref/c/globals_0x66.html +55 -0
  190. data/ref/c/globals_0x70.html +71 -0
  191. data/ref/c/globals_0x72.html +62 -0
  192. data/ref/c/globals_0x73.html +65 -0
  193. data/ref/c/globals_0x74.html +55 -0
  194. data/ref/c/globals_0x76.html +472 -0
  195. data/ref/c/globals_0x78.html +55 -0
  196. data/ref/c/globals_defs.html +81 -0
  197. data/ref/c/globals_defs_0x65.html +50 -0
  198. data/ref/c/globals_defs_0x70.html +51 -0
  199. data/ref/c/globals_defs_0x76.html +463 -0
  200. data/ref/c/globals_defs_0x78.html +50 -0
  201. data/ref/c/globals_enum.html +39 -0
  202. data/ref/c/globals_eval.html +40 -0
  203. data/ref/c/globals_func.html +49 -0
  204. data/ref/c/globals_type.html +63 -0
  205. data/ref/c/globals_vars.html +42 -0
  206. data/ref/c/hierarchy.html +36 -0
  207. data/ref/c/index.html +20 -0
  208. data/ref/c/relay_8cin.html +268 -0
  209. data/ref/c/relay_8hin.html +161 -0
  210. data/ref/c/ruby-vpi_8c.html +34 -0
  211. data/ref/c/structrelay____RubyOptions____def.html +84 -0
  212. data/ref/c/structt__cb__data.html +208 -0
  213. data/ref/c/structt__vpi__delay.html +183 -0
  214. data/ref/c/structt__vpi__error__info.html +208 -0
  215. data/ref/c/structt__vpi__strengthval.html +108 -0
  216. data/ref/c/structt__vpi__systf__data.html +208 -0
  217. data/ref/c/structt__vpi__time.html +133 -0
  218. data/ref/c/structt__vpi__value.html +285 -0
  219. data/ref/c/structt__vpi__vecval.html +83 -0
  220. data/ref/c/structt__vpi__vlog__info.html +133 -0
  221. data/ref/c/swig_8cin.html +91 -0
  222. data/ref/c/swig_8hin.html +99 -0
  223. data/ref/c/tab_b.gif +0 -0
  224. data/ref/c/tab_l.gif +0 -0
  225. data/ref/c/tab_r.gif +0 -0
  226. data/ref/c/tabs.css +102 -0
  227. data/ref/c/verilog_8h.html +149 -0
  228. data/ref/c/vlog_8cin.html +199 -0
  229. data/ref/c/vlog_8hin.html +152 -0
  230. data/ref/c/vpi__user_8h.html +12747 -0
  231. data/ref/ruby/classes/Counter.html +258 -0
  232. data/ref/ruby/classes/Counter.src/M000037.html +20 -0
  233. data/ref/ruby/classes/Counter.src/M000038.html +22 -0
  234. data/ref/ruby/classes/Counter.src/M000039.html +20 -0
  235. data/ref/ruby/classes/Counter.src/M000040.html +22 -0
  236. data/ref/ruby/classes/CounterProto.html +164 -0
  237. data/ref/ruby/classes/CounterProto.src/M000004.html +22 -0
  238. data/ref/ruby/classes/CounterProto.src/M000005.html +22 -0
  239. data/ref/ruby/classes/ERB.html +158 -0
  240. data/ref/ruby/classes/ERB.src/M000034.html +29 -0
  241. data/ref/ruby/classes/FileUtils.html +165 -0
  242. data/ref/ruby/classes/FileUtils.src/M000047.html +18 -0
  243. data/ref/ruby/classes/FileUtils.src/M000048.html +18 -0
  244. data/ref/ruby/classes/Hw5UnitModel/Operation.html +216 -0
  245. data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000011.html +25 -0
  246. data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000012.html +33 -0
  247. data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000013.html +18 -0
  248. data/ref/ruby/classes/Hw5UnitModel.html +256 -0
  249. data/ref/ruby/classes/Hw5UnitModel.src/M000006.html +24 -0
  250. data/ref/ruby/classes/Hw5UnitModel.src/M000008.html +20 -0
  251. data/ref/ruby/classes/Hw5UnitModel.src/M000009.html +38 -0
  252. data/ref/ruby/classes/Hw5UnitModel.src/M000010.html +22 -0
  253. data/ref/ruby/classes/Hw5_unit.html +196 -0
  254. data/ref/ruby/classes/Hw5_unit.src/M000003.html +27 -0
  255. data/ref/ruby/classes/Hw5_unit_spec.html +237 -0
  256. data/ref/ruby/classes/Hw5_unit_spec.src/M000023.html +21 -0
  257. data/ref/ruby/classes/Hw5_unit_spec.src/M000024.html +21 -0
  258. data/ref/ruby/classes/Hw5_unit_spec.src/M000025.html +67 -0
  259. data/ref/ruby/classes/InputGenerator.html +260 -0
  260. data/ref/ruby/classes/InputGenerator.src/M000027.html +18 -0
  261. data/ref/ruby/classes/InputGenerator.src/M000028.html +18 -0
  262. data/ref/ruby/classes/InputGenerator.src/M000029.html +19 -0
  263. data/ref/ruby/classes/InputGenerator.src/M000030.html +38 -0
  264. data/ref/ruby/classes/InputGenerator.src/M000031.html +19 -0
  265. data/ref/ruby/classes/InputGenerator.src/M000032.html +19 -0
  266. data/ref/ruby/classes/MaximumCounterValue.html +159 -0
  267. data/ref/ruby/classes/MaximumCounterValue.src/M000035.html +23 -0
  268. data/ref/ruby/classes/MaximumCounterValue.src/M000036.html +21 -0
  269. data/ref/ruby/classes/ModuleInfo.html +199 -0
  270. data/ref/ruby/classes/ModuleInfo.src/M000018.html +44 -0
  271. data/ref/ruby/classes/ModuleInfo.src/M000019.html +26 -0
  272. data/ref/ruby/classes/OutputInfo.html +304 -0
  273. data/ref/ruby/classes/OutputInfo.src/M000017.html +51 -0
  274. data/ref/ruby/classes/RDoc.html +135 -0
  275. data/ref/ruby/classes/RDoc.src/M000051.html +40 -0
  276. data/ref/ruby/classes/ResettedCounterValue.html +174 -0
  277. data/ref/ruby/classes/ResettedCounterValue.src/M000014.html +19 -0
  278. data/ref/ruby/classes/ResettedCounterValue.src/M000015.html +18 -0
  279. data/ref/ruby/classes/ResettedCounterValue.src/M000016.html +23 -0
  280. data/ref/ruby/classes/RubyVPI.html +186 -0
  281. data/ref/ruby/classes/RubyVPI.src/M000049.html +18 -0
  282. data/ref/ruby/classes/RubyVPI.src/M000050.html +39 -0
  283. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +370 -0
  284. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000041.html +22 -0
  285. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000042.html +44 -0
  286. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000043.html +82 -0
  287. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000044.html +127 -0
  288. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000045.html +26 -0
  289. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000046.html +18 -0
  290. data/ref/ruby/classes/SWIG.html +111 -0
  291. data/ref/ruby/classes/String.html +140 -0
  292. data/ref/ruby/classes/String.src/M000033.html +37 -0
  293. data/ref/ruby/classes/Template.html +158 -0
  294. data/ref/ruby/classes/Template.src/M000026.html +18 -0
  295. data/ref/ruby/classes/TestHw5UnitModel.html +180 -0
  296. data/ref/ruby/classes/TestHw5UnitModel.src/M000020.html +19 -0
  297. data/ref/ruby/classes/TestHw5UnitModel.src/M000021.html +19 -0
  298. data/ref/ruby/classes/TestHw5UnitModel.src/M000022.html +64 -0
  299. data/ref/ruby/created.rid +1 -0
  300. data/ref/ruby/files/bin/generate_test_rb.html +236 -0
  301. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +29 -0
  302. data/ref/ruby/files/bin/generate_test_tpl/bench_rb.html +115 -0
  303. data/ref/ruby/files/bin/generate_test_tpl/design_rb.html +107 -0
  304. data/ref/ruby/files/bin/generate_test_tpl/proto_rb.html +107 -0
  305. data/ref/ruby/files/bin/generate_test_tpl/spec_rb.html +140 -0
  306. data/ref/ruby/files/bin/generate_test_tpl/spec_rb.src/M000002.html +22 -0
  307. data/ref/ruby/files/bin/header_to_ruby_rb.html +116 -0
  308. data/ref/ruby/files/ext/extconf_rb.html +108 -0
  309. data/ref/ruby/files/gem_extconf_rb.html +114 -0
  310. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +108 -0
  311. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +108 -0
  312. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +108 -0
  313. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +115 -0
  314. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +108 -0
  315. data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +108 -0
  316. data/ref/ruby/files/lib/ruby-vpi_rb.html +108 -0
  317. data/ref/ruby/files/samp/counter/counter_rspecTest_bench_rb.html +115 -0
  318. data/ref/ruby/files/samp/counter/counter_rspecTest_design_rb.html +107 -0
  319. data/ref/ruby/files/samp/counter/counter_rspecTest_proto_rb.html +107 -0
  320. data/ref/ruby/files/samp/counter/counter_rspecTest_spec_rb.html +142 -0
  321. data/ref/ruby/files/samp/counter/counter_unitTest_bench_rb.html +115 -0
  322. data/ref/ruby/files/samp/counter/counter_unitTest_design_rb.html +107 -0
  323. data/ref/ruby/files/samp/counter/counter_unitTest_proto_rb.html +107 -0
  324. data/ref/ruby/files/samp/counter/counter_unitTest_spec_rb.html +135 -0
  325. data/ref/ruby/files/samp/pipelined_alu/Hw5UnitModel_rb.html +101 -0
  326. data/ref/ruby/files/samp/pipelined_alu/InputGenerator_rb.html +101 -0
  327. data/ref/ruby/files/samp/pipelined_alu/TestHw5UnitModel_rb.html +111 -0
  328. data/ref/ruby/files/samp/pipelined_alu/hw5_unit_bench_rb.html +108 -0
  329. data/ref/ruby/files/samp/pipelined_alu/hw5_unit_design_rb.html +107 -0
  330. data/ref/ruby/files/samp/pipelined_alu/hw5_unit_spec_rb.html +112 -0
  331. data/ref/ruby/fr_class_index.html +46 -0
  332. data/ref/ruby/fr_file_index.html +55 -0
  333. data/ref/ruby/fr_method_index.html +77 -0
  334. data/ref/ruby/index.html +24 -0
  335. data/ref/ruby/rdoc-style.css +208 -0
  336. data/samp/counter/Rakefile +1 -0
  337. data/samp/counter/counter.v +20 -0
  338. data/samp/counter/counter_rspecTest_bench.rb +9 -0
  339. data/samp/counter/counter_rspecTest_bench.v +28 -0
  340. data/samp/counter/counter_rspecTest_design.rb +22 -0
  341. data/samp/counter/counter_rspecTest_proto.rb +10 -0
  342. data/samp/counter/counter_rspecTest_runner.rake +28 -0
  343. data/samp/counter/counter_rspecTest_spec.rb +47 -0
  344. data/samp/counter/counter_unitTest_bench.rb +9 -0
  345. data/samp/counter/counter_unitTest_bench.v +28 -0
  346. data/samp/counter/counter_unitTest_design.rb +22 -0
  347. data/samp/counter/counter_unitTest_proto.rb +10 -0
  348. data/samp/counter/counter_unitTest_runner.rake +28 -0
  349. data/samp/counter/counter_unitTest_spec.rb +49 -0
  350. data/samp/pipelined_alu/Hw5UnitModel.rb +134 -0
  351. data/samp/pipelined_alu/InputGenerator.rb +94 -0
  352. data/samp/pipelined_alu/README +127 -0
  353. data/samp/pipelined_alu/Rakefile +1 -0
  354. data/samp/pipelined_alu/TestHw5UnitModel.rb +88 -0
  355. data/samp/pipelined_alu/hw5_unit.v +186 -0
  356. data/samp/pipelined_alu/hw5_unit_bench.rb +8 -0
  357. data/samp/pipelined_alu/hw5_unit_bench.v +45 -0
  358. data/samp/pipelined_alu/hw5_unit_design.rb +18 -0
  359. data/samp/pipelined_alu/hw5_unit_runner.rake +10 -0
  360. data/samp/pipelined_alu/hw5_unit_spec.rb +123 -0
  361. data/tpl/launcher.rake +30 -0
  362. data/tpl/runner.rake +96 -0
  363. data/tpl/synopsys_vcs.tab +2 -0
  364. metadata +484 -0
@@ -0,0 +1,77 @@
1
+
2
+ <?xml version="1.0" encoding="utf-8"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Methods
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Methods</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Methods</h1>
22
+ <div id="index-entries">
23
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000045">[] (SWIG::TYPE_p_unsigned_int)</a><br />
24
+ <a href="classes/InputGenerator.html#M000028">bits (InputGenerator)</a><br />
25
+ <a href="classes/InputGenerator.html#M000029">bits= (InputGenerator)</a><br />
26
+ <a href="classes/FileUtils.html#M000048">collect_args (FileUtils)</a><br />
27
+ <a href="classes/Hw5UnitModel/Operation.html#M000012">compute (Hw5UnitModel::Operation)</a><br />
28
+ <a href="classes/Hw5UnitModel/Operation.html#M000013">compute! (Hw5UnitModel::Operation)</a><br />
29
+ <a href="classes/Hw5UnitModel.html#M000009">cycle (Hw5UnitModel)</a><br />
30
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000046">each (SWIG::TYPE_p_unsigned_int)</a><br />
31
+ <a href="classes/InputGenerator.html#M000030">gen (InputGenerator)</a><br />
32
+ <a href="classes/InputGenerator.html#M000032">genPowerOfTwo (InputGenerator)</a><br />
33
+ <a href="classes/InputGenerator.html#M000031">genPrime (InputGenerator)</a><br />
34
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000042">get_value (SWIG::TYPE_p_unsigned_int)</a><br />
35
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000041">get_value_wrapper (SWIG::TYPE_p_unsigned_int)</a><br />
36
+ <a href="classes/RubyVPI.html#M000050">init_bench (RubyVPI)</a><br />
37
+ <a href="classes/Hw5UnitModel.html#M000007">initialize (Hw5UnitModel)</a><br />
38
+ <a href="classes/RubyVPI.html#M000049">load_runner_template (RubyVPI)</a><br />
39
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000044">method_missing (SWIG::TYPE_p_unsigned_int)</a><br />
40
+ <a href="classes/Hw5UnitModel/Operation.html#M000011">new (Hw5UnitModel::Operation)</a><br />
41
+ <a href="classes/Counter.html#M000039">new (Counter)</a><br />
42
+ <a href="classes/ModuleInfo.html#M000018">new (ModuleInfo)</a><br />
43
+ <a href="classes/OutputInfo.html#M000017">new (OutputInfo)</a><br />
44
+ <a href="classes/ERB.html#M000034">new (ERB)</a><br />
45
+ <a href="classes/Hw5_unit.html#M000003">new (Hw5_unit)</a><br />
46
+ <a href="classes/InputGenerator.html#M000027">new (InputGenerator)</a><br />
47
+ <a href="classes/Counter.html#M000037">new (Counter)</a><br />
48
+ <a href="classes/Template.html#M000026">new (Template)</a><br />
49
+ <a href="classes/Hw5UnitModel.html#M000010">output (Hw5UnitModel)</a><br />
50
+ <a href="classes/ModuleInfo.html#M000019">parse_declarations (ModuleInfo)</a><br />
51
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000043">put_value (SWIG::TYPE_p_unsigned_int)</a><br />
52
+ <a href="classes/Hw5UnitModel.html#M000006">reset (Hw5UnitModel)</a><br />
53
+ <a href="classes/Hw5_unit_spec.html#M000024">reset (Hw5_unit_spec)</a><br />
54
+ <a href="classes/Counter.html#M000040">reset! (Counter)</a><br />
55
+ <a href="classes/Counter.html#M000038">reset! (Counter)</a><br />
56
+ <a href="classes/ResettedCounterValue.html#M000014">setup (ResettedCounterValue)</a><br />
57
+ <a href="classes/MaximumCounterValue.html#M000035">setup (MaximumCounterValue)</a><br />
58
+ <a href="files/bin/generate_test_tpl/spec_rb.html#M000002">setup (bin/generate_test_tpl/spec.rb)</a><br />
59
+ <a href="classes/TestHw5UnitModel.html#M000020">setup (TestHw5UnitModel)</a><br />
60
+ <a href="classes/Hw5_unit_spec.html#M000023">setup (Hw5_unit_spec)</a><br />
61
+ <a href="classes/FileUtils.html#M000047">sh (FileUtils)</a><br />
62
+ <a href="classes/CounterProto.html#M000004">simulate! (CounterProto)</a><br />
63
+ <a href="classes/CounterProto.html#M000005">simulate! (CounterProto)</a><br />
64
+ <a href="classes/Hw5UnitModel.html#M000008">startOperation (Hw5UnitModel)</a><br />
65
+ <a href="classes/TestHw5UnitModel.html#M000022">testModel (TestHw5UnitModel)</a><br />
66
+ <a href="classes/ResettedCounterValue.html#M000016">test_increment (ResettedCounterValue)</a><br />
67
+ <a href="classes/MaximumCounterValue.html#M000036">test_overflow (MaximumCounterValue)</a><br />
68
+ <a href="classes/Hw5_unit_spec.html#M000025">test_pipeline (Hw5_unit_spec)</a><br />
69
+ <a href="classes/TestHw5UnitModel.html#M000021">test_reset (TestHw5UnitModel)</a><br />
70
+ <a href="classes/ResettedCounterValue.html#M000015">test_zero (ResettedCounterValue)</a><br />
71
+ <a href="classes/String.html#M000033">to_ruby (String)</a><br />
72
+ <a href="classes/RDoc.html#M000051">usage_from_file (RDoc)</a><br />
73
+ <a href="files/bin/generate_test_rb.html#M000001">write_file (bin/generate_test.rb)</a><br />
74
+ </div>
75
+ </div>
76
+ </body>
77
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+
6
+ <!--
7
+
8
+ Ruby-VPI: Ruby interface to Verilog VPI.
9
+
10
+ -->
11
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
12
+ <head>
13
+ <title>Ruby-VPI: Ruby interface to Verilog VPI.</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
15
+ </head>
16
+ <frameset rows="20%, 80%">
17
+ <frameset cols="25%,35%,45%">
18
+ <frame src="fr_file_index.html" title="Files" name="Files" />
19
+ <frame src="fr_class_index.html" name="Classes" />
20
+ <frame src="fr_method_index.html" name="Methods" />
21
+ </frameset>
22
+ <frame src="files/gem_extconf_rb.html" name="docwin" />
23
+ </frameset>
24
+ </html>
@@ -0,0 +1,208 @@
1
+
2
+ body {
3
+ font-family: Verdana,Arial,Helvetica,sans-serif;
4
+ font-size: 90%;
5
+ margin: 0;
6
+ margin-left: 40px;
7
+ padding: 0;
8
+ background: white;
9
+ }
10
+
11
+ h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
12
+ h1 { font-size: 150%; }
13
+ h2,h3,h4 { margin-top: 1em; }
14
+
15
+ a { background: #eef; color: #039; text-decoration: none; }
16
+ a:hover { background: #039; color: #eef; }
17
+
18
+ /* Override the base stylesheet's Anchor inside a table cell */
19
+ td > a {
20
+ background: transparent;
21
+ color: #039;
22
+ text-decoration: none;
23
+ }
24
+
25
+ /* and inside a section title */
26
+ .section-title > a {
27
+ background: transparent;
28
+ color: #eee;
29
+ text-decoration: none;
30
+ }
31
+
32
+ /* === Structural elements =================================== */
33
+
34
+ div#index {
35
+ margin: 0;
36
+ margin-left: -40px;
37
+ padding: 0;
38
+ font-size: 90%;
39
+ }
40
+
41
+
42
+ div#index a {
43
+ margin-left: 0.7em;
44
+ }
45
+
46
+ div#index .section-bar {
47
+ margin-left: 0px;
48
+ padding-left: 0.7em;
49
+ background: #ccc;
50
+ font-size: small;
51
+ }
52
+
53
+
54
+ div#classHeader, div#fileHeader {
55
+ width: auto;
56
+ color: white;
57
+ padding: 0.5em 1.5em 0.5em 1.5em;
58
+ margin: 0;
59
+ margin-left: -40px;
60
+ border-bottom: 3px solid #006;
61
+ }
62
+
63
+ div#classHeader a, div#fileHeader a {
64
+ background: inherit;
65
+ color: white;
66
+ }
67
+
68
+ div#classHeader td, div#fileHeader td {
69
+ background: inherit;
70
+ color: white;
71
+ }
72
+
73
+
74
+ div#fileHeader {
75
+ background: #057;
76
+ }
77
+
78
+ div#classHeader {
79
+ background: #048;
80
+ }
81
+
82
+
83
+ .class-name-in-header {
84
+ font-size: 180%;
85
+ font-weight: bold;
86
+ }
87
+
88
+
89
+ div#bodyContent {
90
+ padding: 0 1.5em 0 1.5em;
91
+ }
92
+
93
+ div#description {
94
+ padding: 0.5em 1.5em;
95
+ background: #efefef;
96
+ border: 1px dotted #999;
97
+ }
98
+
99
+ div#description h1,h2,h3,h4,h5,h6 {
100
+ color: #125;;
101
+ background: transparent;
102
+ }
103
+
104
+ div#validator-badges {
105
+ text-align: center;
106
+ }
107
+ div#validator-badges img { border: 0; }
108
+
109
+ div#copyright {
110
+ color: #333;
111
+ background: #efefef;
112
+ font: 0.75em sans-serif;
113
+ margin-top: 5em;
114
+ margin-bottom: 0;
115
+ padding: 0.5em 2em;
116
+ }
117
+
118
+
119
+ /* === Classes =================================== */
120
+
121
+ table.header-table {
122
+ color: white;
123
+ font-size: small;
124
+ }
125
+
126
+ .type-note {
127
+ font-size: small;
128
+ color: #DEDEDE;
129
+ }
130
+
131
+ .xxsection-bar {
132
+ background: #eee;
133
+ color: #333;
134
+ padding: 3px;
135
+ }
136
+
137
+ .section-bar {
138
+ color: #333;
139
+ border-bottom: 1px solid #999;
140
+ margin-left: -20px;
141
+ }
142
+
143
+
144
+ .section-title {
145
+ background: #79a;
146
+ color: #eee;
147
+ padding: 3px;
148
+ margin-top: 2em;
149
+ margin-left: -30px;
150
+ border: 1px solid #999;
151
+ }
152
+
153
+ .top-aligned-row { vertical-align: top }
154
+ .bottom-aligned-row { vertical-align: bottom }
155
+
156
+ /* --- Context section classes ----------------------- */
157
+
158
+ .context-row { }
159
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
160
+ .context-item-value { font-size: small; color: #448; }
161
+ .context-item-desc { color: #333; padding-left: 2em; }
162
+
163
+ /* --- Method classes -------------------------- */
164
+ .method-detail {
165
+ background: #efefef;
166
+ padding: 0;
167
+ margin-top: 0.5em;
168
+ margin-bottom: 1em;
169
+ border: 1px dotted #ccc;
170
+ }
171
+ .method-heading {
172
+ color: black;
173
+ background: #ccc;
174
+ border-bottom: 1px solid #666;
175
+ padding: 0.2em 0.5em 0 0.5em;
176
+ }
177
+ .method-signature { color: black; background: inherit; }
178
+ .method-name { font-weight: bold; }
179
+ .method-args { font-style: italic; }
180
+ .method-description { padding: 0 0.5em 0 0.5em; }
181
+
182
+ /* --- Source code sections -------------------- */
183
+
184
+ a.source-toggle { font-size: 90%; }
185
+ div.method-source-code {
186
+ background: #262626;
187
+ color: #ffdead;
188
+ margin: 1em;
189
+ padding: 0.5em;
190
+ border: 1px dashed #999;
191
+ overflow: hidden;
192
+ }
193
+
194
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
195
+
196
+ /* --- Ruby keyword styles --------------------- */
197
+
198
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
199
+
200
+ .ruby-constant { color: #7fffd4; background: transparent; }
201
+ .ruby-keyword { color: #00ffff; background: transparent; }
202
+ .ruby-ivar { color: #eedd82; background: transparent; }
203
+ .ruby-operator { color: #00ffee; background: transparent; }
204
+ .ruby-identifier { color: #ffdead; background: transparent; }
205
+ .ruby-node { color: #ffa07a; background: transparent; }
206
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
207
+ .ruby-regexp { color: #ffa07a; background: transparent; }
208
+ .ruby-value { color: #7fffd4; background: transparent; }
@@ -0,0 +1 @@
1
+ load '../../tpl/launcher.rake'
@@ -0,0 +1,20 @@
1
+ /**
2
+ A simple up-counter with synchronous reset.
3
+
4
+ @param Size Number of bits used to represent the counter's value.
5
+ @param clock Increments the counter's value upon each positive edge.
6
+ @param reset Zeroes the counter's value when asserted.
7
+ @param count The counter's value.
8
+ */
9
+ module counter #(parameter Size = 5) (
10
+ input clock,
11
+ input reset,
12
+ output reg [Size - 1 : 0] count
13
+ );
14
+ always @(posedge clock) begin
15
+ if (reset)
16
+ count <= 0;
17
+ else
18
+ count <= count + 1;
19
+ end
20
+ endmodule
@@ -0,0 +1,9 @@
1
+ ## This is the Ruby side of the bench.
2
+
3
+ require 'ruby-vpi'
4
+ require 'ruby-vpi/rspec'
5
+
6
+ RubyVPI.init_bench 'counter_rspecTest', :CounterProto
7
+
8
+ # service the $ruby_relay callback
9
+ # The RSpec library will take control henceforth.
@@ -0,0 +1,28 @@
1
+ /* This is the Verilog side of the bench. */
2
+
3
+ module counter_rspecTest_bench;
4
+
5
+ // instantiate the design under test
6
+ parameter Size = 5;
7
+
8
+ reg clock;
9
+ reg reset;
10
+ wire [Size - 1 : 0] count;
11
+
12
+ counter#(.Size(Size))counter_rspecTest_bench_rspecTest_design(.clock(clock), .reset(reset), .count(count));
13
+
14
+ // connect to the Ruby side of this bench
15
+ initial begin
16
+ clock = 0;
17
+ $ruby_init("ruby", "-w", "-rubygems", "counter_rspecTest_bench.rb", "-f", "s");
18
+ end
19
+
20
+ always begin
21
+ #5 clock = ~clock;
22
+ end
23
+
24
+ always @(posedge clock) begin
25
+ #1 $ruby_relay;
26
+ end
27
+
28
+ endmodule
@@ -0,0 +1,22 @@
1
+ # An interface to the design under test.
2
+ class Counter
3
+ include Vpi
4
+
5
+ Size = 5
6
+
7
+ attr_reader :clock, :reset, :count
8
+
9
+ def initialize
10
+ @clock = vpi_handle_by_name("counter_rspecTest_bench.clock", nil)
11
+ @reset = vpi_handle_by_name("counter_rspecTest_bench.reset", nil)
12
+ @count = vpi_handle_by_name("counter_rspecTest_bench.count", nil)
13
+ end
14
+
15
+ def reset!
16
+ @reset.hexStrVal = 'x'
17
+
18
+ @reset.intVal = 1
19
+ relay_verilog
20
+ @reset.intVal = 0
21
+ end
22
+ end
@@ -0,0 +1,10 @@
1
+ # A prototype of the design under test.
2
+ class CounterProto < Counter
3
+ def simulate!
4
+ if @reset.intVal == 1
5
+ @count.intVal = 0
6
+ else
7
+ @count.intVal += 1
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,28 @@
1
+ ## This file builds and runs the test.
2
+
3
+ # These are source files that are to be simulated.
4
+ SIMULATOR_SOURCES = [
5
+ 'counter_rspecTest_bench.v',
6
+ 'counter.v',
7
+ ]
8
+
9
+ # This specifies the "top module" that is to be simulated.
10
+ SIMULATOR_TARGET = 'counter_rspecTest_bench'
11
+
12
+ # These are command-line arguments for the simulator.
13
+ # They can be specified as a string or an array of strings.
14
+ SIMULATOR_ARGS = {
15
+ # GPL Cver
16
+ :cver => '',
17
+
18
+ # Icarus Verilog
19
+ :ivl => '',
20
+
21
+ # Synopsys VCS
22
+ :vcs => '',
23
+
24
+ # Mentor Modelsim
25
+ :vsim => '',
26
+ }
27
+
28
+ require 'ruby-vpi/runner'
@@ -0,0 +1,47 @@
1
+ ## This specification verifies the design under test.
2
+
3
+ # lowest upper bound of counter's value
4
+ LIMIT = 2 ** Counter::Size
5
+
6
+ # maximum allowed value for a counter
7
+ MAX = LIMIT - 1
8
+
9
+ include Vpi
10
+
11
+ context "A resetted counter's value" do
12
+ setup do
13
+ @design = Counter.new
14
+ @design.reset!
15
+ end
16
+
17
+ specify "should be zero" do
18
+ @design.count.intVal.should_equal 0
19
+ end
20
+
21
+ specify "should increment by one count upon each rising clock edge" do
22
+ LIMIT.times do |i|
23
+ @design.count.intVal.should_equal i
24
+
25
+ # advance the clock
26
+ relay_verilog
27
+ end
28
+ end
29
+ end
30
+
31
+ context "A counter with the maximum value" do
32
+ setup do
33
+ @design = Counter.new
34
+ @design.reset!
35
+
36
+ # increment the counter to maximum value
37
+ MAX.times do relay_verilog end
38
+ @design.count.intVal.should_equal MAX
39
+ end
40
+
41
+ specify "should overflow upon increment" do
42
+ # increment the counter
43
+ relay_verilog
44
+
45
+ @design.count.intVal.should_equal 0
46
+ end
47
+ end
@@ -0,0 +1,9 @@
1
+ ## This is the Ruby side of the bench.
2
+
3
+ require 'ruby-vpi'
4
+ require 'test/unit'
5
+
6
+ RubyVPI.init_bench 'counter_unitTest', :CounterProto
7
+
8
+ # service the $ruby_relay callback
9
+ # The UnitTest library will take control henceforth.
@@ -0,0 +1,28 @@
1
+ /* This is the Verilog side of the bench. */
2
+
3
+ module counter_unitTest_bench;
4
+
5
+ // instantiate the design under test
6
+ parameter Size = 5;
7
+
8
+ reg clock;
9
+ reg reset;
10
+ wire [Size - 1 : 0] count;
11
+
12
+ counter#(.Size(Size))counter_unitTest_bench_unitTest_design(.clock(clock), .reset(reset), .count(count));
13
+
14
+ // connect to the Ruby side of this bench
15
+ initial begin
16
+ clock = 0;
17
+ $ruby_init("ruby", "-w", "-rubygems", "counter_unitTest_bench.rb");
18
+ end
19
+
20
+ always begin
21
+ #5 clock = ~clock;
22
+ end
23
+
24
+ always @(posedge clock) begin
25
+ #1 $ruby_relay;
26
+ end
27
+
28
+ endmodule
@@ -0,0 +1,22 @@
1
+ # An interface to the design under test.
2
+ class Counter
3
+ include Vpi
4
+
5
+ Size = 5
6
+
7
+ attr_reader :clock, :reset, :count
8
+
9
+ def initialize
10
+ @clock = vpi_handle_by_name("counter_unitTest_bench.clock", nil)
11
+ @reset = vpi_handle_by_name("counter_unitTest_bench.reset", nil)
12
+ @count = vpi_handle_by_name("counter_unitTest_bench.count", nil)
13
+ end
14
+
15
+ def reset!
16
+ @reset.hexStrVal = 'x'
17
+
18
+ @reset.intVal = 1
19
+ relay_verilog
20
+ @reset.intVal = 0
21
+ end
22
+ end
@@ -0,0 +1,10 @@
1
+ # A prototype of the design under test.
2
+ class CounterProto < Counter
3
+ def simulate!
4
+ if @reset.intVal == 1
5
+ @count.intVal = 0
6
+ else
7
+ @count.intVal += 1
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,28 @@
1
+ ## This file builds and runs the test.
2
+
3
+ # These are source files that are to be simulated.
4
+ SIMULATOR_SOURCES = [
5
+ 'counter_unitTest_bench.v',
6
+ 'counter.v',
7
+ ]
8
+
9
+ # This specifies the "top module" that is to be simulated.
10
+ SIMULATOR_TARGET = 'counter_unitTest_bench'
11
+
12
+ # These are command-line arguments for the simulator.
13
+ # They can be specified as a string or an array of strings.
14
+ SIMULATOR_ARGS = {
15
+ # GPL Cver
16
+ :cver => '',
17
+
18
+ # Icarus Verilog
19
+ :ivl => '',
20
+
21
+ # Synopsys VCS
22
+ :vcs => '',
23
+
24
+ # Mentor Modelsim
25
+ :vsim => '',
26
+ }
27
+
28
+ require 'ruby-vpi/runner'
@@ -0,0 +1,49 @@
1
+ ## This specification verifies the design under test.
2
+
3
+ # lowest upper bound of counter's value
4
+ LIMIT = 2 ** Counter::Size
5
+
6
+ # maximum allowed value for a counter
7
+ MAX = LIMIT - 1
8
+
9
+ class ResettedCounterValue < Test::Unit::TestCase
10
+ include Vpi
11
+
12
+ def setup
13
+ @design = Counter.new
14
+ @design.reset!
15
+ end
16
+
17
+ def test_zero
18
+ assert_equal 0, @design.count.intVal
19
+ end
20
+
21
+ def test_increment
22
+ LIMIT.times do |i|
23
+ assert_equal i, @design.count.intVal
24
+
25
+ # advance the clock
26
+ relay_verilog
27
+ end
28
+ end
29
+ end
30
+
31
+ class MaximumCounterValue < Test::Unit::TestCase
32
+ include Vpi
33
+
34
+ def setup
35
+ @design = Counter.new
36
+ @design.reset!
37
+
38
+ # increment the counter to maximum value
39
+ MAX.times do relay_verilog end
40
+ assert_equal MAX, @design.count.intVal
41
+ end
42
+
43
+ def test_overflow
44
+ # increment the counter
45
+ relay_verilog
46
+
47
+ assert_equal 0, @design.count.intVal
48
+ end
49
+ end