origen_testers 0.52.2 → 0.52.4
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/atp/flow_api.rb +14 -1
- data/lib/origen_testers/smartest_based_tester/base/flow.rb +1 -2
- data/lib/origen_testers/smartest_based_tester/base/test_method.rb +8 -2
- data/lib/origen_testers/smartest_based_tester/base.rb +5 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb +1 -1
- data/lib/origen_testers/test/custom_test_interface.rb +33 -0
- data/lib/origen_testers/test/interface.rb +49 -13
- data/program/components/_prb1_main.rb +2 -0
- data/program/custom_tests.rb +3 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560e05a46dd54729a2e7a499963d3fd8326dd0e85810138a31ffc550144020e6
|
4
|
+
data.tar.gz: c8a794cd187f6434ccd5d0f17b491aa00f93f15bcf32cf9e91973d7f55f17aea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 686ae8123717d61dbe7106ceb6ccdd3775b24c5e00349c3430c95058714aa419500d5fd2d2e526ee0e06c84ce1607a5770faf78f6f3f7f2e94c051759730bfc1
|
7
|
+
data.tar.gz: 86531861b14ba739aba0dc0f4dd093a7452a918972327aee0ffc6f50cb10883af62b0b31214f5062b7ebe54ac7e070f6faaa40d94c1b071aac6c5e8eed700efe
|
data/config/version.rb
CHANGED
@@ -9,7 +9,7 @@ module OrigenTesters::ATP
|
|
9
9
|
end
|
10
10
|
|
11
11
|
([:test, :bin, :pass, :continue, :cz, :log, :sub_test, :volatile, :add_global_flag, :set_flag, :unset_flag, :add_flag, :set, :enable, :disable, :render,
|
12
|
-
:context_changed?, :ids, :describe_bin, :describe_softbin, :describe_soft_bin, :
|
12
|
+
:context_changed?, :ids, :describe_bin, :describe_softbin, :describe_soft_bin, :add_auxiliary_flow] +
|
13
13
|
OrigenTesters::ATP::Flow::CONDITION_KEYS.keys + OrigenTesters::ATP::Flow::RELATIONAL_OPERATORS).each do |method|
|
14
14
|
define_method method do |*args, &block|
|
15
15
|
options = args.pop if args.last.is_a?(Hash)
|
@@ -23,6 +23,19 @@ module OrigenTesters::ATP
|
|
23
23
|
|
24
24
|
alias_method :logprint, :log
|
25
25
|
|
26
|
+
def loop(*args, &block)
|
27
|
+
if args.empty?
|
28
|
+
super(&block)
|
29
|
+
else
|
30
|
+
options = args.pop if args.last.is_a?(Hash)
|
31
|
+
options ||= {}
|
32
|
+
add_meta!(options) if respond_to?(:add_meta!, true)
|
33
|
+
add_description!(options) if respond_to?(:add_description!, true)
|
34
|
+
args << options
|
35
|
+
atp.send(:loop, *args, &block)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
26
39
|
def lo_limit(value, options)
|
27
40
|
{
|
28
41
|
value: value,
|
@@ -50,8 +50,7 @@ module OrigenTesters
|
|
50
50
|
parents.unshift(File.basename(f.filename, '.*').to_s.downcase)
|
51
51
|
f = f.parent
|
52
52
|
end
|
53
|
-
|
54
|
-
if Origen.interface.respond_to?(:insertion)
|
53
|
+
if Origen.interface.respond_to?(:insertion) && tester.insertion_in_the_flow_path
|
55
54
|
File.join tester.package_namespace, Origen.interface.insertion.to_s, 'flows', *parents
|
56
55
|
else
|
57
56
|
File.join tester.package_namespace, 'flows', *parents
|
@@ -132,8 +132,10 @@ module OrigenTesters
|
|
132
132
|
"#{val}[Hz]"
|
133
133
|
when :string
|
134
134
|
val.to_s
|
135
|
-
when :integer
|
136
|
-
val
|
135
|
+
when :integer
|
136
|
+
val.to_i
|
137
|
+
when :double
|
138
|
+
val.to_f
|
137
139
|
when :boolean
|
138
140
|
# Check for valid values
|
139
141
|
if [0, 1, true, false, 'true', 'false'].include?(val)
|
@@ -198,6 +200,10 @@ module OrigenTesters
|
|
198
200
|
end
|
199
201
|
end
|
200
202
|
|
203
|
+
def remove_parameter(name)
|
204
|
+
@parameters.delete(name)
|
205
|
+
end
|
206
|
+
|
201
207
|
private
|
202
208
|
|
203
209
|
def inverse_of(type)
|
@@ -83,6 +83,10 @@ module OrigenTesters
|
|
83
83
|
# (SMT8 only)
|
84
84
|
attr_accessor :print_all_params
|
85
85
|
|
86
|
+
# When set to true, the flow path will have insertion in the subdirectories
|
87
|
+
# (SMT8 only)
|
88
|
+
attr_reader :insertion_in_the_flow_path
|
89
|
+
|
86
90
|
def initialize(options = {})
|
87
91
|
options = {
|
88
92
|
# whether to use multiport bursts or not, if so this indicates the name of the port to use
|
@@ -132,6 +136,7 @@ module OrigenTesters
|
|
132
136
|
@capture_style = :hram # default to use hram for capture
|
133
137
|
@overlay_subr = nil
|
134
138
|
@overlay_history = {} # used to track labels, subroutines, digsrc pins used etc
|
139
|
+
@insertion_in_the_flow_path = options[:insertion_in_the_flow_path] # add insertion for path to the flows
|
135
140
|
|
136
141
|
if options[:add_flow_enable]
|
137
142
|
self.add_flow_enable = options[:add_flow_enable]
|
@@ -124,7 +124,7 @@ module OrigenTesters
|
|
124
124
|
# Guarentee hash is using all symbol keys
|
125
125
|
# Since we cannot guarentee ruby version is greater than 2.5, we have to use an older syntax to
|
126
126
|
value_hash = value_hash.inject({}) { |memo, (k, v)| memo[k.to_sym] = v; memo }
|
127
|
-
nested_key = nested_param.first.to_sym
|
127
|
+
nested_key = nested_param.first.to_s.gsub('.', '_').to_sym
|
128
128
|
nested_key_underscore = nested_key.to_s.underscore.to_sym
|
129
129
|
nested_params_accepted_keys << nested_key
|
130
130
|
nested_params_accepted_keys << nested_key_underscore
|
@@ -33,6 +33,20 @@ module OrigenTesters
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
def custom_c(name, options = {})
|
37
|
+
name = "custom_c_#{name}".to_sym
|
38
|
+
if tester.v93k?
|
39
|
+
ti = test_methods.my_tml.test_c
|
40
|
+
ti.my_arg0 = 'arg0_set'
|
41
|
+
if options[:my_arg1]
|
42
|
+
ti.my_arg0 = 'arg1_should_render'
|
43
|
+
ti.my_arg1 = options[:my_arg1]
|
44
|
+
else
|
45
|
+
ti.my_arg0 = 'arg1_should_not_render'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
36
50
|
def custom_hash(name, options = {})
|
37
51
|
name = "custom_hash_#{name}".to_sym
|
38
52
|
if tester.v93k? && tester.smt8?
|
@@ -96,6 +110,25 @@ module OrigenTesters
|
|
96
110
|
my_arg0: [:string, ''],
|
97
111
|
my_arg1: [:string, 'b_default_value']
|
98
112
|
},
|
113
|
+
test_c: {
|
114
|
+
tester_state: [:string, 'CONNECTED', %w(CONNECTED UNCHANGED)],
|
115
|
+
test_name: [:string, 'Functional'],
|
116
|
+
my_arg0: [:string, ''],
|
117
|
+
my_arg1: [:string, 'DELETE_ME'],
|
118
|
+
my_arg2: [:string, 'VOLT', %w(VOLT CURR)],
|
119
|
+
|
120
|
+
# Define any methods you want the test method to have
|
121
|
+
methods: {
|
122
|
+
# An optional finalize function can be supplied to do any final test instance configuration, this
|
123
|
+
# function will be called immediately before the test method is finally rendered. The test method
|
124
|
+
# object itself will be passed in as an argument.
|
125
|
+
finalize: lambda do |tm|
|
126
|
+
if tm.my_arg1 == 'DELETE_ME'
|
127
|
+
tm.remove_parameter(:my_arg1)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
}
|
131
|
+
},
|
99
132
|
test_hash: {
|
100
133
|
# Parameters can be defined with an underscored symbol as the name, this can be used
|
101
134
|
# if the C++ implementation follows the standard V93K convention of calling the attribute
|
@@ -57,22 +57,38 @@ module OrigenTesters
|
|
57
57
|
'hashParameter': [{ param_name0: [:string, 'NO'], param_name1: [:integer, 0] }],
|
58
58
|
'hashParameter2': [{ param_name0: [:string, 'NO'], param_name1: [:integer, 0] }],
|
59
59
|
'nestedHashParameter': [{
|
60
|
-
param_name0:
|
61
|
-
param_list_strings:
|
62
|
-
param_list_classes:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
param_name0: [:string, ''],
|
61
|
+
param_list_strings: [:list_strings, %w(E1 E2)],
|
62
|
+
param_list_classes: [:list_classes, %w(E1 E2)],
|
63
|
+
'param_group.param0': [:string, ''],
|
64
|
+
param_name1: [{
|
65
|
+
param_name_int: [:integer, 0],
|
66
|
+
param_name_double: [:double, 0],
|
67
|
+
param_list_strings: [:list_strings, %w(E1 E2)],
|
68
|
+
param_list_classes: [:list_classes, %w(E1 E2)],
|
69
|
+
'param_group.param1': [:string, '']
|
67
70
|
}]
|
68
71
|
}],
|
69
72
|
'nestedHashParameter2': [{
|
70
73
|
param_name0: [:string, ''],
|
71
74
|
param_name1: [{
|
72
|
-
|
75
|
+
param_name_int: [:integer, 0]
|
73
76
|
}]
|
74
77
|
}]
|
75
78
|
}
|
79
|
+
add_tml :my_type_check,
|
80
|
+
class_name: 'MyTypeCheck',
|
81
|
+
|
82
|
+
# Here is a test definition.
|
83
|
+
# The identifier should be lower-cased and underscored, in-keeping with Ruby naming conventions.
|
84
|
+
# By default the class name will be the camel-cased version of this identifier, so 'myTest' in
|
85
|
+
# this case.
|
86
|
+
my_type_check_test: {
|
87
|
+
# [OPTIONAL] The C++ test method class name can be overridden from the default like this:
|
88
|
+
class_name: 'MyHashExampleClass',
|
89
|
+
int: [:integer, 1],
|
90
|
+
double: [:double, 1.0]
|
91
|
+
}
|
76
92
|
end
|
77
93
|
|
78
94
|
def add_charz
|
@@ -279,6 +295,21 @@ module OrigenTesters
|
|
279
295
|
end
|
280
296
|
end
|
281
297
|
|
298
|
+
def double_int_type_check(name, options = {})
|
299
|
+
number = options[:number]
|
300
|
+
if tester.v93k?
|
301
|
+
block_loop(name, options) do |block, i|
|
302
|
+
options[:number] = number + i if number && i
|
303
|
+
tm = test_methods.my_type_check.my_type_check_test
|
304
|
+
tm.int = '1'
|
305
|
+
tm.double = '1.0'
|
306
|
+
ts = test_suites.run(name, options)
|
307
|
+
ts.test_method = tm
|
308
|
+
flow.test ts, options
|
309
|
+
end
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
282
313
|
def my_hash_test(name, options = {})
|
283
314
|
number = options[:number]
|
284
315
|
|
@@ -291,16 +322,20 @@ module OrigenTesters
|
|
291
322
|
}
|
292
323
|
tm.nestedHashParameter = {
|
293
324
|
my_param_name0: {
|
294
|
-
param_name0:
|
295
|
-
|
325
|
+
param_name0: 'hello',
|
326
|
+
param_group_param0: 'test_group',
|
327
|
+
param_name1: {
|
296
328
|
my_param_name1: {
|
297
|
-
|
329
|
+
param_name_int: '1',
|
330
|
+
param_name_double: '1.0',
|
331
|
+
param_group_param1: 'test_nested_group'
|
298
332
|
},
|
299
333
|
my_param_name2: {
|
300
|
-
|
334
|
+
param_name_int: 2,
|
335
|
+
param_name_double: 2.0
|
301
336
|
},
|
302
337
|
my_param_name3: {
|
303
|
-
|
338
|
+
param_name_int: 3
|
304
339
|
}
|
305
340
|
}
|
306
341
|
}
|
@@ -313,6 +348,7 @@ module OrigenTesters
|
|
313
348
|
param_name0: 'goodbye forever'
|
314
349
|
}
|
315
350
|
}
|
351
|
+
tm.samples = '2'
|
316
352
|
ts = test_suites.run(name, options)
|
317
353
|
ts.test_method = tm
|
318
354
|
ts.spec = options.delete(:pin_levels) if options[:pin_levels]
|
data/program/custom_tests.rb
CHANGED
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.4
|
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-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -156,6 +156,20 @@ dependencies:
|
|
156
156
|
- - '='
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: 0.0.7
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: parallel
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '1.24'
|
166
|
+
type: :runtime
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '1.24'
|
159
173
|
description:
|
160
174
|
email:
|
161
175
|
- stephen.f.mcginty@gmail.com
|
@@ -601,7 +615,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
601
615
|
- !ruby/object:Gem::Version
|
602
616
|
version: '0'
|
603
617
|
requirements: []
|
604
|
-
rubygems_version: 3.
|
618
|
+
rubygems_version: 3.4.10
|
605
619
|
signing_key:
|
606
620
|
specification_version: 4
|
607
621
|
summary: This plugin provides Origen tester models to drive ATE type testers like
|