origen_testers 0.52.2 → 0.52.3

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: 0cc68d0b072cf46956e8af1c821d6c786e3a2293d92b7f18b2562d7494794909
4
- data.tar.gz: 439d5555e5b2f5aa4bc9675b540e9749300971ac3b0b789af181ebba8b860c78
3
+ metadata.gz: 5349ea4cd6f5b1ed7997b2565c6eda09ad601070a71195d40375d1f70faab52d
4
+ data.tar.gz: 571441a791984b34c8fe1205a05ede6fe1b6f89973d090fc2e6f7ba52da51a35
5
5
  SHA512:
6
- metadata.gz: c58c6ec7dabf1aea38f10934367e0bae4dc6a4131bd0ad9dcd0803a8a719e7113862a156801d144ac166f6da2861aa2afb096675ed2e859e7e7ce6b8b707e8c1
7
- data.tar.gz: e7f4e559cab595f3858a62a4103cf99b6827429ec268b60890fcd62ab7e57c62c2b101d725463fe12a9007ea5a782fbe2ff31a559d46ca5673749ff9479cd8e2
6
+ metadata.gz: 1b133340695a1ddab2db3f1e651748b15eebeb1f524866efcf04e1f5ca45bbfacfd753be0a31cd5b6c99b51b47df4c78229c09699c4271c4b03c57ef8760bcf7
7
+ data.tar.gz: 45fd99e42edb9e438ec6930eeb6bc4a492e8f70f957cae8ffb2187863087c39b8f0bf97adfac9c6330e1374ebf457b158eddcbeca194d2affbd5fb1f0d30e355
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 52
4
- BUGFIX = 2
4
+ BUGFIX = 3
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -626,32 +626,37 @@ module OrigenTesters::ATP
626
626
  end
627
627
 
628
628
  def loop(*args, &block)
629
- unless args[0].keys.include?(:from) && args[0].keys.include?(:to)
630
- fail 'Loop must specify :from, :to'
631
- end
632
- # assume 1 if :step not provided
633
- unless args[0].keys.include?(:step)
634
- args[0][:step] = 1
635
- end
636
- # assume 1 if :test_num_inc not provided
637
- unless args[0].keys.include?(:test_num_inc)
638
- args[0][:test_num_inc] = 1
639
- end
640
- # Add node for set of flag to be used for loop
641
- unless args[0][:var].nil?
642
- unless tester.smt8?
643
- set(args[0][:var], 0)
629
+ if args[0].except(:source_file, :source_line_number).empty?
630
+ # not a flow api call, just a loop block
631
+ super(&block)
632
+ else
633
+ unless args[0].keys.include?(:from) && args[0].keys.include?(:to)
634
+ fail 'Loop must specify :from, :to'
644
635
  end
645
- end
646
- extract_meta!(options) do
647
- apply_conditions(options) do
648
- # always pass 5-element array to loop node to simplify downstream parser
649
- # element, 'var', will be nil if not specified by loop call
650
- params = [args[0][:from], args[0][:to], args[0][:step], args[0][:var], args[0][:test_num_inc]]
636
+ # assume 1 if :step not provided
637
+ unless args[0].keys.include?(:step)
638
+ args[0][:step] = 1
639
+ end
640
+ # assume 1 if :test_num_inc not provided
641
+ unless args[0].keys.include?(:test_num_inc)
642
+ args[0][:test_num_inc] = 1
643
+ end
644
+ # Add node for set of flag to be used for loop
645
+ unless args[0][:var].nil?
646
+ unless tester.smt8?
647
+ set(args[0][:var], 0)
648
+ end
649
+ end
650
+ extract_meta!(options) do
651
+ apply_conditions(options) do
652
+ # always pass 5-element array to loop node to simplify downstream parser
653
+ # element, 'var', will be nil if not specified by loop call
654
+ params = [args[0][:from], args[0][:to], args[0][:step], args[0][:var], args[0][:test_num_inc]]
651
655
 
652
- node = n(:loop, params)
653
- node = append_to(node) { block.call }
654
- node
656
+ node = n(:loop, params)
657
+ node = append_to(node) { block.call }
658
+ node
659
+ end
655
660
  end
656
661
  end
657
662
  end
@@ -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
- # need to variablize this for internal usage!!
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, :double
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]
@@ -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
@@ -61,7 +61,8 @@ module OrigenTesters
61
61
  param_list_strings: [:list_strings, %w(E1 E2)],
62
62
  param_list_classes: [:list_classes, %w(E1 E2)],
63
63
  param_name1: [{
64
- param_name0: [:integer, 0],
64
+ param_name_int: [:integer, 0],
65
+ param_name_double: [:double, 0],
65
66
  param_list_strings: [:list_strings, %w(E1 E2)],
66
67
  param_list_classes: [:list_classes, %w(E1 E2)]
67
68
  }]
@@ -69,10 +70,23 @@ module OrigenTesters
69
70
  'nestedHashParameter2': [{
70
71
  param_name0: [:string, ''],
71
72
  param_name1: [{
72
- param_name0: [:integer, 0]
73
+ param_name_int: [:integer, 0]
73
74
  }]
74
75
  }]
75
76
  }
77
+ add_tml :my_type_check,
78
+ class_name: 'MyTypeCheck',
79
+
80
+ # Here is a test definition.
81
+ # The identifier should be lower-cased and underscored, in-keeping with Ruby naming conventions.
82
+ # By default the class name will be the camel-cased version of this identifier, so 'myTest' in
83
+ # this case.
84
+ my_type_check_test: {
85
+ # [OPTIONAL] The C++ test method class name can be overridden from the default like this:
86
+ class_name: 'MyHashExampleClass',
87
+ int: [:integer, 1],
88
+ double: [:double, 1.0]
89
+ }
76
90
  end
77
91
 
78
92
  def add_charz
@@ -279,6 +293,21 @@ module OrigenTesters
279
293
  end
280
294
  end
281
295
 
296
+ def double_int_type_check(name, options = {})
297
+ number = options[:number]
298
+ if tester.v93k?
299
+ block_loop(name, options) do |block, i|
300
+ options[:number] = number + i if number && i
301
+ tm = test_methods.my_type_check.my_type_check_test
302
+ tm.int = '1'
303
+ tm.double = '1.0'
304
+ ts = test_suites.run(name, options)
305
+ ts.test_method = tm
306
+ flow.test ts, options
307
+ end
308
+ end
309
+ end
310
+
282
311
  def my_hash_test(name, options = {})
283
312
  number = options[:number]
284
313
 
@@ -294,13 +323,15 @@ module OrigenTesters
294
323
  param_name0: 'hello',
295
324
  param_name1: {
296
325
  my_param_name1: {
297
- param_name0: 1
326
+ param_name_int: '1',
327
+ param_name_double: '1.0'
298
328
  },
299
329
  my_param_name2: {
300
- param_name0: 2
330
+ param_name_int: 2,
331
+ param_name_double: 2.0
301
332
  },
302
333
  my_param_name3: {
303
- param_name0: 3
334
+ param_name_int: 3
304
335
  }
305
336
  }
306
337
  }
@@ -313,6 +344,7 @@ module OrigenTesters
313
344
  param_name0: 'goodbye forever'
314
345
  }
315
346
  }
347
+ tm.samples = '2'
316
348
  ts = test_suites.run(name, options)
317
349
  ts.test_method = tm
318
350
  ts.spec = options.delete(:pin_levels) if options[:pin_levels]
@@ -257,4 +257,6 @@ Flow.create do |options|
257
257
  func :force_serial_false_test, force_serial: false
258
258
  end
259
259
 
260
+ double_int_type_check :type_check, number: 6035
261
+
260
262
  end
@@ -12,5 +12,8 @@ Flow.create interface: 'OrigenTesters::Test::CustomTestInterface', flow_descript
12
12
  if tester.smt8?
13
13
  custom_hash :test5, number: 30050
14
14
  end
15
+
16
+ custom_c :test6, number: 30060
17
+ custom_c :test7, number: 30070, my_arg1: 'KEEP_ME'
15
18
  end
16
19
  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.2
4
+ version: 0.52.3
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-05-23 00:00:00.000000000 Z
11
+ date: 2024-06-20 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