origen_testers 0.13.1 → 0.13.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (258) hide show
  1. checksums.yaml +4 -4
  2. data/config/application.rb +151 -151
  3. data/config/boot.rb +13 -13
  4. data/config/commands.rb +85 -86
  5. data/config/users.rb +18 -18
  6. data/config/version.rb +8 -8
  7. data/lib/commands/build.rb +69 -69
  8. data/lib/commands/run.rb +48 -48
  9. data/lib/origen_testers.rb +47 -47
  10. data/lib/origen_testers/api.rb +381 -381
  11. data/lib/origen_testers/basic_test_setups.rb +105 -105
  12. data/lib/origen_testers/callback_handlers.rb +59 -59
  13. data/lib/origen_testers/command_based_tester.rb +45 -45
  14. data/lib/origen_testers/flow.rb +382 -382
  15. data/lib/origen_testers/generator.rb +283 -283
  16. data/lib/origen_testers/generator/identity_map.rb +23 -23
  17. data/lib/origen_testers/generator/placeholder.rb +11 -11
  18. data/lib/origen_testers/generator/test_numberer.rb +23 -23
  19. data/lib/origen_testers/igxl_based_tester.rb +12 -12
  20. data/lib/origen_testers/igxl_based_tester/base.rb +1100 -1099
  21. data/lib/origen_testers/igxl_based_tester/base/ac_specsets.rb +79 -79
  22. data/lib/origen_testers/igxl_based_tester/base/custom_test_instance.rb +169 -169
  23. data/lib/origen_testers/igxl_based_tester/base/dc_specsets.rb +98 -98
  24. data/lib/origen_testers/igxl_based_tester/base/edge.rb +60 -60
  25. data/lib/origen_testers/igxl_based_tester/base/edges.rb +24 -24
  26. data/lib/origen_testers/igxl_based_tester/base/edgeset.rb +39 -39
  27. data/lib/origen_testers/igxl_based_tester/base/edgesets.rb +130 -130
  28. data/lib/origen_testers/igxl_based_tester/base/flow.rb +460 -460
  29. data/lib/origen_testers/igxl_based_tester/base/flow_line.rb +276 -276
  30. data/lib/origen_testers/igxl_based_tester/base/generator.rb +607 -607
  31. data/lib/origen_testers/igxl_based_tester/base/global_specs.rb +83 -83
  32. data/lib/origen_testers/igxl_based_tester/base/job.rb +75 -75
  33. data/lib/origen_testers/igxl_based_tester/base/jobs.rb +44 -44
  34. data/lib/origen_testers/igxl_based_tester/base/level_io_se.rb +59 -59
  35. data/lib/origen_testers/igxl_based_tester/base/level_supply.rb +39 -39
  36. data/lib/origen_testers/igxl_based_tester/base/levels.rb +31 -31
  37. data/lib/origen_testers/igxl_based_tester/base/levelset.rb +110 -110
  38. data/lib/origen_testers/igxl_based_tester/base/patgroup.rb +109 -109
  39. data/lib/origen_testers/igxl_based_tester/base/patgroups.rb +38 -38
  40. data/lib/origen_testers/igxl_based_tester/base/patset.rb +68 -68
  41. data/lib/origen_testers/igxl_based_tester/base/patset_pattern.rb +56 -56
  42. data/lib/origen_testers/igxl_based_tester/base/patsets.rb +38 -38
  43. data/lib/origen_testers/igxl_based_tester/base/patsubr.rb +68 -68
  44. data/lib/origen_testers/igxl_based_tester/base/patsubr_pattern.rb +56 -56
  45. data/lib/origen_testers/igxl_based_tester/base/patsubrs.rb +38 -38
  46. data/lib/origen_testers/igxl_based_tester/base/pinmap.rb +93 -93
  47. data/lib/origen_testers/igxl_based_tester/base/references.rb +25 -25
  48. data/lib/origen_testers/igxl_based_tester/base/test_instance.rb +322 -322
  49. data/lib/origen_testers/igxl_based_tester/base/test_instance_group.rb +66 -66
  50. data/lib/origen_testers/igxl_based_tester/base/test_instances.rb +212 -212
  51. data/lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb +37 -37
  52. data/lib/origen_testers/igxl_based_tester/base/timeset.rb +37 -37
  53. data/lib/origen_testers/igxl_based_tester/base/timesets.rb +49 -49
  54. data/lib/origen_testers/igxl_based_tester/base/timesets_basic.rb +49 -49
  55. data/lib/origen_testers/igxl_based_tester/files.rb +43 -43
  56. data/lib/origen_testers/igxl_based_tester/j750.rb +269 -269
  57. data/lib/origen_testers/igxl_based_tester/j750/custom_test_instance.rb +32 -32
  58. data/lib/origen_testers/igxl_based_tester/j750/flow.rb +10 -10
  59. data/lib/origen_testers/igxl_based_tester/j750/flow_line.rb +19 -19
  60. data/lib/origen_testers/igxl_based_tester/j750/generator.rb +19 -19
  61. data/lib/origen_testers/igxl_based_tester/j750/patgroup.rb +9 -9
  62. data/lib/origen_testers/igxl_based_tester/j750/patgroups.rb +10 -10
  63. data/lib/origen_testers/igxl_based_tester/j750/patset.rb +9 -9
  64. data/lib/origen_testers/igxl_based_tester/j750/patset_pattern.rb +18 -18
  65. data/lib/origen_testers/igxl_based_tester/j750/patsets.rb +10 -10
  66. data/lib/origen_testers/igxl_based_tester/j750/patsubr.rb +9 -9
  67. data/lib/origen_testers/igxl_based_tester/j750/patsubr_pattern.rb +18 -18
  68. data/lib/origen_testers/igxl_based_tester/j750/patsubrs.rb +10 -10
  69. data/lib/origen_testers/igxl_based_tester/j750/test_instance.rb +746 -746
  70. data/lib/origen_testers/igxl_based_tester/j750/test_instance_group.rb +9 -9
  71. data/lib/origen_testers/igxl_based_tester/j750/test_instances.rb +10 -10
  72. data/lib/origen_testers/igxl_based_tester/j750_hpt.rb +34 -34
  73. data/lib/origen_testers/igxl_based_tester/j750_hpt/custom_test_instance.rb +32 -32
  74. data/lib/origen_testers/igxl_based_tester/j750_hpt/flow.rb +9 -9
  75. data/lib/origen_testers/igxl_based_tester/j750_hpt/flow_line.rb +9 -9
  76. data/lib/origen_testers/igxl_based_tester/j750_hpt/generator.rb +19 -19
  77. data/lib/origen_testers/igxl_based_tester/j750_hpt/patgroup.rb +9 -9
  78. data/lib/origen_testers/igxl_based_tester/j750_hpt/patgroups.rb +9 -9
  79. data/lib/origen_testers/igxl_based_tester/j750_hpt/patset.rb +9 -9
  80. data/lib/origen_testers/igxl_based_tester/j750_hpt/patset_pattern.rb +9 -9
  81. data/lib/origen_testers/igxl_based_tester/j750_hpt/patsets.rb +9 -9
  82. data/lib/origen_testers/igxl_based_tester/j750_hpt/patsubr.rb +9 -9
  83. data/lib/origen_testers/igxl_based_tester/j750_hpt/patsubr_pattern.rb +9 -9
  84. data/lib/origen_testers/igxl_based_tester/j750_hpt/patsubrs.rb +9 -9
  85. data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instance.rb +599 -599
  86. data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instance_group.rb +9 -9
  87. data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instances.rb +9 -9
  88. data/lib/origen_testers/igxl_based_tester/parser.rb +102 -102
  89. data/lib/origen_testers/igxl_based_tester/parser/ac_spec.rb +9 -9
  90. data/lib/origen_testers/igxl_based_tester/parser/dc_spec.rb +33 -33
  91. data/lib/origen_testers/igxl_based_tester/parser/dc_specs.rb +48 -48
  92. data/lib/origen_testers/igxl_based_tester/parser/descriptions.rb +339 -339
  93. data/lib/origen_testers/igxl_based_tester/parser/flow.rb +109 -109
  94. data/lib/origen_testers/igxl_based_tester/parser/flow_line.rb +203 -203
  95. data/lib/origen_testers/igxl_based_tester/parser/flows.rb +21 -21
  96. data/lib/origen_testers/igxl_based_tester/parser/pattern_set.rb +92 -92
  97. data/lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb +31 -31
  98. data/lib/origen_testers/igxl_based_tester/parser/test_instance.rb +420 -420
  99. data/lib/origen_testers/igxl_based_tester/parser/test_instances.rb +24 -24
  100. data/lib/origen_testers/igxl_based_tester/parser/timeset.rb +13 -13
  101. data/lib/origen_testers/igxl_based_tester/ultraflex.rb +798 -798
  102. data/lib/origen_testers/igxl_based_tester/ultraflex/ac_specsets.rb +10 -10
  103. data/lib/origen_testers/igxl_based_tester/ultraflex/ate_hardware.rb +949 -949
  104. data/lib/origen_testers/igxl_based_tester/ultraflex/custom_test_instance.rb +36 -36
  105. data/lib/origen_testers/igxl_based_tester/ultraflex/dc_specsets.rb +10 -10
  106. data/lib/origen_testers/igxl_based_tester/ultraflex/edge.rb +9 -9
  107. data/lib/origen_testers/igxl_based_tester/ultraflex/edges.rb +9 -9
  108. data/lib/origen_testers/igxl_based_tester/ultraflex/edgeset.rb +9 -9
  109. data/lib/origen_testers/igxl_based_tester/ultraflex/edgesets.rb +10 -10
  110. data/lib/origen_testers/igxl_based_tester/ultraflex/flow.rb +158 -158
  111. data/lib/origen_testers/igxl_based_tester/ultraflex/flow_line.rb +19 -19
  112. data/lib/origen_testers/igxl_based_tester/ultraflex/generator.rb +19 -19
  113. data/lib/origen_testers/igxl_based_tester/ultraflex/global_specs.rb +10 -10
  114. data/lib/origen_testers/igxl_based_tester/ultraflex/job.rb +9 -9
  115. data/lib/origen_testers/igxl_based_tester/ultraflex/jobs.rb +10 -10
  116. data/lib/origen_testers/igxl_based_tester/ultraflex/level_io_se.rb +9 -9
  117. data/lib/origen_testers/igxl_based_tester/ultraflex/level_supply.rb +9 -9
  118. data/lib/origen_testers/igxl_based_tester/ultraflex/levels.rb +9 -9
  119. data/lib/origen_testers/igxl_based_tester/ultraflex/levelset.rb +10 -10
  120. data/lib/origen_testers/igxl_based_tester/ultraflex/patgroup.rb +9 -9
  121. data/lib/origen_testers/igxl_based_tester/ultraflex/patgroups.rb +10 -10
  122. data/lib/origen_testers/igxl_based_tester/ultraflex/patset.rb +9 -9
  123. data/lib/origen_testers/igxl_based_tester/ultraflex/patset_pattern.rb +18 -18
  124. data/lib/origen_testers/igxl_based_tester/ultraflex/patsets.rb +10 -10
  125. data/lib/origen_testers/igxl_based_tester/ultraflex/patsubr.rb +9 -9
  126. data/lib/origen_testers/igxl_based_tester/ultraflex/patsubr_pattern.rb +18 -18
  127. data/lib/origen_testers/igxl_based_tester/ultraflex/patsubrs.rb +10 -10
  128. data/lib/origen_testers/igxl_based_tester/ultraflex/pinmap.rb +10 -10
  129. data/lib/origen_testers/igxl_based_tester/ultraflex/references.rb +10 -10
  130. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/ac_specsets.txt.erb +0 -0
  131. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/dc_specsets.txt.erb +0 -0
  132. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/edgesets.txt.erb +0 -0
  133. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/global_specs.txt.erb +0 -0
  134. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/jobs.txt.erb +0 -0
  135. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/levelset.txt.erb +0 -0
  136. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/pinmap.txt.erb +0 -0
  137. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/references.txt.erb +0 -0
  138. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/timesets.txt.erb +0 -0
  139. data/lib/origen_testers/igxl_based_tester/ultraflex/templates/timesets_basic.txt.erb +0 -0
  140. data/lib/origen_testers/igxl_based_tester/ultraflex/test_instance.rb +315 -315
  141. data/lib/origen_testers/igxl_based_tester/ultraflex/test_instance_group.rb +9 -9
  142. data/lib/origen_testers/igxl_based_tester/ultraflex/test_instances.rb +10 -10
  143. data/lib/origen_testers/igxl_based_tester/ultraflex/timeset.rb +9 -9
  144. data/lib/origen_testers/igxl_based_tester/ultraflex/timesets.rb +10 -10
  145. data/lib/origen_testers/igxl_based_tester/ultraflex/timesets_basic.rb +10 -10
  146. data/lib/origen_testers/interface.rb +345 -324
  147. data/lib/origen_testers/memory_style.rb +77 -77
  148. data/lib/origen_testers/no_interface.rb +7 -7
  149. data/lib/origen_testers/origen_ext/application/runner.rb +25 -25
  150. data/lib/origen_testers/origen_ext/generator.rb +54 -54
  151. data/lib/origen_testers/origen_ext/generator/flow.rb +91 -77
  152. data/lib/origen_testers/origen_ext/generator/resources.rb +21 -21
  153. data/lib/origen_testers/origen_ext/pins/pin.rb +78 -78
  154. data/lib/origen_testers/origen_ext/pins/pin_collection.rb +84 -84
  155. data/lib/origen_testers/parser.rb +22 -22
  156. data/lib/origen_testers/parser/description_lookup.rb +62 -62
  157. data/lib/origen_testers/parser/searchable_array.rb +30 -30
  158. data/lib/origen_testers/parser/searchable_hash.rb +30 -30
  159. data/lib/origen_testers/pattern_compilers.rb +116 -116
  160. data/lib/origen_testers/pattern_compilers/assembler.rb +88 -88
  161. data/lib/origen_testers/pattern_compilers/job.rb +96 -96
  162. data/lib/origen_testers/pattern_compilers/ultraflex_pattern_compiler.rb +599 -599
  163. data/lib/origen_testers/program_generators.rb +62 -62
  164. data/lib/origen_testers/smartest_based_tester.rb +8 -8
  165. data/lib/origen_testers/smartest_based_tester/base.rb +576 -567
  166. data/lib/origen_testers/smartest_based_tester/base/flow.rb +296 -291
  167. data/lib/origen_testers/smartest_based_tester/base/generator.rb +207 -194
  168. data/lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb +32 -32
  169. data/lib/origen_testers/smartest_based_tester/base/pattern_master.rb +69 -69
  170. data/lib/origen_testers/smartest_based_tester/base/processors.rb +16 -16
  171. data/lib/origen_testers/smartest_based_tester/base/processors/adjacent_if_combiner.rb +106 -106
  172. data/lib/origen_testers/smartest_based_tester/base/processors/continue_implementer.rb +39 -39
  173. data/lib/origen_testers/smartest_based_tester/base/processors/empty_branch_cleaner.rb +21 -21
  174. data/lib/origen_testers/smartest_based_tester/base/processors/extract_run_flag_table.rb +33 -33
  175. data/lib/origen_testers/smartest_based_tester/base/processors/extract_set_variables.rb +22 -22
  176. data/lib/origen_testers/smartest_based_tester/base/processors/flag_optimizer.rb +188 -188
  177. data/lib/origen_testers/smartest_based_tester/base/processors/if_ran_cleaner.rb +34 -34
  178. data/lib/origen_testers/smartest_based_tester/base/test_method.rb +178 -164
  179. data/lib/origen_testers/smartest_based_tester/base/test_methods.rb +77 -73
  180. data/lib/origen_testers/smartest_based_tester/base/test_methods/ac_tml.rb +33 -33
  181. data/lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb +38 -38
  182. data/lib/origen_testers/smartest_based_tester/base/test_methods/custom_tml.rb +19 -19
  183. data/lib/origen_testers/smartest_based_tester/base/test_methods/dc_tml.rb +147 -147
  184. data/lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb +65 -65
  185. data/lib/origen_testers/smartest_based_tester/base/test_suite.rb +208 -193
  186. data/lib/origen_testers/smartest_based_tester/base/test_suites.rb +58 -54
  187. data/lib/origen_testers/smartest_based_tester/base/variables_file.rb +38 -38
  188. data/lib/origen_testers/smartest_based_tester/v93k.rb +8 -8
  189. data/lib/origen_testers/smartest_based_tester/v93k/builder.rb +89 -89
  190. data/lib/origen_testers/smartest_based_tester/v93k/builder/flow.rb +181 -181
  191. data/lib/origen_testers/smartest_based_tester/v93k/builder/pattern_master.rb +54 -54
  192. data/lib/origen_testers/smartest_based_tester/v93k/flow.rb +10 -10
  193. data/lib/origen_testers/smartest_based_tester/v93k/generator.rb +19 -19
  194. data/lib/origen_testers/smartest_based_tester/v93k/pattern_compiler.rb +10 -10
  195. data/lib/origen_testers/smartest_based_tester/v93k/pattern_master.rb +10 -10
  196. data/lib/origen_testers/smartest_based_tester/v93k/templates/template.aiv.erb +17 -17
  197. data/lib/origen_testers/smartest_based_tester/v93k/templates/template.pmfl.erb +13 -13
  198. data/lib/origen_testers/smartest_based_tester/v93k/templates/template.tf.erb +236 -214
  199. data/lib/origen_testers/smartest_based_tester/v93k/templates/vars.tf.erb +48 -48
  200. data/lib/origen_testers/smartest_based_tester/v93k/test_method.rb +9 -9
  201. data/lib/origen_testers/smartest_based_tester/v93k/test_methods.rb +9 -9
  202. data/lib/origen_testers/smartest_based_tester/v93k/test_suite.rb +9 -9
  203. data/lib/origen_testers/smartest_based_tester/v93k/test_suites.rb +9 -9
  204. data/lib/origen_testers/smartest_based_tester/v93k/variables_file.rb +10 -10
  205. data/lib/origen_testers/test/basic_interface.rb +17 -17
  206. data/lib/origen_testers/test/block.rb +21 -21
  207. data/lib/origen_testers/test/custom_test_interface.rb +111 -111
  208. data/lib/origen_testers/test/dut.rb +295 -295
  209. data/lib/origen_testers/test/dut2.rb +76 -76
  210. data/lib/origen_testers/test/dut3.rb +244 -244
  211. data/lib/origen_testers/test/interface.rb +503 -503
  212. data/lib/origen_testers/test/nvm.rb +94 -94
  213. data/lib/origen_testers/timing.rb +368 -368
  214. data/lib/origen_testers/vector.rb +207 -207
  215. data/lib/origen_testers/vector_based_tester.rb +41 -41
  216. data/lib/origen_testers/vector_generator.rb +655 -655
  217. data/lib/origen_testers/vector_pipeline.rb +302 -302
  218. data/pattern/bitmap.rb +7 -7
  219. data/pattern/dc_instr.rb +7 -7
  220. data/pattern/delay.rb +7 -7
  221. data/pattern/freq_counter.rb +6 -6
  222. data/pattern/mem_test.rb +8 -8
  223. data/pattern/multi_vector.rb +122 -122
  224. data/pattern/multi_vector_plus1.rb +125 -125
  225. data/pattern/nvm/j750/add_late_pins.rb +3 -3
  226. data/pattern/nvm/j750/iterator_postfix_test_x_bx.rb +8 -8
  227. data/pattern/nvm/j750/iterator_test_x_bx.rb +8 -8
  228. data/pattern/nvm/j750/j750_halt.rb +159 -159
  229. data/pattern/nvm/j750/j750_workout.rb +209 -209
  230. data/pattern/nvm/j750/timing.rb +73 -73
  231. data/pattern/read_write_reg.rb +61 -61
  232. data/pattern/reset.rb +4 -4
  233. data/pattern/subroutines.rb +69 -69
  234. data/pattern/tester_overlay.rb +61 -52
  235. data/pattern/tester_store.rb +28 -28
  236. data/program/_additional_erase.rb +7 -7
  237. data/program/_efa_resources.rb +7 -7
  238. data/program/_erase.rb +25 -25
  239. data/program/_erase_vfy.rb +5 -5
  240. data/program/_iv_resources.rb +10 -10
  241. data/program/basic_interface.rb +5 -5
  242. data/program/components/_prb1_main.rb +222 -222
  243. data/program/components/_temp.rb +6 -6
  244. data/program/custom_tests.rb +10 -10
  245. data/program/flow_control.rb +422 -422
  246. data/program/prb1.rb +11 -11
  247. data/program/prb1_resources.rb +28 -28
  248. data/program/prb2.rb +27 -27
  249. data/program/test.rb +29 -29
  250. data/program/uflex_resources.rb +199 -199
  251. data/templates/example.txt.erb +53 -53
  252. data/templates/j750/program_sheet.txt.erb +9 -9
  253. data/templates/manifest/v93k.yaml.erb +22 -22
  254. data/templates/web/index.md.erb +51 -51
  255. data/templates/web/layouts/_basic.html.erb +15 -15
  256. data/templates/web/partials/_navbar.html.erb +22 -22
  257. data/templates/web/release_notes.md.erb +5 -5
  258. metadata +2 -2
@@ -1,607 +1,607 @@
1
- module OrigenTesters
2
- module IGXLBasedTester
3
- class Base
4
- module Generator
5
- extend ActiveSupport::Concern
6
-
7
- autoload :Placeholder, 'origen_testers/generator/placeholder'
8
-
9
- included do
10
- include Interface # adds the interface helpers/Origen hook-up
11
- end
12
-
13
- # This is just to give all interfaces an initialize that takes
14
- # one argument. The super is important for cases where this module
15
- # is included late via Testers::ProgramGenerators
16
- def initialize(options = {})
17
- super
18
- end
19
-
20
- def add_til(name, methods)
21
- custom_tils[name] = methods
22
- end
23
- alias_method :add_test_instance_library, :add_til
24
-
25
- # @api private
26
- def at_flow_start
27
- unless Origen.interface.resources_mode?
28
- flow.at_flow_start if flow
29
- end
30
- @@pinmaps_filename = nil
31
- @@test_instances_filename = nil
32
- @@patsets_filename = nil
33
- @@patgroups_filename = nil
34
- @@edgesets_filename = nil
35
- @@timesets_filename = nil
36
- @@levelsets_filename = nil
37
- @@ac_specsets_filename = nil
38
- @@dc_specsets_filename = nil
39
- @@global_specs_filename = nil
40
- @@jobs_filename = nil
41
- @@references_filename = nil
42
- end
43
-
44
- # @api private
45
- def at_run_start
46
- flow.at_run_start
47
- @@pinmap_sheets = nil
48
- @@test_instance_sheets = nil
49
- @@patset_sheets = nil
50
- @@flow_sheets = nil
51
- @@patgroup_sheets = nil
52
- @@edgeset_sheets = nil
53
- @@timeset_sheets = nil
54
- @@levelset_sheets = nil
55
- @@ac_specset_sheets = nil
56
- @@dc_specset_sheets = nil
57
- @@global_spec_sheets = nil
58
- @@job_sheets = nil
59
- @@reference_sheets = nil
60
- end
61
- alias_method :reset_globals, :at_run_start
62
-
63
- # Convenience method to allow the current name for the test instance,
64
- # patsets, patgroups and timesets sheets to be set to the same value.
65
- #
66
- # # my j750 interface
67
- #
68
- # resources_filename = "common"
69
- #
70
- # # The above is equivalent to:
71
- #
72
- # pinmaps_filename = "common"
73
- # test_instances_filename = "common"
74
- # patsets_filename = "common"
75
- # patgroups_filename = "common"
76
- # edgesets_filename = "common"
77
- # timesets_filename = "common"
78
- # levelsets_filename = "common"
79
- # ac_specsets_filename = "common"
80
- # dc_specsets_filename = "common"
81
- # global_specs_filename = "common"
82
- # jobs_filename = "common"
83
- # references_filename = "common"
84
- def resources_filename=(name)
85
- self.pinmaps_filename = name
86
- self.test_instances_filename = name
87
- self.patsets_filename = name
88
- self.patgroups_filename = name
89
- self.edgesets_filename = name
90
- self.timesets_filename = name
91
- self.levelsets_filename = name
92
- self.ac_specsets_filename = name
93
- self.dc_specsets_filename = name
94
- self.global_specs_filename = name
95
- self.jobs_filename = name
96
- self.references_filename = name
97
- self.pattern_references_name = name
98
- end
99
-
100
- # Set the name of the current pinmap sheet. This does not change
101
- # the name of the current sheet, but rather sets the name of the sheet that
102
- # will be generated the next time you access pinmaps.
103
- def pinmaps_filename=(name)
104
- @pinmaps_filename = name
105
- @@pinmaps_filename = name
106
- end
107
-
108
- # Set the name of the current test instances sheet. This does not change
109
- # the name of the current sheet, but rather sets the name of the sheet that
110
- # will be generated the next time you access test_instances.
111
- def test_instances_filename=(name)
112
- @test_instances_filename = name
113
- @@test_instances_filename = name
114
- end
115
-
116
- # Set the name of the current pattern sets sheet. This does not change
117
- # the name of the current sheet, but rather sets the name of the sheet that
118
- # will be generated the next time you access patsets.
119
- def patsets_filename=(name)
120
- @patsets_filename = name
121
- @@patsets_filename = name
122
- end
123
-
124
- # Set the name of the current pattern groups sheet. This does not change
125
- # the name of the current sheet, but rather sets the name of the sheet that
126
- # will be generated the next time you access patgroups.
127
- def patgroups_filename=(name)
128
- @patgroups_filename = name
129
- @@patgroups_filename = name
130
- end
131
-
132
- # Set the name of the current edgesets sheet. This does not change
133
- # the name of the current sheet, but rather sets the name of the sheet that
134
- # will be generated the next time you access patgroups.
135
- def edgesets_filename=(name)
136
- @edgesets_filename = name
137
- @@edgesets_filename = name
138
- end
139
-
140
- # Set the name of the current timesets sheet. This does not change
141
- # the name of the current sheet, but rather sets the name of the sheet that
142
- # will be generated the next time you access patgroups.
143
- def timesets_filename=(name)
144
- @timesets_filename = name
145
- @@timesets_filename = name
146
- end
147
-
148
- # Set the name of the current levelsets sheet. This does not change
149
- # the name of the current sheet, but rather sets the name of the sheet that
150
- # will be generated the next time you access patgroups.
151
- def levelsets_filename=(name)
152
- @levelsets_filename = name
153
- @@levelsets_filename = name
154
- end
155
-
156
- # Set the name of the current AC specsets sheet. This does not change
157
- # the name of the current sheet, but rather sets the name of the sheet that
158
- # will be generated the next time you access patgroups.
159
- def ac_specsets_filename=(name)
160
- @ac_specsets_filename = name
161
- @@ac_specsets_filename = name
162
- end
163
-
164
- # Set the name of the current DC specsets sheet. This does not change
165
- # the name of the current sheet, but rather sets the name of the sheet that
166
- # will be generated the next time you access patgroups.
167
- def dc_specsets_filename=(name)
168
- @dc_specsets_filename = name
169
- @@dc_specsets_filename = name
170
- end
171
-
172
- # Set the name of the global specs sheet. This does not change
173
- # the name of the current sheet, but rather sets the name of the sheet that
174
- # will be generated the next time you access patgroups.
175
- def global_specs_filename=(name)
176
- @global_specs_filename = name
177
- @@global_specs_filename = name
178
- end
179
-
180
- # Set the name of the jobs sheet. This does not change
181
- # the name of the current sheet, but rather sets the name of the sheet that
182
- # will be generated the next time you access patgroups.
183
- def jobs_filename=(name)
184
- @jobs_filename = name
185
- @@jobs_filename = name
186
- end
187
-
188
- # Set the name of the references sheet. This does not change
189
- # the name of the current sheet, but rather sets the name of the sheet that
190
- # will be generated the next time you access patgroups.
191
- def references_filename=(name)
192
- @references_filename = name
193
- @@references_filename = name
194
- end
195
-
196
- # Returns the name of the current pinmaps sheet
197
- def pinmaps_filename
198
- @@pinmaps_filename ||= @pinmaps_filename || 'global'
199
- end
200
-
201
- # Returns the name of the current test instances sheet
202
- def test_instances_filename
203
- @@test_instances_filename ||= @test_instances_filename || 'global'
204
- end
205
-
206
- # Returns the name of the current pat sets sheet
207
- def patsets_filename
208
- @@patsets_filename ||= @patsets_filename || 'global'
209
- end
210
-
211
- # Returns the name of the current pat groups sheet
212
- def patgroups_filename
213
- @@patgroups_filename ||= @patgroups_filename || 'global'
214
- end
215
-
216
- # Returns the name of the current edgesets sheet
217
- def edgesets_filename
218
- @@edgesets_filename ||= @edgesets_filename || 'global'
219
- end
220
-
221
- # Returns the name of the current timesets sheet
222
- def timesets_filename
223
- @@timesets_filename ||= @timesets_filename || 'global'
224
- end
225
-
226
- # Returns the name of the current levelsets sheet
227
- def levelsets_filename
228
- @@levelsets_filename ||= @levelsets_filename || 'global'
229
- end
230
-
231
- # Returns the name of the current AC specset sheet
232
- def ac_specsets_filename
233
- @@ac_specsets_filename ||= @ac_specsets_filename || 'global'
234
- end
235
-
236
- # Returns the name of the current DC specset sheet
237
- def dc_specsets_filename
238
- @@dc_specsets_filename ||= @dc_specsets_filename || 'global'
239
- end
240
-
241
- # Returns the name of the current global spec sheet
242
- def global_specs_filename
243
- @@global_specs_filename ||= @global_specs_filename || 'global'
244
- end
245
-
246
- # Returns the name of the current job sheet
247
- def jobs_filename
248
- @@jobs_filename ||= @jobs_filename || 'global'
249
- end
250
-
251
- # Returns the name of the current references sheet
252
- def references_filename
253
- @@references_filename ||= @references_filename || 'global'
254
- end
255
-
256
- # Returns a hash containing all pinmap sheets
257
- def pinmap_sheets
258
- @@pinmap_sheets ||= {}
259
- end
260
-
261
- # Returns a hash containing all test instance sheets
262
- def test_instance_sheets
263
- @@test_instance_sheets ||= {}
264
- end
265
-
266
- # Returns a hash containing all pat set sheets
267
- def patset_sheets
268
- @@patset_sheets ||= {}
269
- end
270
-
271
- # Returns a hash containing all flow sheets
272
- def flow_sheets
273
- @@flow_sheets ||= {}
274
- end
275
-
276
- # Returns a hash containing all pat group sheets
277
- def patgroup_sheets
278
- @@patgroup_sheets ||= {}
279
- end
280
-
281
- # Returns a hash containing all edgeset sheets
282
- def edgeset_sheets
283
- @@edgeset_sheets ||= {}
284
- end
285
-
286
- # Returns a hash containing all timeset sheets
287
- def timeset_sheets
288
- @@timeset_sheets ||= {}
289
- end
290
-
291
- # Returns a hash containing all levelset sheets
292
- def levelset_sheets
293
- @@levelset_sheets ||= {}
294
- end
295
-
296
- # Returns a hash containing all AC specsets sheets
297
- def ac_specset_sheets
298
- @@ac_specset_sheets ||= {}
299
- end
300
-
301
- # Returns a hash containing all DC specsets sheets
302
- def dc_specset_sheets
303
- @@dc_specset_sheets ||= {}
304
- end
305
-
306
- # Returns a hash containing all global spec sheets
307
- def global_spec_sheets
308
- @@global_spec_sheets ||= {}
309
- end
310
-
311
- # Returns a hash containing all job sheets
312
- def job_sheets
313
- @@job_sheets ||= {}
314
- end
315
-
316
- # Returns a hash containing all reference sheets
317
- def reference_sheets
318
- @@reference_sheets ||= {}
319
- end
320
-
321
- # Returns an array containing all sheet generators where a sheet generator is a flow,
322
- # test instance, patset, pat group, edgeset, timeset, AC/DC/Global spec, job,
323
- # or reference sheet.
324
- # All Origen program generators must implement this method
325
- def sheet_generators # :nodoc:
326
- g = []
327
- # Generate all of these sheets verbatim
328
- [pinmap_sheets, flow_sheets, test_instance_sheets, patset_sheets,
329
- patgroup_sheets, levelset_sheets, ac_specset_sheets, dc_specset_sheets,
330
- global_spec_sheets, job_sheets, reference_sheets].each do |sheets|
331
- sheets.each do |name, sheet|
332
- g << sheet
333
- end
334
- end
335
- # Choose whether to generate edgeset/timset or timeset_basic sheets
336
- # * Skip edgeset sheet generation when timeset_basic is selected
337
- [edgeset_sheets, timeset_sheets].each do |sheets|
338
- sheets.each do |name, sheet|
339
- next if sheet.class.name =~ /Edgesets$/ && sheet.ts_basic
340
- g << sheet
341
- end
342
- end
343
- g
344
- end
345
-
346
- # Returns an array containing all flow sheet generators.
347
- # All Origen program generators must implement this method
348
- def flow_generators
349
- g = []
350
- flow_sheets.each do |name, sheet|
351
- g << sheet
352
- end
353
- g
354
- end
355
-
356
- # Returns the current pinmaps sheet (as defined by the current value of
357
- # pinmaps_filename).
358
- #
359
- # Pass in a filename argument to have a specific sheet returned instead.
360
- #
361
- # If the sheet does not exist yet it will be created.
362
- def pinmaps(filename = pinmaps_filename)
363
- f = filename.to_sym
364
- return pinmap_sheets[f] if pinmap_sheets[f]
365
- p = platform::Pinmap.new
366
- p.filename = f
367
- pinmap_sheets[f] = p
368
- end
369
- alias_method :pin_maps, :pinmaps
370
-
371
- # Returns the current test instances sheet (as defined by the current value of
372
- # test_instances_filename).
373
- #
374
- # Pass in a filename argument to have a specific sheet returned instead.
375
- #
376
- # If the sheet does not exist yet it will be created.
377
- def test_instances(filename = test_instances_filename)
378
- f = filename.to_sym
379
- return test_instance_sheets[f] if test_instance_sheets[f]
380
- t = platform::TestInstances.new
381
- t.filename = f
382
- test_instance_sheets[f] = t
383
- end
384
-
385
- # Returns the current pattern sets sheet (as defined by the current value of
386
- # patsets_filename).
387
- #
388
- # Pass in a filename argument to have a specific sheet returned instead.
389
- #
390
- # If the sheet does not exist yet it will be created.
391
- def patsets(filename = patsets_filename)
392
- f = filename.to_sym
393
- return patset_sheets[f] if patset_sheets[f]
394
- p = platform::Patsets.new
395
- p.filename = f
396
- patset_sheets[f] = p
397
- end
398
- alias_method :pat_sets, :patsets
399
- alias_method :pattern_sets, :patsets
400
-
401
- # Returns the current pattern subroutine sheet (as defined by the current value of
402
- # patsubrs_filename).
403
- #
404
- # Pass in a filename argument to have a specific sheet returned instead.
405
- #
406
- # If the sheet does not exist yet it will be created.
407
- def patsubrs(filename = patsubrs_filename)
408
- f = filename.to_sym
409
- return patsubr_sheets[f] if patsubr_sheets[f]
410
- p = platform::Patsubrs.new
411
- p.filename = f
412
- patsubr_sheets[f] = p
413
- end
414
- alias_method :pat_subrs, :patsubrs
415
- alias_method :pattern_subrs, :patsubrs
416
-
417
- # Returns the current flow sheet (as defined by the name of the current top
418
- # level flow source file).
419
- #
420
- # Pass in a filename argument to have a specific sheet returned instead.
421
- #
422
- # If the sheet does not exist yet it will be created.
423
- def flow(filename = nil)
424
- if filename || Origen.file_handler.current_file
425
- filename ||= Origen.file_handler.current_file.basename('.rb').to_s
426
- # DH here need to reset the flow!!
427
- f = filename.to_sym
428
- return flow_sheets[f] if flow_sheets[f] # will return flow if already existing
429
- p = platform::Flow.new
430
- p.inhibit_output if Origen.interface.resources_mode?
431
- p.filename = f
432
- flow_sheets[f] = p
433
- end
434
- end
435
-
436
- # Returns the current pattern groups sheet (as defined by the current value of
437
- # patgroups_filename).
438
- #
439
- # Pass in a filename argument to have a specific sheet returned instead.
440
- #
441
- # If the sheet does not exist yet it will be created.
442
- def patgroups(filename = patgroups_filename)
443
- f = filename.to_sym
444
- return patgroup_sheets[f] if patgroup_sheets[f]
445
- p = platform::Patgroups.new
446
- p.filename = f
447
- patgroup_sheets[f] = p
448
- end
449
- alias_method :pat_groups, :patgroups
450
- alias_method :pattern_groups, :patgroups
451
-
452
- # Returns the current collection of edges that are defined. These are
453
- # used in support of creating edgeset/timeset sheets. They do not have
454
- # an associated sheet of their own.
455
- def edges
456
- @@edges ||= platform::Edges.new
457
- end
458
- alias_method :edge_collection, :edges
459
-
460
- # Returns the current edgesets sheet (as defined by the current value of
461
- # edgesets_filename).
462
- #
463
- # Pass in a filename argument to have a specific sheet returned instead.
464
- #
465
- # If the sheet does not exist yet it will be created.
466
- def edgesets(filename = edgesets_filename, options = {})
467
- options = {
468
- timeset_basic: false
469
- }.merge(options)
470
-
471
- f = filename.to_sym
472
- return edgeset_sheets[f] if edgeset_sheets[f]
473
- e = platform::Edgesets.new(options)
474
- e.filename = f
475
- edgeset_sheets[f] = e
476
- end
477
- alias_method :edge_sets, :edgesets
478
-
479
- # Returns the current timesets or timesets_basic sheet (as defined by the current value of
480
- # timesets_filename).
481
- #
482
- # Pass in a filename argument to have a specific sheet returned instead.
483
- #
484
- # If the sheet does not exist yet it will be created.
485
- def timesets(filename = timesets_filename, options = {})
486
- options = {
487
- timeset_basic: false
488
- }.merge(options)
489
-
490
- f = filename.to_sym
491
- return timeset_sheets[f] if timeset_sheets[f]
492
- case options[:timeset_basic]
493
- when true
494
- t = platform::TimesetsBasic.new(options)
495
- when false
496
- t = platform::Timesets.new(options)
497
- end
498
- t.filename = f
499
- timeset_sheets[f] = t
500
- end
501
- alias_method :time_sets, :timesets
502
- alias_method :timing_sets, :timesets
503
-
504
- # Returns the current collection of levels that are defined. These are
505
- # used in support of creating levelset sheets. They do not have
506
- # an associated sheet of their own.
507
- def levels
508
- @@levels ||= platform::Levels.new
509
- end
510
- alias_method :level_collection, :levels
511
-
512
- # Returns the current levelsets sheet (as defined by the current value of
513
- # levelsets_filename).
514
- #
515
- # Pass in a filename argument to have a specific sheet returned instead.
516
- #
517
- # If the sheet does not exist yet it will be created.
518
- def levelsets(filename = levelsets_filename)
519
- f = filename.to_sym
520
- return levelset_sheets[f] if levelset_sheets[f]
521
- t = platform::Levelset.new
522
- t.filename = f
523
- levelset_sheets[f] = t
524
- end
525
- alias_method :time_sets, :timesets
526
- alias_method :timing_sets, :timesets
527
-
528
- # Returns the current AC specset sheet (as defined by the current value of
529
- # ac_specsets_filename).
530
- #
531
- # Pass in a filename argument to have a specific sheet returned instead.
532
- #
533
- # If the sheet does not exist yet it will be created.
534
- def ac_specsets(filename = ac_specsets_filename)
535
- f = filename.to_sym
536
- return ac_specset_sheets[f] if ac_specset_sheets[f]
537
- s = platform::ACSpecsets.new
538
- s.filename = f
539
- ac_specset_sheets[f] = s
540
- end
541
-
542
- # Returns the current DC specset sheet (as defined by the current value of
543
- # dc_specsets_filename).
544
- #
545
- # Pass in a filename argument to have a specific sheet returned instead.
546
- #
547
- # If the sheet does not exist yet it will be created.
548
- def dc_specsets(filename = dc_specsets_filename)
549
- f = filename.to_sym
550
- return dc_specset_sheets[f] if dc_specset_sheets[f]
551
- s = platform::DCSpecsets.new
552
- s.filename = f
553
- dc_specset_sheets[f] = s
554
- end
555
-
556
- # Returns the current global spec sheet (as defined by the current value of
557
- # global_specs_filename).
558
- #
559
- # Pass in a filename argument to have a specific sheet returned instead.
560
- #
561
- # If the sheet does not exist yet it will be created.
562
- def global_specs(filename = global_specs_filename)
563
- f = filename.to_sym
564
- return global_spec_sheets[f] if global_spec_sheets[f]
565
- s = platform::GlobalSpecs.new
566
- s.filename = f
567
- global_spec_sheets[f] = s
568
- end
569
-
570
- # Returns the current job sheet (as defined by the current value of
571
- # jobs_filename).
572
- #
573
- # Pass in a filename argument to have a specific sheet returned instead.
574
- #
575
- # If the sheet does not exist yet it will be created.
576
- def program_jobs(filename = jobs_filename)
577
- f = filename.to_sym
578
- return job_sheets[f] if job_sheets[f]
579
- j = platform::Jobs.new
580
- j.filename = f
581
- job_sheets[f] = j
582
- end
583
-
584
- # Returns the current reference sheet (as defined by the current value of
585
- # references_filename).
586
- #
587
- # Pass in a filename argument to have a specific sheet returned instead.
588
- #
589
- # If the sheet does not exist yet it will be created.
590
- def references(filename = references_filename)
591
- f = filename.to_sym
592
- return reference_sheets[f] if reference_sheets[f]
593
- r = platform::References.new
594
- r.filename = f
595
- reference_sheets[f] = r
596
- end
597
-
598
- private
599
-
600
- # Custom test instance libraries
601
- def custom_tils
602
- @custom_tils ||= {}
603
- end
604
- end
605
- end
606
- end
607
- end
1
+ module OrigenTesters
2
+ module IGXLBasedTester
3
+ class Base
4
+ module Generator
5
+ extend ActiveSupport::Concern
6
+
7
+ autoload :Placeholder, 'origen_testers/generator/placeholder'
8
+
9
+ included do
10
+ include Interface # adds the interface helpers/Origen hook-up
11
+ end
12
+
13
+ # This is just to give all interfaces an initialize that takes
14
+ # one argument. The super is important for cases where this module
15
+ # is included late via Testers::ProgramGenerators
16
+ def initialize(options = {})
17
+ super
18
+ end
19
+
20
+ def add_til(name, methods)
21
+ custom_tils[name] = methods
22
+ end
23
+ alias_method :add_test_instance_library, :add_til
24
+
25
+ # @api private
26
+ def at_flow_start
27
+ unless Origen.interface.resources_mode?
28
+ flow.at_flow_start if flow
29
+ end
30
+ @@pinmaps_filename = nil
31
+ @@test_instances_filename = nil
32
+ @@patsets_filename = nil
33
+ @@patgroups_filename = nil
34
+ @@edgesets_filename = nil
35
+ @@timesets_filename = nil
36
+ @@levelsets_filename = nil
37
+ @@ac_specsets_filename = nil
38
+ @@dc_specsets_filename = nil
39
+ @@global_specs_filename = nil
40
+ @@jobs_filename = nil
41
+ @@references_filename = nil
42
+ end
43
+
44
+ # @api private
45
+ def at_run_start
46
+ flow.at_run_start
47
+ @@pinmap_sheets = nil
48
+ @@test_instance_sheets = nil
49
+ @@patset_sheets = nil
50
+ @@flow_sheets = nil
51
+ @@patgroup_sheets = nil
52
+ @@edgeset_sheets = nil
53
+ @@timeset_sheets = nil
54
+ @@levelset_sheets = nil
55
+ @@ac_specset_sheets = nil
56
+ @@dc_specset_sheets = nil
57
+ @@global_spec_sheets = nil
58
+ @@job_sheets = nil
59
+ @@reference_sheets = nil
60
+ end
61
+ alias_method :reset_globals, :at_run_start
62
+
63
+ # Convenience method to allow the current name for the test instance,
64
+ # patsets, patgroups and timesets sheets to be set to the same value.
65
+ #
66
+ # # my j750 interface
67
+ #
68
+ # resources_filename = "common"
69
+ #
70
+ # # The above is equivalent to:
71
+ #
72
+ # pinmaps_filename = "common"
73
+ # test_instances_filename = "common"
74
+ # patsets_filename = "common"
75
+ # patgroups_filename = "common"
76
+ # edgesets_filename = "common"
77
+ # timesets_filename = "common"
78
+ # levelsets_filename = "common"
79
+ # ac_specsets_filename = "common"
80
+ # dc_specsets_filename = "common"
81
+ # global_specs_filename = "common"
82
+ # jobs_filename = "common"
83
+ # references_filename = "common"
84
+ def resources_filename=(name)
85
+ self.pinmaps_filename = name
86
+ self.test_instances_filename = name
87
+ self.patsets_filename = name
88
+ self.patgroups_filename = name
89
+ self.edgesets_filename = name
90
+ self.timesets_filename = name
91
+ self.levelsets_filename = name
92
+ self.ac_specsets_filename = name
93
+ self.dc_specsets_filename = name
94
+ self.global_specs_filename = name
95
+ self.jobs_filename = name
96
+ self.references_filename = name
97
+ self.pattern_references_name = name
98
+ end
99
+
100
+ # Set the name of the current pinmap sheet. This does not change
101
+ # the name of the current sheet, but rather sets the name of the sheet that
102
+ # will be generated the next time you access pinmaps.
103
+ def pinmaps_filename=(name)
104
+ @pinmaps_filename = name
105
+ @@pinmaps_filename = name
106
+ end
107
+
108
+ # Set the name of the current test instances sheet. This does not change
109
+ # the name of the current sheet, but rather sets the name of the sheet that
110
+ # will be generated the next time you access test_instances.
111
+ def test_instances_filename=(name)
112
+ @test_instances_filename = name
113
+ @@test_instances_filename = name
114
+ end
115
+
116
+ # Set the name of the current pattern sets sheet. This does not change
117
+ # the name of the current sheet, but rather sets the name of the sheet that
118
+ # will be generated the next time you access patsets.
119
+ def patsets_filename=(name)
120
+ @patsets_filename = name
121
+ @@patsets_filename = name
122
+ end
123
+
124
+ # Set the name of the current pattern groups sheet. This does not change
125
+ # the name of the current sheet, but rather sets the name of the sheet that
126
+ # will be generated the next time you access patgroups.
127
+ def patgroups_filename=(name)
128
+ @patgroups_filename = name
129
+ @@patgroups_filename = name
130
+ end
131
+
132
+ # Set the name of the current edgesets sheet. This does not change
133
+ # the name of the current sheet, but rather sets the name of the sheet that
134
+ # will be generated the next time you access patgroups.
135
+ def edgesets_filename=(name)
136
+ @edgesets_filename = name
137
+ @@edgesets_filename = name
138
+ end
139
+
140
+ # Set the name of the current timesets sheet. This does not change
141
+ # the name of the current sheet, but rather sets the name of the sheet that
142
+ # will be generated the next time you access patgroups.
143
+ def timesets_filename=(name)
144
+ @timesets_filename = name
145
+ @@timesets_filename = name
146
+ end
147
+
148
+ # Set the name of the current levelsets sheet. This does not change
149
+ # the name of the current sheet, but rather sets the name of the sheet that
150
+ # will be generated the next time you access patgroups.
151
+ def levelsets_filename=(name)
152
+ @levelsets_filename = name
153
+ @@levelsets_filename = name
154
+ end
155
+
156
+ # Set the name of the current AC specsets sheet. This does not change
157
+ # the name of the current sheet, but rather sets the name of the sheet that
158
+ # will be generated the next time you access patgroups.
159
+ def ac_specsets_filename=(name)
160
+ @ac_specsets_filename = name
161
+ @@ac_specsets_filename = name
162
+ end
163
+
164
+ # Set the name of the current DC specsets sheet. This does not change
165
+ # the name of the current sheet, but rather sets the name of the sheet that
166
+ # will be generated the next time you access patgroups.
167
+ def dc_specsets_filename=(name)
168
+ @dc_specsets_filename = name
169
+ @@dc_specsets_filename = name
170
+ end
171
+
172
+ # Set the name of the global specs sheet. This does not change
173
+ # the name of the current sheet, but rather sets the name of the sheet that
174
+ # will be generated the next time you access patgroups.
175
+ def global_specs_filename=(name)
176
+ @global_specs_filename = name
177
+ @@global_specs_filename = name
178
+ end
179
+
180
+ # Set the name of the jobs sheet. This does not change
181
+ # the name of the current sheet, but rather sets the name of the sheet that
182
+ # will be generated the next time you access patgroups.
183
+ def jobs_filename=(name)
184
+ @jobs_filename = name
185
+ @@jobs_filename = name
186
+ end
187
+
188
+ # Set the name of the references sheet. This does not change
189
+ # the name of the current sheet, but rather sets the name of the sheet that
190
+ # will be generated the next time you access patgroups.
191
+ def references_filename=(name)
192
+ @references_filename = name
193
+ @@references_filename = name
194
+ end
195
+
196
+ # Returns the name of the current pinmaps sheet
197
+ def pinmaps_filename
198
+ @@pinmaps_filename ||= @pinmaps_filename || 'global'
199
+ end
200
+
201
+ # Returns the name of the current test instances sheet
202
+ def test_instances_filename
203
+ @@test_instances_filename ||= @test_instances_filename || 'global'
204
+ end
205
+
206
+ # Returns the name of the current pat sets sheet
207
+ def patsets_filename
208
+ @@patsets_filename ||= @patsets_filename || 'global'
209
+ end
210
+
211
+ # Returns the name of the current pat groups sheet
212
+ def patgroups_filename
213
+ @@patgroups_filename ||= @patgroups_filename || 'global'
214
+ end
215
+
216
+ # Returns the name of the current edgesets sheet
217
+ def edgesets_filename
218
+ @@edgesets_filename ||= @edgesets_filename || 'global'
219
+ end
220
+
221
+ # Returns the name of the current timesets sheet
222
+ def timesets_filename
223
+ @@timesets_filename ||= @timesets_filename || 'global'
224
+ end
225
+
226
+ # Returns the name of the current levelsets sheet
227
+ def levelsets_filename
228
+ @@levelsets_filename ||= @levelsets_filename || 'global'
229
+ end
230
+
231
+ # Returns the name of the current AC specset sheet
232
+ def ac_specsets_filename
233
+ @@ac_specsets_filename ||= @ac_specsets_filename || 'global'
234
+ end
235
+
236
+ # Returns the name of the current DC specset sheet
237
+ def dc_specsets_filename
238
+ @@dc_specsets_filename ||= @dc_specsets_filename || 'global'
239
+ end
240
+
241
+ # Returns the name of the current global spec sheet
242
+ def global_specs_filename
243
+ @@global_specs_filename ||= @global_specs_filename || 'global'
244
+ end
245
+
246
+ # Returns the name of the current job sheet
247
+ def jobs_filename
248
+ @@jobs_filename ||= @jobs_filename || 'global'
249
+ end
250
+
251
+ # Returns the name of the current references sheet
252
+ def references_filename
253
+ @@references_filename ||= @references_filename || 'global'
254
+ end
255
+
256
+ # Returns a hash containing all pinmap sheets
257
+ def pinmap_sheets
258
+ @@pinmap_sheets ||= {}
259
+ end
260
+
261
+ # Returns a hash containing all test instance sheets
262
+ def test_instance_sheets
263
+ @@test_instance_sheets ||= {}
264
+ end
265
+
266
+ # Returns a hash containing all pat set sheets
267
+ def patset_sheets
268
+ @@patset_sheets ||= {}
269
+ end
270
+
271
+ # Returns a hash containing all flow sheets
272
+ def flow_sheets
273
+ @@flow_sheets ||= {}
274
+ end
275
+
276
+ # Returns a hash containing all pat group sheets
277
+ def patgroup_sheets
278
+ @@patgroup_sheets ||= {}
279
+ end
280
+
281
+ # Returns a hash containing all edgeset sheets
282
+ def edgeset_sheets
283
+ @@edgeset_sheets ||= {}
284
+ end
285
+
286
+ # Returns a hash containing all timeset sheets
287
+ def timeset_sheets
288
+ @@timeset_sheets ||= {}
289
+ end
290
+
291
+ # Returns a hash containing all levelset sheets
292
+ def levelset_sheets
293
+ @@levelset_sheets ||= {}
294
+ end
295
+
296
+ # Returns a hash containing all AC specsets sheets
297
+ def ac_specset_sheets
298
+ @@ac_specset_sheets ||= {}
299
+ end
300
+
301
+ # Returns a hash containing all DC specsets sheets
302
+ def dc_specset_sheets
303
+ @@dc_specset_sheets ||= {}
304
+ end
305
+
306
+ # Returns a hash containing all global spec sheets
307
+ def global_spec_sheets
308
+ @@global_spec_sheets ||= {}
309
+ end
310
+
311
+ # Returns a hash containing all job sheets
312
+ def job_sheets
313
+ @@job_sheets ||= {}
314
+ end
315
+
316
+ # Returns a hash containing all reference sheets
317
+ def reference_sheets
318
+ @@reference_sheets ||= {}
319
+ end
320
+
321
+ # Returns an array containing all sheet generators where a sheet generator is a flow,
322
+ # test instance, patset, pat group, edgeset, timeset, AC/DC/Global spec, job,
323
+ # or reference sheet.
324
+ # All Origen program generators must implement this method
325
+ def sheet_generators # :nodoc:
326
+ g = []
327
+ # Generate all of these sheets verbatim
328
+ [pinmap_sheets, flow_sheets, test_instance_sheets, patset_sheets,
329
+ patgroup_sheets, levelset_sheets, ac_specset_sheets, dc_specset_sheets,
330
+ global_spec_sheets, job_sheets, reference_sheets].each do |sheets|
331
+ sheets.each do |name, sheet|
332
+ g << sheet
333
+ end
334
+ end
335
+ # Choose whether to generate edgeset/timset or timeset_basic sheets
336
+ # * Skip edgeset sheet generation when timeset_basic is selected
337
+ [edgeset_sheets, timeset_sheets].each do |sheets|
338
+ sheets.each do |name, sheet|
339
+ next if sheet.class.name =~ /Edgesets$/ && sheet.ts_basic
340
+ g << sheet
341
+ end
342
+ end
343
+ g
344
+ end
345
+
346
+ # Returns an array containing all flow sheet generators.
347
+ # All Origen program generators must implement this method
348
+ def flow_generators
349
+ g = []
350
+ flow_sheets.each do |name, sheet|
351
+ g << sheet
352
+ end
353
+ g
354
+ end
355
+
356
+ # Returns the current pinmaps sheet (as defined by the current value of
357
+ # pinmaps_filename).
358
+ #
359
+ # Pass in a filename argument to have a specific sheet returned instead.
360
+ #
361
+ # If the sheet does not exist yet it will be created.
362
+ def pinmaps(filename = pinmaps_filename)
363
+ f = filename.to_sym
364
+ return pinmap_sheets[f] if pinmap_sheets[f]
365
+ p = platform::Pinmap.new
366
+ p.filename = f
367
+ pinmap_sheets[f] = p
368
+ end
369
+ alias_method :pin_maps, :pinmaps
370
+
371
+ # Returns the current test instances sheet (as defined by the current value of
372
+ # test_instances_filename).
373
+ #
374
+ # Pass in a filename argument to have a specific sheet returned instead.
375
+ #
376
+ # If the sheet does not exist yet it will be created.
377
+ def test_instances(filename = test_instances_filename)
378
+ f = filename.to_sym
379
+ return test_instance_sheets[f] if test_instance_sheets[f]
380
+ t = platform::TestInstances.new
381
+ t.filename = f
382
+ test_instance_sheets[f] = t
383
+ end
384
+
385
+ # Returns the current pattern sets sheet (as defined by the current value of
386
+ # patsets_filename).
387
+ #
388
+ # Pass in a filename argument to have a specific sheet returned instead.
389
+ #
390
+ # If the sheet does not exist yet it will be created.
391
+ def patsets(filename = patsets_filename)
392
+ f = filename.to_sym
393
+ return patset_sheets[f] if patset_sheets[f]
394
+ p = platform::Patsets.new
395
+ p.filename = f
396
+ patset_sheets[f] = p
397
+ end
398
+ alias_method :pat_sets, :patsets
399
+ alias_method :pattern_sets, :patsets
400
+
401
+ # Returns the current pattern subroutine sheet (as defined by the current value of
402
+ # patsubrs_filename).
403
+ #
404
+ # Pass in a filename argument to have a specific sheet returned instead.
405
+ #
406
+ # If the sheet does not exist yet it will be created.
407
+ def patsubrs(filename = patsubrs_filename)
408
+ f = filename.to_sym
409
+ return patsubr_sheets[f] if patsubr_sheets[f]
410
+ p = platform::Patsubrs.new
411
+ p.filename = f
412
+ patsubr_sheets[f] = p
413
+ end
414
+ alias_method :pat_subrs, :patsubrs
415
+ alias_method :pattern_subrs, :patsubrs
416
+
417
+ # Returns the current flow sheet (as defined by the name of the current top
418
+ # level flow source file).
419
+ #
420
+ # Pass in a filename argument to have a specific sheet returned instead.
421
+ #
422
+ # If the sheet does not exist yet it will be created.
423
+ def flow(filename = nil)
424
+ if filename || Origen.file_handler.current_file
425
+ filename ||= Origen.file_handler.current_file.basename('.rb').to_s
426
+ # DH here need to reset the flow!!
427
+ f = filename.to_sym
428
+ return flow_sheets[f] if flow_sheets[f] # will return flow if already existing
429
+ p = platform::Flow.new
430
+ p.inhibit_output if Origen.interface.resources_mode?
431
+ p.filename = f
432
+ flow_sheets[f] = p
433
+ end
434
+ end
435
+
436
+ # Returns the current pattern groups sheet (as defined by the current value of
437
+ # patgroups_filename).
438
+ #
439
+ # Pass in a filename argument to have a specific sheet returned instead.
440
+ #
441
+ # If the sheet does not exist yet it will be created.
442
+ def patgroups(filename = patgroups_filename)
443
+ f = filename.to_sym
444
+ return patgroup_sheets[f] if patgroup_sheets[f]
445
+ p = platform::Patgroups.new
446
+ p.filename = f
447
+ patgroup_sheets[f] = p
448
+ end
449
+ alias_method :pat_groups, :patgroups
450
+ alias_method :pattern_groups, :patgroups
451
+
452
+ # Returns the current collection of edges that are defined. These are
453
+ # used in support of creating edgeset/timeset sheets. They do not have
454
+ # an associated sheet of their own.
455
+ def edges
456
+ @@edges ||= platform::Edges.new
457
+ end
458
+ alias_method :edge_collection, :edges
459
+
460
+ # Returns the current edgesets sheet (as defined by the current value of
461
+ # edgesets_filename).
462
+ #
463
+ # Pass in a filename argument to have a specific sheet returned instead.
464
+ #
465
+ # If the sheet does not exist yet it will be created.
466
+ def edgesets(filename = edgesets_filename, options = {})
467
+ options = {
468
+ timeset_basic: false
469
+ }.merge(options)
470
+
471
+ f = filename.to_sym
472
+ return edgeset_sheets[f] if edgeset_sheets[f]
473
+ e = platform::Edgesets.new(options)
474
+ e.filename = f
475
+ edgeset_sheets[f] = e
476
+ end
477
+ alias_method :edge_sets, :edgesets
478
+
479
+ # Returns the current timesets or timesets_basic sheet (as defined by the current value of
480
+ # timesets_filename).
481
+ #
482
+ # Pass in a filename argument to have a specific sheet returned instead.
483
+ #
484
+ # If the sheet does not exist yet it will be created.
485
+ def timesets(filename = timesets_filename, options = {})
486
+ options = {
487
+ timeset_basic: false
488
+ }.merge(options)
489
+
490
+ f = filename.to_sym
491
+ return timeset_sheets[f] if timeset_sheets[f]
492
+ case options[:timeset_basic]
493
+ when true
494
+ t = platform::TimesetsBasic.new(options)
495
+ when false
496
+ t = platform::Timesets.new(options)
497
+ end
498
+ t.filename = f
499
+ timeset_sheets[f] = t
500
+ end
501
+ alias_method :time_sets, :timesets
502
+ alias_method :timing_sets, :timesets
503
+
504
+ # Returns the current collection of levels that are defined. These are
505
+ # used in support of creating levelset sheets. They do not have
506
+ # an associated sheet of their own.
507
+ def levels
508
+ @@levels ||= platform::Levels.new
509
+ end
510
+ alias_method :level_collection, :levels
511
+
512
+ # Returns the current levelsets sheet (as defined by the current value of
513
+ # levelsets_filename).
514
+ #
515
+ # Pass in a filename argument to have a specific sheet returned instead.
516
+ #
517
+ # If the sheet does not exist yet it will be created.
518
+ def levelsets(filename = levelsets_filename)
519
+ f = filename.to_sym
520
+ return levelset_sheets[f] if levelset_sheets[f]
521
+ t = platform::Levelset.new
522
+ t.filename = f
523
+ levelset_sheets[f] = t
524
+ end
525
+ alias_method :time_sets, :timesets
526
+ alias_method :timing_sets, :timesets
527
+
528
+ # Returns the current AC specset sheet (as defined by the current value of
529
+ # ac_specsets_filename).
530
+ #
531
+ # Pass in a filename argument to have a specific sheet returned instead.
532
+ #
533
+ # If the sheet does not exist yet it will be created.
534
+ def ac_specsets(filename = ac_specsets_filename)
535
+ f = filename.to_sym
536
+ return ac_specset_sheets[f] if ac_specset_sheets[f]
537
+ s = platform::ACSpecsets.new
538
+ s.filename = f
539
+ ac_specset_sheets[f] = s
540
+ end
541
+
542
+ # Returns the current DC specset sheet (as defined by the current value of
543
+ # dc_specsets_filename).
544
+ #
545
+ # Pass in a filename argument to have a specific sheet returned instead.
546
+ #
547
+ # If the sheet does not exist yet it will be created.
548
+ def dc_specsets(filename = dc_specsets_filename)
549
+ f = filename.to_sym
550
+ return dc_specset_sheets[f] if dc_specset_sheets[f]
551
+ s = platform::DCSpecsets.new
552
+ s.filename = f
553
+ dc_specset_sheets[f] = s
554
+ end
555
+
556
+ # Returns the current global spec sheet (as defined by the current value of
557
+ # global_specs_filename).
558
+ #
559
+ # Pass in a filename argument to have a specific sheet returned instead.
560
+ #
561
+ # If the sheet does not exist yet it will be created.
562
+ def global_specs(filename = global_specs_filename)
563
+ f = filename.to_sym
564
+ return global_spec_sheets[f] if global_spec_sheets[f]
565
+ s = platform::GlobalSpecs.new
566
+ s.filename = f
567
+ global_spec_sheets[f] = s
568
+ end
569
+
570
+ # Returns the current job sheet (as defined by the current value of
571
+ # jobs_filename).
572
+ #
573
+ # Pass in a filename argument to have a specific sheet returned instead.
574
+ #
575
+ # If the sheet does not exist yet it will be created.
576
+ def program_jobs(filename = jobs_filename)
577
+ f = filename.to_sym
578
+ return job_sheets[f] if job_sheets[f]
579
+ j = platform::Jobs.new
580
+ j.filename = f
581
+ job_sheets[f] = j
582
+ end
583
+
584
+ # Returns the current reference sheet (as defined by the current value of
585
+ # references_filename).
586
+ #
587
+ # Pass in a filename argument to have a specific sheet returned instead.
588
+ #
589
+ # If the sheet does not exist yet it will be created.
590
+ def references(filename = references_filename)
591
+ f = filename.to_sym
592
+ return reference_sheets[f] if reference_sheets[f]
593
+ r = platform::References.new
594
+ r.filename = f
595
+ reference_sheets[f] = r
596
+ end
597
+
598
+ private
599
+
600
+ # Custom test instance libraries
601
+ def custom_tils
602
+ @custom_tils ||= {}
603
+ end
604
+ end
605
+ end
606
+ end
607
+ end