origen_testers 0.52.15 → 0.53.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.
- checksums.yaml +4 -4
- data/config/version.rb +2 -2
- data/lib/commands/build.rb +2 -2
- data/lib/commands/convert.rb +1 -1
- data/lib/commands/run.rb +2 -2
- data/lib/origen_testers/api.rb +3 -0
- data/lib/origen_testers/atp/ast/node.rb +1 -2
- data/lib/origen_testers/atp/flow.rb +36 -24
- data/lib/origen_testers/atp/flow_api.rb +1 -0
- data/lib/origen_testers/atp/parser.rb +6 -4
- data/lib/origen_testers/atp/processor.rb +1 -0
- data/lib/origen_testers/atp/processors/on_pass_fail_remover.rb +1 -0
- data/lib/origen_testers/atp/processors/relationship.rb +2 -4
- data/lib/origen_testers/atp/runner.rb +1 -0
- data/lib/origen_testers/callback_handlers.rb +1 -0
- data/lib/origen_testers/charz/profile.rb +7 -7
- data/lib/origen_testers/charz/routines/search_routine.rb +1 -0
- data/lib/origen_testers/charz/session.rb +1 -1
- data/lib/origen_testers/charz.rb +14 -10
- data/lib/origen_testers/command_based_tester.rb +1 -2
- data/lib/origen_testers/decompiler/nodes.rb +1 -1
- data/lib/origen_testers/decompiler/pattern/enumerable_ext.rb +1 -1
- data/lib/origen_testers/decompiler/pattern/splitter.rb +0 -2
- data/lib/origen_testers/decompiler/pattern.rb +2 -1
- data/lib/origen_testers/flow.rb +2 -3
- data/lib/origen_testers/generator/identity_map.rb +1 -1
- data/lib/origen_testers/generator/test_numberer.rb +1 -3
- data/lib/origen_testers/generator.rb +4 -2
- data/lib/origen_testers/igxl_based_tester/base/ac_specsets.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/custom_test_instance.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/dc_specsets.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/edgesets.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/flow_line.rb +11 -17
- data/lib/origen_testers/igxl_based_tester/base/generator.rb +17 -2
- data/lib/origen_testers/igxl_based_tester/base/global_specs.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/job.rb +16 -16
- data/lib/origen_testers/igxl_based_tester/base/level_io_se.rb +2 -2
- data/lib/origen_testers/igxl_based_tester/base/levelset.rb +2 -5
- data/lib/origen_testers/igxl_based_tester/base/patgroup.rb +1 -3
- data/lib/origen_testers/igxl_based_tester/base/patset.rb +0 -1
- data/lib/origen_testers/igxl_based_tester/base/patsubr.rb +0 -1
- data/lib/origen_testers/igxl_based_tester/base/test_instance.rb +13 -14
- data/lib/origen_testers/igxl_based_tester/base/test_instance_group.rb +2 -2
- data/lib/origen_testers/igxl_based_tester/base/timesets.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/timesets_basic.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base.rb +16 -19
- data/lib/origen_testers/igxl_based_tester/decompiler/atp.rb +12 -20
- data/lib/origen_testers/igxl_based_tester/j750/flow_line.rb +1 -2
- data/lib/origen_testers/igxl_based_tester/j750/patset_pattern.rb +1 -2
- data/lib/origen_testers/igxl_based_tester/j750/patsubr_pattern.rb +1 -2
- data/lib/origen_testers/igxl_based_tester/j750/test_instance.rb +7 -8
- data/lib/origen_testers/igxl_based_tester/j750.rb +3 -2
- data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instance.rb +5 -6
- data/lib/origen_testers/igxl_based_tester/j750_hpt.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/parser/descriptions.rb +18 -20
- data/lib/origen_testers/igxl_based_tester/parser/test_instance.rb +2 -2
- data/lib/origen_testers/igxl_based_tester/parser.rb +12 -12
- data/lib/origen_testers/igxl_based_tester/ultraflex/ate_hardware.rb +55 -55
- data/lib/origen_testers/igxl_based_tester/ultraflex/flow_line.rb +1 -2
- data/lib/origen_testers/igxl_based_tester/ultraflex/patsubr_pattern.rb +1 -2
- data/lib/origen_testers/igxl_based_tester/ultraflex/test_instance.rb +9 -10
- data/lib/origen_testers/igxl_based_tester/ultraflex.rb +12 -14
- data/lib/origen_testers/igxl_based_tester.rb +1 -1
- data/lib/origen_testers/interface.rb +8 -8
- data/lib/origen_testers/labview_based_tester/pxie6570.rb +2 -0
- data/lib/origen_testers/labview_based_tester.rb +2 -2
- data/lib/origen_testers/origen_ext/pins/pin.rb +6 -5
- data/lib/origen_testers/origen_ext/pins/pin_collection.rb +6 -6
- data/lib/origen_testers/parser/searchable_array.rb +2 -2
- data/lib/origen_testers/parser/searchable_hash.rb +2 -2
- data/lib/origen_testers/parser.rb +1 -1
- data/lib/origen_testers/pattern_compilers/assembler.rb +3 -1
- data/lib/origen_testers/pattern_compilers/base.rb +5 -4
- data/lib/origen_testers/pattern_compilers/igxl_based.rb +9 -3
- data/lib/origen_testers/pattern_compilers/j750.rb +4 -3
- data/lib/origen_testers/pattern_compilers/ultraflex.rb +4 -3
- data/lib/origen_testers/pattern_compilers/v93k.rb +28 -31
- data/lib/origen_testers/pattern_compilers.rb +1 -0
- data/lib/origen_testers/program_generators.rb +6 -0
- data/lib/origen_testers/smartest_based_tester/base/flow.rb +29 -26
- data/lib/origen_testers/smartest_based_tester/base/generator.rb +2 -0
- data/lib/origen_testers/smartest_based_tester/base/limits_file.rb +2 -2
- data/lib/origen_testers/smartest_based_tester/base/pattern_master.rb +3 -3
- data/lib/origen_testers/smartest_based_tester/base/processors/extract_flow_vars.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/base/test_method.rb +3 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods/dc_tml.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/base/variables_file.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/base.rb +11 -13
- data/lib/origen_testers/smartest_based_tester/decompiler/avc.rb +5 -10
- data/lib/origen_testers/smartest_based_tester/decompiler/nodes.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/decompiler.rb +1 -0
- data/lib/origen_testers/smartest_based_tester/smt8.rb +5 -6
- data/lib/origen_testers/smartest_based_tester/v93k/test_suite.rb +1 -2
- data/lib/origen_testers/smartest_based_tester/v93k.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/shmoo_test.rb +3 -2
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb +5 -4
- data/lib/origen_testers/smartest_based_tester/v93k_smt8.rb +1 -1
- data/lib/origen_testers/stil_based_tester/base.rb +6 -7
- data/lib/origen_testers/test/custom_test_interface.rb +7 -7
- data/lib/origen_testers/test/dut.rb +23 -22
- data/lib/origen_testers/test/interface.rb +9 -7
- data/lib/origen_testers/test/nvm.rb +3 -3
- data/lib/origen_testers/timing/timeset.rb +0 -2
- data/lib/origen_testers/timing/timing_api.rb +2 -3
- data/lib/origen_testers/vector.rb +6 -5
- data/lib/origen_testers/vector_generator.rb +9 -3
- data/lib/origen_testers.rb +1 -1
- metadata +7 -23
|
@@ -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,
|
|
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}")
|
|
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}")
|
|
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
|
|
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
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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,
|
|
3
|
+
autoload :Pxie6570, 'origen_testers/labview_based_tester/pxie6570.rb'
|
|
4
4
|
end
|
|
5
5
|
# Shorter name without LabVIEWBasedTester namespace
|
|
6
|
-
autoload :Pxie6570,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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?
|
|
@@ -54,20 +54,18 @@ module OrigenTesters
|
|
|
54
54
|
avc_dir: nil,
|
|
55
55
|
binl_dir: nil,
|
|
56
56
|
multiport: nil, # Optional hash for multiport settings: port_bursts, port_in_focus, prefix, postfix
|
|
57
|
-
digcap: nil
|
|
57
|
+
digcap: nil # Optional hash for digcap settings: pins, vps, nrf, char
|
|
58
58
|
}.merge(@user_options)
|
|
59
59
|
|
|
60
60
|
@job_options = {
|
|
61
61
|
tester: :v93k,
|
|
62
|
-
compiler: self.class.compiler
|
|
62
|
+
compiler: self.class.compiler # required
|
|
63
63
|
}.merge(@job_options)
|
|
64
64
|
|
|
65
|
-
@compiler_options = {
|
|
66
|
-
|
|
67
|
-
}.merge(@compiler_options)
|
|
65
|
+
@compiler_options = {}.merge(@compiler_options)
|
|
68
66
|
|
|
69
67
|
@compiler_options_with_args = {
|
|
70
|
-
aiv2b_opts:
|
|
68
|
+
aiv2b_opts: nil
|
|
71
69
|
}.merge(@compiler_options_with_args)
|
|
72
70
|
|
|
73
71
|
@avc_files = []
|
|
@@ -149,6 +147,7 @@ module OrigenTesters
|
|
|
149
147
|
# Assumes .aiv file and all workspace collateral has been built up
|
|
150
148
|
aiv = convert_to_pathname(aiv)
|
|
151
149
|
fail 'File does not exist! Please specify existing aiv file.' unless aiv.file?
|
|
150
|
+
|
|
152
151
|
current_job_options = @job_options.merge(@compiler_options_with_args)
|
|
153
152
|
current_job_options = current_job_options.merge(extract_job_options_from_aiv(aiv))
|
|
154
153
|
current_job_options = current_job_options.merge(options)
|
|
@@ -163,6 +162,7 @@ module OrigenTesters
|
|
|
163
162
|
# Output the compiler jobs in the queue to the console
|
|
164
163
|
def inspect_jobs(index = nil)
|
|
165
164
|
return empty_msg if empty?
|
|
165
|
+
|
|
166
166
|
desc = []
|
|
167
167
|
puts "\n"
|
|
168
168
|
@jobs.each_with_index do |j, i|
|
|
@@ -195,8 +195,10 @@ module OrigenTesters
|
|
|
195
195
|
# First-level verification: file/directory was given and exists
|
|
196
196
|
msg = 'Pass in a valid file (.avc, .avc.gz, .list) or a valid directory'
|
|
197
197
|
fail "Pattern path is set to nil! #{msg}" if p.nil?
|
|
198
|
+
|
|
198
199
|
path = Pathname.new(p)
|
|
199
200
|
fail "Pattern path does not exist! #{msg}" unless path.exist?
|
|
201
|
+
|
|
200
202
|
path = path.expand_path
|
|
201
203
|
|
|
202
204
|
# Set the reference directory for pattern sub-dir mirroring
|
|
@@ -257,7 +259,7 @@ module OrigenTesters
|
|
|
257
259
|
|
|
258
260
|
# Move AVC files into job space (through pre-processor)
|
|
259
261
|
@files.each do |file|
|
|
260
|
-
contents = File.open(file, 'rb'
|
|
262
|
+
contents = File.open(file, 'rb', &:read)
|
|
261
263
|
new_contents = preprocess_avc(contents)
|
|
262
264
|
new_avc_file = Pathname.new("#{job_avc_dir}/#{Pathname.new(file).basename}").cleanpath
|
|
263
265
|
File.open(new_avc_file, 'w') { |f| f.write(new_contents.force_encoding('UTF-8')) }
|
|
@@ -315,6 +317,7 @@ module OrigenTesters
|
|
|
315
317
|
factor = 1
|
|
316
318
|
contents.each_line do |line|
|
|
317
319
|
next if line.match(/^\s*\#/)
|
|
320
|
+
|
|
318
321
|
if line.match(/^\s*SQPG\s+LBGN\s+(\d+)\s*;/)
|
|
319
322
|
factor = Regexp.last_match(1).to_i
|
|
320
323
|
end
|
|
@@ -325,42 +328,36 @@ module OrigenTesters
|
|
|
325
328
|
end
|
|
326
329
|
|
|
327
330
|
def avc_dir
|
|
328
|
-
@avc_dir ||=
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
end
|
|
334
|
-
end
|
|
331
|
+
@avc_dir ||= if @user_options[:avc_dir]
|
|
332
|
+
clean_path(@user_options[:avc_dir].to_s)
|
|
333
|
+
else
|
|
334
|
+
Pathname.new('./AVC') # default value
|
|
335
|
+
end
|
|
335
336
|
end
|
|
336
337
|
|
|
337
338
|
def binl_dir
|
|
338
|
-
@binl_dir ||=
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
end
|
|
344
|
-
end
|
|
339
|
+
@binl_dir ||= if @user_options[:binl_dir]
|
|
340
|
+
clean_path(@user_options[:binl_dir].to_s)
|
|
341
|
+
else
|
|
342
|
+
Pathname.new('./BINL') # default value
|
|
343
|
+
end
|
|
345
344
|
end
|
|
346
345
|
|
|
347
346
|
def tmp_dir
|
|
348
|
-
@tmp_dir ||=
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
end
|
|
354
|
-
end
|
|
347
|
+
@tmp_dir ||= if @user_options[:tmp_dir]
|
|
348
|
+
clean_path(@user_options[:tmp_dir].to_s)
|
|
349
|
+
else
|
|
350
|
+
Pathname.new('./tmp') # default value
|
|
351
|
+
end
|
|
355
352
|
end
|
|
356
353
|
|
|
357
354
|
# Given path string, return Pathname object with cleaned up path
|
|
358
355
|
def clean_path(path_str)
|
|
359
356
|
path = Pathname.new(path_str).cleanpath
|
|
360
357
|
if path.absolute?
|
|
361
|
-
|
|
358
|
+
path
|
|
362
359
|
else
|
|
363
|
-
|
|
360
|
+
Pathname.new("./#{path}")
|
|
364
361
|
end
|
|
365
362
|
end
|
|
366
363
|
|
|
@@ -408,7 +405,7 @@ module OrigenTesters
|
|
|
408
405
|
|
|
409
406
|
def extract_job_options_from_aiv(file)
|
|
410
407
|
options = {}
|
|
411
|
-
contents = File.open(file, 'rb'
|
|
408
|
+
contents = File.open(file, 'rb', &:read)
|
|
412
409
|
count = 0
|
|
413
410
|
counting = false
|
|
414
411
|
contents.each_line do |line|
|