origen_testers 0.52.15 → 0.54.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/config/version.rb +2 -2
  3. data/lib/commands/build.rb +2 -2
  4. data/lib/commands/convert.rb +1 -1
  5. data/lib/commands/run.rb +2 -2
  6. data/lib/origen_testers/api.rb +3 -0
  7. data/lib/origen_testers/atp/ast/node.rb +1 -2
  8. data/lib/origen_testers/atp/flow.rb +36 -24
  9. data/lib/origen_testers/atp/flow_api.rb +1 -0
  10. data/lib/origen_testers/atp/parser.rb +6 -4
  11. data/lib/origen_testers/atp/processor.rb +1 -0
  12. data/lib/origen_testers/atp/processors/on_pass_fail_remover.rb +1 -0
  13. data/lib/origen_testers/atp/processors/relationship.rb +2 -4
  14. data/lib/origen_testers/atp/runner.rb +1 -0
  15. data/lib/origen_testers/callback_handlers.rb +1 -0
  16. data/lib/origen_testers/charz/profile.rb +7 -7
  17. data/lib/origen_testers/charz/routines/search_routine.rb +1 -0
  18. data/lib/origen_testers/charz/session.rb +1 -1
  19. data/lib/origen_testers/charz.rb +14 -10
  20. data/lib/origen_testers/command_based_tester.rb +1 -2
  21. data/lib/origen_testers/decompiler/nodes.rb +1 -1
  22. data/lib/origen_testers/decompiler/pattern/enumerable_ext.rb +1 -1
  23. data/lib/origen_testers/decompiler/pattern/splitter.rb +0 -2
  24. data/lib/origen_testers/decompiler/pattern.rb +2 -1
  25. data/lib/origen_testers/flow.rb +25 -24
  26. data/lib/origen_testers/generator/identity_map.rb +1 -1
  27. data/lib/origen_testers/generator/test_numberer.rb +1 -3
  28. data/lib/origen_testers/generator.rb +4 -2
  29. data/lib/origen_testers/igxl_based_tester/base/ac_specsets.rb +1 -1
  30. data/lib/origen_testers/igxl_based_tester/base/custom_test_instance.rb +1 -1
  31. data/lib/origen_testers/igxl_based_tester/base/dc_specsets.rb +1 -1
  32. data/lib/origen_testers/igxl_based_tester/base/edgesets.rb +1 -1
  33. data/lib/origen_testers/igxl_based_tester/base/flow_line.rb +11 -17
  34. data/lib/origen_testers/igxl_based_tester/base/generator.rb +17 -2
  35. data/lib/origen_testers/igxl_based_tester/base/global_specs.rb +1 -1
  36. data/lib/origen_testers/igxl_based_tester/base/job.rb +16 -16
  37. data/lib/origen_testers/igxl_based_tester/base/level_io_se.rb +2 -2
  38. data/lib/origen_testers/igxl_based_tester/base/levelset.rb +2 -5
  39. data/lib/origen_testers/igxl_based_tester/base/patgroup.rb +1 -3
  40. data/lib/origen_testers/igxl_based_tester/base/patset.rb +0 -1
  41. data/lib/origen_testers/igxl_based_tester/base/patsubr.rb +0 -1
  42. data/lib/origen_testers/igxl_based_tester/base/test_instance.rb +13 -14
  43. data/lib/origen_testers/igxl_based_tester/base/test_instance_group.rb +2 -2
  44. data/lib/origen_testers/igxl_based_tester/base/timesets.rb +1 -1
  45. data/lib/origen_testers/igxl_based_tester/base/timesets_basic.rb +1 -1
  46. data/lib/origen_testers/igxl_based_tester/base.rb +16 -19
  47. data/lib/origen_testers/igxl_based_tester/decompiler/atp.rb +12 -20
  48. data/lib/origen_testers/igxl_based_tester/j750/flow_line.rb +1 -2
  49. data/lib/origen_testers/igxl_based_tester/j750/patset_pattern.rb +1 -2
  50. data/lib/origen_testers/igxl_based_tester/j750/patsubr_pattern.rb +1 -2
  51. data/lib/origen_testers/igxl_based_tester/j750/test_instance.rb +7 -8
  52. data/lib/origen_testers/igxl_based_tester/j750.rb +3 -2
  53. data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instance.rb +5 -6
  54. data/lib/origen_testers/igxl_based_tester/j750_hpt.rb +1 -1
  55. data/lib/origen_testers/igxl_based_tester/parser/descriptions.rb +18 -20
  56. data/lib/origen_testers/igxl_based_tester/parser/test_instance.rb +2 -2
  57. data/lib/origen_testers/igxl_based_tester/parser.rb +12 -12
  58. data/lib/origen_testers/igxl_based_tester/ultraflex/ate_hardware.rb +55 -55
  59. data/lib/origen_testers/igxl_based_tester/ultraflex/flow_line.rb +1 -2
  60. data/lib/origen_testers/igxl_based_tester/ultraflex/patsubr_pattern.rb +1 -2
  61. data/lib/origen_testers/igxl_based_tester/ultraflex/test_instance.rb +9 -10
  62. data/lib/origen_testers/igxl_based_tester/ultraflex.rb +12 -14
  63. data/lib/origen_testers/igxl_based_tester.rb +1 -1
  64. data/lib/origen_testers/interface.rb +8 -8
  65. data/lib/origen_testers/labview_based_tester/pxie6570.rb +2 -0
  66. data/lib/origen_testers/labview_based_tester.rb +2 -2
  67. data/lib/origen_testers/origen_ext/pins/pin.rb +6 -5
  68. data/lib/origen_testers/origen_ext/pins/pin_collection.rb +6 -6
  69. data/lib/origen_testers/parser/searchable_array.rb +2 -2
  70. data/lib/origen_testers/parser/searchable_hash.rb +2 -2
  71. data/lib/origen_testers/parser.rb +1 -1
  72. data/lib/origen_testers/pattern_compilers/assembler.rb +3 -1
  73. data/lib/origen_testers/pattern_compilers/base.rb +5 -4
  74. data/lib/origen_testers/pattern_compilers/igxl_based.rb +9 -3
  75. data/lib/origen_testers/pattern_compilers/j750.rb +4 -3
  76. data/lib/origen_testers/pattern_compilers/ultraflex.rb +4 -3
  77. data/lib/origen_testers/pattern_compilers/v93k.rb +28 -31
  78. data/lib/origen_testers/pattern_compilers.rb +1 -0
  79. data/lib/origen_testers/program_generators.rb +6 -0
  80. data/lib/origen_testers/smartest_based_tester/base/flow.rb +37 -26
  81. data/lib/origen_testers/smartest_based_tester/base/generator.rb +2 -0
  82. data/lib/origen_testers/smartest_based_tester/base/limits_file.rb +2 -2
  83. data/lib/origen_testers/smartest_based_tester/base/pattern_master.rb +3 -3
  84. data/lib/origen_testers/smartest_based_tester/base/processors/extract_flow_vars.rb +1 -1
  85. data/lib/origen_testers/smartest_based_tester/base/test_method.rb +62 -25
  86. data/lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb +18 -4
  87. data/lib/origen_testers/smartest_based_tester/base/test_methods/dc_tml.rb +1 -1
  88. data/lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb +1 -1
  89. data/lib/origen_testers/smartest_based_tester/base/variables_file.rb +1 -1
  90. data/lib/origen_testers/smartest_based_tester/base.rb +11 -13
  91. data/lib/origen_testers/smartest_based_tester/decompiler/avc.rb +5 -10
  92. data/lib/origen_testers/smartest_based_tester/decompiler/nodes.rb +1 -1
  93. data/lib/origen_testers/smartest_based_tester/decompiler.rb +1 -0
  94. data/lib/origen_testers/smartest_based_tester/smt8.rb +5 -6
  95. data/lib/origen_testers/smartest_based_tester/v93k/test_suite.rb +1 -2
  96. data/lib/origen_testers/smartest_based_tester/v93k.rb +1 -1
  97. data/lib/origen_testers/smartest_based_tester/v93k_smt8/shmoo_test.rb +3 -2
  98. data/lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb +30 -26
  99. data/lib/origen_testers/smartest_based_tester/v93k_smt8.rb +1 -1
  100. data/lib/origen_testers/stil_based_tester/base.rb +6 -7
  101. data/lib/origen_testers/test/custom_test_interface.rb +7 -7
  102. data/lib/origen_testers/test/dut.rb +23 -22
  103. data/lib/origen_testers/test/interface.rb +9 -7
  104. data/lib/origen_testers/test/nvm.rb +3 -3
  105. data/lib/origen_testers/timing/timeset.rb +0 -2
  106. data/lib/origen_testers/timing/timing_api.rb +2 -3
  107. data/lib/origen_testers/vector.rb +6 -5
  108. data/lib/origen_testers/vector_generator.rb +9 -3
  109. data/lib/origen_testers.rb +1 -1
  110. metadata +6 -18
@@ -23,8 +23,7 @@ module OrigenTesters
23
23
  timeset: :time_sets,
24
24
  timesets: :time_sets,
25
25
 
26
- other: {
27
- },
26
+ other: {},
28
27
 
29
28
  empty: {
30
29
  arg_list: :arg0,
@@ -310,7 +309,7 @@ module OrigenTesters
310
309
  wait_flag1: -2, # waitoff
311
310
  wait_flag2: -2, # waitoff
312
311
  wait_flag3: -2, # waitoff
313
- wait_flag4: -2, # waitoff
312
+ wait_flag4: -2 # waitoff
314
313
  },
315
314
  dcvi_powersupply: {
316
315
  arg_list: 'PreconditionPat,StartOfBodyF,PrePatF,PreTestF,PostTestF,PostPatF,EndOfBodyF,HoldStatePat,DriveLoPins,DriveHiPins,DriveZPins,FloatPins,SamplingTime,SampleSize,SettlingTime,MainVoltage,AltVoltage,PowerPins,DisablePins,VoltageOutput,PcpStartLabel,PcpStopLabel,StartOfBodyFArgs,PrePatFArgs,PreTestFArgs,PostTestFArgs,PostPatFArgs,EndOfBodyFArgs,HspStartLabel,HspStopLabel,PcpCheckPatGen,CurrentClamp,HspCheckPatGen,HspResumePat,RelayMode,Util1Pins,Util0Pins,TestControl,SerializeMeas,MeasF,MeasFArgs,WaitFlagA,WaitFlagB,WaitFlagC,WaitFlagD,Validating_,Irange,PatternTimeout,PcpDisableAlarm,HspDisableAlarm',
@@ -320,7 +319,7 @@ module OrigenTesters
320
319
  wait_flag1: -2, # waitoff
321
320
  wait_flag2: -2, # waitoff
322
321
  wait_flag3: -2, # waitoff
323
- wait_flag4: -2, # waitoff
322
+ wait_flag4: -2 # waitoff
324
323
  }
325
324
 
326
325
  }
@@ -335,10 +334,10 @@ module OrigenTesters
335
334
  # assumes clr flag means to set it off (waitoff = -2)
336
335
  # does not yet support waitlo = 0
337
336
  def set_wait_flags(*flags)
338
- a = (flags.include?(:a) || flags.include?(:a)) ? '-1' : '-2'
339
- b = (flags.include?(:b) || flags.include?(:b)) ? '-1' : '-2'
340
- c = (flags.include?(:c) || flags.include?(:c)) ? '-1' : '-2'
341
- d = (flags.include?(:d) || flags.include?(:d)) ? '-1' : '-2'
337
+ a = (flags.include?(:a) || flags.include?(:a)) ? '-1' : '-2' # rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
338
+ b = (flags.include?(:b) || flags.include?(:b)) ? '-1' : '-2' # rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
339
+ c = (flags.include?(:c) || flags.include?(:c)) ? '-1' : '-2' # rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
340
+ d = (flags.include?(:d) || flags.include?(:d)) ? '-1' : '-2' # rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
342
341
  self.wait_flag1 = a
343
342
  self.wait_flag2 = b
344
343
  self.wait_flag3 = c
@@ -356,9 +355,9 @@ module OrigenTesters
356
355
  # intended to be used in documentation
357
356
  def to_meta
358
357
  return @meta if @meta
358
+
359
359
  m = { 'Test' => name,
360
- 'Type' => type
361
- }
360
+ 'Type' => type }
362
361
  if type == :functional
363
362
  m['Pattern'] = pattern
364
363
  elsif type == :board_pmu || type == :pin_pmu
@@ -2,7 +2,7 @@ require 'origen_testers/igxl_based_tester/ultraflex/ate_hardware'
2
2
  module OrigenTesters
3
3
  module IGXLBasedTester
4
4
  class UltraFLEX < Base
5
- autoload :Generator, 'origen_testers/igxl_based_tester/ultraflex/generator.rb'
5
+ autoload :Generator, 'origen_testers/igxl_based_tester/ultraflex/generator.rb'
6
6
 
7
7
  # Read or update the digital instrument
8
8
  # Ex: tester.digital_instrument = 'hsdmq'
@@ -65,8 +65,7 @@ module OrigenTesters
65
65
  # $tester.freq_count($top.pin(:d_out)) # Freq measure on pin "d_out"
66
66
  # $tester.freq_count($top.pin(:d_out):readcode => 10)
67
67
  def freq_count(pin, options = {})
68
- options = { readcode: false
69
- }.merge(options)
68
+ options = { readcode: false }.merge(options)
70
69
 
71
70
  set_code(options[:readcode]) if options[:readcode]
72
71
  cycle(microcode: "#{@microcode[:set_flag]} (#{@flags[0]})") # set cpuA
@@ -191,24 +190,22 @@ module OrigenTesters
191
190
  #
192
191
  def set_code(*code)
193
192
  options = code.last.is_a?(Hash) ? code.pop : {}
194
- options = { counter: 'c15'
195
- }.merge(options)
193
+ options = { counter: 'c15' }.merge(options)
196
194
  cc " Using counter #{options[:counter]} as set_code replacement - value set to #{code[0]} + 1"
197
195
  unless @set_msb_issued
198
196
  set_msb(1)
199
197
  cycle # set_msb doesn't issue a cycle
200
198
  end
201
- cycle(microcode: "set #{options[:counter]} #{code[0].next}") #+1 here to align with VBT
199
+ cycle(microcode: "set #{options[:counter]} #{code[0].next}") # +1 here to align with VBT
202
200
  end
203
201
 
204
202
  def set_code_no_msb(*code)
205
203
  options = code.last.is_a?(Hash) ? code.pop : {}
206
- options = { counter: 'c15'
207
- }.merge(options)
204
+ options = { counter: 'c15' }.merge(options)
208
205
  unless @set_msb_issued
209
206
  cycle # set_msb doesn't issue a cycle
210
207
  end
211
- cycle(microcode: "set #{options[:counter]} #{code[0].next}") #+1 here to align with VBT
208
+ cycle(microcode: "set #{options[:counter]} #{code[0].next}") # +1 here to align with VBT
212
209
  end
213
210
 
214
211
  def loop_vectors(name, number_of_loops, global = false, label_first = false)
@@ -372,8 +369,7 @@ module OrigenTesters
372
369
  super(options.merge(digital_inst: @digital_instrument,
373
370
  memory_test: false,
374
371
  high_voltage: false,
375
- svm_only: false
376
- )) do |pin_list|
372
+ svm_only: false)) do |pin_list|
377
373
  # if subroutine pattern has only single-module subroutines then skip module start
378
374
  # (will be taken care of elsewhere)
379
375
  unless options[:subroutine_pat] && @onemodsubs_found && !@nonmodsubs_found
@@ -419,6 +415,7 @@ module OrigenTesters
419
415
  # must be done BEFORE any subroutines that need their own module definition!
420
416
  fail "ERROR: Cannot implement any common module subroutines (#{name}) after implementing any single-module subroutines in the same pattern!"
421
417
  end
418
+
422
419
  @nonmodsubs_found = true
423
420
  end
424
421
  super(name, options)
@@ -632,7 +629,7 @@ module OrigenTesters
632
629
  def handshake(options = {})
633
630
  options = {
634
631
  readcode: false,
635
- manual_stop: false, # set a 2nd CPU flag in case 1st flag is automatically cleared
632
+ manual_stop: false # set a 2nd CPU flag in case 1st flag is automatically cleared
636
633
  }.merge(options)
637
634
  if options[:readcode]
638
635
  set_code(options[:readcode])
@@ -685,10 +682,10 @@ module OrigenTesters
685
682
  # $tester.store(:offset => -2) # Just realized I need to capture that earlier vector
686
683
  def store(*pins)
687
684
  return if @inhibit_vectors
685
+
688
686
  options = pins.last.is_a?(Hash) ? pins.pop : {}
689
687
  options = { offset: 0,
690
- opcode: 'stv'
691
- }.merge(options)
688
+ opcode: 'stv' }.merge(options)
692
689
  pins = pins.flatten.compact
693
690
  if pins.empty?
694
691
  fail 'For the UltraFLEX you must supply the pins to store/capture'
@@ -750,6 +747,7 @@ module OrigenTesters
750
747
  # $tester.cycle # This is the vector that will be captured
751
748
  def store_next_cycle(*pins)
752
749
  return if @inhibit_vectors
750
+
753
751
  options = pins.last.is_a?(Hash) ? pins.pop : {}
754
752
  options = {
755
753
  opcode: 'stv'
@@ -5,7 +5,7 @@ module OrigenTesters
5
5
  autoload :J750_HPT, 'origen_testers/igxl_based_tester/j750_hpt.rb'
6
6
  autoload :UltraFLEX, 'origen_testers/igxl_based_tester/ultraflex.rb'
7
7
 
8
- require 'origen_testers/igxl_based_tester/base.rb'
8
+ require 'origen_testers/igxl_based_tester/base'
9
9
  require 'origen_testers/igxl_based_tester/decompiler'
10
10
  end
11
11
  # Convenience/Legacy names without the IGXLBasedTester namespace
@@ -119,6 +119,7 @@ module OrigenTesters
119
119
  # tester-level by the target.
120
120
  def add_flow_enable=(value)
121
121
  return unless flow.respond_to?(:add_flow_enable=)
122
+
122
123
  if value
123
124
  if value == :enable || value == :enabled
124
125
  flow.add_flow_enable = :enabled
@@ -151,17 +152,16 @@ module OrigenTesters
151
152
  # Compile a template file
152
153
  def compile(file, options = {})
153
154
  return unless write?
155
+
154
156
  # Any options passed in from an interface will be passed to the compiler and to
155
157
  # the templates being compiled
156
158
  options[:initial_options] = options
157
159
  Origen.file_handler.preserve_state do
158
- begin
159
- file = Origen.file_handler.clean_path_to_template(file)
160
- Origen.generator.compile_file_or_directory(file, options)
161
- rescue
162
- file = Origen.file_handler.clean_path_to(file)
163
- Origen.generator.compile_file_or_directory(file, options)
164
- end
160
+ file = Origen.file_handler.clean_path_to_template(file)
161
+ Origen.generator.compile_file_or_directory(file, options)
162
+ rescue
163
+ file = Origen.file_handler.clean_path_to(file)
164
+ Origen.generator.compile_file_or_directory(file, options)
165
165
  end
166
166
  end
167
167
 
@@ -189,7 +189,7 @@ module OrigenTesters
189
189
  sheet_generators.each do |generator|
190
190
  generator.finalize(options)
191
191
  end
192
- sheet_generators.each do |generator|
192
+ sheet_generators.each do |generator| # rubocop:disable Style/CombinableLoops
193
193
  generator.write_to_file(options) if generator.to_be_written?
194
194
  end
195
195
  clean_referenced_patterns
@@ -101,6 +101,7 @@ module OrigenTesters
101
101
  pins = pins.flatten.compact
102
102
 
103
103
  fail 'For the PXIE6570 you must supply the pins to store/capture' if pins.empty?
104
+
104
105
  add_capture_start pins, options
105
106
 
106
107
  pins.each do |pin|
@@ -191,6 +192,7 @@ module OrigenTesters
191
192
  repeat_count = options[:repeat].nil? ? 1 : options[:repeat]
192
193
 
193
194
  fail 'For the PXIE6570 you must supply the pins to store/capture' if pins.empty?
195
+
194
196
  add_capture_start pins, options
195
197
  @capture_history[:count] += repeat_count
196
198
 
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  module LabVIEWBasedTester
3
- autoload :Pxie6570, 'origen_testers/labview_based_tester/pxie6570.rb'
3
+ autoload :Pxie6570, 'origen_testers/labview_based_tester/pxie6570.rb'
4
4
  end
5
5
  # Shorter name without LabVIEWBasedTester namespace
6
- autoload :Pxie6570, 'origen_testers/labview_based_tester/pxie6570.rb'
6
+ autoload :Pxie6570, 'origen_testers/labview_based_tester/pxie6570.rb'
7
7
  end
@@ -13,7 +13,7 @@ module Origen
13
13
  site: 0 # Default is to use site 0.
14
14
  }.merge(options)
15
15
  unless $tester.channelmap[options[:chanmapname]]
16
- fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel"
16
+ fail 'You must first import the tester channel map (e.g. $tester.channelmap = "probe_x32") before calling pin.channel'
17
17
  end
18
18
 
19
19
  channelinfo = Struct.new(:channel, :chanmapname, :site)
@@ -31,10 +31,10 @@ module Origen
31
31
  }.merge(options)
32
32
 
33
33
  unless $tester.channelmap[options[:chanmapname]]
34
- fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel"
34
+ fail 'You must first import the tester channel map (e.g. $tester.channelmap = "probe_x32") before calling pin.channel'
35
35
  end
36
36
  unless $tester.testerconfig[options[:testerconfigname]]
37
- fail "You must first import the tester configuration (e.g. $tester.testerconfig = \"UflexConfigA\") before calling pin.instrument_type"
37
+ fail 'You must first import the tester configuration (e.g. $tester.testerconfig = "UflexConfigA") before calling pin.instrument_type'
38
38
  end
39
39
 
40
40
  instrumentinfo = Struct.new(:instrument, :chanmapname, :site, :testerconfigname)
@@ -52,11 +52,12 @@ module Origen
52
52
  }.merge(options)
53
53
 
54
54
  unless $tester.channelmap[options[:chanmapname]]
55
- fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel"
55
+ fail 'You must first import the tester channel map (e.g. $tester.channelmap = "probe_x32") before calling pin.channel'
56
56
  end
57
57
  unless $tester.testerconfig[options[:testerconfigname]]
58
- fail "You must first import the tester configuration (e.g. $tester.testerconfig = \"UflexConfigA\") before calling pin.instrument_type"
58
+ fail 'You must first import the tester configuration (e.g. $tester.testerconfig = "UflexConfigA") before calling pin.instrument_type'
59
59
  end
60
+
60
61
  if Origen.top_level.power_pin_groups.keys.include?(name) # Power Pin Groups do not need :ppmu, but need :supply
61
62
  instrumentinfo = Struct.new(:channel, :instrument, :chanmapname, :site, :testerconfigname, :supply)
62
63
  @channel = $tester.get_tester_channel(options[:chanmapname], name, options[:site])
@@ -13,7 +13,7 @@ module Origen
13
13
  site: 0 # Default is to use site 0.
14
14
  }.merge(options)
15
15
  unless $tester.channelmap[options[:chanmapname]]
16
- fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel"
16
+ fail 'You must first import the tester channel map (e.g. $tester.channelmap = "probe_x32") before calling pin.channel'
17
17
  end
18
18
 
19
19
  channelinfo = Struct.new(:channel, :chanmapname, :site)
@@ -31,10 +31,10 @@ module Origen
31
31
  }.merge(options)
32
32
 
33
33
  unless $tester.channelmap[options[:chanmapname]]
34
- fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel"
34
+ fail 'You must first import the tester channel map (e.g. $tester.channelmap = "probe_x32") before calling pin.channel'
35
35
  end
36
36
  unless $tester.testerconfig[options[:testerconfigname]]
37
- fail "You must first import the tester configuration (e.g. $tester.testerconfig = \"UflexConfigA\") before calling pin.instrument_type"
37
+ fail 'You must first import the tester configuration (e.g. $tester.testerconfig = "UflexConfigA") before calling pin.instrument_type'
38
38
  end
39
39
 
40
40
  instrumentinfo = Struct.new(:instrument, :chanmapname, :site, :testerconfigname)
@@ -52,10 +52,10 @@ module Origen
52
52
  }.merge(options)
53
53
 
54
54
  unless $tester.channelmap[options[:chanmapname]]
55
- fail "You must first import the tester channel map (e.g. $tester.channelmap = \"probe_x32\") before calling pin.channel"
55
+ fail 'You must first import the tester channel map (e.g. $tester.channelmap = "probe_x32") before calling pin.channel'
56
56
  end
57
57
  unless $tester.testerconfig[options[:testerconfigname]]
58
- fail "You must first import the tester configuration (e.g. $tester.testerconfig = \"UflexConfigA\") before calling pin.instrument_type"
58
+ fail 'You must first import the tester configuration (e.g. $tester.testerconfig = "UflexConfigA") before calling pin.instrument_type'
59
59
  end
60
60
 
61
61
  if Origen.top_level.power_pin_groups.keys.include?(name) # Power Pin Groups do not need :ppmu, but need :supply
@@ -65,7 +65,7 @@ module Origen
65
65
  @supply = $tester.ate_hardware(@instrument).supply
66
66
  instrumentinfo.new(@channel, @instrument, options[:chanmapname], options[:site], options[:testerconfigname], @supply)
67
67
  else # Collecting information of individual members and put in arrays
68
- instrumentinfo = Struct.new(:members, :channel, :instrument, :chanmapname, :site, :testerconfigname, :ppmu)
68
+ instrumentinfo = Struct.new(:members, :channel, :instrument, :chanmapname, :site, :testerconfigname, :ppmu) # rubocop:disable Lint/StructNewOverride
69
69
  @members = []
70
70
  @channel = []
71
71
  @instrument = []
@@ -10,13 +10,13 @@ module Tester
10
10
  if exact
11
11
  val.any? { |v| item.send(attr).to_s == v.to_s }
12
12
  else
13
- val.any? { |v| item.send(attr).to_s =~ /#{v.to_s}/ }
13
+ val.any? { |v| item.send(attr).to_s =~ /#{v}/ }
14
14
  end
15
15
  else
16
16
  if exact
17
17
  item.send(attr).to_s == val.to_s
18
18
  else
19
- item.send(attr).to_s =~ /#{val.to_s}/
19
+ item.send(attr).to_s =~ /#{val}/
20
20
  end
21
21
  end
22
22
  end
@@ -10,13 +10,13 @@ module OrigenTesters
10
10
  if exact
11
11
  val.any? { |v| item.send(attr).to_s == v.to_s }
12
12
  else
13
- val.any? { |v| item.send(attr).to_s =~ /#{v.to_s}/ }
13
+ val.any? { |v| item.send(attr).to_s =~ /#{v}/ }
14
14
  end
15
15
  else
16
16
  if exact
17
17
  item.send(attr).to_s == val.to_s
18
18
  else
19
- item.send(attr).to_s =~ /#{val.to_s}/
19
+ item.send(attr).to_s =~ /#{val}/
20
20
  end
21
21
  end
22
22
  end
@@ -2,7 +2,7 @@ module OrigenTesters
2
2
  module Parser
3
3
  autoload :SearchableArray, 'origen_testers/parser/searchable_array'
4
4
  autoload :SearchableHash, 'origen_testers/parser/searchable_hash'
5
- autoload :DescriptionLookup, 'origen_testers/parser/description_lookup'
5
+ autoload :DescriptionLookup, 'origen_testers/parser/description_lookup'
6
6
 
7
7
  def parse(*args, &block)
8
8
  parser.parse(*args, &block)
@@ -36,12 +36,14 @@ module OrigenTesters
36
36
  line.strip!
37
37
  # Skip a blank line
38
38
  next if line.match(/^\s+$/)
39
+
39
40
  # Check if the pattern or list exists
40
41
  line_path = Pathname.new("#{dir}/#{line}")
41
42
  unless line_path.file?
42
43
  # puts "Skipping #{line_path.to_s} at line ##{line_number} in file #{path.to_s} because it is not a file"
43
44
  next
44
45
  end
46
+
45
47
  # Process the file
46
48
  process_file(line_path, files)
47
49
  end
@@ -58,7 +60,7 @@ module OrigenTesters
58
60
  files << file unless files.include?(file)
59
61
  when 'list'
60
62
  parse_list(file, files)
61
- end
63
+ end
62
64
  end
63
65
 
64
66
  # Processes a diretcory looking for files in '.' or recursively
@@ -24,7 +24,7 @@ module OrigenTesters
24
24
  path: nil, # required: will be passed in or parsed from a .list file
25
25
  reference_directory: nil, # optional: will be set to @path or Origen.app.config.pattern_output_directory
26
26
  target: nil, # optional: allows user to temporarily set target and run compilation
27
- recursive: false, # optional: controls whether to look for patterns in a directory recursively
27
+ recursive: false # optional: controls whether to look for patterns in a directory recursively
28
28
  }
29
29
 
30
30
  @job_options = {
@@ -32,7 +32,7 @@ module OrigenTesters
32
32
  location: :local, # optional: controls whether the commands go to the LSF or run locally
33
33
  clean: false, # optional: controls whether compiler log files are deleted after compilation
34
34
  output_directory: nil, # optional:
35
- verbose: false, # optional: controls whether the compiler output gets put to STDOUT
35
+ verbose: false # optional: controls whether the compiler output gets put to STDOUT
36
36
  }
37
37
  @compiler_options = {}
38
38
  @compiler_options_with_args = {}
@@ -58,7 +58,7 @@ module OrigenTesters
58
58
  end
59
59
 
60
60
  # Allow users to search for a pattern in the job queue or default to return all jobs
61
- def jobs(search = nil)
61
+ def jobs(search = nil) # rubocop:disable Lint/DuplicateMethods
62
62
  found = false
63
63
  if search.nil?
64
64
  inspect_jobs
@@ -143,6 +143,7 @@ module OrigenTesters
143
143
  req = 'true '
144
144
  else
145
145
  next if v.nil? || v == false
146
+
146
147
  req = 'false'
147
148
  end
148
149
  desc << "| #{k}".ljust(22) + "| #{v}".ljust(argument_padding) + "| #{req} |"
@@ -255,7 +256,7 @@ module OrigenTesters
255
256
  end
256
257
 
257
258
  def empty_msg
258
- puts "No compiler jobs created, check the compiler options\n" if self.empty?
259
+ puts "No compiler jobs created, check the compiler options\n" if empty?
259
260
  end
260
261
 
261
262
  def convert_to_pathname(opt)
@@ -10,7 +10,7 @@ module OrigenTesters
10
10
  @user_options = {}.merge(@user_options)
11
11
 
12
12
  @job_options = {
13
- pinmap_workbook: dut.pinmap, # required: will default to $dut.pinmap
13
+ pinmap_workbook: dut.pinmap # required: will default to $dut.pinmap
14
14
  }.merge(@job_options)
15
15
 
16
16
  # These are compiler options that are common to both the UltraFLEX and J750 compilers
@@ -22,7 +22,7 @@ module OrigenTesters
22
22
  import_all_undefineds: false, # automatically import all undefined symbols. the key is mis-spelled but correct!
23
23
  suppress_log: false, # disables output to main log file
24
24
  template: false, # generate setup template
25
- timestamp: false, # enable log timestamp
25
+ timestamp: false # enable log timestamp
26
26
  }.merge(@compiler_options)
27
27
 
28
28
  # These are compiler options that are common to both the UltraFLEX and J750 compilers
@@ -34,7 +34,7 @@ module OrigenTesters
34
34
  output: nil, # Name of output file
35
35
  pinmap_sheet: nil, # Name of workbook containing pinmap
36
36
  # pinmap_workbook: nil, # Name of sheet in workbook which contains pinmap (moved to @job_options)
37
- setup: nil, # path to setup file
37
+ setup: nil # path to setup file
38
38
  }.merge(@compiler_options_with_args)
39
39
  end
40
40
 
@@ -68,6 +68,7 @@ module OrigenTesters
68
68
  end
69
69
  @jobs.each do |job|
70
70
  fail "Error: compiler #{job.id} not ready for pattern #{job.name}" unless job.ready?
71
+
71
72
  if job.location == :lsf
72
73
  Origen.app.lsf.submit(ATPC_SETUP + '; ' + job.cmd)
73
74
  else
@@ -87,6 +88,7 @@ module OrigenTesters
87
88
  else
88
89
  list = convert_to_pathname(list)
89
90
  fail "Error: pattern list #{list} does not exist, exiting..." unless list.file?
91
+
90
92
  File.open(list, 'r') do |file|
91
93
  while (line = file.gets)
92
94
  current_job_options = @job_options.merge(@compiler_options_with_args)
@@ -132,8 +134,10 @@ module OrigenTesters
132
134
  # Handles singles files (.atp, .atp.gz, or .list) and directories (recursively or flat)
133
135
  def find_jobs(path = @path)
134
136
  fail 'Pattern path is set to nil, pass in a valid file (.atp or .atp.gz) or a valid directory' if path.nil?
137
+
135
138
  @path = Pathname.new(path)
136
139
  fail 'Pattern path does not exist, pass in a valid file (.atp or .atp.gz) or a valid directory' unless @path.exist?
140
+
137
141
  @path = @path.expand_path
138
142
  # Set the reference directory for pattern sub-dir mirroring
139
143
  set_reference_directory
@@ -228,6 +232,7 @@ module OrigenTesters
228
232
  # Output the compiler jobs in the queue to the console
229
233
  def inspect_jobs(index = nil)
230
234
  return empty_msg if empty?
235
+
231
236
  desc = []
232
237
  puts "\n"
233
238
  @jobs.each_with_index do |j, i|
@@ -290,6 +295,7 @@ module OrigenTesters
290
295
  end
291
296
  puts desc.flatten.join("\n")
292
297
  end
298
+
293
299
  # For future checks on incorrect or incompatible arguments to compiler options
294
300
  def options_ok?
295
301
  end
@@ -40,7 +40,7 @@ module OrigenTesters
40
40
 
41
41
  @job_options = {
42
42
  tester: :j750,
43
- compiler: self.class.compiler, # required
43
+ compiler: self.class.compiler # required
44
44
  }.merge(@job_options)
45
45
 
46
46
  # These are compiler options that are specific to J750 compiler (builds on options from IGXL-Based)
@@ -50,7 +50,7 @@ module OrigenTesters
50
50
  extended: false, # Compiles the pattern for extended mode.
51
51
  scan_parallel: false, # Expands scan vectors into parallel SVM/LVM vectors.
52
52
  svm_only: false, # Compile all vectors in the file for SVM.
53
- svm_subr_only: false, # Only SVM subroutines in file being used.
53
+ svm_subr_only: false # Only SVM subroutines in file being used.
54
54
  }.merge(@compiler_options)
55
55
 
56
56
  # These are compiler options that are specific to J750 compiler (builds on options from IGXL-Based)
@@ -58,7 +58,7 @@ module OrigenTesters
58
58
  i: nil, # Includes paths to be passed to C++ preprocessor.
59
59
  lvm_size: nil, # Number of LVM vectors to allow in a single pattern.
60
60
  max_errors: nil, # Number of errors that will cause compilation of the pattern file to be aborted.
61
- min_period: nil, # Minimum period, in seconds, that will be used during a pattern burst.
61
+ min_period: nil # Minimum period, in seconds, that will be used during a pattern burst.
62
62
  }.merge(@compiler_options_with_args)
63
63
 
64
64
  update_common_options(options) # Update common options with default (see BasePatternCompiler)
@@ -69,6 +69,7 @@ module OrigenTesters
69
69
  # Executes the compiler for each job in the queue
70
70
  def run(list = nil, options = {})
71
71
  fail "Error: the tester #{Origen.tester} is not an J750 tester,exiting..." unless is_j750?
72
+
72
73
  msg = "Error: application #{Origen.app.name} is running on Windows, "
73
74
  msg += 'to run the pattern compiler you must be on a Linux machine'
74
75
  fail msg if Origen.running_on_windows?
@@ -40,7 +40,7 @@ module OrigenTesters
40
40
 
41
41
  @job_options = {
42
42
  tester: :ultraflex,
43
- compiler: self.class.compiler, # required
43
+ compiler: self.class.compiler # required
44
44
  }.merge(@job_options)
45
45
 
46
46
  # These are compiler options that are specific to UltraFLEX (builds on options from IGXL-Based)
@@ -49,7 +49,7 @@ module OrigenTesters
49
49
  lock: false, # prevents pattern from being reverse compiled or opened in PatternTool
50
50
  multiinst: false, # indicates more than one instrument is connected to a single pin
51
51
  nocompress: false, # do not compress pattern data blocks
52
- stdin: false, # Compile data from standard input. Do not use -cpp or specify any pattern file(s) when using this option.
52
+ stdin: false # Compile data from standard input. Do not use -cpp or specify any pattern file(s) when using this option.
53
53
  }.merge(@compiler_options)
54
54
 
55
55
  # These are compiler options that are specific to UltraFLEX (builds on options from IGXL-Based)
@@ -70,7 +70,7 @@ module OrigenTesters
70
70
  allow_mixed_1x2x: nil, # Turns on/off the support of mixed 1x/2x pin groups. Default value is "no".
71
71
  allow_differential: nil, # Turns on/off support for differential pins. Default value is "yes".
72
72
  allow_scan_in_srm: nil, # Allow/disallow scan vectors in SRM pattern modules. Default value is "no".
73
- vm_block_size: nil, # Specifies uncompressed size in bytes of a pattern data block
73
+ vm_block_size: nil # Specifies uncompressed size in bytes of a pattern data block
74
74
  }.merge(@compiler_options_with_args)
75
75
 
76
76
  update_common_options(options) # Update common options with default (see BasePatternCompiler)
@@ -81,6 +81,7 @@ module OrigenTesters
81
81
  # Executes the compiler for each job in the queue
82
82
  def run(list = nil, options = {})
83
83
  fail "Error: the tester #{Origen.tester} is not an Ultrflex tester,exiting..." unless is_ultraflex?
84
+
84
85
  msg = "Error: application #{Origen.app.name} is running on Windows, "
85
86
  msg += 'to run the pattern compiler you must be on a Linux machine'
86
87
  fail msg if Origen.running_on_windows?