origen_testers 0.51.1 → 0.51.2
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/charz/profile.rb +55 -3
- data/lib/origen_testers/charz/session.rb +18 -6
- data/lib/origen_testers/charz.rb +90 -1
- data/lib/origen_testers/test/interface.rb +22 -0
- data/program/charz.rb +25 -9
- data/templates/origen_guides/program/charz.md.erb +21 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1ba41af6b65ac674916979e0732f2ec945cd3871a9764ed26eed0c1fc9ad9df
|
|
4
|
+
data.tar.gz: 63be076e3b7dfc1dfa525b420b233b8a79eb33f6c86a06852f0069f01cfd7668
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13f984fad6402b0749eaa3029aa8ccecf3870f6e534c553884a6dc6de42a11b4383e268378ec84968b7e71ce2ed75b800fe9c8f7128f37c32e3b1b78a7d70ec7
|
|
7
|
+
data.tar.gz: a4b421dfd78750be92b44112ca13506a6f281a98ee9f84faa3ccf49b08a4e1f32fecfe979aa7f2eafb4f66a1875a66ad092949d39bd7638ccdbfb6ba812308a6
|
data/config/version.rb
CHANGED
|
@@ -19,7 +19,7 @@ module OrigenTesters
|
|
|
19
19
|
# @return [Array] list of charz routines to be called under this profile
|
|
20
20
|
# @!attribute charz_only
|
|
21
21
|
# @return [Boolean] indicates if the point tests should or shouldn't be added to the flow
|
|
22
|
-
attr_accessor :id, :name, :placement, :on_result, :enables, :flags, :routines, :charz_only
|
|
22
|
+
attr_accessor :id, :name, :placement, :on_result, :enables, :flags, :routines, :charz_only, :and_enables, :and_flags
|
|
23
23
|
|
|
24
24
|
def initialize(id, options, &block)
|
|
25
25
|
@id = id
|
|
@@ -74,8 +74,20 @@ module OrigenTesters
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
unless @gate_checks == false
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
if @and_enables && @and_flags
|
|
78
|
+
Origen.log.error "@and_enables and @and_flags are both set to true. Please only 'and' one gate type"
|
|
79
|
+
fail
|
|
80
|
+
end
|
|
81
|
+
if @and_enables
|
|
82
|
+
gate_check(@flags, :flags) if @flags
|
|
83
|
+
gate_check_and(@enables, :enables, @flags) if @enables
|
|
84
|
+
elsif @and_flags
|
|
85
|
+
gate_check(@enables, :enables) if @enables
|
|
86
|
+
gate_check_and(@flags, :flags, @enables) if @flags
|
|
87
|
+
else
|
|
88
|
+
gate_check(@enables, :enable) if @enables
|
|
89
|
+
gate_check(@flags, :flags) if @flags
|
|
90
|
+
end
|
|
79
91
|
end
|
|
80
92
|
end
|
|
81
93
|
|
|
@@ -112,6 +124,46 @@ module OrigenTesters
|
|
|
112
124
|
end
|
|
113
125
|
end
|
|
114
126
|
|
|
127
|
+
def gate_check_and(gates, gate_type, other_gate)
|
|
128
|
+
if other_gate.is_a? Hash
|
|
129
|
+
Origen.log.error "Profile #{id}: #{other_gate} When using &&-ing feature, the non-anded gate can not be of type hash."
|
|
130
|
+
fail
|
|
131
|
+
end
|
|
132
|
+
case gates
|
|
133
|
+
when Symbol, String
|
|
134
|
+
return
|
|
135
|
+
when Array
|
|
136
|
+
unknown_gates = gates.reject { |gate| [String, Symbol].include? gate.class }
|
|
137
|
+
if unknown_gates.empty?
|
|
138
|
+
return
|
|
139
|
+
else
|
|
140
|
+
Origen.log.error "Profile #{id}: Unknown #{gate_type} type(s) in #{gate_type} array."
|
|
141
|
+
Origen.log.error "Arrays must contain Strings and/or Symbols, but #{unknown_gates.map(&:class).uniq } were found in #{gates}"
|
|
142
|
+
fail
|
|
143
|
+
end
|
|
144
|
+
when Hash
|
|
145
|
+
gates.each do |gated_routine, gates|
|
|
146
|
+
if gated_routine.is_a? Hash
|
|
147
|
+
Origen.log.error "Profile #{id}: #{gate_type} Hash keys cannot be of type Hash, but only Symbol, String, or Array"
|
|
148
|
+
fail
|
|
149
|
+
end
|
|
150
|
+
unless @defined_routines.include?(gated_routine)
|
|
151
|
+
Origen.log.error "Profile #{id}: #{gated_routine} Hash keys for &&-ed gates must be defined routines."
|
|
152
|
+
fail
|
|
153
|
+
end
|
|
154
|
+
gates = [gates] unless gates.is_a? Array
|
|
155
|
+
unknown_gates = gates.reject { |gate| [String, Symbol].include? gate.class }
|
|
156
|
+
unless unknown_gates.empty?
|
|
157
|
+
Origen.log.error "Gate array must contain Strings and/or Symbols, but #{unknown_gates.map(&:class).uniq } were found in #{gates}"
|
|
158
|
+
fail
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
else
|
|
162
|
+
Origen.log.error "Profile #{id}: Unknown #{gate_type} type: #{gates.class}. #{gate_type} must be of type Symbol, String, Array, or Hash"
|
|
163
|
+
fail
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
115
167
|
def method_missing(m, *args, &block)
|
|
116
168
|
ivar = "@#{m.to_s.gsub('=', '')}"
|
|
117
169
|
ivar_sym = ":#{ivar}"
|
|
@@ -16,12 +16,13 @@ module OrigenTesters
|
|
|
16
16
|
@defaults = options[:defaults]
|
|
17
17
|
else
|
|
18
18
|
@defaults = {
|
|
19
|
-
placement:
|
|
20
|
-
on_result:
|
|
21
|
-
enables:
|
|
22
|
-
flags:
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
placement: :inline,
|
|
20
|
+
on_result: nil,
|
|
21
|
+
enables: nil,
|
|
22
|
+
flags: nil,
|
|
23
|
+
enables_and: nil,
|
|
24
|
+
name: 'charz',
|
|
25
|
+
charz_only: false
|
|
25
26
|
}
|
|
26
27
|
end
|
|
27
28
|
end
|
|
@@ -53,6 +54,17 @@ module OrigenTesters
|
|
|
53
54
|
return @valid
|
|
54
55
|
end
|
|
55
56
|
@defined_routines = options.delete(:defined_routines)
|
|
57
|
+
|
|
58
|
+
if charz_obj.and_flags
|
|
59
|
+
@and_flags = charz_obj.and_flags
|
|
60
|
+
else
|
|
61
|
+
@and_flags = false
|
|
62
|
+
end
|
|
63
|
+
if charz_obj.and_enables
|
|
64
|
+
@and_enables = charz_obj.and_enables
|
|
65
|
+
else
|
|
66
|
+
@and_enables = false
|
|
67
|
+
end
|
|
56
68
|
assign_by_priority(:placement, charz_obj, options)
|
|
57
69
|
assign_by_priority(:on_result, charz_obj, options)
|
|
58
70
|
assign_by_priority(:enables, charz_obj, options)
|
data/lib/origen_testers/charz.rb
CHANGED
|
@@ -334,13 +334,102 @@ module OrigenTesters
|
|
|
334
334
|
#
|
|
335
335
|
# This is the final method of handling the insert_charz_test usecases, where the block thats been passed around is finally called
|
|
336
336
|
# the user's provided block is passed the current routine (one at a time) to then take its info to generate a charz test
|
|
337
|
+
|
|
338
|
+
# Pass an "and_if_true" variable for enables and flags? And use that to to decide what to do? Then we don't need 4.
|
|
339
|
+
# But the hash has to be structured a different way for the enable_and (routine is key, enables is value.)
|
|
337
340
|
def process_gates(options, &block)
|
|
338
341
|
if options[:skip_gates] || !(charz_session.enables || charz_session.flags)
|
|
339
342
|
charz_session.routines.each do |routine|
|
|
340
343
|
block.call(options.merge(current_routine: routine))
|
|
341
344
|
end
|
|
342
345
|
else
|
|
343
|
-
if charz_session.
|
|
346
|
+
if charz_session.and_enables
|
|
347
|
+
if charz_session.flags
|
|
348
|
+
# Wrap all tests in flag, wrap some tests in anded enables.
|
|
349
|
+
ungated_routines = charz_session.routines - charz_session.enables.keys
|
|
350
|
+
ungated_routines.each do |routine|
|
|
351
|
+
if_flag charz_session.flags do
|
|
352
|
+
block.call(options.merge(current_routine: routine))
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
gated_routines = charz_session.routines - ungated_routines
|
|
356
|
+
# Build the proc which contains the nested if statements for each routine so they are anded.
|
|
357
|
+
gated_routines.each do |routine|
|
|
358
|
+
my_proc = -> do
|
|
359
|
+
if_flag charz_session.flags do
|
|
360
|
+
block.call(options.merge(current_routine: routine))
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
charz_session.enables[routine].inject(my_proc) do |my_block, enable|
|
|
364
|
+
lambda do
|
|
365
|
+
if_enable :"#{enable}" do
|
|
366
|
+
my_block.call
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
end.call
|
|
370
|
+
end
|
|
371
|
+
else
|
|
372
|
+
ungated_routines = charz_session.routines - charz_session.enables.keys
|
|
373
|
+
ungated_routines.each do |routine|
|
|
374
|
+
block.call(options.merge(current_routine: routine))
|
|
375
|
+
end
|
|
376
|
+
# Build the proc which contains the nested if statements for each routine so they are anded.
|
|
377
|
+
gated_routines = charz_session.routines - ungated_routines
|
|
378
|
+
gated_routines.each do |routine|
|
|
379
|
+
my_proc = -> { block.call(options.merge(current_routine: routine)) }
|
|
380
|
+
charz_session.enables[routine].inject(my_proc) do |my_block, enable|
|
|
381
|
+
lambda do
|
|
382
|
+
if_enable :"#{enable}" do
|
|
383
|
+
my_block.call
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
end.call
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
elsif charz_session.and_flags
|
|
390
|
+
if charz_session.enables
|
|
391
|
+
# Wrap all tests in enable, some tests in anded flags.
|
|
392
|
+
ungated_routines = charz_session.routines - charz_session.flags.keys
|
|
393
|
+
ungated_routines.each do |routine|
|
|
394
|
+
if_enable charz_session.enables do
|
|
395
|
+
block.call(options.merge(current_routine: routine))
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
# Build the proc which contains the nested if statemements for each routine so they are anded.
|
|
399
|
+
gated_routines = charz_session.routines - ungated_routines
|
|
400
|
+
gated_routines.each do |routine|
|
|
401
|
+
my_proc = -> do
|
|
402
|
+
if_enable charz_session.enables do
|
|
403
|
+
block.call(options.merge(current_routine: routine))
|
|
404
|
+
end
|
|
405
|
+
end
|
|
406
|
+
charz_session.flags[routine].inject(my_proc) do |my_block, flag|
|
|
407
|
+
lambda do
|
|
408
|
+
if_flag :"#{flag}" do
|
|
409
|
+
my_block.call
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
end.call
|
|
413
|
+
end
|
|
414
|
+
else
|
|
415
|
+
ungated_routines = charz_session.routines - charz_session.flags.keys
|
|
416
|
+
ungated_routines.each do |routine|
|
|
417
|
+
block.call(options.merge(current_routine: routine))
|
|
418
|
+
end
|
|
419
|
+
# Build the proc which contains the nested if statemements for each routine so they are anded.
|
|
420
|
+
gated_routines = charz_session.routines - ungated_routines
|
|
421
|
+
gated_routines.each do |routine|
|
|
422
|
+
my_proc = -> { block.call(options.merge(current_routine: routine)) }
|
|
423
|
+
charz_session.flags[routine].inject(my_proc) do |my_block, flag|
|
|
424
|
+
lambda do
|
|
425
|
+
if_flag :"#{flag}" do
|
|
426
|
+
my_block.call
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end.call
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
elsif charz_session.enables && charz_session.flags
|
|
344
433
|
if charz_session.enables.is_a?(Hash) && !charz_session.flags.is_a?(Hash)
|
|
345
434
|
# wrap all tests in flags, wrap specific tests in enables
|
|
346
435
|
if_flag charz_session.flags do
|
|
@@ -50,6 +50,28 @@ module OrigenTesters
|
|
|
50
50
|
profile.enables = { ['$MyEnable1'] => [:routine1], ['$MyEnable2'] => [:routine2, :routine3], '$MyEnable3' => :routine5 }
|
|
51
51
|
profile.routines = [:routine1, :routine2, :routine3, :routine4, :routine5, :routine6]
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
add_charz_profile :simple_anded_flags do |profile|
|
|
55
|
+
profile.and_flags = true
|
|
56
|
+
profile.routines = [:routine1]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
add_charz_profile :simple_anded_enables do |profile|
|
|
60
|
+
profile.and_enables = true
|
|
61
|
+
profile.routines = [:routine1]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
add_charz_profile :complex_anded_flags do |profile|
|
|
65
|
+
profile.and_flags = true
|
|
66
|
+
profile.enables = :my_enable
|
|
67
|
+
profile.routines = [:routine1]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
add_charz_profile :complex_anded_enables do |profile|
|
|
71
|
+
profile.and_enables = true
|
|
72
|
+
profile.flags = :my_flag
|
|
73
|
+
profile.routines = [:routine1]
|
|
74
|
+
end
|
|
53
75
|
end
|
|
54
76
|
|
|
55
77
|
# Test that the block form of flow control methods like this can
|
data/program/charz.rb
CHANGED
|
@@ -7,11 +7,11 @@ Flow.create interface: 'OrigenTesters::Test::Interface' do
|
|
|
7
7
|
|
|
8
8
|
if tester.v93k? && tester.smt7?
|
|
9
9
|
charz_on :complex_gates, { on_result: :fail }
|
|
10
|
-
|
|
10
|
+
func_with_charz :func_complex_gates_on_fail
|
|
11
11
|
charz_off
|
|
12
12
|
|
|
13
13
|
charz_on :complex_gates, { enables: :my_enable }
|
|
14
|
-
|
|
14
|
+
func_with_charz :func_complex_flag_simple_enable
|
|
15
15
|
charz_off
|
|
16
16
|
|
|
17
17
|
charz_on :complex_gates, { flags: :my_flag } do
|
|
@@ -19,17 +19,17 @@ Flow.create interface: 'OrigenTesters::Test::Interface' do
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
charz_on :cz_only, { placement: :eof }
|
|
22
|
-
|
|
22
|
+
func_with_charz :func_charz_only
|
|
23
23
|
charz_off
|
|
24
24
|
|
|
25
25
|
func_with_charz :func_test_level_routine, charz: [:routine1, { type: :routine }]
|
|
26
26
|
|
|
27
27
|
charz_on :cz
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
func_with_charz :func_skip_group, skip_group: true
|
|
29
|
+
charz_pause
|
|
30
|
+
func_with_charz :func_pause_charz
|
|
31
|
+
charz_resume
|
|
32
|
+
func_with_charz :func_resume_charz
|
|
33
33
|
charz_off
|
|
34
34
|
|
|
35
35
|
charz_on :simple_gates, { on_result: :pass } do
|
|
@@ -43,6 +43,22 @@ Flow.create interface: 'OrigenTesters::Test::Interface' do
|
|
|
43
43
|
charz_on :simple_gates, { flags: nil }
|
|
44
44
|
func_with_charz :func_simple_enables
|
|
45
45
|
charz_off
|
|
46
|
-
end
|
|
47
46
|
|
|
47
|
+
charz_on :simple_anded_flags, { flags: { routine1: [:my_flag1, :my_flag2]}}
|
|
48
|
+
func_with_charz :func_simple_anded_flags
|
|
49
|
+
charz_off
|
|
50
|
+
|
|
51
|
+
charz_on :simple_anded_enables, {enables: { routine1: [:my_enable1, :my_enable2]}}
|
|
52
|
+
func_with_charz :func_simple_anded_enables
|
|
53
|
+
charz_off
|
|
54
|
+
|
|
55
|
+
charz_on :complex_anded_flags, {flags: { routine1: [:my_flag1, :my_flag2]}}
|
|
56
|
+
func_with_charz :func_complex_anded_flags
|
|
57
|
+
charz_off
|
|
58
|
+
|
|
59
|
+
charz_on :complex_anded_enables, {enables: { routine1: [:my_enable1, :my_enable2]}}
|
|
60
|
+
func_with_charz :func_complex_anded_enables
|
|
61
|
+
charz_off
|
|
62
|
+
|
|
63
|
+
end
|
|
48
64
|
end
|
|
@@ -48,7 +48,7 @@ end
|
|
|
48
48
|
Charz profiles contain a collection of routines, as well as test creation meta data related to test placement, production test result dependence, and conditional execution.
|
|
49
49
|
|
|
50
50
|
The interface adds charz profiles by calling the `add_charz_profile` method. To create a profile that contains previously defined vmin and vmax search routines, whose resulting searches
|
|
51
|
-
only run if the production test failed, and sets the vmax search routine to only run if the 'VmaxEnable' variable is set
|
|
51
|
+
only run if the production test failed, and sets the vmax search routine to only run if the 'VmaxEnable' variable is set.
|
|
52
52
|
|
|
53
53
|
~~~ruby
|
|
54
54
|
add_charz_profile :fail_searches do |profile|
|
|
@@ -59,6 +59,26 @@ add_charz_profile :fail_searches do |profile|
|
|
|
59
59
|
end
|
|
60
60
|
~~~
|
|
61
61
|
|
|
62
|
+
The default behavior for gates is to "OR" them if multiple are defined. The below will result in each routine being nested inside 'my_enable1 or my_enable2'.
|
|
63
|
+
~~~ruby
|
|
64
|
+
add_charz_profile :enables do |profile|
|
|
65
|
+
profile.name = 'enables'
|
|
66
|
+
profile.routines = [:vmin, :vmax]
|
|
67
|
+
profile.enables = [:my_enable1, :my_enable2]
|
|
68
|
+
end
|
|
69
|
+
~~~
|
|
70
|
+
|
|
71
|
+
The profile can be updated to "AND" together multiple enables or flags. To set up this functionality
|
|
72
|
+
create a hash which maps a routine name to multiple flags and set the corresponding "and_" profile attribute to true.
|
|
73
|
+
~~~ruby
|
|
74
|
+
add_charz_profile :anded_enables do |profile|
|
|
75
|
+
profile.name = 'anded_enables'
|
|
76
|
+
profile.routines = [:vmin, :vmax]
|
|
77
|
+
profile.and_enables = true
|
|
78
|
+
profile.enables = { vmin: [:overall_enable, :vmin_enable], vmax: [:overall_enable, :vmax_enable]}
|
|
79
|
+
end
|
|
80
|
+
~~~
|
|
81
|
+
|
|
62
82
|
### Charz Session
|
|
63
83
|
|
|
64
84
|
The charz session (stored in your interfaces `@charz_session` attribute) monitors the current state of characterization at a given point in flow generation.
|
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.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen McGinty
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-07-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: origen
|
|
@@ -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.2.
|
|
604
|
+
rubygems_version: 3.2.3
|
|
605
605
|
signing_key:
|
|
606
606
|
specification_version: 4
|
|
607
607
|
summary: This plugin provides Origen tester models to drive ATE type testers like
|