origen_testers 0.7.0 → 0.7.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d897e6581771bc27d333380a7268dd24f5823c11
4
- data.tar.gz: 9320f4f545dba6122cfc142da034818a5ef8856c
3
+ metadata.gz: 13097c4540ddc2298b5549c3edc445f71285b5fa
4
+ data.tar.gz: cc7bad70792a9de4bee7a303fa90c031eab2a4bf
5
5
  SHA512:
6
- metadata.gz: 440ddc17e513453c7611976fa25e2f310368d5fe7f409b3077d80354f3e21d8bbfe38631dff4322247b7b61417bbdd6967d0c98ca490b70acb0f5aff3ee868aa
7
- data.tar.gz: 90bd5c77657cb3c31cda3b098ee0db03f68fb017a9796cb1cd49c8d8b5301ad4e7fb3b3db253d85614ae4c9607ffdfe793471bfd5834889a2a31b696e16a3c51
6
+ metadata.gz: 0082db3b24571cdf255686fc76f7211c08dd3c29197b4eebb644af6554f63591a9de56934af76783caa8eb6b1d520fb03fb55b4ffd38a3346fcd1e478cd09594
7
+ data.tar.gz: f124fa94f903803406816de277cd877406722ee518c3cdd9b52798de2b6b2135ed9e82a251aa3467fdb70838602048089cdf3ec199e8308e454cee3e86bfa8f4
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 7
4
- BUGFIX = 0
4
+ BUGFIX = 1
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -11,7 +11,7 @@ module OrigenTesters
11
11
  attr_accessor :channelmap
12
12
  attr_accessor :default_channelmap
13
13
  attr_accessor :default_testerconfig
14
-
14
+ attr_accessor :max_site
15
15
  # NOTE: DO NOT USE THIS CLASS DIRECTLY ONLY USED AS PARENT FOR
16
16
  # DESIRED TESTER CLASS
17
17
 
@@ -717,7 +717,7 @@ module OrigenTesters
717
717
  $tester.align_to_last
718
718
  # cycle(:microcode => "#{$dut.end_of_pattern_label}:") if $dut.end_of_pattern_label
719
719
  if options[:end_in_ka]
720
- $tester.cycle microcode: 'keep_alive'
720
+ $tester.cycle microcode: "#{@microcode[:keepalive]}"
721
721
  else
722
722
  if options[:end_with_halt]
723
723
  $tester.cycle microcode: 'halt'
@@ -69,31 +69,6 @@ module OrigenTesters
69
69
  end
70
70
  end
71
71
 
72
- # Returns a hash containing key meta data about the test instance, this is
73
- # intended to be used in documentation
74
- def to_meta
75
- m = { 'Test' => name,
76
- 'Type' => type
77
- }
78
- if type == :functional
79
- m['Pattern'] = pattern
80
- elsif type == :board_pmu || type == :pin_pmu
81
- m['Measure'] = fvmi? ? 'current' : 'voltage'
82
- if hi_lo_limit_valid & 2 != 0
83
- m['Hi'] = hi_limit
84
- end
85
- if hi_lo_limit_valid & 1 != 0
86
- m['Lo'] = lo_limit
87
- end
88
- if force_cond
89
- m['Force'] = force_cond
90
- end
91
- end
92
- m['DC'] = "#{dc_category} (#{dc_selector})"
93
- m['AC'] = "#{ac_category} (#{ac_selector})"
94
- m.merge(@meta)
95
- end
96
-
97
72
  def inspect
98
73
  "<TestInstance: #{name}, Type: #{type}>"
99
74
  end
@@ -174,26 +149,11 @@ module OrigenTesters
174
149
  fail 'The #{self.class} class has not defined a set_wait_flags method!'
175
150
  end
176
151
 
177
- # Set and enable the pre-charge voltage of a parametric test instance.
178
- def set_pre_charge(val)
179
- if val
180
- self.pre_charge_enable = 1
181
- self.pre_charge = val
182
- else
183
- self.pre_charge_enable = 0
184
- end
185
- self
186
- end
187
- alias_method :set_precharge, :set_pre_charge
188
-
189
152
  # Set and enable the hi limit of a parametric test instance, passing in
190
153
  # nil or false as the lim parameter will disable the hi limit.
191
154
  def set_hi_limit(lim)
192
155
  if lim
193
- self.hi_lo_limit_valid = hi_lo_limit_valid | 2
194
156
  self.hi_limit = lim
195
- else
196
- self.hi_lo_limit_valid = hi_lo_limit_valid & 1
197
157
  end
198
158
  self
199
159
  end
@@ -203,10 +163,7 @@ module OrigenTesters
203
163
  # nil or false as the lim parameter will disable the hi limit.
204
164
  def set_lo_limit(lim)
205
165
  if lim
206
- self.hi_lo_limit_valid = hi_lo_limit_valid | 1
207
166
  self.lo_limit = lim
208
- else
209
- self.hi_lo_limit_valid = hi_lo_limit_valid & 2
210
167
  end
211
168
  self
212
169
  end
@@ -330,19 +287,6 @@ module OrigenTesters
330
287
  self
331
288
  end
332
289
 
333
- # Set the meaure mode of a parametric test instance, either:
334
- # * :voltage / :fimv
335
- # * :current / :fvmi
336
- def set_measure_mode(mode)
337
- if mode == :current || mode == :fvmi
338
- self.measure_mode = 0
339
- elsif mode == :voltage || mode == :fimv
340
- self.measure_mode = 1
341
- else
342
- fail "Unknown measure mode: #{mode}"
343
- end
344
- end
345
-
346
290
  # Returns true if instance configured for force current, measure voltage
347
291
  def fimv?
348
292
  measure_mode == 1
@@ -40,6 +40,7 @@ module OrigenTesters
40
40
  @microcode[:enable] = 'enable'
41
41
  @microcode[:set_flag] = 'set_cpu'
42
42
  @microcode[:mask_vector] = 'ign ifc icc'
43
+ @microcode[:keepalive] = 'keep_alive'
43
44
  end
44
45
 
45
46
  def pattern_header(options = {})
@@ -541,6 +541,92 @@ module OrigenTesters
541
541
  self.wait_flags = d + c + b + a
542
542
  self
543
543
  end
544
+
545
+ # Set and enable the pre-charge voltage of a parametric test instance.
546
+ def set_pre_charge(val)
547
+ if val
548
+ self.pre_charge_enable = 1
549
+ self.pre_charge = val
550
+ else
551
+ self.pre_charge_enable = 0
552
+ end
553
+ self
554
+ end
555
+ alias_method :set_precharge, :set_pre_charge
556
+
557
+ # Returns a hash containing key meta data about the test instance, this is
558
+ # intended to be used in documentation
559
+ def to_meta
560
+ m = { 'Test' => name,
561
+ 'Type' => type
562
+ }
563
+ if type == :functional
564
+ m['Pattern'] = pattern
565
+ elsif type == :board_pmu || type == :pin_pmu
566
+ m['Measure'] = fvmi? ? 'current' : 'voltage'
567
+ if hi_lo_limit_valid & 2 != 0
568
+ m['Hi'] = hi_limit
569
+ end
570
+ if hi_lo_limit_valid & 1 != 0
571
+ m['Lo'] = lo_limit
572
+ end
573
+ m['Hi'] = hi_limit
574
+ m['Lo'] = lo_limit
575
+ if force_cond
576
+ m['Force'] = force_cond
577
+ end
578
+ end
579
+ m['DC'] = "#{dc_category} (#{dc_selector})"
580
+ m['AC'] = "#{ac_category} (#{ac_selector})"
581
+ m.merge(@meta)
582
+ end
583
+
584
+ # Set the meaure mode of a parametric test instance, either:
585
+ # * :voltage / :fimv
586
+ # * :current / :fvmi
587
+ def set_measure_mode(mode)
588
+ if mode == :current || mode == :fvmi
589
+ self.measure_mode = 0
590
+ elsif mode == :voltage || mode == :fimv
591
+ self.measure_mode = 1
592
+ else
593
+ fail "Unknown measure mode: #{mode}"
594
+ end
595
+ end
596
+
597
+ # Set and enable the hi limit of a parametric test instance, passing in
598
+ # nil or false as the lim parameter will disable the hi limit.
599
+ def set_hi_limit(lim)
600
+ if lim
601
+ if $tester.j750?
602
+ self.hi_lo_limit_valid = hi_lo_limit_valid | 2
603
+ end
604
+ self.hi_limit = lim
605
+ else
606
+ if $tester.j750?
607
+ self.hi_lo_limit_valid = hi_lo_limit_valid & 1
608
+ end
609
+ end
610
+ self
611
+ end
612
+ alias_method :hi_limit=, :set_hi_limit
613
+
614
+ # Set and enable the hi limit of a parametric test instance, passing in
615
+ # nil or false as the lim parameter will disable the hi limit.
616
+ def set_lo_limit(lim)
617
+ if lim
618
+ if $tester.j750?
619
+ self.hi_lo_limit_valid = hi_lo_limit_valid | 1
620
+ end
621
+ self.lo_limit = lim
622
+ else
623
+ if $tester.j750?
624
+ self.hi_lo_limit_valid = hi_lo_limit_valid & 2
625
+ end
626
+ end
627
+ self
628
+ end
629
+ alias_method :lo_limit=, :set_lo_limit
544
630
  end
545
631
  end
546
632
  end
@@ -38,6 +38,9 @@ module OrigenTesters
38
38
  @digital_instrument = 'hsdm' # 'hsdm' for HSD1000 and UP800, ok with UP1600 though
39
39
 
40
40
  @capture_state = 'V' # STV requires valid 'V' expect data
41
+
42
+ @set_msb_issued = false # Internal flag to keep track of set_msb usage, allowing for set_lsb to be used as a readcode
43
+ @microcode[:keepalive] = 'keepalive'
41
44
  end
42
45
 
43
46
  def freq_count(pin, options = {})
@@ -124,12 +127,51 @@ module OrigenTesters
124
127
  end
125
128
 
126
129
  def call_match
127
- fail 'Method call_match not yet supported for UltraFLEX!'
130
+ # fail 'Method call_match not yet supported for UltraFLEX!'
131
+ @match_counter = @match_counter || 0
132
+ call_subroutine("match_done_#{@match_counter}")
133
+ @match_counter += 1 unless @match_counter == (@match_entries || 1) - 1
134
+ end
135
+
136
+ # Ultraflex implementation of J750-style 'set_code'
137
+ #
138
+ # Set a readcode, using one of the Ultraflex general-purpose counters.
139
+ # Counter C15 is used by default, this can be changed by the caller if necessary.
140
+ #
141
+ # Use to set an explicit readcode for communicating with the tester. This method
142
+ # will generate an additional vector (or 2, depending if set_msb is needed).
143
+ #
144
+ # NOTE: Some caveats when using this method:
145
+ # - When setting a counter from the pattern microcode, the actual Patgen counter value is set to n-1.
146
+ # This method adjusts by using a value of n+1, so the value read by the tester is the original intended value.
147
+ #
148
+ # - When setting a counter from pattern microcode, the upper bits must be loaded separately using 'set_msb'.
149
+ # This method calls the set_msb opcode if needed - note the tester must mask the upper 16 bits to get the desired value.
150
+ # The set_msb opcode will also generate a second vector the first time the set_code method is called.
151
+ #
152
+ # ==== Examples
153
+ # $tester.set_code(55)
154
+ #
155
+ def set_code(*code)
156
+ options = code.last.is_a?(Hash) ? code.pop : {}
157
+ options = { counter: 'c15'
158
+ }.merge(options)
159
+ cc " Using counter #{options[:counter]} as set_code replacement - value set to #{code[0]} + 1"
160
+ unless @set_msb_issued
161
+ set_msb(1)
162
+ cycle # set_msb doesn't issue a cycle
163
+ end
164
+ cycle(microcode: "set #{options[:counter]} #{code[0].next}") #+1 here to align with VBT
128
165
  end
129
166
 
130
- def set_code(code)
131
- Origen.log.warning 'Method set_code not supported for UltraFLEX! Find alternative solution.'
132
- cc '*** WARNING! *** Method set_code not supported for UltraFLEX! Find alternative solution.'
167
+ def set_code_no_msb(*code)
168
+ options = code.last.is_a?(Hash) ? code.pop : {}
169
+ options = { counter: 'c15'
170
+ }.merge(options)
171
+ unless @set_msb_issued
172
+ cycle # set_msb doesn't issue a cycle
173
+ end
174
+ cycle(microcode: "set #{options[:counter]} #{code[0].next}") #+1 here to align with VBT
133
175
  end
134
176
 
135
177
  def loop_vectors(name, number_of_loops, global = false, label_first = false)
@@ -189,7 +231,6 @@ module OrigenTesters
189
231
  options[:dc_pins] = get_dc_instr_pins
190
232
  options[:digsrc_pins] = get_digsrc_pins
191
233
  options[:digcap_pins] = get_digcap_pins
192
-
193
234
  if options[:dc_pins]
194
235
  options[:dc_pins].each do |pin|
195
236
  options[:instruments].merge!(pin => 'DCVS')
@@ -292,11 +333,11 @@ module OrigenTesters
292
333
  fail 'ERROR: block not passed to match_block!'
293
334
  end
294
335
 
295
- if options[:check_for_fails]
296
- cc 'NOTE: check for fails prior to match loop not necessary on UltraFlex'
297
- end
336
+ # if options[:check_for_fails]
337
+ # cc 'NOTE: check for fails prior to match loop not necessary on UltraFlex'
338
+ # end
298
339
 
299
- ss 'WARNING: MATCH LOOP FOR ULTRAFLEX STILL UNDER DEVELOPMENT'
340
+ # ss 'WARNING: MATCH LOOP FOR ULTRAFLEX STILL UNDER DEVELOPMENT'
300
341
 
301
342
  # Create BlockArgs objects in order to receive multiple blocks
302
343
  match_conditions = Origen::Utility::BlockArgs.new
@@ -311,6 +352,23 @@ module OrigenTesters
311
352
  fail_conditions.add(&block)
312
353
  end
313
354
 
355
+ if options[:check_for_fails]
356
+ if options[:multiple_entries]
357
+ @match_entries.times do |i|
358
+ microcode "global subr match_done_#{i}:"
359
+ set_code(i + 100)
360
+ cycle(microcode: 'jump call_tester') unless i == @match_entries - 1
361
+ end
362
+ microcode 'call_tester:'
363
+ else
364
+ set_code(100)
365
+ end
366
+ cc 'Wait for any prior failures to propagate through the pipeline'
367
+ cycle(microcode: 'pipe_minus 1')
368
+ cc 'Now handshake with the tester to bin out and parts that have failed before they got here'
369
+ handshake(manual_stop: options[:manual_stop])
370
+ end
371
+
314
372
  # Now do the main match loop
315
373
  cc 'Start the match loop'
316
374
 
@@ -450,7 +508,8 @@ module OrigenTesters
450
508
  # $tester.store(:offset => -2) # Just realized I need to capture that earlier vector
451
509
  def store(*pins)
452
510
  options = pins.last.is_a?(Hash) ? pins.pop : {}
453
- options = { offset: 0
511
+ options = { offset: 0,
512
+ opcode: 'stv'
454
513
  }.merge(options)
455
514
  pins = pins.flatten.compact
456
515
  if pins.empty?
@@ -459,8 +518,8 @@ module OrigenTesters
459
518
  pins.each do |pin|
460
519
  pin.restore_state do
461
520
  pin.capture
462
- update_vector microcode: 'stv', offset: options[:offset]
463
- update_vector_pin_val pin, microcode: 'stv', offset: options[:offset]
521
+ update_vector microcode: options[:opcode], offset: options[:offset]
522
+ update_vector_pin_val pin, microcode: options[:opcode], offset: options[:offset]
464
523
  last_vector(options[:offset]).dont_compress = true
465
524
  end
466
525
  end
@@ -472,8 +531,8 @@ module OrigenTesters
472
531
  microcode "reload #{name}"
473
532
  end
474
533
 
475
- def set_msb(name)
476
- microcode "set_msb #{name}"
534
+ def set_msb(integer)
535
+ microcode "set_msb #{integer}"
477
536
  end
478
537
 
479
538
  # Capture the next vector generated to HRAM
@@ -490,6 +549,7 @@ module OrigenTesters
490
549
  def store_next_cycle(*pins)
491
550
  options = pins.last.is_a?(Hash) ? pins.pop : {}
492
551
  options = {
552
+ opcode: 'stv'
493
553
  }.merge(options)
494
554
  pins = pins.flatten.compact
495
555
  if pins.empty?
@@ -498,7 +558,7 @@ module OrigenTesters
498
558
  pins.each { |pin| pin.save; pin.capture }
499
559
  # Register this clean up function to be run after the next vector
500
560
  # is generated (SMcG: cool or what! DH: Yes, very cool!)
501
- preset_next_vector(microcode: 'stv') do
561
+ preset_next_vector(microcode: options[:opcode]) do
502
562
  pins.each(&:restore)
503
563
  end
504
564
  end
@@ -5,7 +5,7 @@ module OrigenTesters
5
5
  class CustomTestInstance < Base::CustomTestInstance
6
6
  # Give all UltraFLEX test instances the ability to contain limits, these will
7
7
  # be rendered to Use-limit lines in the flow
8
- attr_accessor :lo_limit, :hi_limit, :scale, :units, :defer_limits
8
+ attr_accessor :lo_limit, :hi_limit, :scale, :units, :defer_limits, :lo, :hi
9
9
 
10
10
  # Attributes for each test instance line, first few are named directly
11
11
  TEST_INSTANCE_ATTRS = %w(
@@ -10,7 +10,7 @@ module OrigenTesters
10
10
  def on_test(node)
11
11
  super
12
12
  ins = node.find(:object).value
13
- if ins.respond_to?(:lo_limit) && (ins.lo_limit || ins.hi_limit)
13
+ if ins.respond_to?(:lo_limit) && (ins.lo_limit || ins.hi_limit) || ins.respond_to?(:lo) && (ins.lo || ins.hi)
14
14
  if ins.defer_limits
15
15
  completed_lines.last.opcode = 'Test-defer-limits'
16
16
  end
@@ -18,10 +18,19 @@ module OrigenTesters
18
18
  limit.type = :use_limit
19
19
  limit.opcode = 'Use-Limit'
20
20
  limit.parameter = nil
21
-
22
- lo = ins.lo_limit
23
- hi = ins.hi_limit
24
-
21
+ if ins.respond_to?(:lo_limit)
22
+ lo = ins.lo_limit
23
+ hi = ins.hi_limit
24
+ if lo.nil?
25
+ lo = ins.lo
26
+ end
27
+ if hi.nil?
28
+ hi = ins.hi
29
+ end
30
+ elsif ins.respond_to?(:lo)
31
+ lo = ins.lo
32
+ hi = ins.hi
33
+ end
25
34
  size = 1
26
35
  if lo.is_a?(Array)
27
36
  size = lo.size if lo.size > size
@@ -52,9 +61,11 @@ module OrigenTesters
52
61
  s = ins.scale
53
62
  end
54
63
  else
55
- s = lowest_scale(scale_of(l), scale_of(h))
56
- l = scaled(l, s)
57
- h = scaled(h, s)
64
+ unless $tester.ultraflex?
65
+ s = lowest_scale(scale_of(l), scale_of(h))
66
+ l = scaled(l, s)
67
+ h = scaled(h, s)
68
+ end
58
69
  end
59
70
  line.lolim = l
60
71
  line.hilim = h
@@ -12,7 +12,7 @@ module OrigenTesters
12
12
 
13
13
  # Give all UltraFLEX test instances the ability to contain limits, these will
14
14
  # be rendered to Use-limit lines in the flow
15
- attr_accessor :lo_limit, :hi_limit, :scale, :units, :defer_limits
15
+ attr_accessor :lo_limit, :hi_limit, :scale, :units, :defer_limits, :lo, :hi
16
16
 
17
17
  # Attributes for additional test instance arguments beyond those described above
18
18
  TEST_INSTANCE_EXTRA_ARGS = 130
@@ -268,6 +268,46 @@ module OrigenTesters
268
268
  self.wait_flag4 = d
269
269
  self
270
270
  end
271
+
272
+ # Set and enable the pre-charge voltage of a parametric test instance.
273
+ def set_pre_charge(val)
274
+ self
275
+ end
276
+ alias_method :set_precharge, :set_pre_charge
277
+
278
+ # Returns a hash containing key meta data about the test instance, this is
279
+ # intended to be used in documentation
280
+ def to_meta
281
+ m = { 'Test' => name,
282
+ 'Type' => type
283
+ }
284
+ if type == :functional
285
+ m['Pattern'] = pattern
286
+ elsif type == :board_pmu || type == :pin_pmu
287
+ m['Measure'] = fvmi? ? 'current' : 'voltage'
288
+ m['Hi'] = hi_limit
289
+ m['Lo'] = lo_limit
290
+ if force_cond
291
+ m['Force'] = force_cond
292
+ end
293
+ end
294
+ m['DC'] = "#{dc_category} (#{dc_selector})"
295
+ m['AC'] = "#{ac_category} (#{ac_selector})"
296
+ m.merge(@meta)
297
+ end
298
+
299
+ # Set the meaure mode of a parametric test instance, either:
300
+ # * :voltage / :fimv
301
+ # * :current / :fvmi
302
+ def set_measure_mode(mode)
303
+ if mode == :current || mode == :fvmi
304
+ self.measure_mode = 2
305
+ elsif mode == :voltage || mode == :fimv
306
+ self.measure_mode = 1
307
+ else
308
+ fail "Unknown measure mode: #{mode}"
309
+ end
310
+ end
271
311
  end
272
312
  end
273
313
  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.7.0
4
+ version: 0.7.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: 2016-05-23 00:00:00.000000000 Z
11
+ date: 2016-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
399
399
  version: 1.8.11
400
400
  requirements: []
401
401
  rubyforge_project:
402
- rubygems_version: 2.6.2
402
+ rubygems_version: 2.2.2
403
403
  signing_key:
404
404
  specification_version: 4
405
405
  summary: This plugin provides Origen tester models to drive ATE type testers like