origen_testers 0.50.0 → 0.51.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5895221d7385ac33677fffba9d998bf29a475978677f740968f1cfda57677e1
4
- data.tar.gz: 5f623aacb11d0ea9b56b36fd3186cf32dbf2724e034de5d2b1822e02c507aa53
3
+ metadata.gz: d6f96fa1f3c65b7ab6cd0fb2c25abb378ef0cd0d9489a05cc7c94eb05becf628
4
+ data.tar.gz: 0d465b02299aceb26467727fd021736b78c959d46ece03fddd0c581495291e3d
5
5
  SHA512:
6
- metadata.gz: bae858530cf088b08ac1938411815e6d67fe86524fa98824f328583dfa6c319e5143588b868edd16ffef31a119e665e64cde113d0ea5c71ba8dd0ddb3b899529
7
- data.tar.gz: 368c6d87bf5fb030e83cf96283c0d6ce43844a442f2719a10a76ddf3c2f4906ef7cd4012d7fdea9bf5eec4f39aedfaa0f1bba0276892978e2e91c26495ac9168
6
+ metadata.gz: d08fd272bc3331a87ac33011d22386e535981d376c0c995c4d3605794e6a7c3be7d755f69b0d851e22bf398692e98b516ce19999860e4b46fbba7af3ee1123e2
7
+ data.tar.gz: b754e33f7577da5f100e93cb7b020ad8abf014e8e7b102d17e07bace411ff5e20df0c47e5e033f74fab814ccda0bc6b89fc1b2e5e768b8cb13b9e2e03ae4a32e
data/config/commands.rb CHANGED
@@ -200,7 +200,7 @@ when "examples", "test"
200
200
  puts
201
201
  puts "To approve any diffs in the reference.list files run the following command:"
202
202
  puts
203
- platforms = %w(j750 j750_hpt ultraflex v93k v93k_multiport v93k_enable_flow v93k_disable_flow v93k_limits_file v93k_global v93k_smt8) # put here the various platforms used in examples/program_generator.rb
203
+ platforms = %w(j750 j750_literals j750_hpt ultraflex ultraflex_literals v93k v93k_multiport v93k_enable_flow v93k_disable_flow v93k_limits_file v93k_global v93k_smt8) # put here the various platforms used in examples/program_generator.rb
204
204
  reflist_command = ''
205
205
  platforms.each do |platform|
206
206
  unless reflist_command == ''
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
- MINOR = 50
4
- BUGFIX = 0
3
+ MINOR = 51
4
+ BUGFIX = 1
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -220,6 +220,15 @@ module OrigenTesters::ATP
220
220
  @pipeline[0] = add_volatile_flags(@pipeline[0], flags)
221
221
  end
222
222
 
223
+ # Indicate the that given flags should keep state between units
224
+ # prevent them from being in the initialization block
225
+ # these flags will be the user's responsibility to initialize
226
+ def add_global_flag(*flags)
227
+ options = flags.pop if flags.last.is_a?(Hash)
228
+ flags = flags.flatten
229
+ @pipeline[0] = add_global_flag_to_node(@pipeline[0], flags)
230
+ end
231
+
223
232
  # Record a description for a bin number
224
233
  def describe_bin(number, description, options = {})
225
234
  @pipeline[0] = add_bin_description(@pipeline[0], number, description, type: :hard)
@@ -947,6 +956,24 @@ module OrigenTesters::ATP
947
956
  node.updated(nil, [name, v] + nodes)
948
957
  end
949
958
 
959
+ # Ensures the flow ast has a global node, then adds the
960
+ # given flags to it
961
+ def add_global_flag_to_node(node, flags)
962
+ name, *nodes = *node
963
+ if nodes[0] && nodes[0].type == :global
964
+ v = nodes.shift
965
+ else
966
+ v = n0(:global)
967
+ end
968
+ existing = v.children.map { |f| f.type == :flag ? f.value : nil }.compact
969
+ new = []
970
+ flags.each do |flag|
971
+ new << n1(:flag, flag) unless existing.include?(flag)
972
+ end
973
+ v = v.updated(nil, v.children + new)
974
+ node.updated(nil, [name, v] + nodes)
975
+ end
976
+
950
977
  # Ensures the flow ast has a bin descriptions node, then adds the
951
978
  # given description to it
952
979
  def add_bin_description(node, number, description, options)
@@ -8,7 +8,7 @@ module OrigenTesters::ATP
8
8
  @atp
9
9
  end
10
10
 
11
- ([:test, :bin, :pass, :continue, :cz, :log, :sub_test, :volatile, :set_flag, :set, :enable, :disable, :render,
11
+ ([:test, :bin, :pass, :continue, :cz, :log, :sub_test, :volatile, :add_global_flag, :set_flag, :set, :enable, :disable, :render,
12
12
  :context_changed?, :ids, :describe_bin, :describe_softbin, :describe_soft_bin, :loop] +
13
13
  OrigenTesters::ATP::Flow::CONDITION_KEYS.keys + OrigenTesters::ATP::Flow::RELATIONAL_OPERATORS).each do |method|
14
14
  define_method method do |*args, &block|
@@ -33,6 +33,8 @@ module OrigenTesters::ATP
33
33
  n = process(node)
34
34
  if n.respond_to?(:type) && n.type == :inline
35
35
  results += n.children
36
+ elsif n.respond_to?(:type) && n.type == :global
37
+ add_global_flag(n.to_a[0].value)
36
38
  else
37
39
  results << n unless n.respond_to?(:type) && n.type == :remove
38
40
  end
@@ -64,6 +66,32 @@ module OrigenTesters::ATP
64
66
  result
65
67
  end
66
68
 
69
+ def add_global_flag(flag)
70
+ # Had to do @@ because the state got lost after the recursive calls
71
+ @@globals ||= {}
72
+ @@globals[:flags] ||= []
73
+ @@globals[:flags] << flag
74
+ end
75
+
76
+ def extract_globals(flow)
77
+ @@globals ||= {}
78
+ if v = flow.find(:global)
79
+ @@globals[:flags] ||= []
80
+ @@globals[:flags] += Array(v.find_all(:flag)).map(&:value) if v.respond_to?(:find_all) && v.method(:find_all).parameters.size == 1
81
+ end
82
+ end
83
+
84
+ def global_flags
85
+ @@globals ||= {}
86
+ @@globals[:flags] || []
87
+ end
88
+
89
+ # Returns true if the given flag name has been marked as global
90
+ def global_flag?(flag)
91
+ result = global_flags.any? { |f| clean_flag(f) == clean_flag(flag) }
92
+ result
93
+ end
94
+
67
95
  def clean_flag(flag)
68
96
  flag = flag.dup.to_s
69
97
  flag[0] = '' if flag[0] == '$'
@@ -9,15 +9,25 @@ module OrigenTesters::ATP
9
9
  end
10
10
 
11
11
  # Make all IDs lower cased symbols
12
+ # unless literal_flags is set
12
13
  def on_id(node)
13
14
  id = node.to_a[0]
14
- node.updated(nil, [clean(id)])
15
+ if tester.literal_flags
16
+ node.updated(nil, [id])
17
+ else
18
+ node.updated(nil, [clean(id)])
19
+ end
15
20
  end
16
21
 
17
22
  # Make all ID references use the lower case symbols
23
+ # unless literal_flags is set
18
24
  def on_if_failed(node)
19
25
  id, *children = *node
20
- node.updated(nil, [clean(id)] + process_all(children))
26
+ if tester.literal_flags
27
+ node.updated(nil, [id] + process_all(children))
28
+ else
29
+ node.updated(nil, [clean(id)] + process_all(children))
30
+ end
21
31
  end
22
32
  alias_method :on_if_passed, :on_if_failed
23
33
  alias_method :on_if_any_failed, :on_if_failed
@@ -129,7 +129,7 @@ module OrigenTesters
129
129
  current_line.flag_pass = flag
130
130
  end
131
131
  else
132
- unless set_previously
132
+ if !set_previously && !global_flags.include?(flag)
133
133
  completed_lines << platform::FlowLine.new(:defaults, flag_fail: flag)
134
134
  end
135
135
  completed_lines << new_line(:flag_true, parameter: flag)
@@ -425,7 +425,11 @@ module OrigenTesters
425
425
  flag[0] = ''
426
426
  flag
427
427
  else
428
- flag.downcase
428
+ if tester.literal_enables
429
+ flag
430
+ else
431
+ flag.downcase
432
+ end
429
433
  end
430
434
  end
431
435
 
@@ -23,6 +23,11 @@ module OrigenTesters
23
23
  attr_accessor :min_repeat_loop
24
24
  alias_method :min_repeat_count, :min_repeat_loop
25
25
  alias_method :min_repeat_count=, :min_repeat_loop=
26
+
27
+ # Control literal flag definitions
28
+ attr_accessor :literal_flags # whether flags should be exactly as indicated
29
+ attr_accessor :literal_enables # whether enables should be exactly as indicated
30
+
26
31
  # NOTE: DO NOT USE THIS CLASS DIRECTLY ONLY USED AS PARENT FOR
27
32
  # DESIRED TESTER CLASS
28
33
 
@@ -64,6 +69,13 @@ module OrigenTesters
64
69
  @overlay_history = {} # used to track labels, subroutines, digsrc pins used etc
65
70
  @overlay_subr = nil
66
71
  @capture_history = {}
72
+
73
+ if options[:literal_flags]
74
+ @literal_flags = true
75
+ end
76
+ if options[:literal_enables]
77
+ @literal_enables = true
78
+ end
67
79
  end
68
80
 
69
81
  def igxl_based?
@@ -26,8 +26,8 @@ module OrigenTesters
26
26
 
27
27
  # Returns a new J750 instance, normally there would only ever be one of these
28
28
  # assigned to the global variable such as $tester by your target.
29
- def initialize
30
- super
29
+ def initialize(options = {})
30
+ super(options)
31
31
  @pipeline_depth = 34 # for extended mode is vectors, for normal mode is vector pairs (54 for J750Ex)
32
32
  @use_hv_pin = false # allows to use high voltage for a pin for all patterns
33
33
  @software_version = '3.50.40'
@@ -14,8 +14,8 @@ module OrigenTesters
14
14
  class J750_HPT < J750
15
15
  require 'origen_testers/igxl_based_tester/j750_hpt/generator.rb'
16
16
 
17
- def initialize
18
- super
17
+ def initialize(options = {})
18
+ super(options)
19
19
  @@hpt_mode = true
20
20
  @drive_hi_state = '.1'
21
21
  @drive_lo_state = '.0'
@@ -37,6 +37,10 @@ module OrigenTesters
37
37
  @var_filename || 'global'
38
38
  end
39
39
 
40
+ def set_var_filename(new_var_filename)
41
+ @var_filename = new_var_filename
42
+ end
43
+
40
44
  def subdirectory
41
45
  @subdirectory ||= begin
42
46
  if smt8?
@@ -218,6 +222,10 @@ module OrigenTesters
218
222
  @post_test_lines = []
219
223
  @stack = { on_fail: [], on_pass: [] }
220
224
  @set_runtime_variables = ast.excluding_sub_flows.set_flags
225
+ global_flags.each do |global_var_name|
226
+ @set_runtime_variables.delete(global_var_name)
227
+ @set_runtime_variables.delete('$' + global_var_name)
228
+ end
221
229
  process(ast)
222
230
  unless smt8?
223
231
  unless flow_variables[:empty?]
@@ -27,6 +27,10 @@ module OrigenTesters
27
27
  alias_method :min_repeat_count, :min_repeat_loop
28
28
  alias_method :min_repeat_count=, :min_repeat_loop=
29
29
 
30
+ # Control literal flag definitions
31
+ attr_accessor :literal_flags # whether flags should be exactly as indicated
32
+ attr_accessor :literal_enables # whether enables should be exactly as indicated
33
+
30
34
  # permit option to generate multiport type patterns
31
35
  # and use multiport type code
32
36
  attr_accessor :multiport
@@ -140,6 +144,13 @@ module OrigenTesters
140
144
  @create_limits_file = false
141
145
  end
142
146
  end
147
+ if options[:literal_flags]
148
+ @literal_flags = true
149
+ end
150
+ if options[:literal_enables]
151
+ @literal_enables = true
152
+ end
153
+
143
154
  @package_namespace = options.delete(:package_namespace)
144
155
  self.limitfile_test_modes = options[:limitfile_test_modes] || options[:limitsfile_test_modes]
145
156
  self.force_pass_on_continue = options[:force_pass_on_continue]
@@ -309,6 +309,16 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Contro
309
309
  test :test2, number: 51470
310
310
  end
311
311
 
312
+ log 'Test global flag functionality'
313
+ add_global_flag :global
314
+ test :global_test1, on_fail: { set_flag: :$non_global }, continue: true
315
+ unless_flag "$global" do
316
+ set_flag '$non_global'
317
+ end
318
+ if_flag "$non_global" do
319
+ set_flag '$global'
320
+ end
321
+
312
322
  if tester.v93k?
313
323
  log "This should retain the set-run-flag in the else conditional"
314
324
  func :test22, id: :at22, number: 51480
@@ -0,0 +1,139 @@
1
+ # Flow to exercise the Flow Control API related to using exact literal value of flag (no lowercase or cleanup) as
2
+ # controlled at tester API level
3
+ #
4
+ # Some of the other flows also cover the flow control API and those tests are used
5
+ # to guarantee that the test ID references work when sub-flows are involved.
6
+ # This flow provides a full checkout of all flow control methods.
7
+ Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Control Flag/Enable Literal Testing" do
8
+ flow.flow_description = 'Flow to exercise the Flow Control API' if tester.v93k?
9
+
10
+ self.resources_filename = 'flow_control'
11
+
12
+ log "Test that if_failed works using Literal"
13
+ func :read1, id: :Test__Flag1, bin: 10, number: 50000
14
+ func :erase1, if_failed: :Test__Flag1, bin: 12, number: 50010
15
+
16
+ log "Test the block form of if_failed"
17
+ func :read2, id: :Test__Flag2, bin: 10, number: 50020
18
+ if_failed :Test__Flag2 do
19
+ func :erase2, number: 50030
20
+ func :erase2, number: 50040
21
+ end
22
+
23
+ log "Test that if_passed works"
24
+ func :read1, id: :Test__Flag3, bin: 10, number: 50050
25
+ func :pgm1, if_passed: :Test__Flag3, number: 50060
26
+
27
+ log "Test the block form of if_passed"
28
+ func :read2, id: :Test__Flag4, bin: 10, number: 50070
29
+ if_passed :Test__Flag4 do
30
+ func :pgm1, number: 50080
31
+ func :pgm1, number: 50090
32
+ end
33
+
34
+ log "Test that if_ran works"
35
+ func :pgm, id: :Test__Flag5, bin: 10, number: 50100
36
+ func :read0, if_ran: :Test__Flag5, number: 50110
37
+
38
+ log "Test the block form of if_ran"
39
+ func :pgm, id: :Test__Flag6, bin: 10, number: 50120
40
+ if_ran :Test__Flag6 do
41
+ func :read0, number: 50130
42
+ func :read0, number: 50140
43
+ end
44
+
45
+ log "Test that unless_ran works"
46
+ func :pgm, id: :Test__Flag7, bin: 10, number: 50150
47
+ func :read0, unless_ran: :Test__Flag7, number: 50160
48
+
49
+ log "Test the block form of unless_ran"
50
+ func :pgm, id: :Test__Flag8, bin: 10, number: 50170
51
+ unless_ran :Test__Flag8 do
52
+ func :read0, number: 50180
53
+ func :read0, number: 50190
54
+ end
55
+
56
+ log "Test that if_enable works"
57
+ func :extra_test, if_enable: :Extras__123, number: 50270
58
+
59
+ log "Test the block form of if_enable"
60
+ if_enable :Cz__123 do
61
+ func :cz_test1, number: 50280
62
+ func :cz_test2, number: 50290
63
+ end
64
+
65
+ log "Test that unless_enable works"
66
+ func :long_test, unless_enable: :Quick__123, number: 50300
67
+
68
+ log "Test the block form of unless_enable"
69
+ unless_enable :Quick__123 do
70
+ func :long_test1, number: 50310
71
+ func :long_test2, number: 50320
72
+ end
73
+
74
+ log "Test that if_any_failed works"
75
+ func :test1, id: :iFA__1, number: 50330
76
+ func :test2, id: :iFA__2, number: 50340
77
+ func :test3, if_any_failed: [:iFA__1, :iFA__2], number: 50350
78
+
79
+ log "Test the block form of if_any_failed"
80
+ func :test1, id: :OOF__Passcode1, number: 50360
81
+ func :test2, id: :OOF__Passcode2, number: 50370
82
+ if_any_failed :OOF__Passcode1, :OOF__Passcode2 do
83
+ func :test3, number: 50380
84
+ func :test4, number: 50390
85
+ end
86
+
87
+ log "Test that if_all_failed works"
88
+ func :test1, id: :iFall__1, number: 50400
89
+ func :test2, id: :iFall__2, number: 50410
90
+ func :test3, if_all_failed: [:iFall__1, :iFall__2], number: 50420
91
+
92
+ log "Test the block form of if_all_failed"
93
+ func :test1, id: :iFall__B1, number: 50430
94
+ func :test2, id: :iFall__B2, number: 50440
95
+ if_all_failed [:iFall__B1, :iFall__B2] do
96
+ func :test3, number: 50450
97
+ func :test4, number: 50460
98
+ end
99
+
100
+ log "Test that if_any_passed works"
101
+ func :test1, id: :if__AP1, number: 50470
102
+ func :test2, id: :if__AP2, number: 50480
103
+ func :test3, if_any_passed: [:if__AP1, :if__AP2], number: 50490
104
+
105
+ log "Test the block form of if_any_passed"
106
+ func :test1, id: :if__APB1, number: 50500
107
+ func :test2, id: :if__APB2, number: 50510
108
+ if_any_passed :if__APB1, :if__APB2 do
109
+ func :test3, number: 50520
110
+ func :test4, number: 50530
111
+ end
112
+
113
+ log "Test that if_all_passed works"
114
+ func :test1, id: :iFall__P1, number: 50540
115
+ func :test2, id: :iFall__P2, number: 50550
116
+ func :test3, if_all_passed: [:iFall__P1, :iFall__P2], number: 50560
117
+
118
+ log "Test the block form of if_all_passed"
119
+ func :test1, id: :iFall__PB1, number: 50570
120
+ func :test2, id: :iFall__PB2, number: 50580
121
+ if_all_passed :iFall__PB1, :iFall__PB2 do
122
+ func :test3, number: 50590
123
+ func :test4, number: 50600
124
+ end
125
+
126
+ log "Test that group-level dependencies work"
127
+ group "grp1", id: :Group__1 do
128
+ func :grp1_test1, bin: 5, number: 50610
129
+ func :grp1_test2, bin: 5, number: 50620
130
+ func :grp1_test3, bin: 5, number: 50630
131
+ end
132
+
133
+ group "grp2", if_failed: :Group__1 do
134
+ func :grp2_test1, bin: 5, number: 50640
135
+ func :grp2_test2, bin: 5, number: 50650
136
+ func :grp2_test3, bin: 5, number: 50660
137
+ end
138
+
139
+ end
@@ -305,6 +305,19 @@ end
305
305
 
306
306
  In all cases the `$` will be removed from the final flag name that appears in the test program.
307
307
 
308
+ Whenever you set a flag or automation initializes a variable, you can remove the variable from initialization flow by labeling as a global flag
309
+ with the `add_global_flag` API. The below example will set the `global` variable in the flow but not initialize it to a value. `non_global` will behave as normal.
310
+
311
+ ~~~ruby
312
+ add_global_flag :global
313
+ test :global_test1, on_fail: { set_flag: :$non_global }, continue: true
314
+ unless_flag "$global" do
315
+ set_flag '$non_global'
316
+ end
317
+ if_flag "$non_global" do
318
+ set_flag '$global'
319
+ end
320
+ ~~~
308
321
 
309
322
 
310
323
  #### Adding the V93K bypass option:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_testers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.50.0
4
+ version: 0.51.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-16 00:00:00.000000000 Z
11
+ date: 2023-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.57.1
19
+ version: 0.60.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.57.1
26
+ version: 0.60.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dentaku
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -532,6 +532,7 @@ files:
532
532
  - program/custom_tests.rb
533
533
  - program/flow_control.rb
534
534
  - program/flow_control_flag_bug.rb
535
+ - program/flow_control_literals.rb
535
536
  - program/prb1.rb
536
537
  - program/prb1_resources.rb
537
538
  - program/prb2.rb
@@ -600,7 +601,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
600
601
  - !ruby/object:Gem::Version
601
602
  version: '0'
602
603
  requirements: []
603
- rubygems_version: 3.1.4
604
+ rubygems_version: 3.2.31
604
605
  signing_key:
605
606
  specification_version: 4
606
607
  summary: This plugin provides Origen tester models to drive ATE type testers like