origen_testers 0.52.4 → 0.52.6
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 +1 -1
- data/lib/origen_testers/decompiler/nodes.rb +2 -0
- data/lib/origen_testers/igxl_based_tester/decompiler/atp.rb +5 -1
- data/lib/origen_testers/smartest_based_tester/base/flow.rb +6 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/flow.rb +6 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/generator.rb +4 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/shmoo_test.rb +426 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/shmoo_tests.rb +92 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/templates/template.flow.erb +6 -0
- data/lib/origen_testers/test/interface.rb +8 -0
- data/program/components/_prb1_main.rb +29 -0
- data/templates/origen_guides/program/flowapi.md.erb +3 -0
- data/templates/origen_guides/program/v93ksmt8.md.erb +65 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea6ace3a51f5db9a3b42ab1adef04fa976ad674c9c8e1db5e6a0562a78bf0941
|
4
|
+
data.tar.gz: 4fabf65687d335e073f331876217810edd38a7b91e6afb14184fb1a6f0e186c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62c5e05ff8b61b625dbe5f394217447f8b3fbe47c3354c074403f4234555f7ae10f38a64b8a01c27c0b9ba00c8d54a87c335ad4e3554b50c801a75d4e73d8621
|
7
|
+
data.tar.gz: 37e24209edf371cbb9e723161c0316158d06d915d34f1ee26297f45522397444e7369e8255e132036327f2ea0ad657c66c7095df9a10cbff7f1638e1c8a92f39
|
data/config/version.rb
CHANGED
@@ -103,6 +103,8 @@ module OrigenTesters
|
|
103
103
|
alias_method :pinlist, :pins
|
104
104
|
|
105
105
|
def initialize(pins:, context:)
|
106
|
+
# remove trailing formatting characters
|
107
|
+
pins = pins.map { |p| p.split(':').first }
|
106
108
|
@pins = pins.map(&:strip).map(&:to_sym)
|
107
109
|
super(context: context, type: :pinlist)
|
108
110
|
end
|
@@ -59,6 +59,8 @@ module OrigenTesters
|
|
59
59
|
nodes_namespace::CommentBlock.new(context: self,
|
60
60
|
comments: raw_vector.split("\n")
|
61
61
|
)
|
62
|
+
elsif raw_vector.strip.size == 0
|
63
|
+
nodes_namespace::CommentBlock.new(context: self, comments: ['// blank line replaced with comment by origen convert'])
|
62
64
|
elsif raw_vector =~ Regexp.new('^\s*start_label')
|
63
65
|
nodes_namespace::StartLabel.new(context: self,
|
64
66
|
start_label: raw_vector[raw_vector.index('start_label') + 11..-1].strip[0..-2]
|
@@ -69,7 +71,9 @@ module OrigenTesters
|
|
69
71
|
label_type: contents[0],
|
70
72
|
label_name: contents[1]
|
71
73
|
)
|
72
|
-
elsif
|
74
|
+
# original elsif for label was updated to avoid confusing origen's eol comments for a label
|
75
|
+
# elsif raw_vector =~ Regexp.new(':(?!(.*>))')
|
76
|
+
elsif raw_vector.split(';').first =~ Regexp.new(':(?!(.*>))')
|
73
77
|
nodes_namespace::Label.new(context: self,
|
74
78
|
# Strip any whitespace from the vector and grab contents up to
|
75
79
|
# the ':' symbol.
|
@@ -188,6 +188,9 @@ module OrigenTesters
|
|
188
188
|
if smt8?
|
189
189
|
return unless top_level? || options[:called_by_top_level]
|
190
190
|
super
|
191
|
+
# Refresh the ast before finalized gets set to true
|
192
|
+
# If ast gets called by the user the finalized flag will lock it to the incorrect value
|
193
|
+
ast
|
191
194
|
@finalized = true
|
192
195
|
# All flows have now been executed and the top-level contains the final AST.
|
193
196
|
# The AST contained in each child flow may not be complete since it has not been subject to the
|
@@ -238,6 +241,9 @@ module OrigenTesters
|
|
238
241
|
end
|
239
242
|
test_suites.finalize
|
240
243
|
test_methods.finalize
|
244
|
+
if smt8?
|
245
|
+
shmoo_tests.finalize
|
246
|
+
end
|
241
247
|
if tester.create_limits_file && top_level?
|
242
248
|
render_limits_file
|
243
249
|
end
|
@@ -10,6 +10,8 @@ module OrigenTesters
|
|
10
10
|
test_suite = node.find(:object).to_a[0]
|
11
11
|
if test_suite.is_a?(String)
|
12
12
|
name = test_suite
|
13
|
+
elsif test_suite.is_a?(ShmooTest)
|
14
|
+
name = test_suite.name
|
13
15
|
else
|
14
16
|
name = test_suite.name
|
15
17
|
test_method = test_suite.test_method
|
@@ -185,6 +187,10 @@ module OrigenTesters
|
|
185
187
|
@sub_flows || {}
|
186
188
|
end
|
187
189
|
|
190
|
+
def shmoo_tests
|
191
|
+
@shmoo_tests ||= platform::ShmooTests.new(self)
|
192
|
+
end
|
193
|
+
|
188
194
|
def auxiliary_flows
|
189
195
|
@auxiliary_flows || {}
|
190
196
|
end
|
@@ -0,0 +1,426 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module SmartestBasedTester
|
3
|
+
class V93K_SMT8
|
4
|
+
class ShmooTest
|
5
|
+
ATTRS =
|
6
|
+
%w(
|
7
|
+
name
|
8
|
+
|
9
|
+
bypass
|
10
|
+
target
|
11
|
+
result_title
|
12
|
+
result_type
|
13
|
+
result_signal
|
14
|
+
execution_order
|
15
|
+
ffc_error_count
|
16
|
+
axis
|
17
|
+
)
|
18
|
+
|
19
|
+
ALIASES = {
|
20
|
+
targets: :target,
|
21
|
+
title: :result_title,
|
22
|
+
type: :result_type,
|
23
|
+
signal: :result_signal
|
24
|
+
}
|
25
|
+
|
26
|
+
DEFAULTS = {
|
27
|
+
}
|
28
|
+
|
29
|
+
NO_STRING_TYPES = [:list_strings, :list_classes, :class]
|
30
|
+
# Generate accessors for all attributes and their aliases
|
31
|
+
ATTRS.each do |attr|
|
32
|
+
if attr == 'name'
|
33
|
+
attr_reader attr.to_sym
|
34
|
+
else
|
35
|
+
attr_accessor attr.to_sym
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Define the aliases
|
40
|
+
ALIASES.each do |_alias, val|
|
41
|
+
define_method("#{_alias}=") do |v|
|
42
|
+
send("#{val}=", v)
|
43
|
+
end
|
44
|
+
define_method("#{_alias}") do
|
45
|
+
send(val)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
attr_accessor :meta
|
49
|
+
|
50
|
+
def initialize(name, attrs = {})
|
51
|
+
@name = name
|
52
|
+
if interface.unique_test_names == :signature
|
53
|
+
if interface.flow.sig
|
54
|
+
@name = "#{name}_#{interface.flow.sig}"
|
55
|
+
end
|
56
|
+
elsif interface.unique_test_names == :flowname || interface.unique_test_names == :flow_name
|
57
|
+
@name = "#{name}_#{interface.flow.name.to_s.symbolize}"
|
58
|
+
elsif interface.unique_test_names == :preflowname || interface.unique_test_names == :pre_flow_name
|
59
|
+
@name = "#{interface.flow.name.to_s.symbolize}_#{name}"
|
60
|
+
elsif interface.unique_test_names
|
61
|
+
utn_string = interface.unique_test_names.to_s
|
62
|
+
if utn_string =~ /^prepend_/
|
63
|
+
utn_string = utn_string.gsub(/^prepend_/, '')
|
64
|
+
@name = "#{utn_string}_#{name}"
|
65
|
+
else
|
66
|
+
utn_string = utn_string.gsub(/^append_/, '')
|
67
|
+
@name = "#{name}_#{utn_string}"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# handle axis
|
72
|
+
if axis = attrs.delete(:axis)
|
73
|
+
axis = [axis] unless axis.is_a?(Array)
|
74
|
+
axis.each_with_index do |a, i|
|
75
|
+
aname = a.delete(:name) || "axis#{i + 1}"
|
76
|
+
if axes_names.include?(aname.to_sym)
|
77
|
+
fail "Axis name #{aname} is already used in shmoo test '#{@name}'"
|
78
|
+
end
|
79
|
+
axes << ShmooTestAxis.new(aname.to_sym, a)
|
80
|
+
end
|
81
|
+
else
|
82
|
+
fail 'ShmooTest must have at least one axis'
|
83
|
+
end
|
84
|
+
|
85
|
+
# Set the defaults
|
86
|
+
self.class::DEFAULTS.each do |k, v|
|
87
|
+
send("#{k}=", v)
|
88
|
+
end
|
89
|
+
# Then the values that have been supplied
|
90
|
+
attrs.each do |k, v|
|
91
|
+
send("#{k}=", v) if respond_to?("#{k}=") && k.to_sym != :name
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def smt8?
|
96
|
+
tester.smt8?
|
97
|
+
end
|
98
|
+
|
99
|
+
def inspect
|
100
|
+
"<ShmooTest: #{name}>"
|
101
|
+
end
|
102
|
+
|
103
|
+
# The name is immutable once the shmoo test is created, this will raise an error when called
|
104
|
+
def name=(val, options = {})
|
105
|
+
fail 'Once assigned the name of a shmoo test cannot be changed!'
|
106
|
+
end
|
107
|
+
|
108
|
+
def interface
|
109
|
+
Origen.interface
|
110
|
+
end
|
111
|
+
|
112
|
+
def axes
|
113
|
+
@axes ||= []
|
114
|
+
end
|
115
|
+
|
116
|
+
def axes_names
|
117
|
+
axes.map(&:name)
|
118
|
+
end
|
119
|
+
|
120
|
+
def lines
|
121
|
+
l = []
|
122
|
+
l << "shmoo #{name} {"
|
123
|
+
if target.length > 1
|
124
|
+
l << " target = \#[#{target.map(&:to_s).join(',')}];"
|
125
|
+
else
|
126
|
+
l << " target = #{target[0]};"
|
127
|
+
end
|
128
|
+
l << " resultTitle = \"#{result_title}\";" if result_title
|
129
|
+
l << " resultType = \"#{result_type}\";" if result_type
|
130
|
+
l << " resultSignal = \"#{result_signal}\";" if result_signal
|
131
|
+
l << " executionOrder = #{execution_order};" if execution_order
|
132
|
+
l << " bypass = \"#{bypass}\";" if bypass
|
133
|
+
l << " ffcErrorCount = #{ffc_error_count};" if ffc_error_count
|
134
|
+
l << ''
|
135
|
+
|
136
|
+
axes.each do |a|
|
137
|
+
a.lines.each do |al|
|
138
|
+
l << al
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
l << '}'
|
143
|
+
l
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
class ShmooTestAxis
|
148
|
+
ATTRS =
|
149
|
+
%w(
|
150
|
+
name
|
151
|
+
|
152
|
+
resource_type
|
153
|
+
resource_name
|
154
|
+
setup_signal
|
155
|
+
|
156
|
+
range_resolution
|
157
|
+
range_steps
|
158
|
+
range_fast_steps
|
159
|
+
range_scale
|
160
|
+
range_list
|
161
|
+
range_start
|
162
|
+
range_stop
|
163
|
+
range_relative_percentage_start
|
164
|
+
range_relative_percentage_stop
|
165
|
+
range_relative_value_start
|
166
|
+
range_relative_value_stop
|
167
|
+
tracking
|
168
|
+
)
|
169
|
+
|
170
|
+
ALIASES = {
|
171
|
+
resolution: :range_resolution,
|
172
|
+
steps: :range_steps,
|
173
|
+
fast_steps: :range_fast_steps
|
174
|
+
}
|
175
|
+
|
176
|
+
# Generate accessors for all attributes and their aliases
|
177
|
+
ATTRS.each do |attr|
|
178
|
+
if attr == 'name'
|
179
|
+
attr_reader attr.to_sym
|
180
|
+
else
|
181
|
+
attr_accessor attr.to_sym
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def initialize(name, attrs = {})
|
186
|
+
@name = name
|
187
|
+
|
188
|
+
@resource_type = attrs.delete(:resource_type)
|
189
|
+
@resource_name = attrs.delete(:resource_name)
|
190
|
+
@setup_signal = attrs.delete(:setup_signal)
|
191
|
+
|
192
|
+
if range_list = attrs.delete(:range_list)
|
193
|
+
@range_list = range_list
|
194
|
+
elsif attrs[:range] && attrs[:range].is_a?(Array)
|
195
|
+
@range_list = attrs.delete(:range)
|
196
|
+
else
|
197
|
+
if range = attrs.delete(:range)
|
198
|
+
if range.is_a?(Range)
|
199
|
+
@range_start = range.begin
|
200
|
+
@range_stop = range.end
|
201
|
+
@range_steps = attrs.delete(:range_steps) || attrs.delete(:steps)
|
202
|
+
@range_resolution = attrs.delete(:range_resolution) || attrs.delete(:resolution)
|
203
|
+
@range_fast_steps = attrs.delete(:range_fast_steps) || attrs.delete(:fast_steps)
|
204
|
+
elsif range.is_a?(Hash)
|
205
|
+
@range_start = range[:start]
|
206
|
+
@range_stop = range[:stop]
|
207
|
+
@range_steps = range[:steps]
|
208
|
+
@range_resolution = range[:resolution]
|
209
|
+
@range_fast_steps = range[:fast_steps]
|
210
|
+
end
|
211
|
+
elsif range_relative_percentage = attrs.delete(:range_relative_percentage)
|
212
|
+
if range_relative_percentage.is_a?(Range)
|
213
|
+
@range_relative_percentage_start = range_relative_percentage.begin
|
214
|
+
@range_relative_percentage_stop = range_relative_percentage.end
|
215
|
+
@range_steps = attrs.delete(:range_steps) || attrs.delete(:steps)
|
216
|
+
@range_resolution = attrs.delete(:range_resolution) || attrs.delete(:resolution)
|
217
|
+
@range_fast_steps = attrs.delete(:range_fast_steps) || attrs.delete(:fast_steps)
|
218
|
+
elsif range_relative_percentage.is_a?(Hash)
|
219
|
+
@range_relative_percentage_start = range_relative_percentage[:start]
|
220
|
+
@range_relative_percentage_stop = range_relative_percentage[:stop]
|
221
|
+
@range_steps = range_relative_percentage[:steps]
|
222
|
+
@range_resolution = range_relative_percentage[:resolution]
|
223
|
+
@range_fast_steps = range_relative_percentage[:fast_steps]
|
224
|
+
end
|
225
|
+
elsif range_relative_value = attrs.delete(:range_relative_value)
|
226
|
+
if range_relative_value.is_a?(Range)
|
227
|
+
@range_relative_value_start = range_relative_value.begin
|
228
|
+
@range_relative_value_stop = range_relative_value.end
|
229
|
+
@range_steps = attrs.delete(:range_steps) || attrs.delete(:steps)
|
230
|
+
@range_resolution = attrs.delete(:range_resolution) || attrs.delete(:resolution)
|
231
|
+
@range_fast_steps = attrs.delete(:range_fast_steps) || attrs.delete(:fast_steps)
|
232
|
+
elsif range_relative_value.is_a?(Hash)
|
233
|
+
@range_relative_value_start = range_relative_value[:start]
|
234
|
+
@range_relative_value_stop = range_relative_value[:stop]
|
235
|
+
@range_steps = range_relative_value[:steps]
|
236
|
+
@range_resolution = range_relative_value[:resolution]
|
237
|
+
@range_fast_steps = range_relative_value[:fast_steps]
|
238
|
+
end
|
239
|
+
else
|
240
|
+
attrs.each do |k, v|
|
241
|
+
send("#{k}=", v) if respond_to?("#{k}=") && k.to_sym != :name
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
if tracking = attrs.delete(:tracking)
|
247
|
+
tracking = [tracking] unless tracking.is_a?(Array)
|
248
|
+
tracking.each_with_index do |t, i|
|
249
|
+
tname = t.delete(:name) || "tracking#{i + 1}"
|
250
|
+
if trackings_names.include?(tname.to_sym)
|
251
|
+
fail "Tracking name #{tname} is already used in shmoo test axis '#{@name}'"
|
252
|
+
end
|
253
|
+
trackings << ShmooTestTracking.new(tname.to_sym, t)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
attrs.each do |k, v|
|
258
|
+
send("#{k}=", v) if respond_to?("#{k}=") && k.to_sym != :name
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
def lines
|
263
|
+
l = []
|
264
|
+
l << " axis [#{name}] = {"
|
265
|
+
if resource_type
|
266
|
+
l << " resourceType = #{resource_type};"
|
267
|
+
else
|
268
|
+
fail 'Shmoo Axis must have a resource type'
|
269
|
+
end
|
270
|
+
if resource_name
|
271
|
+
l << " resourceName = \"#{resource_name}\";"
|
272
|
+
else
|
273
|
+
fail 'Shmoo Axis must have a resource name'
|
274
|
+
end
|
275
|
+
l << " setup_signal = \"#{setup_signal}\";" if setup_signal
|
276
|
+
if range_list
|
277
|
+
l << " range.list = \#[#{range_list.map(&:to_s).join(',')}];"
|
278
|
+
elsif range_start && range_stop
|
279
|
+
l << " range.start = #{range_start};"
|
280
|
+
l << " range.stop = #{range_stop};"
|
281
|
+
elsif range_relative_percentage_start && range_relative_percentage_stop
|
282
|
+
l << " range.relativePercentage.start = #{range_relative_percentage_start};"
|
283
|
+
l << " range.relativePercentage.stop = #{range_relative_percentage_stop};"
|
284
|
+
elsif range_relative_value_start && range_relative_value_stop
|
285
|
+
l << " range.relativeValue.start = #{range_relative_value_start};"
|
286
|
+
l << " range.relativeValue.stop = #{range_relative_value_stop};"
|
287
|
+
else
|
288
|
+
fail 'Shmoo Axis must have a range (start & stop) or range list'
|
289
|
+
end
|
290
|
+
if range_resolution && range_steps.nil?
|
291
|
+
l << " range.resolution = #{range_resolution};"
|
292
|
+
if range_fast_steps
|
293
|
+
fail 'Shmoo Axis cannot have range fast steps with range resolution'
|
294
|
+
end
|
295
|
+
elsif range_steps && range_resolution.nil?
|
296
|
+
l << " range.steps = #{range_steps};"
|
297
|
+
if range_fast_steps
|
298
|
+
l << " range.fastSteps = #{range_fast_steps};"
|
299
|
+
end
|
300
|
+
elsif range_resolution.nil? && range_steps.nil?
|
301
|
+
fail 'Shmoo Axis must define either range resolution or range steps'
|
302
|
+
else
|
303
|
+
fail 'Shmoo Axis must define either range resolution or range steps, but not both'
|
304
|
+
end
|
305
|
+
l << '' if trackings.length > 0
|
306
|
+
trackings.each do |t|
|
307
|
+
t.lines.each do |tl|
|
308
|
+
l << tl
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
l << ' };'
|
313
|
+
l
|
314
|
+
end
|
315
|
+
|
316
|
+
def trackings
|
317
|
+
@trackings ||= []
|
318
|
+
end
|
319
|
+
|
320
|
+
def trackings_names
|
321
|
+
trackings.map(&:name)
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
class ShmooTestTracking
|
326
|
+
ATTRS =
|
327
|
+
%w(
|
328
|
+
name
|
329
|
+
|
330
|
+
resource_type
|
331
|
+
resource_name
|
332
|
+
setup_signal
|
333
|
+
|
334
|
+
range_list
|
335
|
+
range_start
|
336
|
+
range_stop
|
337
|
+
range_relative_percentage_start
|
338
|
+
range_relative_percentage_stop
|
339
|
+
range_relative_value_start
|
340
|
+
range_relative_value_stop
|
341
|
+
)
|
342
|
+
|
343
|
+
# Generate accessors for all attributes and their aliases
|
344
|
+
ATTRS.each do |attr|
|
345
|
+
if attr == 'name'
|
346
|
+
attr_reader attr.to_sym
|
347
|
+
else
|
348
|
+
attr_accessor attr.to_sym
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
def initialize(name, attrs = {})
|
353
|
+
@name = name
|
354
|
+
|
355
|
+
@resource_type = attrs.delete(:resource_type)
|
356
|
+
@resource_name = attrs.delete(:resource_name)
|
357
|
+
@setup_signal = attrs.delete(:setup_signal)
|
358
|
+
|
359
|
+
if range = attrs.delete(:range)
|
360
|
+
if range.is_a?(Range)
|
361
|
+
@range_start = range.begin
|
362
|
+
@range_stop = range.end
|
363
|
+
elsif range.is_a?(Hash)
|
364
|
+
@range_start = range[:start]
|
365
|
+
@range_stop = range[:stop]
|
366
|
+
elsif range.is_a?(Array)
|
367
|
+
@range_list = range
|
368
|
+
end
|
369
|
+
elsif range_relative_percentage = attrs.delete(:range_relative_percentage)
|
370
|
+
if range_relative_percentage.is_a?(Range)
|
371
|
+
@range_relative_percentage_start = range_relative_percentage.begin
|
372
|
+
@range_relative_percentage_stop = range_relative_percentage.end
|
373
|
+
elsif range_relative_percentage.is_a?(Hash)
|
374
|
+
@range_relative_percentage_start = range_relative_percentage[:start]
|
375
|
+
@range_relative_percentage_stop = range_relative_percentage[:stop]
|
376
|
+
end
|
377
|
+
elsif range_relative_value = attrs.delete(:range_relative_value)
|
378
|
+
if range_relative_value.is_a?(Range)
|
379
|
+
@range_relative_value_start = range_relative_value.begin
|
380
|
+
@range_relative_value_stop = range_relative_value.end
|
381
|
+
elsif range_relative_value.is_a?(Hash)
|
382
|
+
@range_relative_value_start = range_relative_value[:start]
|
383
|
+
@range_relative_value_stop = range_relative_value[:stop]
|
384
|
+
end
|
385
|
+
else
|
386
|
+
attrs.each do |k, v|
|
387
|
+
send("#{k}=", v) if respond_to?("#{k}=") && k.to_sym != :name
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
def lines
|
393
|
+
l = []
|
394
|
+
l << " tracking [#{name}] = {"
|
395
|
+
if resource_type
|
396
|
+
l << " resourceType = #{resource_type};"
|
397
|
+
else
|
398
|
+
fail 'Shmoo Tracking must have a resource type'
|
399
|
+
end
|
400
|
+
if resource_name
|
401
|
+
l << " resourceName = \"#{resource_name}\";"
|
402
|
+
else
|
403
|
+
fail 'Shmoo Tracking must have a resource name'
|
404
|
+
end
|
405
|
+
l << " setup_signal = \"#{setup_signal}\";" if setup_signal
|
406
|
+
if range_list
|
407
|
+
l << " range.list = \#[#{range_list.map(&:to_s).join(',')}];"
|
408
|
+
elsif range_start && range_stop
|
409
|
+
l << " range.start = #{range_start};"
|
410
|
+
l << " range.stop = #{range_stop};"
|
411
|
+
elsif range_relative_percentage_start && range_relative_percentage_stop
|
412
|
+
l << " range.relativePercentage.start = #{range_relative_percentage_start};"
|
413
|
+
l << " range.relativePercentage.stop = #{range_relative_percentage_stop};"
|
414
|
+
elsif range_relative_value_start && range_relative_value_stop
|
415
|
+
l << " range.relativeValue.start = #{range_relative_value_start};"
|
416
|
+
l << " range.relativeValue.stop = #{range_relative_value_stop};"
|
417
|
+
else
|
418
|
+
fail 'Shmoo Tracking must have a range (start & stop) or range list'
|
419
|
+
end
|
420
|
+
l << ' };'
|
421
|
+
l
|
422
|
+
end
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|
426
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module SmartestBasedTester
|
3
|
+
class Base
|
4
|
+
class ShmooTests
|
5
|
+
# Origen::Tester::Generator not included since test suites do not have their
|
6
|
+
# own top-level sheet, they will be incorporated within the flow sheet
|
7
|
+
|
8
|
+
attr_accessor :flow, :collection
|
9
|
+
|
10
|
+
def initialize(flow)
|
11
|
+
@flow = flow
|
12
|
+
@collection = []
|
13
|
+
@existing_names = {}
|
14
|
+
# Test names also have to be unique vs. the current flow name
|
15
|
+
if tester.smt8?
|
16
|
+
@existing_names[flow.filename.sub('.flow', '').to_s] = true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def filename
|
21
|
+
flow.filename
|
22
|
+
end
|
23
|
+
|
24
|
+
def add(name, options = {})
|
25
|
+
symbol = name.is_a?(Symbol)
|
26
|
+
name = make_unique(name)
|
27
|
+
# Ensure names given as a symbol stay as a symbol, this is more for
|
28
|
+
# alignment to existing test cases than anything else
|
29
|
+
name = name.to_sym if symbol
|
30
|
+
shmoo = platform::ShmooTest.new(name, options)
|
31
|
+
@collection << shmoo
|
32
|
+
shmoo
|
33
|
+
end
|
34
|
+
alias_method :run, :add
|
35
|
+
alias_method :run_and_branch, :add
|
36
|
+
|
37
|
+
def platform
|
38
|
+
Origen.interface.platform
|
39
|
+
end
|
40
|
+
|
41
|
+
def finalize
|
42
|
+
# match any formatting difference between test suite shmoo and test flow shmoo
|
43
|
+
@collection.each do |shmoo_test|
|
44
|
+
shmoo_test.targets.each_with_index do |target, i|
|
45
|
+
target_is_a_test_suite = false
|
46
|
+
flow.test_suites.sorted_collection.each do |suite|
|
47
|
+
if suite.name.to_s == target.to_s
|
48
|
+
target_is_a_test_suite = true
|
49
|
+
break
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
unless target_is_a_test_suite
|
54
|
+
target_is_a_test_flow = false
|
55
|
+
flow.sub_flows.each do |name, path|
|
56
|
+
target_name = target.to_s.gsub(' ', '_')
|
57
|
+
if name.to_s.downcase == target_name.to_s.downcase
|
58
|
+
target_is_a_test_flow = true
|
59
|
+
shmoo_test.targets[i] = name
|
60
|
+
break
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
unless target_is_a_test_flow
|
65
|
+
fail "Shmoo test target '#{target}' for shmoo test '#{shmoo_test.name}' not found in test suites or sub_flows"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def sorted_collection
|
73
|
+
@collection.sort_by { |st| st.name.to_s }
|
74
|
+
end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
def make_unique(name)
|
79
|
+
name = name.to_s
|
80
|
+
tempname = name
|
81
|
+
i = 0
|
82
|
+
while @existing_names[tempname]
|
83
|
+
i += 1
|
84
|
+
tempname = "#{name}_#{i}"
|
85
|
+
end
|
86
|
+
@existing_names[tempname] = true
|
87
|
+
tempname
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -21,6 +21,12 @@ flow <%= flow_name %> {
|
|
21
21
|
<%= line %>
|
22
22
|
% end
|
23
23
|
|
24
|
+
% end
|
25
|
+
% shmoo_tests.sorted_collection.each do |shmoo_test|
|
26
|
+
% shmoo_test.lines.each do |line|
|
27
|
+
<%= line %>
|
28
|
+
% end
|
29
|
+
|
24
30
|
% end
|
25
31
|
% auxiliary_flows.each do |name, path|
|
26
32
|
flow <%= name %> calls <%= path %> {}
|
@@ -398,6 +398,14 @@ module OrigenTesters
|
|
398
398
|
end
|
399
399
|
end
|
400
400
|
|
401
|
+
def shmoo(name, targets, options = {})
|
402
|
+
if tester.v93k? && tester.smt8?
|
403
|
+
targets = [targets] unless targets.is_a?(Array)
|
404
|
+
st = shmoo_tests.run(name, { targets: targets }.merge(options))
|
405
|
+
flow.test st, options
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
401
409
|
def por(options = {})
|
402
410
|
options = {
|
403
411
|
instance_not_available: true
|
@@ -259,4 +259,33 @@ Flow.create do |options|
|
|
259
259
|
|
260
260
|
double_int_type_check :type_check, number: 6035
|
261
261
|
|
262
|
+
if tester.smt8?
|
263
|
+
log 'shmoo test insertion works as expected, shmoo over test suite 1D'
|
264
|
+
range = { start: 3.0, stop: 5.0, steps: 10 }
|
265
|
+
axis = { name: :axis1, resource_type: 'specVariable', resource_name: 'vcc', range: range }
|
266
|
+
shmoo :shmoo_over_ts_1D, :cc_test_0, title: 'shmooOverTest', execution_order: :horizontal, axis: axis
|
267
|
+
|
268
|
+
log 'shmoo test insertion works as expected, shmoo over test suite 3D'
|
269
|
+
axis = [
|
270
|
+
{ resource_type: :instrumentProperty, resource_name: 'vih', range_relative_percentage: -0.01..0.01, steps: 10 },
|
271
|
+
{ resource_type: :specVariable, resource_name: 'vcc', range: 3..5, steps: 10 },
|
272
|
+
{ resource_type: :suiteParameter, resource_name: 'forceVoltage', range: 4.8..5.2, steps: 10 }
|
273
|
+
]
|
274
|
+
shmoo :shmoo_over_ts_3D, :erase_all, axis: axis, if_enable: 'do_erase'
|
275
|
+
|
276
|
+
log 'shmoo test insertion works as expected, shmoo over multiple test suites'
|
277
|
+
axis = { name: :vih, resource_type: :instrumentProperty, resource_name: 'vih', range_relative_percentage: -0.01..0.01, steps: 10 }
|
278
|
+
shmoo :shmoo_over_ts_multiple_ts, [:margin_read0_ckbd, :margin_read1_ckbd], title: 'shmooOverMultiTS', axis: axis
|
279
|
+
|
280
|
+
log 'shmoo test insertion works as expected, shmoo over test flow'
|
281
|
+
axis = { name: :vcc, resource_type: :specVariable, resource_name: 'vcc', range: 3..5, steps: 10 }
|
282
|
+
shmoo :shmoo_over_tf, "200Mhz Tests", title: 'shmooOverTF', axis: axis, if_failed: :g200
|
283
|
+
|
284
|
+
log 'shmoo test insertion works as expected, shmoo with tracking parameters'
|
285
|
+
range = { start: 0.5, stop: 3.5, steps: 10 }
|
286
|
+
tracking = { name: :voh, resource_type: 'instrumentProperty', resource_name: 'voh', range_relative_value: 1..2 }
|
287
|
+
axis = { name: :vcc, resource_type: 'specVariable', resource_name: 'vcc', range: range, tracking: tracking }
|
288
|
+
shmoo :shmoo_with_tracking_para, :erase, title: 'shmooOverTF', axis: axis
|
289
|
+
end
|
290
|
+
|
262
291
|
end
|
@@ -375,6 +375,7 @@ end
|
|
375
375
|
Indicating step value is optional, default is 1.
|
376
376
|
|
377
377
|
These loops can also be nested:
|
378
|
+
|
378
379
|
~~~ruby
|
379
380
|
loop from: 0, to: 9, step: 2, var: '$LOOP_VARIABLE1'do
|
380
381
|
loop from: 1, to: 10, step: 1, var: '$LOOP_VARIABLE2' do
|
@@ -386,6 +387,7 @@ end
|
|
386
387
|
~~~
|
387
388
|
|
388
389
|
You can also indicate a test number increment if desired (default is 1):
|
390
|
+
|
389
391
|
~~~ruby
|
390
392
|
loop from: 0, to: 5, var: '$LOOP_VARIABLE', test_num_inc: 2 do
|
391
393
|
func :test_myloop3, number: 56200
|
@@ -393,6 +395,7 @@ end
|
|
393
395
|
~~~
|
394
396
|
|
395
397
|
You can also provide a variable starting point:
|
398
|
+
|
396
399
|
~~~ruby
|
397
400
|
loop from: '$TEST_VARIABLE', to: 5, var: '$LOOP_VARIABLE' do
|
398
401
|
func :test_myloop6, number: 56600
|
@@ -134,4 +134,69 @@ If you wish to have a collapse-able block for the variables, you need to set the
|
|
134
134
|
flow_variable_grouping: true
|
135
135
|
~~~
|
136
136
|
|
137
|
+
#### Built-In Shmoo Element
|
138
|
+
|
139
|
+
SMT8 provides a built in shmoo element that can be used to shmoo a test suite or test flow.
|
140
|
+
In order to add setup and execute code to the flow, create the shmoo_test object using `shmoo_tests.run(name, options)` and add it to the flow with `flow.test` method.
|
141
|
+
|
142
|
+
|
143
|
+
Example of integrating the shmoo api in an interface:
|
144
|
+
|
145
|
+
~~~ruby
|
146
|
+
def shmoo(name, targets, options = {})
|
147
|
+
if tester.v93k? && tester.smt8?
|
148
|
+
targets = [targets] unless targets.is_a?(Array)
|
149
|
+
st = shmoo_tests.run(name, { targets: targets }.merge(options))
|
150
|
+
flow.test st, options
|
151
|
+
end
|
152
|
+
end
|
153
|
+
~~~
|
154
|
+
|
155
|
+
|
156
|
+
Then in the flow, you can add the shmoo element to the flow with the following code:
|
157
|
+
|
158
|
+
~~~ruby
|
159
|
+
Flow.create
|
160
|
+
...
|
161
|
+
range = { start: 3.0, stop: 5.0, steps: 10 }
|
162
|
+
axis = { name: :axis1, resource_type: 'specVariable', resource_name: 'vcc', range: range }
|
163
|
+
shmoo :shmoo_over_ts_1D, :cc_test_0, title: 'shmooOverTest', execution_order: :horizontal, axis: axis
|
164
|
+
...
|
165
|
+
end
|
166
|
+
~~~
|
167
|
+
|
168
|
+
Please see Advantest TDC Topic 253309 for details ahbout Shmoo parameters.
|
169
|
+
|
170
|
+
|
171
|
+
The above code will generate the following flow code:
|
172
|
+
|
173
|
+
~~~java
|
174
|
+
flow <FLOW> {
|
175
|
+
setup {
|
176
|
+
...
|
177
|
+
shmoo shmoo_over_ts_1D {
|
178
|
+
target = cc_test_0;
|
179
|
+
resultTitle = "shmooOverTest";
|
180
|
+
executionOrder = horizontal;
|
181
|
+
|
182
|
+
axis [axis1] = {
|
183
|
+
resourceType = specVariable;
|
184
|
+
resourceName = "vcc";
|
185
|
+
range.start = 3.0;
|
186
|
+
range.stop = 5.0;
|
187
|
+
range.steps = 10;
|
188
|
+
};
|
189
|
+
}
|
190
|
+
...
|
191
|
+
}
|
192
|
+
|
193
|
+
execute {
|
194
|
+
...
|
195
|
+
shmoo_over_ts_1D.execute();
|
196
|
+
...
|
197
|
+
}
|
198
|
+
}
|
199
|
+
~~~
|
200
|
+
|
201
|
+
|
137
202
|
% end
|
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.52.
|
4
|
+
version: 0.52.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -479,6 +479,8 @@ files:
|
|
479
479
|
- lib/origen_testers/smartest_based_tester/v93k_smt8/generator.rb
|
480
480
|
- lib/origen_testers/smartest_based_tester/v93k_smt8/limits_file.rb
|
481
481
|
- lib/origen_testers/smartest_based_tester/v93k_smt8/limits_workbook.rb
|
482
|
+
- lib/origen_testers/smartest_based_tester/v93k_smt8/shmoo_test.rb
|
483
|
+
- lib/origen_testers/smartest_based_tester/v93k_smt8/shmoo_tests.rb
|
482
484
|
- lib/origen_testers/smartest_based_tester/v93k_smt8/templates/limits.csv.erb
|
483
485
|
- lib/origen_testers/smartest_based_tester/v93k_smt8/templates/template.flow.erb
|
484
486
|
- lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb
|
@@ -615,7 +617,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
615
617
|
- !ruby/object:Gem::Version
|
616
618
|
version: '0'
|
617
619
|
requirements: []
|
618
|
-
rubygems_version: 3.
|
620
|
+
rubygems_version: 3.2.3
|
619
621
|
signing_key:
|
620
622
|
specification_version: 4
|
621
623
|
summary: This plugin provides Origen tester models to drive ATE type testers like
|