origen_testers 0.51.0 → 0.51.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/origen_testers/atp/flow.rb +27 -0
- data/lib/origen_testers/atp/flow_api.rb +1 -1
- data/lib/origen_testers/atp/processor.rb +28 -0
- data/lib/origen_testers/igxl_based_tester/base/flow.rb +1 -1
- data/lib/origen_testers/smartest_based_tester/base/flow.rb +8 -0
- data/program/flow_control.rb +10 -0
- data/templates/origen_guides/program/flowapi.md.erb +13 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6f96fa1f3c65b7ab6cd0fb2c25abb378ef0cd0d9489a05cc7c94eb05becf628
|
4
|
+
data.tar.gz: 0d465b02299aceb26467727fd021736b78c959d46ece03fddd0c581495291e3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d08fd272bc3331a87ac33011d22386e535981d376c0c995c4d3605794e6a7c3be7d755f69b0d851e22bf398692e98b516ce19999860e4b46fbba7af3ee1123e2
|
7
|
+
data.tar.gz: b754e33f7577da5f100e93cb7b020ad8abf014e8e7b102d17e07bace411ff5e20df0c47e5e033f74fab814ccda0bc6b89fc1b2e5e768b8cb13b9e2e03ae4a32e
|
data/config/version.rb
CHANGED
@@ -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] == '$'
|
@@ -129,7 +129,7 @@ module OrigenTesters
|
|
129
129
|
current_line.flag_pass = flag
|
130
130
|
end
|
131
131
|
else
|
132
|
-
|
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)
|
@@ -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?]
|
data/program/flow_control.rb
CHANGED
@@ -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
|
@@ -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.51.
|
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:
|
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.
|
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.
|
26
|
+
version: 0.60.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dentaku
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -601,7 +601,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
601
601
|
- !ruby/object:Gem::Version
|
602
602
|
version: '0'
|
603
603
|
requirements: []
|
604
|
-
rubygems_version: 3.
|
604
|
+
rubygems_version: 3.2.31
|
605
605
|
signing_key:
|
606
606
|
specification_version: 4
|
607
607
|
summary: This plugin provides Origen tester models to drive ATE type testers like
|