ruby-vpi 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,1582 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ Copyright 2006 Suraj N. Kurapati.
4
+
5
+ Permission is granted to copy, distribute and/or modify this
6
+ document under the terms of the GNU Free Documentation License,
7
+ Version 1.1 or any later version published by the Free Software
8
+ Foundation; with no Invariant Sections, no Front-Cover Texts and
9
+ no Back-Cover Texts. A copy of the license is included in the
10
+ the file named "LICENSE".
11
+
12
+ Source code formatting rules:
13
+ is a reserved keyword
14
+ <type> is structure, class, variable type, etc.
15
+ <varname> is a variable name
16
+ <function> is function or method name
17
+ <literal> is for strings, numbers, etc. anything literal
18
+ <constant> is a constant variable name
19
+ <remark> is a comment
20
+ -->
21
+
22
+ <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
23
+ <!-- imports -->
24
+ <!ENTITY % sharedDTD SYSTEM "shared.dtd"> %sharedDTD;
25
+ <!ENTITY license SYSTEM "license.xml">
26
+
27
+
28
+ <!-- content -->
29
+ <!ENTITY background.step3 "<para>When the Ruby interpreter invokes the <code><constant>Vpi</constant>::<function>relay_verilog</function></code> method, it is paused and the &v; simulator is given control.</para>">
30
+
31
+ <!ENTITY fixed-in-2.0.0 "<note>
32
+ <title>Problem solved</title>
33
+ <para>This problem was fixed in release 2.0.0 (2006-04-17). If it still occurs, then <link linkend='introduction.resources'>please report it</link>.</para>
34
+ </note>">
35
+
36
+ <!ENTITY test-bench.gloss "<glossterm linkend='term..test-bench'>test bench</glossterm>">
37
+ <!ENTITY test.gloss "<glossterm linkend='term..test'>test</glossterm>">
38
+ <!ENTITY design.gloss "<glossterm linkend='term..design'>design</glossterm>">
39
+ <!ENTITY specification.gloss "<glossterm linkend='term..specification'>specification</glossterm>">
40
+ <!ENTITY bench.gloss "<glossterm linkend='term..bench'>bench</glossterm>">
41
+ <!ENTITY BDD.gloss "<glossterm linkend='term..BDD'>BDD</glossterm>">
42
+ <!ENTITY TDD.gloss "<glossterm linkend='term..TDD'>TDD</glossterm>">
43
+ <!ENTITY rspec.gloss "<glossterm linkend='term..rspec'>&rspec;</glossterm>">
44
+ <!ENTITY rake.gloss "<glossterm linkend='term..rake'>&rake;</glossterm>">
45
+ <!ENTITY handle.gloss "<glossterm linkend='term..handle'>handle</glossterm>">
46
+
47
+ <!ENTITY rake "Rake">
48
+ <!ENTITY rake.url "http://rake.rubyforge.org/">
49
+ <!ENTITY rake-doc.url "http://docs.rubyrake.org/">
50
+
51
+ <!ENTITY rspec "RSpec">
52
+ <!ENTITY rspec.url "http://rspec.rubyforge.org">
53
+ <!ENTITY rspec..ulink "<ulink url='&rspec.url;'>&rspec;</ulink>">
54
+ <!ENTITY rspec-tutorial.url "http://rspec.rubyforge.org/tutorials/index.html">
55
+ <!ENTITY rspec-tutorial..ulink "<ulink url='&rspec-tutorial.url;'>&rspec; tutorial</ulink>">
56
+ ]>
57
+ <book lang="en">
58
+ <bookinfo>
59
+ <title>&rv; user manual</title>
60
+
61
+ &snk..copyright;
62
+
63
+ <copyright>
64
+ <year>2005</year>
65
+ <year>2006</year>
66
+ <holder><ulink url="http://tango.freedesktop.org">Tango Desktop Project</ulink> <remark>for admonition and navigation graphics released under <ulink url="images/COPYING">this license</ulink>.</remark></holder>
67
+ </copyright>
68
+
69
+ <copyright>
70
+ <year>1999</year>
71
+ <year>2000</year>
72
+ <year>2001</year>
73
+ <holder>Norman Walsh <remark>for DocBook graphics released under <ulink url="images/copyright">this license</ulink>.</remark></holder>
74
+ </copyright>
75
+
76
+ <abstract>
77
+ <para>This manual explains how to use &rv;. You can find the newest version of this manual at the <ulink url="&rv.url;">&rv; website</ulink>.</para>
78
+ </abstract>
79
+
80
+ <legalnotice>
81
+ <para>Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "&gnu; Free Documentation License".</para>
82
+ </legalnotice>
83
+ </bookinfo>
84
+
85
+ <chapter id="introduction">
86
+ <title>Introduction</title>
87
+ <para>&rv; is a &r..ulink; interface to <ulink url="http://en.wikipedia.org/wiki/Verilog">&vpi;</ulink>. It lets you create complex &v; test benches easily and wholly in Ruby.</para>
88
+
89
+ <section id="introduction.license">
90
+ <title>License</title>
91
+ <para>&rv; is <ulink url="http://en.wikipedia.org/wiki/Free_software">free software</ulink>; you can redistribute it and/or modify it under the terms of the <ulink url="http://www.gnu.org/copyleft/gpl.html">&gnu; General Public License</ulink> as published by the <ulink url="http://www.fsf.org">Free Software Foundation</ulink>; either version 2 of the License, or (at your option) any later version.</para>
92
+ </section>
93
+
94
+ <section id="introduction.manifest">
95
+ <title>Manifest</title>
96
+
97
+ <para>When you extract a &rv; release package, the following is what you would expect to find.</para>
98
+
99
+ <variablelist>
100
+ <varlistentry>
101
+ <term><filename>doc</filename></term>
102
+ <listitem>
103
+ <para>This directory contains user documentation in various formats.</para>
104
+ </listitem>
105
+ </varlistentry>
106
+
107
+ <varlistentry>
108
+ <term><filename>ref</filename></term>
109
+ <listitem>
110
+ <para>This directory contains reference <acronym>API</acronym> documentation in &html; format.</para>
111
+ </listitem>
112
+ </varlistentry>
113
+
114
+ <varlistentry>
115
+ <term><filename>ext</filename></term>
116
+ <listitem>
117
+ <para>This directory contains source code, written in the C language, for the <link linkend="background.organization">core of &rv;</link>.</para>
118
+ </listitem>
119
+ </varlistentry>
120
+
121
+ <varlistentry>
122
+ <term><filename>lib</filename></term>
123
+ <listitem>
124
+ <para>This directory contains libraries, written in the Ruby language, for use by specifications.</para>
125
+ </listitem>
126
+ </varlistentry>
127
+
128
+ <varlistentry>
129
+ <term><filename>tpl</filename></term>
130
+ <listitem>
131
+ <para>This directory contains templates used by tests.</para>
132
+ </listitem>
133
+ </varlistentry>
134
+
135
+ <varlistentry>
136
+ <term><filename>bin</filename></term>
137
+ <listitem>
138
+ <para>This directory contains various tools. See <xref linkend="usage.tools"/> for more information.</para>
139
+ </listitem>
140
+ </varlistentry>
141
+
142
+ <varlistentry>
143
+ <term><filename>samp</filename></term>
144
+ <listitem>
145
+ <para>This directory contains example tests. See <xref linkend="usage.examples"/> for more information.</para>
146
+ </listitem>
147
+ </varlistentry>
148
+ </variablelist>
149
+ </section>
150
+
151
+ <section id="introduction.resources">
152
+ <title>Resources</title>
153
+
154
+ <variablelist>
155
+ <varlistentry>
156
+ <term><ulink url="&rv.url-project;">Project</ulink></term>
157
+ <listitem>
158
+ <para>Access project facilities, hosted generously by <ulink url="http://rubyforge.org">RubyForge</ulink>.</para>
159
+ </listitem>
160
+ </varlistentry>
161
+
162
+ <varlistentry>
163
+ <term><ulink url="&rv.url-project;">Tracker</ulink></term>
164
+ <listitem>
165
+ <para>Report problems, contribute patches, and more.</para>
166
+ </listitem>
167
+ </varlistentry>
168
+
169
+ <varlistentry>
170
+ <term><ulink url="&rv.url-download;">Releases</ulink></term>
171
+ <listitem>
172
+ <para>Download the newest release of &rv;.</para>
173
+ </listitem>
174
+ </varlistentry>
175
+
176
+ <varlistentry>
177
+ <term><ulink url="&rv.url-source;">Sources</ulink></term>
178
+ <listitem>
179
+ <para>Browse or access the source code repository.</para>
180
+ </listitem>
181
+ </varlistentry>
182
+
183
+ <varlistentry>
184
+ <term><ulink url="&rv.url-forum;">Forums</ulink></term>
185
+ <listitem>
186
+ <para>Ask for help, give feedback, or discuss.</para>
187
+ </listitem>
188
+ </varlistentry>
189
+ </variablelist>
190
+ </section>
191
+
192
+ <section id="introduction.related-works">
193
+ <title>Related works</title>
194
+
195
+ <para>You may wish to consider the following projects, which are similar to &rv;.</para>
196
+
197
+ <variablelist>
198
+ <varlistentry>
199
+ <term><ulink url="http://rhdl.rubyforge.org">RHDL</ulink></term>
200
+ <listitem>
201
+ <para>Hardware description and verification language based on Ruby.</para>
202
+ </listitem>
203
+ </varlistentry>
204
+ <varlistentry>
205
+ <term><ulink url="http://myhdl.jandecaluwe.com">MyHDL</ulink></term>
206
+ <listitem>
207
+ <para>Hardware description and verification language based on Python, which features conversion to &v; and co-simulation.</para>
208
+ </listitem>
209
+ </varlistentry>
210
+ <varlistentry>
211
+ <term><ulink url="http://jove.sourceforge.net">JOVE</ulink></term>
212
+ <listitem>
213
+ <para>Java interface to &vpi;.</para>
214
+ </listitem>
215
+ </varlistentry>
216
+ <varlistentry>
217
+ <term><ulink url="http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/">ScriptEDA</ulink></term>
218
+ <listitem>
219
+ <para>Perl, Python, and Tcl interface to &vpi;.</para>
220
+ </listitem>
221
+ </varlistentry>
222
+ </variablelist>
223
+
224
+ <section id="introduction.related-works.pli">
225
+ <title>Ye olde PLI</title>
226
+ <para>The following projects utilize the archaic <acronym>tf</acronym> and <abbrev>acc</abbrev> PLI interfaces, which have been officially deprecated in IEEE Std 1364-2005.</para>
227
+
228
+ <variablelist>
229
+ <varlistentry>
230
+ <term><ulink url="http://www.nelsim.com">ScriptSim</ulink></term>
231
+ <listitem>
232
+ <para>Perl, Python, and Tcl/Tk interface to PLI.</para>
233
+ </listitem>
234
+ </varlistentry>
235
+ <varlistentry>
236
+ <term><ulink url="http://www.veripool.com/verilog-pli.html">&v;::Pli</ulink></term>
237
+ <listitem>
238
+ <para>Perl interface to PLI.</para>
239
+ </listitem>
240
+ </varlistentry>
241
+ <varlistentry>
242
+ <term><ulink url="http://www.time-rover.com/jpli/">JPLI</ulink></term>
243
+ <listitem>
244
+ <para>Java interface to PLI.</para>
245
+ </listitem>
246
+ </varlistentry>
247
+ </variablelist>
248
+ </section>
249
+ </section>
250
+ </chapter>
251
+
252
+ <chapter id="background">
253
+ <title>Background</title>
254
+
255
+ <para>&rv; is a &bench.gloss; which lets you &test.gloss; &v; modules using the Ruby language.</para>
256
+
257
+ <section id="background.methodology">
258
+ <title>Methodology</title>
259
+
260
+ <para>&rv; presents an open-ended interface to &vpi;. Thus, you can use any methodology you wish when writing tests. However, &BDD.gloss; is emphasized in this project because it greatly simplifies thinking about <emphasis>how</emphasis> to verify a design.</para>
261
+ </section>
262
+
263
+ <section id="background.terminology">
264
+ <title>Terminology</title>
265
+
266
+ <tip>
267
+ <para>Have a look at the <xref linkend="glossary"/> for definitions of terms used in this manual.</para>
268
+ </tip>
269
+
270
+ <para>As a newcomer into the world of &v;, I often heard the term <emphasis>test bench</emphasis>: <quote>I ran the test bench, but it didn't work!</quote> or <quote>Are you crazy?!! You <emphasis>still</emphasis> haven't written the test bench? o_O</quote>, for example. I flipped through my textbook and surfed the Internet for a definition of the term, but it was to no avail. Instead, both resources nonchalantly employed the term <emphasis>throughout</emphasis> their being, as if mocking my ignorance of what seems to be universal knowledge.</para>
271
+
272
+ <para>Defeated, I turned to my inner faculties to determine the answer. <quote>Let's see, the term <emphasis>test bench</emphasis> has the word <emphasis>test</emphasis>&mdash;so it has something to do with testing&mdash;and it has the word <emphasis>bench</emphasis>&mdash;so maybe it's referring to a table where the testing should occur</quote>. This reasoning grew increasingly familiar as my mind rummaged through towering stores of obsolescence and ultimately revealed dreaded memories of sleepless anguish: debugging electronics in the robotics laboratory.</para>
273
+
274
+ <para><quote>Aha!</quote>, I exclaimed hesitantly, trying to dismiss the past. The term has its roots in the testing of electronic devices, where an engineer would sit at a bench in an electronics laboratory and verify that an electronic component satisfies some criteria. The bench would be furnished with tools of measurement and manipulation&mdash;such as oscilloscopes, voltmeters, soldering irons, and so on&mdash;which help the engineer to verify the electronic component or locate the sources of defects in the component.</para>
275
+
276
+ <para>Alright, now I remember what a laboratory bench is, but how does that compare with the term test bench? Surely they cannot have the same meaning, because it doesn't make sense to <emphasis>run</emphasis> a laboratory bench or to <emphasis>write</emphasis> one. Thus, to avoid propagating such confusion into this manual, I have attempted to clarify the terminology by <link linkend="glossary">simplifying and reintroducing it in a new light</link>.</para>
277
+ </section>
278
+
279
+ <section id="background.organization">
280
+ <title>Organization</title>
281
+
282
+ <figure id="fig..organization">
283
+ <title>Overall organization of a test</title>
284
+ <mediaobject>
285
+ <imageobject>
286
+ <imagedata fileref="figures/organization.png"/>
287
+ </imageobject>
288
+ </mediaobject>
289
+ </figure>
290
+
291
+ <para>As <xref linkend="fig..organization"/> shows, a test is composed of a bench, a design, and a specification. To extend the <link linkend="background.terminology">analogy of an electronics laboratory</link>, the first acts as the laboratory bench which provides measurement and manipulation tools. The second acts as the electronic component being verified by the engineer. And the third acts as the engineer who measures, manipulates, and verifies the electronic component.</para>
292
+
293
+ <section id="organization.vpi">
294
+ <title>Interface to &vpi;</title>
295
+
296
+ <figure id="fig..organization.detail">
297
+ <title>Detailed organization of a test</title>
298
+ <mediaobject>
299
+ <imageobject>
300
+ <imagedata fileref="figures/organization_detailed.png"/>
301
+ </imageobject>
302
+ </mediaobject>
303
+ </figure>
304
+
305
+ <para>In <xref linkend="fig..organization.detail"/>, &rv; acts as the bench, a &v; simulator encapsulates the design, and a Ruby interpreter encapsulates the specification. Notice that &rv; encapsulates all communication between the Ruby interpreter and &vpi;. This allows the specification, or any Ruby program in general, to access &vpi; using nothing more than the Ruby language! Thus, &rv; removes the burden of having to write C programs in order to access &vpi;.</para>
306
+
307
+ <para>Furthermore, &rv; presents the <emphasis>entire</emphasis> IEEE Std 1364-2005 &vpi; interface to the Ruby interpreter, but with the following minor changes.
308
+
309
+ <itemizedlist>
310
+ <listitem>
311
+ <para>The first letter in the name of every function, type, structure, and constant becomes capitalized.</para>
312
+
313
+ <para>For example, the <type>s_vpi_value</type> structure in C becomes the <type>S_vpi_value</type> class in Ruby. Likewise, the <constant>vpiIntVal</constant> constant in C becomes the <constant>VpiIntVal</constant> constant in Ruby.</para>
314
+ </listitem>
315
+
316
+ <listitem>
317
+ <para>The &vpi; functions <function>vpi_vprintf</function> and <function>vpi_mcd_vprintf</function> are not made accessible to Ruby. However, this isn't a big problem because you can use Ruby's <function>printf</function> method instead.</para>
318
+
319
+ <para>The reason for this limitation is that some C compilers have trouble with pointers to the <type>va_list</type> type. For these compilers, the second line in the code shown below causes a <quote>type mismatch</quote> error.</para>
320
+
321
+ <programlisting>
322
+ <type>void</type> <function>foo</function>(<parameter><type>va_list</type> <varname>ap</varname></parameter>) {
323
+ <type>va_list</type> *<varname>p</varname> = &amp;<varname>ap</varname>;
324
+ }
325
+ </programlisting>
326
+ </listitem>
327
+ </itemizedlist>
328
+ </para>
329
+
330
+ <section id="organization.vpi.util">
331
+ <title>&vpi; utility layer</title>
332
+ <para>From a user's perspective, the &vpi; utility layer greatly enhances the ability to interact with handles. One simply invokes a handle's methods, which are carefully named in the following manner, to access its &vpi; properties.</para>
333
+
334
+ <table id="table..handle-property-accessor-naming-format" frame='all'>
335
+ <title>Naming format for accessing a handle's &vpi; properties</title>
336
+ <tgroup cols='6'>
337
+ <colspec colname='c1'/>
338
+ <colspec colname='c2'/>
339
+ <colspec colname='c3'/>
340
+ <colspec colname='c4'/>
341
+ <colspec colname='c5'/>
342
+ <colspec colname='c6'/>
343
+ <thead>
344
+ <row>
345
+ <entry>Operation</entry>
346
+ <entry>_</entry>
347
+ <entry>Property</entry>
348
+ <entry>_</entry>
349
+ <entry>Accessor</entry>
350
+ <entry>Addendum</entry>
351
+ </row>
352
+ </thead>
353
+ <tbody>
354
+ <row>
355
+ <entry namest="c1" nameend="c2">optional</entry>
356
+ <entry>required</entry>
357
+ <entry namest="c4" nameend="c5">optional</entry>
358
+ <entry>optional</entry>
359
+ </row>
360
+ </tbody>
361
+ </tgroup>
362
+ </table>
363
+
364
+ <variablelist>
365
+ <varlistentry>
366
+ <term>Operation</term>
367
+ <listitem>
368
+ <para>This parameter suggests a method that should be invoked in the context of the Property parameter.</para>
369
+ </listitem>
370
+ </varlistentry>
371
+ <varlistentry>
372
+ <term>Property</term>
373
+ <listitem>
374
+ <para>This parameter suggests which &vpi; property should be accessed. The first letter of this parameter's value should be lower case, and the <emphasis>vpi</emphasis> prefix&mdash;common to all &vpi; properties&mdash;can be omitted.</para>
375
+
376
+ <para>For example, the &vpi; property <emphasis>vpiFullName</emphasis> is considered equivalent to <emphasis>fullName</emphasis> but not equivalent to either <emphasis>FullName</emphasis> or <emphasis>full_name</emphasis>.</para>
377
+ </listitem>
378
+ </varlistentry>
379
+ <varlistentry>
380
+ <term>Accessor</term>
381
+ <listitem>
382
+ <para>This parameter suggests which &vpi; function should be used to access the &vpi; property. When this parameter is not specified, the &vpi; utility layer will attempt to <emphasis>guess</emphasis> the value of this parameter (<ulink url="../../ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html">see the source code</ulink> of the <code><constant>SWIG</constant>::<constant>TYPE_p_unsigned_int</constant>#<function>method_missing</function></code> method for details).</para>
383
+
384
+ <table frame='all'>
385
+ <title>Possible accessors and their implications</title>
386
+ <tgroup cols='0'>
387
+ <thead>
388
+ <row>
389
+ <entry>Accessor</entry>
390
+ <entry>Kind of value accessed</entry>
391
+ <entry>&vpi; functions used to access the value</entry>
392
+ </row>
393
+ </thead>
394
+ <tbody>
395
+ <row>
396
+ <entry>d</entry>
397
+ <entry>delay</entry>
398
+ <entry><function>vpi_get_delays</function>, <function>vpi_put_delays</function></entry>
399
+ </row>
400
+ <row>
401
+ <entry>l</entry>
402
+ <entry>logic</entry>
403
+ <entry><function>vpi_get_value</function>, <function>vpi_put_value</function></entry>
404
+ </row>
405
+ <row>
406
+ <entry>i</entry>
407
+ <entry>integer</entry>
408
+ <entry><function>vpi_get</function></entry>
409
+ </row>
410
+ <row>
411
+ <entry>b</entry>
412
+ <entry>boolean</entry>
413
+ <entry><function>vpi_get</function></entry>
414
+ </row>
415
+ <row>
416
+ <entry>s</entry>
417
+ <entry>string</entry>
418
+ <entry><function>vpi_get_str</function></entry>
419
+ </row>
420
+ <row>
421
+ <entry>h</entry>
422
+ <entry>handle</entry>
423
+ <entry><function>vpi_handle</function></entry>
424
+ </row>
425
+ </tbody>
426
+ </tgroup>
427
+ </table>
428
+ </listitem>
429
+ </varlistentry>
430
+ <varlistentry>
431
+ <term>Addendum</term>
432
+ <listitem>
433
+ <para>When this parameter is a question mark (<emphasis>?</emphasis>), it suggests that the specified &vpi; property should be queried as a boolean value. This produces the same effect as specifying <emphasis>b</emphasis> for the Accessor parameter.</para>
434
+
435
+ <para>When this parameter is an equal sign (<emphasis>=</emphasis>), it suggests that the specified &vpi; property should be written to.</para>
436
+ </listitem>
437
+ </varlistentry>
438
+ </variablelist>
439
+
440
+ <example id="ex..handle-property-accessor-naming-format">
441
+ <title>Accessing a handle's &vpi; properties</title>
442
+
443
+ <informaltable frame='all'>
444
+ <tgroup cols='6'>
445
+ <colspec colname='c1'/>
446
+ <colspec colname='c2'/>
447
+ <colspec colname='c3'/>
448
+ <colspec colname='c4'/>
449
+ <colspec colname='c5'/>
450
+ <colspec colname='c6'/>
451
+ <colspec colname='c7'/>
452
+ <colspec colname='c8'/>
453
+ <thead>
454
+ <row>
455
+ <entry morerows="1">Ruby expression</entry>
456
+ <entry namest="c2" nameend="c7">Naming format</entry>
457
+ <entry morerows="1">Description</entry>
458
+ </row>
459
+ <row>
460
+ <entry namest="c2">Operation</entry>
461
+ <entry>_</entry>
462
+ <entry>Property</entry>
463
+ <entry>_</entry>
464
+ <entry>Accessor</entry>
465
+ <entry>Addendum</entry>
466
+ </row>
467
+ </thead>
468
+ <tbody>
469
+ <row>
470
+ <entry><code><varname>handle</varname>.<function>each_vpiNet</function> {|<varname>net</varname>| <function>puts</function> <varname>net</varname>.<function>fullName</function>}</code></entry>
471
+ <entry>each</entry>
472
+ <entry>_</entry>
473
+ <entry>vpiNet</entry>
474
+ <entry></entry>
475
+ <entry></entry>
476
+ <entry></entry>
477
+ <entry morerows="1">These expressions print the full name of each <constant>vpiNet</constant> object associated with the handle.</entry>
478
+ </row>
479
+ <row>
480
+ <entry><code><varname>handle</varname>.<function>each_net</function> {|<varname>net</varname>| <function>puts</function> <varname>net</varname>.<function>fullName</function>}</code></entry>
481
+ <entry>each</entry>
482
+ <entry>_</entry>
483
+ <entry>net</entry>
484
+ <entry></entry>
485
+ <entry></entry>
486
+ <entry></entry>
487
+ </row>
488
+
489
+ <row>
490
+ <entry><code><varname>handle</varname>.<function>vpiIntVal</function></code></entry>
491
+ <entry></entry>
492
+ <entry></entry>
493
+ <entry>vpiIntVal</entry>
494
+ <entry></entry>
495
+ <entry></entry>
496
+ <entry></entry>
497
+ <entry morerows="3">These expressions access the logic value of the handle's <constant>vpiIntVal</constant> property.</entry>
498
+ </row>
499
+ <row>
500
+ <entry><code><varname>handle</varname>.<function>vpiIntVal_l</function></code></entry>
501
+ <entry></entry>
502
+ <entry></entry>
503
+ <entry>vpiIntVal</entry>
504
+ <entry>_</entry>
505
+ <entry>l</entry>
506
+ <entry></entry>
507
+ </row>
508
+ <row>
509
+ <entry><code><varname>handle</varname>.<function>intVal</function></code></entry>
510
+ <entry></entry>
511
+ <entry></entry>
512
+ <entry>intVal</entry>
513
+ <entry></entry>
514
+ <entry></entry>
515
+ <entry></entry>
516
+ </row>
517
+ <row>
518
+ <entry><code><varname>handle</varname>.<function>intVal_l</function></code></entry>
519
+ <entry></entry>
520
+ <entry></entry>
521
+ <entry>intVal</entry>
522
+ <entry>_</entry>
523
+ <entry>l</entry>
524
+ <entry></entry>
525
+ </row>
526
+
527
+ <row>
528
+ <entry><code><varname>handle</varname>.<function>vpiIntVal</function> = <literal>15</literal></code></entry>
529
+ <entry></entry>
530
+ <entry></entry>
531
+ <entry>vpiIntVal</entry>
532
+ <entry></entry>
533
+ <entry></entry>
534
+ <entry>=</entry>
535
+ <entry morerows="3">These expressions assign the number 15 to the logic value of the handle's <constant>vpiIntVal</constant> property.</entry>
536
+ </row>
537
+ <row>
538
+ <entry><code><varname>handle</varname>.<function>vpiIntVal_l</function> = <literal>15</literal></code></entry>
539
+ <entry></entry>
540
+ <entry></entry>
541
+ <entry>vpiIntVal</entry>
542
+ <entry>_</entry>
543
+ <entry>l</entry>
544
+ <entry>=</entry>
545
+ </row>
546
+ <row>
547
+ <entry><code><varname>handle</varname>.<function>intVal</function> = <literal>15</literal></code></entry>
548
+ <entry></entry>
549
+ <entry></entry>
550
+ <entry>intVal</entry>
551
+ <entry></entry>
552
+ <entry></entry>
553
+ <entry>=</entry>
554
+ </row>
555
+ <row>
556
+ <entry><code><varname>handle</varname>.<function>intVal</function>_l = <literal>15</literal></code></entry>
557
+ <entry></entry>
558
+ <entry></entry>
559
+ <entry>intVal</entry>
560
+ <entry>_</entry>
561
+ <entry>l</entry>
562
+ <entry>=</entry>
563
+ </row>
564
+
565
+ <row>
566
+ <entry><code><varname>handle</varname>.<function>vpiType</function></code></entry>
567
+ <entry></entry>
568
+ <entry></entry>
569
+ <entry>vpiType</entry>
570
+ <entry></entry>
571
+ <entry></entry>
572
+ <entry></entry>
573
+ <entry morerows="3">These expressions access the integer value of the handle's <constant>vpiType</constant> property.</entry>
574
+ </row>
575
+ <row>
576
+ <entry><code><varname>handle</varname>.<function>vpiType_i</function></code></entry>
577
+ <entry></entry>
578
+ <entry></entry>
579
+ <entry>vpiType</entry>
580
+ <entry>_</entry>
581
+ <entry>i</entry>
582
+ <entry></entry>
583
+ </row>
584
+ <row>
585
+ <entry><code><varname>handle</varname>.<function>type</function></code></entry>
586
+ <entry></entry>
587
+ <entry></entry>
588
+ <entry>type</entry>
589
+ <entry></entry>
590
+ <entry></entry>
591
+ <entry></entry>
592
+ </row>
593
+ <row>
594
+ <entry><code><varname>handle</varname>.<function>type_i</function></code></entry>
595
+ <entry></entry>
596
+ <entry></entry>
597
+ <entry>type</entry>
598
+ <entry>_</entry>
599
+ <entry>i</entry>
600
+ <entry></entry>
601
+ </row>
602
+
603
+ <row>
604
+ <entry><code><varname>handle</varname>.<function>vpiProtected</function></code></entry>
605
+ <entry></entry>
606
+ <entry></entry>
607
+ <entry>vpiProtected</entry>
608
+ <entry></entry>
609
+ <entry></entry>
610
+ <entry></entry>
611
+ <entry morerows="5">These expressions access the boolean value of the handle's <constant>vpiProtected</constant> property.</entry>
612
+ </row>
613
+ <row>
614
+ <entry><code><varname>handle</varname>.<function>vpiProtected_b</function></code></entry>
615
+ <entry></entry>
616
+ <entry></entry>
617
+ <entry>vpiProtected</entry>
618
+ <entry>_</entry>
619
+ <entry>b</entry>
620
+ <entry></entry>
621
+ </row>
622
+ <row>
623
+ <entry><code><varname>handle</varname>.<function>vpiProtected?</function></code></entry>
624
+ <entry></entry>
625
+ <entry></entry>
626
+ <entry>vpiProtected</entry>
627
+ <entry></entry>
628
+ <entry></entry>
629
+ <entry>?</entry>
630
+ </row>
631
+ <row>
632
+ <entry><code><varname>handle</varname>.<function>protected</function></code></entry>
633
+ <entry></entry>
634
+ <entry></entry>
635
+ <entry>protected</entry>
636
+ <entry></entry>
637
+ <entry></entry>
638
+ <entry></entry>
639
+ </row>
640
+ <row>
641
+ <entry><code><varname>handle</varname>.<function>protected_b</function></code></entry>
642
+ <entry></entry>
643
+ <entry></entry>
644
+ <entry>protected</entry>
645
+ <entry>_</entry>
646
+ <entry>b</entry>
647
+ <entry></entry>
648
+ </row>
649
+ <row>
650
+ <entry><code><varname>handle</varname>.<function>protected?</function></code></entry>
651
+ <entry></entry>
652
+ <entry></entry>
653
+ <entry>protected</entry>
654
+ <entry></entry>
655
+ <entry></entry>
656
+ <entry>?</entry>
657
+ </row>
658
+
659
+ <row>
660
+ <entry><code><varname>handle</varname>.<function>vpiFullName</function></code></entry>
661
+ <entry></entry>
662
+ <entry></entry>
663
+ <entry>vpiFullName</entry>
664
+ <entry></entry>
665
+ <entry></entry>
666
+ <entry></entry>
667
+ <entry morerows="3">These expressions access the string value of the handle's <constant>vpiFullName</constant> property.</entry>
668
+ </row>
669
+ <row>
670
+ <entry><code><varname>handle</varname>.<function>vpiFullName_s</function></code></entry>
671
+ <entry></entry>
672
+ <entry></entry>
673
+ <entry>vpiFullName</entry>
674
+ <entry>_</entry>
675
+ <entry>s</entry>
676
+ <entry></entry>
677
+ </row>
678
+ <row>
679
+ <entry><code><varname>handle</varname>.<function>fullName</function></code></entry>
680
+ <entry></entry>
681
+ <entry></entry>
682
+ <entry>fullName</entry>
683
+ <entry></entry>
684
+ <entry></entry>
685
+ <entry></entry>
686
+ </row>
687
+ <row>
688
+ <entry><code><varname>handle</varname>.<function>fullName_s</function></code></entry>
689
+ <entry></entry>
690
+ <entry></entry>
691
+ <entry>fullName</entry>
692
+ <entry>_</entry>
693
+ <entry>s</entry>
694
+ <entry></entry>
695
+ </row>
696
+
697
+ <row>
698
+ <entry><code><varname>handle</varname>.<function>vpiParent</function></code></entry>
699
+ <entry></entry>
700
+ <entry></entry>
701
+ <entry>vpiParent</entry>
702
+ <entry></entry>
703
+ <entry></entry>
704
+ <entry></entry>
705
+ <entry morerows="3">These expressions access the handle value of the handle's <constant>vpiParent</constant> property.</entry>
706
+ </row>
707
+ <row>
708
+ <entry><code><varname>handle</varname>.<function>vpiParent_h</function></code></entry>
709
+ <entry></entry>
710
+ <entry></entry>
711
+ <entry>vpiParent</entry>
712
+ <entry>_</entry>
713
+ <entry>h</entry>
714
+ <entry></entry>
715
+ </row>
716
+ <row>
717
+ <entry><code><varname>handle</varname>.<function>parent</function></code></entry>
718
+ <entry></entry>
719
+ <entry></entry>
720
+ <entry>parent</entry>
721
+ <entry></entry>
722
+ <entry></entry>
723
+ <entry></entry>
724
+ </row>
725
+ <row>
726
+ <entry><code><varname>handle</varname>.<function>parent_h</function></code></entry>
727
+ <entry></entry>
728
+ <entry></entry>
729
+ <entry>parent</entry>
730
+ <entry>_</entry>
731
+ <entry>h</entry>
732
+ <entry></entry>
733
+ </row>
734
+
735
+ </tbody>
736
+ </tgroup>
737
+ </informaltable>
738
+ </example>
739
+ </section>
740
+ </section>
741
+ </section>
742
+
743
+ <section id="background.running-tests">
744
+ <title>Running a test</title>
745
+
746
+ <para>Unlike an engineer who can verify an electronic component in real-time, the &v; simulator and the Ruby interpreter (see <xref linkend="fig..organization.detail"/>) take turns working with objects in a simulation when a test is run. In particular, they take turns manipulating the design and transfer control to each other when appropriate.</para>
747
+
748
+ <para>The situation is similar to a pair of friends playing catch. One friend throws a ball to the other, and the other throws it back. Either is able to inspect and modify the ball, but only when it is in hand.</para>
749
+
750
+ <section id="background.running-tests.init">
751
+ <title>Initialization</title>
752
+
753
+ <para>A test is first initialized before it is <link linkend="background.running-tests.exec">executed</link>. <xref linkend="fig..ruby_init"/> illustrates the initialization process <link linkend="proc..ruby_init">described below</link>.</para>
754
+
755
+ <figure id="fig..ruby_init">
756
+ <title>Initialization of a test</title>
757
+ <mediaobject>
758
+ <imageobject>
759
+ <imagedata fileref="figures/ruby_init.png"/>
760
+ </imageobject>
761
+ </mediaobject>
762
+ </figure>
763
+
764
+ <procedure id="proc..ruby_init">
765
+ <title>Initialization of a test</title>
766
+
767
+ <step>
768
+ <para>The &v; simulator initializes the Ruby interpreter by invoking the <code><function>$ruby_init</function>;</code> system task/function, whose parameters represent the command-line invocation of the Ruby interpreter. For example, one would specify <code><function>$ruby_init</function>(<parameter><literal>"ruby"</literal></parameter>, <parameter><literal>"-w"</literal></parameter>);</code> in &v; to achieve the same effect as specifying <command>ruby <option>-w</option></command> at a command-prompt.</para>
769
+ </step>
770
+
771
+ <step>
772
+ <para>The &v; simulator is paused and the Ruby interpreter is initialized with the arguments of the <code><function>$ruby_init</function>;</code> system task/function.</para>
773
+ </step>
774
+
775
+ <step>&background.step3;</step>
776
+ </procedure>
777
+ </section>
778
+
779
+ <section id="background.running-tests.exec">
780
+ <title>Execution</title>
781
+
782
+ <para>After a test is <link linkend="background.running-tests.init">initialized</link>, it is executed such that the design is verified against the specification. <xref linkend="fig..ruby_relay"/> illustrates the execution process <link linkend="proc..ruby_relay">described below</link>.</para>
783
+
784
+ <figure id="fig..ruby_relay">
785
+ <title>Execution of a test</title>
786
+ <mediaobject>
787
+ <imageobject>
788
+ <imagedata fileref="figures/ruby_relay.png"/>
789
+ </imageobject>
790
+ </mediaobject>
791
+ </figure>
792
+
793
+ <procedure id="proc..ruby_relay">
794
+ <title>Execution of a test</title>
795
+
796
+ <step>
797
+ <para>The &v; simulator transfers control to the Ruby interpreter by invoking the <code><function>$ruby_relay</function>;</code> system task/function.</para>
798
+ </step>
799
+
800
+ <step>
801
+ <para>The &v; simulator is paused and the Ruby interpreter is given control.</para>
802
+ </step>
803
+
804
+ <step>&background.step3;</step>
805
+ </procedure>
806
+ </section>
807
+ </section>
808
+ </chapter>
809
+
810
+ <chapter id="usage">
811
+ <title>Usage</title>
812
+
813
+ <section id="usage.requirements">
814
+ <title>Requirements</title>
815
+ <para>The following software is necessary in order to use &rv;.</para>
816
+
817
+ <variablelist>
818
+ <varlistentry>
819
+ <term>&v; simulator</term>
820
+ <listitem>
821
+ <para>&rv; is known to work with the following simulators. Nevertheless, you should be able to use it with any &v; simulator that supports &vpi;.</para>
822
+
823
+ <variablelist>
824
+ <varlistentry>
825
+ <term><ulink url="http://www.icarus.com/eda/&v;/">Icarus &v;</ulink></term>
826
+ <listitem>
827
+ <para>Version 0.8 or newer is acceptable.</para>
828
+ </listitem>
829
+ </varlistentry>
830
+
831
+ <varlistentry>
832
+ <term><ulink url="http://www.pragmatic-c.com/gpl-cver/">GPL Cver</ulink></term>
833
+ <listitem>
834
+ <para>Version 2.11a or newer is acceptable.</para>
835
+ </listitem>
836
+ </varlistentry>
837
+
838
+ <varlistentry>
839
+ <term><ulink url="http://www.synopsys.com/products/simulation/simulation.html">Synopsys VCS</ulink></term>
840
+ <listitem>
841
+ <para>Version X-2005.06 or newer is acceptable.</para>
842
+ </listitem>
843
+ </varlistentry>
844
+
845
+ <varlistentry>
846
+ <term><ulink url="http://www.model.com">Mentor Modelsim</ulink></term>
847
+ <listitem>
848
+ <para>Version 6.1b or newer is acceptable.</para>
849
+ </listitem>
850
+ </varlistentry>
851
+ </variablelist>
852
+ </listitem>
853
+ </varlistentry>
854
+
855
+ <varlistentry>
856
+ <term><command>make</command></term>
857
+ <listitem>
858
+ <para><ulink url="http://www.gnu.org/software/make/">&gnu; make</ulink> is preferred but any distribution of <command>make</command> should be acceptable.</para>
859
+ </listitem>
860
+ </varlistentry>
861
+
862
+ <varlistentry>
863
+ <term>C compiler</term>
864
+ <listitem>
865
+ <para><ulink url="http://www.gnu.org/software/gcc/">&gnu; Compiler Collection (<acronym>GCC</acronym>)</ulink> is preferred but any C compiler should be acceptable.</para>
866
+ </listitem>
867
+ </varlistentry>
868
+
869
+ <varlistentry>
870
+ <term><ulink url="http://en.wikipedia.org/wiki/Pthreads"><acronym>POSIX</acronym> threads (pthreads)</ulink></term>
871
+ <listitem>
872
+ <para>Header and linkable object files, and operating system support for this library are necessary.</para>
873
+ </listitem>
874
+ </varlistentry>
875
+
876
+ <varlistentry>
877
+ <term><ulink url="http://www.ruby-lang.org">Ruby</ulink></term>
878
+ <listitem>
879
+ <para>Version 1.8 or newer, including header and linkable object files for building extensions, is necessary. You can install Ruby by following <ulink url="http://www.rubygarden.org/faq/section/show/3">these instructions</ulink>.</para>
880
+ </listitem>
881
+ </varlistentry>
882
+
883
+ <varlistentry>
884
+ <term><ulink url="http://rubyforge.org/frs/?group_id=126">RubyGems</ulink></term>
885
+ <listitem>
886
+ <para>Any recent version should be acceptable. You can install RubyGems by following <ulink url="http://www.rubygems.org/read/chapter/3">these instructions</ulink>.</para>
887
+ </listitem>
888
+ </varlistentry>
889
+ </variablelist>
890
+ </section>
891
+
892
+ <section id="usage.installation">
893
+ <title>Installation and maintenance</title>
894
+
895
+ <para>Once you have satisfied the <link linkend="usage.requirements">necessary requirements</link>, you can install &rv; by running the command <command>gem <action>install</action> <replaceable>ruby-vpi</replaceable></command>. Likewise, you can uninstall &rv; by running the command <command>gem <action>uninstall</action> <replaceable>ruby-vpi</replaceable></command>. Furthermore, you can upgrade to the latest release of &rv; by running the command <command>gem <action>update</action> <replaceable>ruby-vpi</replaceable></command>.</para>
896
+
897
+ <para>You can learn more about using and manipulating RubyGems in <ulink url="http://www.rubygems.org">the RubyGems user manual</ulink>.</para>
898
+ </section>
899
+
900
+ <section id="usage.tools">
901
+ <title>Tools</title>
902
+ <para>The <filename>bin</filename> directory contains various utilities which ease the process of writing tests. Each tool provides help and usage information invoked with the <option>--help</option> option.</para>
903
+
904
+ <section id="usage.tools.generate-test">
905
+ <title>Automated test generation</title>
906
+
907
+ <para>The <command>generate_test.rb</command> tool can be used to automatically generate tests from &v; 2001 module declarations (see <xref linkend="usage.tutorial.generate-test"/>). You can try it by running the command <command>generate_test.rb <option>--help</option></command>.</para>
908
+ </section>
909
+
910
+ <section id="usage.tools.verilog-ruby-conv">
911
+ <title>&v; to &r; conversion</title>
912
+
913
+ <para>The <command>header_to_ruby.rb</command> tool can be used to convert &v; header files into &r;. You can try it by running the command <command>header_to_ruby.rb <option>--help</option></command>.</para>
914
+ </section>
915
+ </section>
916
+
917
+ <section id="usage.examples">
918
+ <title>Examples</title>
919
+ <para>The <filename>samp</filename> directory contains several example tests which illustrate how &rv; can be used. Each example has an associated <filename>Rakefile</filename> which simplifies the process of running it. Therefore, simply navigate into an example directory and run the command <command>rake</command> to get started.</para>
920
+
921
+ <para>Also, some example specifications make use of BDD through the <application>RSpec</application> library. See the <xref linkend="background.methodology"/> for a discussion of <application>RSpec</application>.</para>
922
+ </section>
923
+
924
+ <section id="usage.tutorial">
925
+ <title>Tutorial</title>
926
+
927
+ <procedure>
928
+ <title>Typical way of using &rv;</title>
929
+
930
+ <step>
931
+ <para><link linkend="usage.tutorial.declare-design">Declare the design</link>, which is a &v; module, using &v; 2001 syntax.</para>
932
+ </step>
933
+
934
+ <step>
935
+ <para><link linkend="usage.tutorial.generate-test">Generate a test</link> for the design using the <link linkend="usage.tools.generate-test">automated test generator</link> tool.</para>
936
+ </step>
937
+
938
+ <step>
939
+ <para><link linkend="usage.tutorial.specification">Identify your expectations</link> for the design and implement them in the specification.</para>
940
+ </step>
941
+
942
+ <step>
943
+ <para><link linkend="usage.tutorial.implement-proto">Implement the prototype</link> of the design in &r;.</para>
944
+ </step>
945
+
946
+ <step>
947
+ <para><link linkend="usage.tutorial.test-proto">Verify the prototype</link> against the specification.</para>
948
+ </step>
949
+
950
+ <step>
951
+ <para><link linkend="usage.tutorial.implement-design">Implement the design</link> in &v; once the prototype has been verified.</para>
952
+ </step>
953
+
954
+ <step>
955
+ <para><link linkend="usage.tutorial.test-design">Verify the design</link> against the specification.</para>
956
+ </step>
957
+ </procedure>
958
+
959
+ <section id="usage.tutorial.declare-design">
960
+ <title>Start with a design</title>
961
+
962
+ <para>First, we need a design to verify. In this tutorial, <xref linkend="fig..counter.v_decl"/> will serve as our design. Its interface is composed of the following parts:
963
+ <variablelist>
964
+ <varlistentry>
965
+ <term><constant>Size</constant></term>
966
+ <listitem><para>This parameter defines the number of bits used to represent the counter's value.</para></listitem>
967
+ </varlistentry>
968
+ <varlistentry>
969
+ <term><varname>clock</varname></term>
970
+ <listitem><para>Each positive edge of this signal causes the <varname>count</varname> register to increment.</para></listitem>
971
+ </varlistentry>
972
+ <varlistentry>
973
+ <term><varname>reset</varname></term>
974
+ <listitem><para>Assertion of this signal causes the <varname>count</varname> register to become zero.</para></listitem>
975
+ </varlistentry>
976
+ <varlistentry>
977
+ <term><varname>count</varname></term>
978
+ <listitem><para>This register contains the counter's value.</para></listitem>
979
+ </varlistentry>
980
+ </variablelist>
981
+ </para>
982
+
983
+ <important>
984
+ <title>Before we continue&hellip;</title>
985
+ <para>Save the source code shown in <xref linkend="fig..counter.v_decl"/> into a file named <filename>counter.v</filename>.</para>
986
+ </important>
987
+
988
+ <figure id="fig..counter.v_decl">
989
+ <title>Declaration of a simple up-counter with synchronous reset</title>
990
+ <programlisting>
991
+ <token>module</token> counter #(<token>parameter</token> <constant>Size</constant> = <literal>5</literal>) (
992
+ <token>input</token> <varname>clock</varname>,
993
+ <token>input</token> <varname>reset</varname>,
994
+ <token>output</token> <type>reg</type> [<constant>Size</constant> - <literal>1</literal> : <literal>0</literal>] <varname>count</varname>
995
+ );
996
+ <token>endmodule</token>
997
+ </programlisting>
998
+ </figure>
999
+ </section>
1000
+
1001
+ <section id="usage.tutorial.generate-test">
1002
+ <title>Generate a test</title>
1003
+
1004
+ <para>Now that we have a design to verify, let us generate a test for it using the automated test generator tool. This tool allows us to implement our specification in either &rspec;, unit test, or our very own format. Each format represents a different software development methodology: &rspec; represents &BDD.gloss;, unit testing represents &TDD.gloss;, and our own format can represent another methodology.</para>
1005
+
1006
+ <note>
1007
+ <para>In this tutorial, we will see how to implement our specification in both &rspec; and unit test formats.</para>
1008
+ </note>
1009
+
1010
+ <para>Once we have decided how we want to implement our specification, we can proceed to generate a test for our design. <xref linkend="fig..generate-test.rspec"/> and <xref linkend="fig..generate-test.unit-test"/> illustrate this process. Here, the test generation tool produces a test composed of the following parts:
1011
+ <variablelist>
1012
+ <varlistentry>
1013
+ <term>Runner</term>
1014
+ <listitem>
1015
+ <para>Written in Rake, this file builds and runs the test bench.</para>
1016
+ </listitem>
1017
+ </varlistentry>
1018
+ <varlistentry>
1019
+ <term>Bench</term>
1020
+ <listitem>
1021
+ <para>Written in Verilog and Ruby, these files define the testing environment.</para>
1022
+ </listitem>
1023
+ </varlistentry>
1024
+ <varlistentry>
1025
+ <term>Design</term>
1026
+ <listitem>
1027
+ <para>Written in Ruby, this file provides an interface to the design under test.</para>
1028
+ </listitem>
1029
+ </varlistentry>
1030
+ <varlistentry>
1031
+ <term>Prototype</term>
1032
+ <listitem>
1033
+ <para>Written in Ruby, this file defines a prototype of the design under test.</para>
1034
+ </listitem>
1035
+ </varlistentry>
1036
+ <varlistentry>
1037
+ <term>Specification</term>
1038
+ <listitem>
1039
+ <para>Written in Ruby, this file verifies the design.</para>
1040
+ </listitem>
1041
+ </varlistentry>
1042
+ </variablelist>
1043
+ </para>
1044
+
1045
+ <para>The reason for dividing a single test into these parts is mainly to decouple the design from the specification. This allows you to focus on writing the specification while the remainder is automatically generated by the tool. For example, when the interface of a &v; module changes, you would simply re-run this tool to incorporate those changes into the test without diverting your focus from the specification.</para>
1046
+
1047
+ <figure id="fig..generate-test.rspec">
1048
+ <title>Generating a test with specification in &rspec; format</title>
1049
+ <screen>
1050
+ <prompt>$</prompt> <userinput><command>generate_test.rb <replaceable>counter.v</replaceable> <option>--rspec</option> <option>--name</option> <replaceable>rspecTest</replaceable></command></userinput>
1051
+ <computeroutput>Using name `rspecTest' for generated test.
1052
+ Using RSpec specification format.
1053
+
1054
+ Parsed module: counter
1055
+ - Generated runner: counter_rspecTest_runner.rake
1056
+ - Generated bench: counter_rspecTest_bench.v
1057
+ - Generated bench: counter_rspecTest_bench.rb
1058
+ - Generated design: counter_rspecTest_design.rb
1059
+ - Generated prototype: counter_rspecTest_proto.rb
1060
+ - Generated specification: counter_rspecTest_spec.rb</computeroutput>
1061
+ </screen>
1062
+ </figure>
1063
+
1064
+ <figure id="fig..generate-test.unit-test">
1065
+ <title>Generating a test with specification in unit test format</title>
1066
+ <screen>
1067
+ <prompt>$</prompt> <userinput><command>generate_test.rb <replaceable>counter.v</replaceable> <option>--unit</option> <option>--name</option> <replaceable>unitTest</replaceable></command></userinput>
1068
+ <computeroutput>Using name `unitTest' for generated test.
1069
+ Using UnitTest specification format.
1070
+
1071
+ Parsed module: counter
1072
+ - Generated runner: counter_unitTest_runner.rake
1073
+ - Generated bench: counter_unitTest_bench.v
1074
+ - Generated bench: counter_unitTest_bench.rb
1075
+ - Generated design: counter_unitTest_design.rb
1076
+ - Generated prototype: counter_unitTest_proto.rb
1077
+ - Generated specification: counter_unitTest_spec.rb</computeroutput>
1078
+ </screen>
1079
+ </figure>
1080
+ </section>
1081
+
1082
+ <section id="usage.tutorial.specification">
1083
+ <title>Specify your expectations</title>
1084
+
1085
+ <para>So far, the test generation tool has created a basic foundation for our test. Now we must build upon this foundation by identifying our expectations of the design. That is, how do we expect the design to <emphasis>behave</emphasis> under certain conditions?</para>
1086
+
1087
+ <para>The following is a reasonable set of expectations for our simple counter:
1088
+ <itemizedlist>
1089
+ <listitem>
1090
+ <para>A resetted counter's value should be zero.</para>
1091
+ </listitem>
1092
+ <listitem>
1093
+ <para>A resetted counter's value should increment by one count upon each rising clock edge.</para>
1094
+ </listitem>
1095
+ <listitem>
1096
+ <para>A counter with the maximum value should overflow upon increment.</para>
1097
+ </listitem>
1098
+ </itemizedlist>
1099
+ </para>
1100
+
1101
+ <para>Now that we have identified a set of expectations for our design, we are ready to implement them in our specification. <xref linkend="fig..counter_rspecTest_spec.rb"/> and <xref linkend="fig..counter_unitTest_spec.rb"/> illustrate this process. Note the striking similarities between our expectations and their implementation.</para>
1102
+
1103
+ <important>
1104
+ <title>Before we continue&hellip;</title>
1105
+ <itemizedlist>
1106
+ <listitem>
1107
+ <para>Append the following code to the files named <filename>counter_rspecTest_design.rb</filename> and <filename>counter_unitTest_design.rb</filename>.</para>
1108
+
1109
+ <programlisting>
1110
+ <token>class</token> <constant>Counter</constant>
1111
+ <token>def</token> <function>reset!</function>
1112
+ <varname>@reset</varname>.<function>intVal</function> = <literal>1</literal>
1113
+ <function>relay_verilog</function> <remark># advance the clock</remark>
1114
+ <varname>@reset</varname>.<function>intVal</function> = <literal>0</literal>
1115
+ <token>end</token>
1116
+ <token>end</token>
1117
+ </programlisting>
1118
+ </listitem>
1119
+ <listitem>
1120
+ <para>Replace the contents of the file named <filename>counter_rspecTest_spec.rb</filename> with the source code shown in <xref linkend="fig..counter_rspecTest_spec.rb"/>.</para>
1121
+ </listitem>
1122
+ <listitem>
1123
+ <para>Replace the contents of the file named <filename>counter_unitTest_spec.rb</filename> with the source code shown in <xref linkend="fig..counter_unitTest_spec.rb"/>.</para>
1124
+ </listitem>
1125
+ </itemizedlist>
1126
+ </important>
1127
+
1128
+ <figure id="fig..counter_rspecTest_spec.rb">
1129
+ <title>Specification implemented in &rspec; format</title>
1130
+ <programlisting>
1131
+ <constant>LIMIT</constant> = <literal>2</literal> ** <constant>Counter</constant>::<constant>Size</constant> <remark># lowest upper bound of counter's value</remark>
1132
+ <constant>MAX</constant> = <constant>LIMIT</constant> - <literal>1</literal> <remark># maximum allowed value for a counter</remark>
1133
+
1134
+ <function>include</function> <constant>Vpi</constant>
1135
+
1136
+ <function>context</function> <literal>"A resetted counter's value"</literal> <token>do</token>
1137
+ <function>setup</function> <token>do</token>
1138
+ <varname>@design</varname> = <constant>Counter</constant>.<function>new</function>
1139
+ <varname>@design</varname>.<function>reset!</function>
1140
+ <token>end</token>
1141
+
1142
+ <function>specify</function> <literal>"should be zero"</literal> <token>do</token>
1143
+ <varname>@design</varname>.<function>count</function>.<function>intVal</function>.<function>should_equal</function> <literal>0</literal>
1144
+ <token>end</token>
1145
+
1146
+ <function>specify</function> <literal>"should increment by one count upon each rising clock edge"</literal> <token>do</token>
1147
+ <constant>LIMIT</constant>.<function>times</function> <token>do</token> |<varname>i</varname>|
1148
+ <varname>@design</varname>.<function>count</function>.<function>intVal</function>.<function>should_equal</function> <varname>i</varname>
1149
+ <function>relay_verilog</function> <remark># advance the clock</remark>
1150
+ <token>end</token>
1151
+ <token>end</token>
1152
+ <token>end</token>
1153
+
1154
+ <function>context</function> <literal>"A counter with the maximum value"</literal> <token>do</token>
1155
+ <function>setup</function> <token>do</token>
1156
+ <varname>@design</varname> = <constant>Counter</constant>.<function>new</function>
1157
+ <varname>@design</varname>.<function>reset!</function>
1158
+
1159
+ <remark># increment the counter to maximum value</remark>
1160
+ <constant>MAX</constant>.<function>times</function> <token>do</token> <function>relay_verilog</function> <token>end</token>
1161
+ <varname>@design</varname>.<function>count</function>.<function>intVal</function>.<function>should_equal</function> <constant>MAX</constant>
1162
+ <token>end</token>
1163
+
1164
+ <function>specify</function> <literal>"should overflow upon increment"</literal> <token>do</token>
1165
+ <function>relay_verilog</function> <remark># increment the counter</remark>
1166
+ <varname>@design</varname>.<function>count</function>.<function>intVal</function>.<function>should_equal</function> <literal>0</literal>
1167
+ <token>end</token>
1168
+ <token>end</token>
1169
+ </programlisting>
1170
+ </figure>
1171
+
1172
+ <figure id="fig..counter_unitTest_spec.rb">
1173
+ <title>Specification implemented in unit test format</title>
1174
+ <programlisting>
1175
+ <constant>LIMIT</constant> = <literal>2</literal> ** <constant>Counter</constant>::<constant>Size</constant> <remark># lowest upper bound of counter's value</remark>
1176
+ <constant>MAX</constant> = <constant>LIMIT</constant> - <literal>1</literal> <remark># maximum allowed value for a counter</remark>
1177
+
1178
+ <token>class</token> <constant>ResettedCounterValue</constant> &lt; <constant>Test</constant>::<constant>Unit</constant>::<constant>TestCase</constant>
1179
+ <function>include</function> <constant>Vpi</constant>
1180
+
1181
+ <token>def</token> <function>setup</function>
1182
+ <varname>@design</varname> = <constant>Counter</constant>.<function>new</function>
1183
+ <varname>@design</varname>.<function>reset!</function>
1184
+ <token>end</token>
1185
+
1186
+ <token>def</token> <function>test_zero</function>
1187
+ <function>assert_equal</function> <literal>0</literal>, <varname>@design</varname>.<function>count</function>.<function>intVal</function>
1188
+ <token>end</token>
1189
+
1190
+ <token>def</token> <function>test_increment</function>
1191
+ <constant>LIMIT</constant>.<function>times</function> <token>do</token> |<varname>i</varname>|
1192
+ <function>assert_equal</function> <varname>i</varname>, <varname>@design</varname>.<function>count</function>.<function>intVal</function>
1193
+ <function>relay_verilog</function> <remark># advance the clock</remark>
1194
+ <token>end</token>
1195
+ <token>end</token>
1196
+ <token>end</token>
1197
+
1198
+ <token>class</token> <constant>MaximumCounterValue</constant> &lt; <constant>Test</constant>::<constant>Unit</constant>::<constant>TestCase</constant>
1199
+ <function>include</function> <constant>Vpi</constant>
1200
+
1201
+ <token>def</token> <function>setup</function>
1202
+ <varname>@design</varname> = <constant>Counter</constant>.<function>new</function>
1203
+ <varname>@design</varname>.<function>reset!</function>
1204
+
1205
+ <remark># increment the counter to maximum value</remark>
1206
+ <constant>MAX</constant>.<function>times</function> <token>do</token> <function>relay_verilog</function> <token>end</token>
1207
+ <function>assert_equal</function> <constant>MAX</constant>, <varname>@design</varname>.<function>count</function>.<function>intVal</function>
1208
+ <token>end</token>
1209
+
1210
+ <token>def</token> <function>test_overflow</function>
1211
+ <function>relay_verilog</function> <remark># increment the counter</remark>
1212
+ <function>assert_equal</function> <literal>0</literal>, <varname>@design</varname>.<function>count</function>.<function>intVal</function>
1213
+ <token>end</token>
1214
+ <token>end</token>
1215
+ </programlisting>
1216
+ </figure>
1217
+ </section>
1218
+
1219
+ <section id="usage.tutorial.implement-proto">
1220
+ <title>Implement the prototype</title>
1221
+ <para>Now that we have a specification against which to verify our design, let us build a prototype of our design. By doing so, we exercise our specification, experience potential problems that may arise when we later implement our design in &v;, and gain confidence in our work. <!--Furthermore, we will use the <emphasis>same</emphasis> specification later when verifying our design!--> <xref linkend="fig..counter_proto.rb"/> shows the completed prototype for our design.</para>
1222
+
1223
+ <important>
1224
+ <title>Before we continue&hellip;</title>
1225
+ <para>Replace the contents of the files named <filename>counter_rspecTest_proto.rb</filename> and <filename>counter_unitTest_proto.rb</filename> with the source code shown in <xref linkend="fig..counter_proto.rb"/>.</para>
1226
+ </important>
1227
+
1228
+ <figure id="fig..counter_proto.rb">
1229
+ <title>Ruby prototype of our &v; design</title>
1230
+ <programlisting>
1231
+ <token>class</token> <constant>CounterProto</constant> &lt; <constant>Counter</constant>
1232
+ <token>def</token> <function>simulate!</function>
1233
+ <token>if</token> <varname>@reset</varname>.<function>intVal</function> == <literal>1</literal>
1234
+ <varname>@count</varname>.<function>intVal</function> = <literal>0</literal>
1235
+ <token>else</token>
1236
+ <varname>@count</varname>.<function>intVal</function> += <literal>1</literal>
1237
+ <token>end</token>
1238
+ <token>end</token>
1239
+ <token>end</token>
1240
+ </programlisting>
1241
+ </figure>
1242
+
1243
+ </section>
1244
+
1245
+ <section id="usage.tutorial.test-proto">
1246
+ <title>Verify the prototype</title>
1247
+ <para>Now that we have implemented our prototype, we are ready to verify it against our specification by running the test. <xref linkend="fig..test-proto.rspec"/> and <xref linkend="fig..test-proto.unit-test"/> illustrate this process.</para>
1248
+
1249
+ <para>Here, the <varname>PROTO</varname> environment variable is set&mdash;any value is fine&mdash;before running the test in order to replace the design with the prototype in the simulation. Otherwise, our design will be verified&mdash;instead of our prototype&mdash;against our specification. Furthermore, the manner in which the <varname>PROTO</varname> environment variable is set in these figures follows the syntax of the &bash; shell. If you use a different shell, you may have to use different syntax, or a different command altogether, in order to set this variable. Finally, the Icarus &v; simulator, denoted by <replaceable>ivl</replaceable>, is used to simulate our design.</para>
1250
+
1251
+ <figure id="fig..test-proto.rspec">
1252
+ <title>Running a test with specification in &rspec; format</title>
1253
+ <screen>
1254
+ <prompt>$</prompt> <userinput><command>export <replaceable>PROTO=1</replaceable></command></userinput>
1255
+ <prompt>$</prompt> <userinput><command>rake <option>-f</option> <replaceable>counter_rspecTest_runner.rake</replaceable> <replaceable>ivl</replaceable></command></userinput>
1256
+ <computeroutput>counter_rspecTest: verifying prototype instead of design
1257
+
1258
+ A resetted counter's value
1259
+ - should be zero
1260
+ - should increment by one count upon each rising clock edge
1261
+
1262
+ A counter with the maximum value
1263
+ - should overflow upon increment
1264
+
1265
+ Finished in 0.018199 seconds
1266
+
1267
+ 3 specifications, 0 failures</computeroutput>
1268
+ </screen>
1269
+ </figure>
1270
+
1271
+ <figure id="fig..test-proto.unit-test">
1272
+ <title>Running a test with specification in unit test format</title>
1273
+ <screen>
1274
+ <prompt>$</prompt> <userinput><command>export <replaceable>PROTO=1</replaceable></command></userinput>
1275
+ <prompt>$</prompt> <userinput><command>rake <option>-f</option> <replaceable>counter_unitTest_runner.rake</replaceable> <replaceable>ivl</replaceable></command></userinput>
1276
+ <computeroutput>counter_unitTest: verifying prototype instead of design
1277
+
1278
+ Loaded suite counter_unitTest_bench
1279
+ Started
1280
+ ...
1281
+ Finished in 0.040668 seconds.
1282
+
1283
+ 3 tests, 35 assertions, 0 failures, 0 errors</computeroutput>
1284
+ </screen>
1285
+ </figure>
1286
+ </section>
1287
+
1288
+ <section id="usage.tutorial.implement-design">
1289
+ <title>Implement the design</title>
1290
+
1291
+ <para>Now that we have implemented and verified our prototype, we are ready to implement our design. This is often quite simple because we translate <emphasis>existing</emphasis> code from &r; into &v;. <xref linkend="fig..counter.v_impl"/> illustrates the result of this process.</para>
1292
+
1293
+ <important>
1294
+ <title>Before we continue&hellip;</title>
1295
+ <para>Replace the contents of the file named <filename>counter.v</filename> with the source code shown in <xref linkend="fig..counter.v_impl"/>.</para>
1296
+ </important>
1297
+
1298
+ <figure id="fig..counter.v_impl">
1299
+ <title>Implementation of a simple up-counter with synchronous reset</title>
1300
+ <programlisting>
1301
+ <token>module</token> counter #(<token>parameter</token> <constant>Size</constant> = <literal>5</literal>) (
1302
+ <token>input</token> <varname>clock</varname>,
1303
+ <token>input</token> <varname>reset</varname>,
1304
+ <token>output</token> <type>reg</type> [<constant>Size</constant> - <literal>1</literal> : <literal>0</literal>] <varname>count</varname>
1305
+ );
1306
+ <token>always</token> @(<token>posedge</token> <varname>clock</varname>) <token>begin</token>
1307
+ <token>if</token> (<varname>reset</varname>)
1308
+ <varname>count</varname> &lt;= <literal>0</literal>;
1309
+ <token>else</token>
1310
+ <varname>count</varname> &lt;= <varname>count</varname> + <literal>1</literal>;
1311
+ <token>end</token>
1312
+ <token>endmodule</token>
1313
+ </programlisting>
1314
+ </figure>
1315
+ </section>
1316
+
1317
+ <section id="usage.tutorial.test-design">
1318
+ <title>Verify the design</title>
1319
+ <para>Now that we have implemented our design, we are ready to verify it against our specification by running the test. <xref linkend="fig..test-design.rspec"/> and <xref linkend="fig..test-design.unit-test"/> illustrate this process.</para>
1320
+
1321
+ <para>Here, the <varname>PROTO</varname> environment variable is unset before the test is run in order to prevent the design from being replaced by the prototype. Otherwise, our prototype will be verified&mdash;instead of our design&mdash;against our specification. Furthermore, the manner in which the <varname>PROTO</varname> environment variable is unset in these figures follows the syntax of the &bash; shell. If you use a different shell, you may have to use different syntax, or a different command altogether, in order to set this variable. Finally, the Icarus &v; simulator, denoted by <replaceable>ivl</replaceable>, is used to simulate our design.</para>
1322
+
1323
+ <figure id="fig..test-design.rspec">
1324
+ <title>Running a test with specification in &rspec; format</title>
1325
+ <screen>
1326
+ <prompt>$</prompt> <userinput><command>unset <replaceable>PROTO</replaceable></command></userinput>
1327
+ <prompt>$</prompt> <userinput><command>rake <option>-f</option> <replaceable>counter_rspecTest_runner.rake</replaceable> <replaceable>ivl</replaceable></command></userinput>
1328
+ <computeroutput>A resetted counter's value
1329
+ - should be zero
1330
+ - should increment by one count upon each rising clock edge
1331
+
1332
+ A counter with the maximum value
1333
+ - should overflow upon increment
1334
+
1335
+ Finished in 0.005628 seconds
1336
+
1337
+ 3 specifications, 0 failures</computeroutput>
1338
+ </screen>
1339
+ </figure>
1340
+
1341
+ <figure id="fig..test-design.unit-test">
1342
+ <title>Running a test with specification in unit test format</title>
1343
+ <screen>
1344
+ <prompt>$</prompt> <userinput><command>unset <replaceable>PROTO</replaceable></command></userinput>
1345
+ <prompt>$</prompt> <userinput><command>rake <option>-f</option> <replaceable>counter_unitTest_runner.rake</replaceable> <replaceable>ivl</replaceable></command></userinput>
1346
+ <computeroutput>Loaded suite counter_unitTest_bench
1347
+ Started
1348
+ ...
1349
+ Finished in 0.006766 seconds.
1350
+
1351
+ 3 tests, 35 assertions, 0 failures, 0 errors</computeroutput>
1352
+ </screen>
1353
+ </figure>
1354
+ </section>
1355
+
1356
+ </section>
1357
+ </chapter>
1358
+
1359
+ <chapter id="problems">
1360
+ <title>Known problems</title>
1361
+
1362
+ <para>This chapter presents known problems and possible solutions. In addition, previously solved problems have been retained for historical reference.</para>
1363
+
1364
+ <section id="problems.ruby">
1365
+ <title>Ruby</title>
1366
+
1367
+ <section id="problems.ruby.SystemStackError">
1368
+ <title>SystemStackError</title>
1369
+
1370
+ &fixed-in-2.0.0;
1371
+
1372
+ <para>If a <quote>stack level too deep (SystemStackError)</quote> error occurs during the simulation, then increase the system-resource limit for stack-size by running the command <command>ulimit <option>-s</option> <replaceable>unlimited</replaceable></command> before starting the simulation.</para>
1373
+ </section>
1374
+
1375
+ <section id="problems.ruby.TestUnit">
1376
+ <title>test/unit</title>
1377
+
1378
+ &fixed-in-2.0.0;
1379
+
1380
+ <para>If your specification employs Ruby's unit testing framework, then you will encounter the error: <quote>[BUG] cross-thread violation on rb_gc()</quote>.</para>
1381
+ </section>
1382
+ </section>
1383
+
1384
+ <section id="problem.ivl">
1385
+ <title>Icarus &v;</title>
1386
+
1387
+ <section id="problems.ivl.vpi_handle_by_name">
1388
+ <title>vpi_handle_by_name</title>
1389
+
1390
+ <section id="problems.ivl.vpi_handle_by_name.absolute-paths">
1391
+ <title>Give full paths to &v; objects</title>
1392
+
1393
+ <para>In version 0.8 of Icarus &v;, the <function>vpi_handle_by_name</function> function requires an <emphasis>absolute</emphasis> path (including the name of the bench which instantiates the design) to a &v; object.</para>
1394
+
1395
+ <para>For example, consider <xref linkend="ex..TestFoo"/>. Here, one needs to specify <code>TestFoo.my_foo.clk</code> instead of <code>my_foo.clk</code> in order to access the <varname>clk</varname> input of the <varname>my_foo</varname> module instance.</para>
1396
+
1397
+ <example id="ex..TestFoo">
1398
+ <title>Part of a bench which instantiates a &v; design</title>
1399
+ <programlisting>
1400
+ <token>module</token> TestFoo;
1401
+ <type>reg</type> <varname>clk_reg</varname>;
1402
+ Foo <varname>my_foo</varname>(<parameter>.clk</parameter>(<varname>clk_reg</varname>));
1403
+ <token>endmodule</token>
1404
+ </programlisting>
1405
+ </example>
1406
+ </section>
1407
+
1408
+ <section id="problems.ivl.vpi_handle_by_name.connect-registers">
1409
+ <title>Registers must be connected</title>
1410
+
1411
+ <para>In version 0.8 of Icarus &v;, if you want to access a register in a design, then it must be connected to something (either assigned to a wire or passed as a parameter to a module instantiation). Otherwise, you will get a <literal>nil</literal> value as the result of <function>vpi_handle_by_name</function> method.</para>
1412
+
1413
+ <para>For example, suppose you wanted to access the <varname>clk_reg</varname> register, from the bench shown in <xref linkend="ex..TestFoo_bad"/>. If you execute the statement <code><varname>clk_reg</varname> = <function>vpi_handle_by_name</function>(<parameter><literal>"TestFoo.clk_reg"</literal></parameter>, <parameter><literal>nil</literal></parameter>)</code> in a specification, then you will discover that the <function>vpi_handle_by_name</function> method returns <literal>nil</literal> instead of a handle to the <varname>clk_reg</varname> register.</para>
1414
+
1415
+ <para>The solution is to change the design such that it appears like the one shown in <xref linkend="ex..TestFoo_fix"/> where the register is connected to a wire, or <xref linkend="ex..TestFoo"/> where the register is connected to a module instantiation.</para>
1416
+
1417
+ <example id="ex..TestFoo_bad">
1418
+ <title>Bad design with unconnected registers</title>
1419
+
1420
+ <para>Here the <varname>clk_reg</varname> register is not connected to anything.</para>
1421
+
1422
+ <programlisting>
1423
+ <token>module</token> TestFoo;
1424
+ <type>reg</type> <varname>clk_reg</varname>;
1425
+ <token>endmodule</token>
1426
+ </programlisting>
1427
+ </example>
1428
+
1429
+ <example id="ex..TestFoo_fix">
1430
+ <title>Fixed design with wired registers</title>
1431
+
1432
+ <para>Here the <varname>clk_reg</varname> register is connected to the <varname>clk_wire</varname> wire.</para>
1433
+
1434
+ <programlisting>
1435
+ <token>module</token> TestFoo;
1436
+ <type>reg</type> <varname>clk_reg</varname>;
1437
+ <type>wire</type> <varname>clk_wire</varname>;
1438
+ <token>assign</token> <varname>clk_wire</varname> = <varname>clk_reg</varname>;
1439
+ <token>endmodule</token>
1440
+ </programlisting>
1441
+ </example>
1442
+ </section>
1443
+ </section>
1444
+
1445
+ <section id="problems.ivl.vpi_reset">
1446
+ <title>Vpi::reset</title>
1447
+
1448
+ <caution>
1449
+ <title>Deprecated method</title>
1450
+ <para>The <function>vpi_control</function> method was removed in release 3.0.0 (2006-04-23) of &rv;, and is deprecated. Please use <code><constant>Vpi</constant>::<function>vpi_control</function>(<parameter><constant>VpiReset</constant></parameter>)</code> instead.</para>
1451
+ </caution>
1452
+
1453
+ <para>In version 0.8 of Icarus &v;, the <code><function>vpi_control</function>(<parameter><constant>vpiReset</constant></parameter>)</code> &vpi; function causes an assertion to fail inside the simulator. As a result, the simulation terminates and a core dump is produced.</para>
1454
+ </section>
1455
+ </section>
1456
+
1457
+ <section id="problems.vsim">
1458
+ <title>Mentor Modelsim</title>
1459
+
1460
+ <section id="problems.vsim.ruby_run">
1461
+ <title>ruby_run()</title>
1462
+
1463
+ &fixed-in-2.0.0;
1464
+
1465
+ <para>Version 6.1b of Mentor Modelsim doesn't play nicely with either an embedded Ruby interpreter or POSIX threads in a PLI application. When &rv; invokes the <function>ruby_run</function> function (which starts the Ruby interpreter), the simulator terminates immediately with an exit status of 0.</para>
1466
+ </section>
1467
+ </section>
1468
+ </chapter>
1469
+
1470
+ <glossary id="glossary">
1471
+ <glossdiv>
1472
+ <title>B</title>
1473
+
1474
+ <glossentry id="term..bench">
1475
+ <glossterm>Bench</glossterm>
1476
+ <glossdef>
1477
+ <para>An environment in which a design is verified against a specification. Often, it is used to emulate conditions in which the design will be eventually deployed.</para>
1478
+ </glossdef>
1479
+ </glossentry>
1480
+
1481
+ <glossentry id="term..BDD">
1482
+ <glossterm><acronym>BDD</acronym></glossterm>
1483
+
1484
+ <glossdef>
1485
+ <para>Behavior driven development.</para>
1486
+ <para>A software development methodology which emphasizes thinking in terms of behavior when designing, implementing, and verifying software. See the <ulink url="http://behaviour-driven.org/">official wiki</ulink> for more information.</para>
1487
+
1488
+ <glossseealso otherterm="term..TDD"/>
1489
+ <glossseealso otherterm="term..rspec"/>
1490
+ </glossdef>
1491
+ </glossentry>
1492
+ </glossdiv>
1493
+
1494
+ <glossdiv>
1495
+ <title>D</title>
1496
+
1497
+ <glossentry id="term..design">
1498
+ <glossterm>Design</glossterm>
1499
+ <glossdef>
1500
+ <para>An idea or entity that is verified against a specification in order to ensure correctness or soundness of its being.</para>
1501
+ </glossdef>
1502
+ </glossentry>
1503
+ </glossdiv>
1504
+
1505
+ <glossdiv>
1506
+ <title>H</title>
1507
+
1508
+ <glossentry id="term..handle">
1509
+ <glossterm>Handle</glossterm>
1510
+ <glossdef>
1511
+ <para>An object in a &v; simulation.</para>
1512
+ </glossdef>
1513
+ </glossentry>
1514
+ </glossdiv>
1515
+
1516
+ <glossdiv>
1517
+ <title>R</title>
1518
+
1519
+ <glossentry id="term..rake">
1520
+ <glossterm>&rake;</glossterm>
1521
+ <glossdef>
1522
+ <blockquote>
1523
+ <attribution><ulink url="&rake-doc.url;">&rake; documentation</ulink></attribution>
1524
+ <para>Rake is a build tool, written in Ruby, using Ruby as a build language. Rake is similar to make in scope and purpose.</para>
1525
+ </blockquote>
1526
+
1527
+ <para>See the <ulink url="&rake.url;">&rake; website</ulink> for more information.</para>
1528
+ </glossdef>
1529
+ </glossentry>
1530
+
1531
+ <glossentry id="term..rspec">
1532
+ <glossterm>&rspec;</glossterm>
1533
+ <glossdef>
1534
+ <para>Ruby framework for BDD. See the <ulink url="&rspec.url;">&rspec; website</ulink> and &rspec-tutorial..ulink; for more information.</para>
1535
+
1536
+ <glossseealso otherterm="term..BDD"/>
1537
+ </glossdef>
1538
+ </glossentry>
1539
+ </glossdiv>
1540
+
1541
+ <glossdiv>
1542
+ <title>S</title>
1543
+
1544
+ <glossentry id="term..specification">
1545
+ <glossterm>Specification</glossterm>
1546
+ <glossdef>
1547
+ <para>A collection of expectations that must be satisfied by a design when subjected to certain conditions.</para>
1548
+ </glossdef>
1549
+ </glossentry>
1550
+ </glossdiv>
1551
+
1552
+ <glossdiv>
1553
+ <title>T</title>
1554
+
1555
+ <glossentry id="term..TDD">
1556
+ <glossterm>TDD</glossterm>
1557
+ <glossdef>
1558
+ <para>Test Driven Development.</para>
1559
+ <glossseealso otherterm="term..BDD"/>
1560
+ </glossdef>
1561
+ </glossentry>
1562
+
1563
+ <glossentry id="term..test">
1564
+ <glossterm>Test</glossterm>
1565
+ <glossdef>
1566
+ <para>The act of verifying a design against a specification in a bench.</para>
1567
+ <glossseealso otherterm="term..test-bench"/>
1568
+ </glossdef>
1569
+ </glossentry>
1570
+
1571
+ <glossentry id="term..test-bench">
1572
+ <glossterm>Test bench</glossterm>
1573
+ <glossdef>
1574
+ <para>An allusion to <link linkend="background.terminology">a bench in an electronics laboratory</link>, or so it seems.</para>
1575
+ <glossseealso otherterm="term..test"/>
1576
+ </glossdef>
1577
+ </glossentry>
1578
+ </glossdiv>
1579
+ </glossary>
1580
+
1581
+ &license;
1582
+ </book>