ruby-vpi 7.2.0 → 7.3.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 (214) hide show
  1. data/HEADER +4 -5
  2. data/HISTORY +18 -2
  3. data/MEMO +10 -6
  4. data/Rakefile +11 -14
  5. data/bin/generate_test.rb +7 -58
  6. data/bin/generate_test_tpl/bench.v +15 -19
  7. data/bin/generate_test_tpl/design.rb +8 -8
  8. data/bin/generate_test_tpl/spec.rb +2 -2
  9. data/bin/header_to_ruby.rb +2 -27
  10. data/doc/xhtml/background.organization.html +1 -1
  11. data/doc/xhtml/index.html +2 -2
  12. data/header.html +3 -6
  13. data/header.part.html +3 -6
  14. data/history.html +35 -8
  15. data/history.part.html +32 -2
  16. data/lib/ruby-vpi/verilog_parser.rb +136 -0
  17. data/lib/ruby-vpi/vpi_util.rb +10 -0
  18. data/memo.html +19 -17
  19. data/memo.part.html +16 -11
  20. data/readme.html +3 -6
  21. data/ref/c/annotated.html +1 -1
  22. data/ref/c/common_8h.html +1 -1
  23. data/ref/c/files.html +1 -1
  24. data/ref/c/functions.html +1 -1
  25. data/ref/c/functions_vars.html +1 -1
  26. data/ref/c/globals.html +1 -1
  27. data/ref/c/globals_0x63.html +1 -1
  28. data/ref/c/globals_0x65.html +1 -1
  29. data/ref/c/globals_0x66.html +1 -1
  30. data/ref/c/globals_0x70.html +1 -1
  31. data/ref/c/globals_0x72.html +1 -1
  32. data/ref/c/globals_0x73.html +1 -1
  33. data/ref/c/globals_0x74.html +1 -1
  34. data/ref/c/globals_0x76.html +1 -1
  35. data/ref/c/globals_0x78.html +1 -1
  36. data/ref/c/globals_defs.html +1 -1
  37. data/ref/c/globals_defs_0x65.html +1 -1
  38. data/ref/c/globals_defs_0x70.html +1 -1
  39. data/ref/c/globals_defs_0x76.html +1 -1
  40. data/ref/c/globals_defs_0x78.html +1 -1
  41. data/ref/c/globals_enum.html +1 -1
  42. data/ref/c/globals_eval.html +1 -1
  43. data/ref/c/globals_func.html +1 -1
  44. data/ref/c/globals_type.html +1 -1
  45. data/ref/c/globals_vars.html +1 -1
  46. data/ref/c/hierarchy.html +1 -1
  47. data/ref/c/index.html +1 -1
  48. data/ref/c/relay_8cin.html +1 -1
  49. data/ref/c/relay_8hin.html +1 -1
  50. data/ref/c/ruby-vpi_8c.html +1 -1
  51. data/ref/c/structrelay____RubyOptions____def.html +1 -1
  52. data/ref/c/structt__cb__data.html +1 -1
  53. data/ref/c/structt__vpi__delay.html +1 -1
  54. data/ref/c/structt__vpi__error__info.html +1 -1
  55. data/ref/c/structt__vpi__strengthval.html +1 -1
  56. data/ref/c/structt__vpi__systf__data.html +1 -1
  57. data/ref/c/structt__vpi__time.html +1 -1
  58. data/ref/c/structt__vpi__value.html +1 -1
  59. data/ref/c/structt__vpi__vecval.html +1 -1
  60. data/ref/c/structt__vpi__vlog__info.html +1 -1
  61. data/ref/c/swig_8cin.html +1 -1
  62. data/ref/c/swig_8hin.html +1 -1
  63. data/ref/c/verilog_8h.html +1 -1
  64. data/ref/c/vlog_8cin.html +1 -1
  65. data/ref/c/vlog_8hin.html +1 -1
  66. data/ref/c/vpi__user_8h.html +1 -1
  67. data/ref/ruby/classes/ERB.html +5 -5
  68. data/ref/ruby/classes/ERB.src/{M000011.html → M000018.html} +0 -0
  69. data/ref/ruby/classes/FileUtils.html +10 -10
  70. data/ref/ruby/classes/FileUtils.src/{M000065.html → M000073.html} +0 -0
  71. data/ref/ruby/classes/FileUtils.src/{M000066.html → M000074.html} +0 -0
  72. data/ref/ruby/classes/OutputInfo.html +5 -5
  73. data/ref/ruby/classes/OutputInfo.src/{M000007.html → M000014.html} +37 -37
  74. data/ref/ruby/classes/RDoc.html +5 -5
  75. data/ref/ruby/classes/RDoc.src/{M000069.html → M000077.html} +0 -0
  76. data/ref/ruby/classes/RubyVPI.html +10 -10
  77. data/ref/ruby/classes/RubyVPI.src/{M000067.html → M000075.html} +0 -0
  78. data/ref/ruby/classes/RubyVPI.src/{M000068.html → M000076.html} +0 -0
  79. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +72 -35
  80. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000065.html +18 -0
  81. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000066.html +18 -0
  82. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000059.html → M000067.html} +8 -8
  83. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000060.html → M000068.html} +29 -29
  84. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000061.html → M000069.html} +63 -63
  85. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000062.html → M000070.html} +106 -106
  86. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000063.html → M000071.html} +12 -12
  87. data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000064.html → M000072.html} +4 -4
  88. data/ref/ruby/classes/String.html +27 -9
  89. data/ref/ruby/classes/String.src/M000016.html +41 -0
  90. data/ref/ruby/classes/String.src/M000017.html +18 -0
  91. data/ref/ruby/classes/Table.html +20 -20
  92. data/ref/ruby/classes/Table.src/{M000003.html → M000010.html} +0 -0
  93. data/ref/ruby/classes/Table.src/{M000004.html → M000011.html} +0 -0
  94. data/ref/ruby/classes/Table.src/{M000005.html → M000012.html} +0 -0
  95. data/ref/ruby/classes/Table.src/{M000006.html → M000013.html} +0 -0
  96. data/ref/ruby/classes/Template.html +5 -5
  97. data/ref/ruby/classes/Template.src/{M000010.html → M000015.html} +0 -0
  98. data/ref/ruby/classes/VerilogParser/Module/Parameter.html +160 -0
  99. data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000009.html +21 -0
  100. data/ref/ruby/classes/VerilogParser/Module/Port.html +207 -0
  101. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +21 -0
  102. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +18 -0
  103. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +18 -0
  104. data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +18 -0
  105. data/ref/ruby/classes/VerilogParser/Module.html +172 -0
  106. data/ref/ruby/classes/VerilogParser/Module.src/M000004.html +29 -0
  107. data/ref/ruby/classes/{ModuleInfo.html → VerilogParser.html} +38 -50
  108. data/ref/ruby/classes/VerilogParser.src/M000003.html +34 -0
  109. data/ref/ruby/classes/XX/Document.html +45 -45
  110. data/ref/ruby/classes/XX/Document.src/M000056.html +9 -8
  111. data/ref/ruby/classes/XX/Document.src/M000057.html +7 -21
  112. data/ref/ruby/classes/XX/Document.src/M000058.html +7 -85
  113. data/ref/ruby/classes/XX/Document.src/{M000053.html → M000059.html} +0 -0
  114. data/ref/ruby/classes/XX/Document.src/{M000054.html → M000060.html} +0 -0
  115. data/ref/ruby/classes/XX/Document.src/{M000055.html → M000061.html} +0 -0
  116. data/ref/ruby/classes/XX/Document.src/M000062.html +21 -0
  117. data/ref/ruby/classes/XX/Document.src/M000063.html +34 -0
  118. data/ref/ruby/classes/XX/Document.src/M000064.html +98 -0
  119. data/ref/ruby/classes/XX/HTML4/Strict.html +5 -5
  120. data/ref/ruby/classes/XX/HTML4/Strict.src/{M000016.html → M000022.html} +0 -0
  121. data/ref/ruby/classes/XX/HTML4/Transitional.html +5 -5
  122. data/ref/ruby/classes/XX/HTML4/Transitional.src/{M000015.html → M000021.html} +0 -0
  123. data/ref/ruby/classes/XX/HTML4.html +5 -5
  124. data/ref/ruby/classes/XX/HTML4.src/{M000014.html → M000020.html} +0 -0
  125. data/ref/ruby/classes/XX/Markup/ClassMethods.html +40 -40
  126. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000028.html +9 -14
  127. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000029.html +7 -9
  128. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000024.html → M000030.html} +0 -0
  129. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000025.html → M000031.html} +0 -0
  130. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000026.html → M000032.html} +0 -0
  131. data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000027.html → M000033.html} +0 -0
  132. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000034.html +27 -0
  133. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000035.html +22 -0
  134. data/ref/ruby/classes/XX/Markup/InstanceMethods.html +100 -100
  135. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000036.html +43 -19
  136. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000037.html +20 -19
  137. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000038.html +18 -15
  138. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000039.html +35 -10
  139. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000040.html +7 -13
  140. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000041.html +18 -7
  141. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000042.html +19 -7
  142. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000043.html +19 -7
  143. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000044.html +15 -7
  144. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000045.html +10 -7
  145. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000046.html +13 -8
  146. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000047.html +7 -7
  147. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000048.html +7 -7
  148. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000049.html +7 -7
  149. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000050.html +20 -0
  150. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000051.html +20 -0
  151. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000052.html +21 -0
  152. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000053.html +20 -0
  153. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000054.html +20 -0
  154. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000055.html +20 -0
  155. data/ref/ruby/classes/XX/Markup.html +5 -5
  156. data/ref/ruby/classes/XX/Markup.src/{M000021.html → M000027.html} +0 -0
  157. data/ref/ruby/classes/XX/XHTML/Strict.html +5 -5
  158. data/ref/ruby/classes/XX/XHTML/Strict.src/{M000020.html → M000026.html} +0 -0
  159. data/ref/ruby/classes/XX/XHTML/Transitional.html +5 -5
  160. data/ref/ruby/classes/XX/XHTML/Transitional.src/{M000019.html → M000025.html} +0 -0
  161. data/ref/ruby/classes/XX/XHTML.html +5 -5
  162. data/ref/ruby/classes/XX/XHTML.src/{M000018.html → M000024.html} +0 -0
  163. data/ref/ruby/classes/XX/XML.html +5 -5
  164. data/ref/ruby/classes/XX/XML.src/{M000013.html → M000019.html} +0 -0
  165. data/ref/ruby/classes/XX/XMLish.html +5 -5
  166. data/ref/ruby/classes/XX/XMLish.src/{M000017.html → M000023.html} +0 -0
  167. data/ref/ruby/created.rid +1 -1
  168. data/ref/ruby/files/bin/generate_test_rb.html +2 -1
  169. data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +15 -15
  170. data/ref/ruby/files/bin/header_to_ruby_rb.html +2 -1
  171. data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
  172. data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
  173. data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
  174. data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
  175. data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
  176. data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +1 -1
  177. data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
  178. data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +107 -0
  179. data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
  180. data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +1 -1
  181. data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
  182. data/ref/ruby/fr_class_index.html +4 -1
  183. data/ref/ruby/fr_file_index.html +1 -0
  184. data/ref/ruby/fr_method_index.html +75 -67
  185. data/samp/counter/counter_rspecTest_bench.v +4 -5
  186. data/samp/counter/counter_unitTest_bench.v +6 -5
  187. data/samp/pipelined_alu/Hw5UnitModel.rb +4 -4
  188. data/samp/pipelined_alu/hw5_unit.v +15 -23
  189. data/samp/pipelined_alu/hw5_unit_test_bench.rb +9 -0
  190. data/samp/pipelined_alu/hw5_unit_test_bench.v +39 -0
  191. data/samp/pipelined_alu/hw5_unit_test_design.rb +88 -0
  192. data/samp/pipelined_alu/hw5_unit_test_proto.rb +8 -0
  193. data/samp/pipelined_alu/hw5_unit_test_runner.rake +28 -0
  194. data/samp/pipelined_alu/hw5_unit_test_spec.rb +88 -0
  195. metadata +82 -63
  196. data/ref/ruby/classes/ModuleInfo.src/M000008.html +0 -44
  197. data/ref/ruby/classes/ModuleInfo.src/M000009.html +0 -26
  198. data/ref/ruby/classes/String.src/M000012.html +0 -37
  199. data/ref/ruby/classes/XX/Document.src/M000050.html +0 -22
  200. data/ref/ruby/classes/XX/Document.src/M000051.html +0 -20
  201. data/ref/ruby/classes/XX/Document.src/M000052.html +0 -20
  202. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000022.html +0 -22
  203. data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000023.html +0 -20
  204. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000030.html +0 -56
  205. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000031.html +0 -33
  206. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000032.html +0 -31
  207. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000033.html +0 -48
  208. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000034.html +0 -20
  209. data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000035.html +0 -31
  210. data/samp/pipelined_alu/hw5_unit_bench.rb +0 -8
  211. data/samp/pipelined_alu/hw5_unit_bench.v +0 -45
  212. data/samp/pipelined_alu/hw5_unit_design.rb +0 -18
  213. data/samp/pipelined_alu/hw5_unit_runner.rake +0 -10
  214. data/samp/pipelined_alu/hw5_unit_spec.rb +0 -123
@@ -20,75 +20,83 @@
20
20
  <div id="index">
21
21
  <h1 class="section-bar">Methods</h1>
22
22
  <div id="index-entries">
23
- <a href="classes/XX/Document.html#M000058"><< (XX::Document)</a><br />
24
- <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000063">[] (SWIG::TYPE_p_unsigned_int)</a><br />
25
- <a href="classes/FileUtils.html#M000066">collect_args (FileUtils)</a><br />
26
- <a href="classes/XX/Document.html#M000057">create (XX::Document)</a><br />
27
- <a href="classes/Table.html#M000003">doc (Table)</a><br />
28
- <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000064">each (SWIG::TYPE_p_unsigned_int)</a><br />
29
- <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000060">get_value (SWIG::TYPE_p_unsigned_int)</a><br />
30
- <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000059">get_value_wrapper (SWIG::TYPE_p_unsigned_int)</a><br />
31
- <a href="classes/XX/HTML4.html#M000014">html4_ (XX::HTML4)</a><br />
32
- <a href="classes/XX/HTML4/Transitional.html#M000015">html4_ (XX::HTML4::Transitional)</a><br />
33
- <a href="classes/XX/HTML4/Strict.html#M000016">html4_ (XX::HTML4::Strict)</a><br />
34
- <a href="classes/XX/Markup.html#M000021">included (XX::Markup)</a><br />
35
- <a href="classes/RubyVPI.html#M000067">init_bench (RubyVPI)</a><br />
36
- <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000062">method_missing (SWIG::TYPE_p_unsigned_int)</a><br />
37
- <a href="classes/XX/Markup/InstanceMethods.html#M000030">method_missing (XX::Markup::InstanceMethods)</a><br />
38
- <a href="classes/ERB.html#M000011">new (ERB)</a><br />
39
- <a href="classes/ModuleInfo.html#M000008">new (ModuleInfo)</a><br />
40
- <a href="classes/XX/Document.html#M000050">new (XX::Document)</a><br />
41
- <a href="classes/Template.html#M000010">new (Template)</a><br />
42
- <a href="classes/OutputInfo.html#M000007">new (OutputInfo)</a><br />
23
+ <a href="classes/XX/Document.html#M000064"><< (XX::Document)</a><br />
24
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000071">[] (SWIG::TYPE_p_unsigned_int)</a><br />
25
+ <a href="classes/FileUtils.html#M000074">collect_args (FileUtils)</a><br />
26
+ <a href="classes/XX/Document.html#M000063">create (XX::Document)</a><br />
27
+ <a href="classes/Table.html#M000010">doc (Table)</a><br />
28
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000072">each (SWIG::TYPE_p_unsigned_int)</a><br />
29
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000068">get_value (SWIG::TYPE_p_unsigned_int)</a><br />
30
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000067">get_value_wrapper (SWIG::TYPE_p_unsigned_int)</a><br />
31
+ <a href="classes/XX/HTML4/Strict.html#M000022">html4_ (XX::HTML4::Strict)</a><br />
32
+ <a href="classes/XX/HTML4/Transitional.html#M000021">html4_ (XX::HTML4::Transitional)</a><br />
33
+ <a href="classes/XX/HTML4.html#M000020">html4_ (XX::HTML4)</a><br />
34
+ <a href="classes/XX/Markup.html#M000027">included (XX::Markup)</a><br />
35
+ <a href="classes/RubyVPI.html#M000075">init_bench (RubyVPI)</a><br />
36
+ <a href="classes/VerilogParser/Module/Port.html#M000006">input? (VerilogParser::Module::Port)</a><br />
37
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000070">method_missing (SWIG::TYPE_p_unsigned_int)</a><br />
38
+ <a href="classes/XX/Markup/InstanceMethods.html#M000036">method_missing (XX::Markup::InstanceMethods)</a><br />
39
+ <a href="classes/ERB.html#M000018">new (ERB)</a><br />
40
+ <a href="classes/VerilogParser/Module/Parameter.html#M000009">new (VerilogParser::Module::Parameter)</a><br />
41
+ <a href="classes/XX/Document.html#M000056">new (XX::Document)</a><br />
42
+ <a href="classes/VerilogParser.html#M000003">new (VerilogParser)</a><br />
43
+ <a href="classes/OutputInfo.html#M000014">new (OutputInfo)</a><br />
44
+ <a href="classes/VerilogParser/Module/Port.html#M000005">new (VerilogParser::Module::Port)</a><br />
45
+ <a href="classes/VerilogParser/Module.html#M000004">new (VerilogParser::Module)</a><br />
46
+ <a href="classes/Template.html#M000015">new (Template)</a><br />
43
47
  <a href="files/lib/ruby-vpi/runner_rb.html#M000002">object_file_path (lib/ruby-vpi/runner.rb)</a><br />
44
- <a href="classes/ModuleInfo.html#M000009">parse_declarations (ModuleInfo)</a><br />
45
- <a href="classes/XX/Document.html#M000053">pop (XX::Document)</a><br />
46
- <a href="classes/XX/Document.html#M000056">pretty (XX::Document)</a><br />
47
- <a href="classes/XX/Document.html#M000052">push (XX::Document)</a><br />
48
- <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000061">put_value (SWIG::TYPE_p_unsigned_int)</a><br />
49
- <a href="classes/FileUtils.html#M000065">sh (FileUtils)</a><br />
50
- <a href="classes/Table.html#M000005">to_html4 (Table)</a><br />
51
- <a href="classes/String.html#M000012">to_ruby (String)</a><br />
52
- <a href="classes/XX/Document.html#M000055">to_str (XX::Document)</a><br />
53
- <a href="classes/Table.html#M000004">to_xhtml (Table)</a><br />
54
- <a href="classes/Table.html#M000006">to_xml (Table)</a><br />
55
- <a href="classes/XX/Document.html#M000051">top (XX::Document)</a><br />
56
- <a href="classes/XX/Document.html#M000054">tracking_additions (XX::Document)</a><br />
57
- <a href="classes/RDoc.html#M000069">usage_from_file (RDoc)</a><br />
58
- <a href="classes/RubyVPI.html#M000068">with_coverage_analysis (RubyVPI)</a><br />
48
+ <a href="classes/VerilogParser/Module/Port.html#M000007">output? (VerilogParser::Module::Port)</a><br />
49
+ <a href="classes/XX/Document.html#M000059">pop (XX::Document)</a><br />
50
+ <a href="classes/XX/Document.html#M000062">pretty (XX::Document)</a><br />
51
+ <a href="classes/XX/Document.html#M000058">push (XX::Document)</a><br />
52
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000069">put_value (SWIG::TYPE_p_unsigned_int)</a><br />
53
+ <a href="classes/VerilogParser/Module/Port.html#M000008">reg? (VerilogParser::Module::Port)</a><br />
54
+ <a href="classes/FileUtils.html#M000073">sh (FileUtils)</a><br />
55
+ <a href="classes/Table.html#M000012">to_html4 (Table)</a><br />
56
+ <a href="classes/String.html#M000017">to_ruby_const_name (String)</a><br />
57
+ <a href="classes/XX/Document.html#M000061">to_str (XX::Document)</a><br />
58
+ <a href="classes/Table.html#M000011">to_xhtml (Table)</a><br />
59
+ <a href="classes/Table.html#M000013">to_xml (Table)</a><br />
60
+ <a href="classes/XX/Document.html#M000057">top (XX::Document)</a><br />
61
+ <a href="classes/XX/Document.html#M000060">tracking_additions (XX::Document)</a><br />
62
+ <a href="classes/RDoc.html#M000077">usage_from_file (RDoc)</a><br />
63
+ <a href="classes/String.html#M000016">verilog_to_ruby (String)</a><br />
64
+ <a href="classes/RubyVPI.html#M000076">with_coverage_analysis (RubyVPI)</a><br />
59
65
  <a href="files/bin/generate_test_rb.html#M000001">write_file (bin/generate_test.rb)</a><br />
60
- <a href="classes/XX/XHTML.html#M000018">xhtml_ (XX::XHTML)</a><br />
61
- <a href="classes/XX/XHTML/Transitional.html#M000019">xhtml_ (XX::XHTML::Transitional)</a><br />
62
- <a href="classes/XX/XHTML/Strict.html#M000020">xhtml_ (XX::XHTML::Strict)</a><br />
63
- <a href="classes/XX/XML.html#M000013">xml_ (XX::XML)</a><br />
64
- <a href="classes/XX/XMLish.html#M000017">xmlish_ (XX::XMLish)</a><br />
65
- <a href="classes/XX/Markup/InstanceMethods.html#M000046">xx_ancestors (XX::Markup::InstanceMethods)</a><br />
66
- <a href="classes/XX/Markup/ClassMethods.html#M000026">xx_ancestors (XX::Markup::ClassMethods)</a><br />
67
- <a href="classes/XX/Markup/InstanceMethods.html#M000037">xx_any_ (XX::Markup::InstanceMethods)</a><br />
68
- <a href="classes/XX/Markup/InstanceMethods.html#M000038">xx_cdata_ (XX::Markup::InstanceMethods)</a><br />
69
- <a href="classes/XX/Markup/InstanceMethods.html#M000041">xx_class (XX::Markup::InstanceMethods)</a><br />
70
- <a href="classes/XX/Markup/InstanceMethods.html#M000047">xx_config (XX::Markup::InstanceMethods)</a><br />
71
- <a href="classes/XX/Markup/ClassMethods.html#M000027">xx_config (XX::Markup::ClassMethods)</a><br />
72
- <a href="classes/XX/Markup/InstanceMethods.html#M000048">xx_config_for (XX::Markup::InstanceMethods)</a><br />
73
- <a href="classes/XX/Markup/ClassMethods.html#M000028">xx_config_for (XX::Markup::ClassMethods)</a><br />
74
- <a href="classes/XX/Markup/InstanceMethods.html#M000049">xx_configure (XX::Markup::InstanceMethods)</a><br />
75
- <a href="classes/XX/Markup/ClassMethods.html#M000029">xx_configure (XX::Markup::ClassMethods)</a><br />
76
- <a href="classes/XX/Markup/InstanceMethods.html#M000044">xx_define_tag_method (XX::Markup::InstanceMethods)</a><br />
77
- <a href="classes/XX/Markup/ClassMethods.html#M000024">xx_define_tag_method (XX::Markup::ClassMethods)</a><br />
78
- <a href="classes/XX/Markup/InstanceMethods.html#M000043">xx_define_tmp_method (XX::Markup::InstanceMethods)</a><br />
79
- <a href="classes/XX/Markup/ClassMethods.html#M000023">xx_define_tmp_method (XX::Markup::ClassMethods)</a><br />
80
- <a href="classes/XX/Markup/InstanceMethods.html#M000034">xx_doc (XX::Markup::InstanceMethods)</a><br />
81
- <a href="classes/XX/Markup/InstanceMethods.html#M000036">xx_markup_ (XX::Markup::InstanceMethods)</a><br />
82
- <a href="classes/XX/Markup/InstanceMethods.html#M000039">xx_parse_attributes (XX::Markup::InstanceMethods)</a><br />
83
- <a href="classes/XX/Markup/InstanceMethods.html#M000040">xx_parse_yaml_attributes (XX::Markup::InstanceMethods)</a><br />
84
- <a href="classes/XX/Markup/InstanceMethods.html#M000045">xx_remove_tag_method (XX::Markup::InstanceMethods)</a><br />
85
- <a href="classes/XX/Markup/ClassMethods.html#M000025">xx_remove_tag_method (XX::Markup::ClassMethods)</a><br />
86
- <a href="classes/XX/Markup/InstanceMethods.html#M000031">xx_tag_ (XX::Markup::InstanceMethods)</a><br />
87
- <a href="classes/XX/Markup/ClassMethods.html#M000022">xx_tag_method_name (XX::Markup::ClassMethods)</a><br />
88
- <a href="classes/XX/Markup/InstanceMethods.html#M000042">xx_tag_method_name (XX::Markup::InstanceMethods)</a><br />
89
- <a href="classes/XX/Markup/InstanceMethods.html#M000035">xx_text_ (XX::Markup::InstanceMethods)</a><br />
90
- <a href="classes/XX/Markup/InstanceMethods.html#M000032">xx_which (XX::Markup::InstanceMethods)</a><br />
91
- <a href="classes/XX/Markup/InstanceMethods.html#M000033">xx_with_doc_in_effect (XX::Markup::InstanceMethods)</a><br />
66
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000065">x? (SWIG::TYPE_p_unsigned_int)</a><br />
67
+ <a href="classes/XX/XHTML.html#M000024">xhtml_ (XX::XHTML)</a><br />
68
+ <a href="classes/XX/XHTML/Transitional.html#M000025">xhtml_ (XX::XHTML::Transitional)</a><br />
69
+ <a href="classes/XX/XHTML/Strict.html#M000026">xhtml_ (XX::XHTML::Strict)</a><br />
70
+ <a href="classes/XX/XML.html#M000019">xml_ (XX::XML)</a><br />
71
+ <a href="classes/XX/XMLish.html#M000023">xmlish_ (XX::XMLish)</a><br />
72
+ <a href="classes/XX/Markup/InstanceMethods.html#M000052">xx_ancestors (XX::Markup::InstanceMethods)</a><br />
73
+ <a href="classes/XX/Markup/ClassMethods.html#M000032">xx_ancestors (XX::Markup::ClassMethods)</a><br />
74
+ <a href="classes/XX/Markup/InstanceMethods.html#M000043">xx_any_ (XX::Markup::InstanceMethods)</a><br />
75
+ <a href="classes/XX/Markup/InstanceMethods.html#M000044">xx_cdata_ (XX::Markup::InstanceMethods)</a><br />
76
+ <a href="classes/XX/Markup/InstanceMethods.html#M000047">xx_class (XX::Markup::InstanceMethods)</a><br />
77
+ <a href="classes/XX/Markup/InstanceMethods.html#M000053">xx_config (XX::Markup::InstanceMethods)</a><br />
78
+ <a href="classes/XX/Markup/ClassMethods.html#M000033">xx_config (XX::Markup::ClassMethods)</a><br />
79
+ <a href="classes/XX/Markup/InstanceMethods.html#M000054">xx_config_for (XX::Markup::InstanceMethods)</a><br />
80
+ <a href="classes/XX/Markup/ClassMethods.html#M000034">xx_config_for (XX::Markup::ClassMethods)</a><br />
81
+ <a href="classes/XX/Markup/InstanceMethods.html#M000055">xx_configure (XX::Markup::InstanceMethods)</a><br />
82
+ <a href="classes/XX/Markup/ClassMethods.html#M000035">xx_configure (XX::Markup::ClassMethods)</a><br />
83
+ <a href="classes/XX/Markup/ClassMethods.html#M000030">xx_define_tag_method (XX::Markup::ClassMethods)</a><br />
84
+ <a href="classes/XX/Markup/InstanceMethods.html#M000050">xx_define_tag_method (XX::Markup::InstanceMethods)</a><br />
85
+ <a href="classes/XX/Markup/ClassMethods.html#M000029">xx_define_tmp_method (XX::Markup::ClassMethods)</a><br />
86
+ <a href="classes/XX/Markup/InstanceMethods.html#M000049">xx_define_tmp_method (XX::Markup::InstanceMethods)</a><br />
87
+ <a href="classes/XX/Markup/InstanceMethods.html#M000040">xx_doc (XX::Markup::InstanceMethods)</a><br />
88
+ <a href="classes/XX/Markup/InstanceMethods.html#M000042">xx_markup_ (XX::Markup::InstanceMethods)</a><br />
89
+ <a href="classes/XX/Markup/InstanceMethods.html#M000045">xx_parse_attributes (XX::Markup::InstanceMethods)</a><br />
90
+ <a href="classes/XX/Markup/InstanceMethods.html#M000046">xx_parse_yaml_attributes (XX::Markup::InstanceMethods)</a><br />
91
+ <a href="classes/XX/Markup/ClassMethods.html#M000031">xx_remove_tag_method (XX::Markup::ClassMethods)</a><br />
92
+ <a href="classes/XX/Markup/InstanceMethods.html#M000051">xx_remove_tag_method (XX::Markup::InstanceMethods)</a><br />
93
+ <a href="classes/XX/Markup/InstanceMethods.html#M000037">xx_tag_ (XX::Markup::InstanceMethods)</a><br />
94
+ <a href="classes/XX/Markup/ClassMethods.html#M000028">xx_tag_method_name (XX::Markup::ClassMethods)</a><br />
95
+ <a href="classes/XX/Markup/InstanceMethods.html#M000048">xx_tag_method_name (XX::Markup::InstanceMethods)</a><br />
96
+ <a href="classes/XX/Markup/InstanceMethods.html#M000041">xx_text_ (XX::Markup::InstanceMethods)</a><br />
97
+ <a href="classes/XX/Markup/InstanceMethods.html#M000038">xx_which (XX::Markup::InstanceMethods)</a><br />
98
+ <a href="classes/XX/Markup/InstanceMethods.html#M000039">xx_with_doc_in_effect (XX::Markup::InstanceMethods)</a><br />
99
+ <a href="classes/SWIG/TYPE_p_unsigned_int.html#M000066">z? (SWIG::TYPE_p_unsigned_int)</a><br />
92
100
  </div>
93
101
  </div>
94
102
  </body>
@@ -4,12 +4,11 @@ module counter_rspecTest_bench;
4
4
 
5
5
  // instantiate the design under test
6
6
  parameter Size = 5;
7
+ reg clock;
8
+ reg reset;
9
+ wire [Size - 1 : 0] count;
7
10
 
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));
11
+ counter #(.Size(Size))counter_rspecTest_bench_design(.clock(clock), .reset(reset), .count(count));
13
12
 
14
13
  // connect to the Ruby side of this bench
15
14
  initial begin
@@ -1,15 +1,16 @@
1
1
  /* This is the Verilog side of the bench. */
2
2
 
3
+
4
+
3
5
  module counter_unitTest_bench;
4
6
 
5
7
  // instantiate the design under test
6
8
  parameter Size = 5;
9
+ reg clock;
10
+ reg reset;
11
+ wire [Size - 1 : 0] count;
7
12
 
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
+ counter #(.Size(Size))counter_unitTest_bench_design(.clock(clock), .reset(reset), .count(count));
13
14
 
14
15
  // connect to the Ruby side of this bench
15
16
  initial begin
@@ -67,10 +67,10 @@ class Hw5UnitModel
67
67
 
68
68
  # Number of cycles each operation uses.
69
69
  OPERATION_LATENCIES = {
70
- :add => 3, #1,
71
- :sub => 3, #2,
72
- :mul => 3, #3,
73
- :nop => 3, #1,
70
+ :add => 1,
71
+ :sub => 2,
72
+ :mul => 3,
73
+ :nop => 1,
74
74
  }
75
75
 
76
76
  # The famous no-operation.
@@ -42,10 +42,9 @@ module hw5_unit(
42
42
  );
43
43
 
44
44
 
45
- //-------------------------------------
46
- // PHASE 0: perform the ALU operations
45
+ /* PHASE 0: perform the ALU operations */
47
46
 
48
- // operation ID
47
+ // operation ID
49
48
  reg [`DATABITS-1:0] in_databits_phase0;
50
49
  reg [1:0] in_op_phase0;
51
50
 
@@ -54,24 +53,21 @@ module hw5_unit(
54
53
  in_op_phase0 = in_op;
55
54
  end
56
55
 
57
-
58
- // addition
56
+ // addition
59
57
  reg [`WIDTH-1:0] add_result_phase0;
60
58
 
61
59
  always @(*) begin
62
60
  add_result_phase0 = a + b;
63
61
  end
64
62
 
65
-
66
- // subtraction
63
+ // subtraction
67
64
  reg [`WIDTH-1:0] sub_result_phase0;
68
65
 
69
66
  always @(*) begin
70
67
  sub_result_phase0 = a - b;
71
68
  end
72
69
 
73
-
74
- // multiplication
70
+ // multiplication
75
71
  reg [`WIDTH-1:0] mul_result_phase0;
76
72
 
77
73
  always @(*) begin
@@ -79,17 +75,16 @@ module hw5_unit(
79
75
  end
80
76
 
81
77
 
82
- // always @(posedge clk) begin
83
- // $display("in_databits_phase0 => %d", in_databits_phase0);
84
- // $display("in_op_phase0 => %d", in_op_phase0);
85
- // $display("add_result_phase0 => %d", add_result_phase0);
86
- // $display("sub_result_phase0 => %d", sub_result_phase0);
87
- // $display("mul_result_phase0 => %d", mul_result_phase0);
88
- // end
78
+ // always @(posedge clk) begin
79
+ // $display("in_databits_phase0 => %d", in_databits_phase0);
80
+ // $display("in_op_phase0 => %d", in_op_phase0);
81
+ // $display("add_result_phase0 => %d", add_result_phase0);
82
+ // $display("sub_result_phase0 => %d", sub_result_phase0);
83
+ // $display("mul_result_phase0 => %d", mul_result_phase0);
84
+ // end
89
85
 
90
86
 
91
- //-------------------------------------
92
- // PHASE 1: delay the ALU results
87
+ /* PHASE 1: delay the ALU results */
93
88
 
94
89
  reg [`DATABITS-1:0] in_databits_phase1;
95
90
  reg [1:0] in_op_phase1;
@@ -116,8 +111,7 @@ module hw5_unit(
116
111
  // end
117
112
 
118
113
 
119
- //-------------------------------------
120
- // PHASE 2: delay the ALU results
114
+ /* PHASE 2: delay the ALU results */
121
115
 
122
116
  reg [`DATABITS-1:0] in_databits_phase2;
123
117
  reg [1:0] in_op_phase2;
@@ -144,8 +138,7 @@ module hw5_unit(
144
138
  // end
145
139
 
146
140
 
147
- //-------------------------------------
148
- // PHASE 3: produce the outputs
141
+ /* PHASE 3: produce the outputs */
149
142
 
150
143
  reg [`DATABITS-1:0] out_databits_next;
151
144
  reg [1:0] out_op_next;
@@ -160,7 +153,6 @@ module hw5_unit(
160
153
 
161
154
  out_databits_next = in_databits_phase2;
162
155
 
163
- // determine res_next
164
156
  case (in_op_phase2)
165
157
  `OP_NOP:
166
158
  res_next = 0;
@@ -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 'hw5_unit_test', :Hw5_unitProto
7
+
8
+ # service the $ruby_relay callback
9
+ # The UnitTest library will take control henceforth.
@@ -0,0 +1,39 @@
1
+ /* This is the Verilog side of the bench. */
2
+
3
+ `define WIDTH 32
4
+ `define DATABITS 7
5
+ `define OP_NOP 0
6
+ `define OP_ADD 1
7
+ `define OP_SUB 2
8
+ `define OP_MULT 3
9
+
10
+ module hw5_unit_test_bench;
11
+
12
+ // instantiate the design under test
13
+ reg clk;
14
+ reg reset;
15
+ reg [`DATABITS-1:0] in_databits;
16
+ reg [`WIDTH-1:0] a;
17
+ reg [`WIDTH-1:0] b;
18
+ reg [1:0] in_op;
19
+ wire [`WIDTH-1:0] res;
20
+ wire [`DATABITS-1:0] out_databits;
21
+ wire [1:0] out_op;
22
+
23
+ hw5_unit hw5_unit_test_bench_design(.clk(clk), .reset(reset), .in_databits(in_databits), .a(a), .b(b), .in_op(in_op), .res(res), .out_databits(out_databits), .out_op(out_op));
24
+
25
+ // connect to the Ruby side of this bench
26
+ initial begin
27
+ clk = 0;
28
+ $ruby_init("ruby", "-w", "-rubygems", "hw5_unit_test_bench.rb");
29
+ end
30
+
31
+ always begin
32
+ #5 clk = ~clk;
33
+ end
34
+
35
+ always @(posedge clk) begin
36
+ #1 $ruby_relay;
37
+ end
38
+
39
+ endmodule
@@ -0,0 +1,88 @@
1
+ # An interface to the design under test.
2
+ class Hw5_unit
3
+ include Vpi
4
+
5
+ WIDTH = 32
6
+ DATABITS = 7
7
+ OP_NOP = 0
8
+ OP_ADD = 1
9
+ OP_SUB = 2
10
+ OP_MULT = 3
11
+
12
+ # Supported types of ALU operations.
13
+ OPERATIONS = constants.grep(/^OP_/).map {|s| const_get s}
14
+
15
+ # Number of cycles needed to reset this design.
16
+ RESET_DELAY = 5
17
+
18
+ attr_reader :clk, :reset, :in_databits, :a, :b, :in_op, :res, :out_databits, :out_op
19
+
20
+ def initialize
21
+ @clk = vpi_handle_by_name("hw5_unit_test_bench.clk", nil)
22
+ @reset = vpi_handle_by_name("hw5_unit_test_bench.reset", nil)
23
+ @in_databits = vpi_handle_by_name("hw5_unit_test_bench.in_databits", nil)
24
+ @a = vpi_handle_by_name("hw5_unit_test_bench.a", nil)
25
+ @b = vpi_handle_by_name("hw5_unit_test_bench.b", nil)
26
+ @in_op = vpi_handle_by_name("hw5_unit_test_bench.in_op", nil)
27
+ @res = vpi_handle_by_name("hw5_unit_test_bench.res", nil)
28
+ @out_databits = vpi_handle_by_name("hw5_unit_test_bench.out_databits", nil)
29
+ @out_op = vpi_handle_by_name("hw5_unit_test_bench.out_op", nil)
30
+ end
31
+
32
+ def reset!
33
+ @reset.hexStrVal = 'x'
34
+ @in_databits.hexStrVal = 'x'
35
+ @a.hexStrVal = 'x'
36
+ @b.hexStrVal = 'x'
37
+ @in_op.hexStrVal = 'x'
38
+
39
+
40
+ @reset.intVal = 1
41
+
42
+ RESET_DELAY.times do
43
+ relay_verilog
44
+ end
45
+
46
+ @reset.intVal = 0
47
+ end
48
+
49
+ # Represents an ALU operation.
50
+ class Operation
51
+ attr_accessor :type, :tag, :arg1, :arg2, :stage, :result
52
+
53
+ def initialize(type, tag, arg1 = 0, arg2 = 0)
54
+ raise ArgumentError unless OPERATIONS.include? type
55
+
56
+ @type = type
57
+ @tag = tag
58
+ @arg1 = arg1
59
+ @arg2 = arg2
60
+
61
+ @stage = 0
62
+ end
63
+
64
+ # Computes the result of this operation.
65
+ def compute
66
+ case @type
67
+ when OP_ADD
68
+ @arg1 + @arg2
69
+
70
+ when OP_SUB
71
+ @arg1 - @arg2
72
+
73
+ when OP_MULT
74
+ @arg1 * @arg2
75
+
76
+ when OP_NOP
77
+ nil
78
+
79
+ else
80
+ raise
81
+ end
82
+ end
83
+
84
+ def compute!
85
+ @result = compute
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,8 @@
1
+ # A prototype of the design under test.
2
+ class Hw5_unitProto < Hw5_unit
3
+ def simulate!
4
+ # read inputs
5
+ # simulate design's behavior
6
+ # produce outputs
7
+ end
8
+ 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
+ 'hw5_unit_test_bench.v',
6
+ 'hw5_unit.v',
7
+ ]
8
+
9
+ # This specifies the "top module" that is to be simulated.
10
+ SIMULATOR_TARGET = 'hw5_unit_test_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,88 @@
1
+ ## This specification verifies the design under test.
2
+ =begin
3
+ Copyright 2006 Suraj N. Kurapati
4
+
5
+ This file is part of Ruby-VPI.
6
+
7
+ Ruby-VPI is free software; you can redistribute it and/or
8
+ modify it under the terms of the GNU General Public License
9
+ as published by the Free Software Foundation; either version 2
10
+ of the License, or (at your option) any later version.
11
+
12
+ Ruby-VPI is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with Ruby-VPI; if not, write to the Free Software Foundation,
19
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
+ =end
21
+
22
+ require 'InputGenerator'
23
+
24
+ class Hw5_unit_test_spec < Test::Unit::TestCase
25
+ include Vpi
26
+
27
+ # Number of input sequences to test.
28
+ NUM_TESTS = 4000
29
+
30
+ # Bitmask capable of capturing ALU result.
31
+ ALU_RESULT_MASK = (2 ** Hw5_unit::WIDTH) - 1
32
+
33
+ # Upper limit of values allowed for an operation's tag.
34
+ OPERATION_TAG_LIMIT = 2 ** Hw5_unit::DATABITS
35
+
36
+ def setup
37
+ @ig = InputGenerator.new(Hw5_unit::WIDTH)
38
+
39
+ @design = Hw5_unit.new
40
+ @design.reset!
41
+ end
42
+
43
+ def test_pipeline
44
+ issuedOps = []
45
+ numIssued = numVerified = 0
46
+
47
+ until numVerified == NUM_TESTS
48
+ # issue a new operation
49
+ if numIssued < NUM_TESTS
50
+ op = Hw5_unit::Operation.new(
51
+ Hw5_unit::OPERATIONS[rand(Hw5_unit::OPERATIONS.size)],
52
+ numIssued % OPERATION_TAG_LIMIT,
53
+ @ig.gen.abs,
54
+ @ig.gen.abs
55
+ )
56
+
57
+ @design.a.intVal = op.arg1
58
+ @design.b.intVal = op.arg2
59
+ @design.in_op.intVal = op.type
60
+ @design.in_databits.intVal = op.tag
61
+
62
+ issuedOps << op
63
+ numIssued += 1
64
+ end
65
+
66
+ relay_verilog
67
+
68
+ # verify result of finished operation
69
+ unless @design.out_databits.x?
70
+ finishedOp = Hw5_unit::Operation.new(
71
+ @design.out_op.intVal,
72
+ @design.out_databits.intVal
73
+ )
74
+ finishedOp.result = @design.res.intVal & ALU_RESULT_MASK
75
+
76
+ expectedOp = issuedOps.shift
77
+ assert_equal expectedOp.type, finishedOp.type, "incorrect operation"
78
+ assert_equal expectedOp.tag, finishedOp.tag, "incorrect tag"
79
+
80
+ unless finishedOp.type == Hw5_unit::OP_NOP
81
+ assert_equal expectedOp.compute & ALU_RESULT_MASK, finishedOp.result, "incorrect result"
82
+ end
83
+
84
+ numVerified += 1
85
+ end
86
+ end
87
+ end
88
+ end