origen_testers 0.48.3 → 0.49.3

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
  SHA256:
3
- metadata.gz: 3c67bc8fcc8e5ee79fccb2b53ab691ce22f5635811bedcb2cc6cbd6a247d0af7
4
- data.tar.gz: 94966a015d097731c5a8320bbe2f0f8d7238b988151af466b213c2017e3f1c53
3
+ metadata.gz: 44d3544735522514276c1f11198d48015f587645bb434cb5ff5e1cd877dd799c
4
+ data.tar.gz: 99b3a18e65bd837febf9b9d6cfa1043f447c5cbc02aec73902c35312d2e9f266
5
5
  SHA512:
6
- metadata.gz: 4628a25c96b619ddc665fc49c958468f9192ea16af3609d04cbb40f27ef714e13ccfba33a111b632e1842f7fb70018eb6665a70f57bfcdc316e829bd1cd1560c
7
- data.tar.gz: 7fa99d5a51d669bb845bc529d91dcf69a77c19851313b1cacfca0e1d704f122c23dda8f7495de9893af6ab89103ea2e2648eaa5561cad96ddf2269fdc8f73a4f
6
+ metadata.gz: 87fb0d43358361dc87fb0db076c75050edfd26c4e4e5c8b62eb21d4794f4a5efe314a019cf7ede6e1d93f31184829e52cf50852c8aac9ffc573bceb97a9eba0e
7
+ data.tar.gz: d3ff0b325eecffe7a7f61cdc16473fd737b798cfa8dc5c7404ff60831407bdc441bcc158975cf9e34c0110c191287f05d03b056e8f2962bb6fdc7e4e278b37eb
data/config/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
- MINOR = 48
3
+ MINOR = 49
4
4
  BUGFIX = 3
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -11,6 +11,7 @@ module OrigenTesters
11
11
  attr_accessor :includes
12
12
  attr_accessor :comment_level
13
13
  attr_accessor :generating
14
+
14
15
  # Get/Set the overlay style
15
16
  #
16
17
  # This method changes the way overlay is handled.
@@ -19,6 +20,7 @@ module OrigenTesters
19
20
  # @example
20
21
  # tester.overlay_style = :label
21
22
  attr_accessor :overlay_style
23
+
22
24
  # Get/Set the capture style
23
25
  #
24
26
  # This method changes the way tester.store() implements the store
@@ -49,10 +51,18 @@ module OrigenTesters
49
51
  end
50
52
  alias_method :pattern_extension, :pat_extension
51
53
 
54
+ def comment_char=(val)
55
+ @comment_char = val
56
+ end
57
+
52
58
  def comment_char
53
59
  @comment_char || '//'
54
60
  end
55
61
 
62
+ def program_comment_char=(val)
63
+ @program_comment_char = val
64
+ end
65
+
56
66
  def program_comment_char
57
67
  @program_comment_char || comment_char
58
68
  end
@@ -439,6 +439,8 @@ module OrigenTesters::ATP
439
439
  children << on_pass(options[:on_pass]) if options[:on_pass]
440
440
  end
441
441
 
442
+ children << priority(options[:priority]) if options[:priority]
443
+
442
444
  save_conditions
443
445
  n(:test, children)
444
446
  end
@@ -581,14 +583,26 @@ module OrigenTesters::ATP
581
583
  end
582
584
 
583
585
  def loop(*args, &block)
584
- unless args[0].keys.include?(:from) && args[0].keys.include?(:to) && args[0].keys.include?(:step)
585
- fail 'Loop must specify :from, :to, :step'
586
+ unless args[0].keys.include?(:from) && args[0].keys.include?(:to)
587
+ fail 'Loop must specify :from, :to'
588
+ end
589
+ # assume 1 if :step not provided
590
+ unless args[0].keys.include?(:step)
591
+ args[0][:step] = 1
592
+ end
593
+ # assume 1 if :test_num_inc not provided
594
+ unless args[0].keys.include?(:test_num_inc)
595
+ args[0][:test_num_inc] = 1
596
+ end
597
+ # Add node for set of flag to be used for loop
598
+ unless args[0][:var].nil?
599
+ set(args[0][:var], 0)
586
600
  end
587
601
  extract_meta!(options) do
588
602
  apply_conditions(options) do
589
- # always pass 4-element array to loop node to simplify downstream parser
590
- # last element, 'var', will be nil if not specified by loop call
591
- params = [args[0][:from], args[0][:to], args[0][:step], args[0][:var]]
603
+ # always pass 5-element array to loop node to simplify downstream parser
604
+ # element, 'var', will be nil if not specified by loop call
605
+ params = [args[0][:from], args[0][:to], args[0][:step], args[0][:var], args[0][:test_num_inc]]
592
606
 
593
607
  node = n(:loop, params)
594
608
  node = append_to(node) { block.call }
@@ -601,7 +615,7 @@ module OrigenTesters::ATP
601
615
  define_method method do |*args, &block|
602
616
  options = args.pop if args.last.is_a?(Hash)
603
617
  unless args.size == 2
604
- fail "Format for relational operation must match: ':<opertor>(var1, var2)'"
618
+ fail "Format for relational operation must match: ':<operator>(var1, var2)'"
605
619
  end
606
620
  n2(method.to_sym, args[0], args[1])
607
621
  end unless method_defined?(method)
@@ -810,6 +824,10 @@ module OrigenTesters::ATP
810
824
  n1(:id, name)
811
825
  end
812
826
 
827
+ def priority(name)
828
+ n1(:priority, name)
829
+ end
830
+
813
831
  def on_fail(options = {})
814
832
  if options.is_a?(Proc)
815
833
  node = n0(:on_fail)
@@ -35,6 +35,19 @@ module OrigenTesters
35
35
  def attrs_ok?
36
36
  return if @quality_check == false
37
37
 
38
+ unless @routines.is_a?(Array)
39
+ Origen.log.error "Profile #{id}: routines is expected to be of type <Array>, but is instead of type <#{@routines.class}>!"
40
+ fail
41
+ end
42
+
43
+ # allowing a config for empty routines for usecase of
44
+ # determining routines on the fly dynamically
45
+ if @routines.empty? && !@allow_empty_routines
46
+ Origen.log.error "Profile #{id}: routines array is empty!"
47
+ Origen.log.warn "If you'd like to enable profile creation without routines, set the profile's @allow_empty_routines attribute to true"
48
+ fail
49
+ end
50
+
38
51
  unknown_routines = @routines - @defined_routines
39
52
  unless unknown_routines.empty?
40
53
  Origen.log.error "Profile #{id}: unknown routines: #{unknown_routines}"
@@ -205,6 +205,8 @@ module OrigenTesters
205
205
  def active_description
206
206
  flow_file = OrigenTesters::Flow.callstack.last
207
207
  called_from = caller.find { |l| l =~ /^#{flow_file}:.*/ }
208
+ # Windows fix - prevent the drive letter in the file name from changing the index of the line_no below
209
+ called_from.gsub!(flow_file, '')
208
210
  desc = nil
209
211
  if called_from
210
212
  called_from = called_from.split(':')
@@ -257,8 +259,10 @@ module OrigenTesters
257
259
  flow_file = OrigenTesters::Flow.callstack.last
258
260
  called_from = caller.find { |l| l =~ /^#{flow_file}:.*/ }
259
261
  if called_from
262
+ # Splitting on ':' when file names are included will yield a different index for everything in Windows
263
+ called_from.gsub!(flow_file, '')
260
264
  called_from = called_from.split(':')
261
- options[:source_file] = called_from[0]
265
+ options[:source_file] = flow_file # called_from[0]
262
266
  options[:source_line_number] = called_from[1].to_i
263
267
  end
264
268
  end
@@ -462,6 +462,41 @@ module OrigenTesters
462
462
  alias_method :on_whenever_any, :on_whenever
463
463
  alias_method :on_whenever_all, :on_whenever
464
464
 
465
+ def on_loop(node, options = {})
466
+ # TODO: don't have the SMT8 way to do this yet
467
+ if smt8?
468
+ fail 'Flow loop control not yet supported for SMT8!'
469
+ end
470
+ start = node.to_a[0]
471
+ stop = node.to_a[1]
472
+ step = node.to_a[2]
473
+ if node.to_a[3].nil?
474
+ fail 'You must supply a loop variable name!'
475
+ else
476
+ var = generate_flag_name(node.to_a[3])
477
+ end
478
+ test_num_inc = node.to_a[4]
479
+ unless smt8?
480
+ var = "@#{var}"
481
+ end
482
+ num = (stop - start) / step + 1
483
+ # Handle increment/decrement
484
+ if step < 0
485
+ compare = '>'
486
+ incdec = "- #{step * -1}"
487
+ else
488
+ compare = '<'
489
+ incdec = "+ #{step}"
490
+ end
491
+ line "for #{var} = #{start}; #{var} #{compare} #{stop + step} ; #{var} = #{var} #{incdec}; do"
492
+ line "test_number_loop_increment = #{test_num_inc}"
493
+ line '{'
494
+ @indent += 1
495
+ process_all(node.children)
496
+ @indent -= 1
497
+ line '}'
498
+ end
499
+
465
500
  def generate_expr_string(node, options = {})
466
501
  return node unless node.respond_to?(:type)
467
502
  case node.type
@@ -119,6 +119,7 @@ module OrigenTesters
119
119
  o[:test_name] = extract_test_name(node, o)
120
120
  o[:test_number] = extract_test_number(node, o)
121
121
  o[:limits] = extract_limits(node, o)
122
+ o[:priority] = extract_priority(node, o)
122
123
  o[:test_text] = node.find(:test_text).try(:value)
123
124
  if on_fail = node.find(:on_fail)
124
125
  if set_result = on_fail.find(:set_result)
@@ -141,7 +142,7 @@ module OrigenTesters
141
142
  end
142
143
  if smt8?
143
144
  if o[:bin_s_num]
144
- limits_workbook.add_softbin o[:bin_s_num], name: o[:bin_s_name], bin: o[:bin_h_num]
145
+ limits_workbook.add_softbin o[:bin_s_num], name: o[:bin_s_name], bin: o[:bin_h_num], priority: o[:priority]
145
146
  end
146
147
  if o[:bin_h_num]
147
148
  limits_workbook.add_bin o[:bin_h_num], name: o[:bin_h_name]
@@ -217,6 +218,16 @@ module OrigenTesters
217
218
  name
218
219
  end
219
220
 
221
+ def extract_priority(node, o)
222
+ test_obj = node.find(:priority).to_a[0]
223
+ if test_obj.is_a?(Hash)
224
+ priority = test_obj['Priority']
225
+ else
226
+ priority = test_obj.respond_to?(:priority) ? test_obj.priority : test_obj if test_obj
227
+ end
228
+ priority
229
+ end
230
+
220
231
  def extract_test_name(node, o)
221
232
  test_obj = node.find(:object).to_a[0]
222
233
  if smt8?
@@ -99,8 +99,10 @@ module OrigenTesters
99
99
  @min_repeat_loop = 33
100
100
  if smt8?
101
101
  @pat_extension = 'pat'
102
+ @program_comment_char = ['println', '//']
102
103
  else
103
104
  @pat_extension = 'avc'
105
+ @program_comment_char = ['print_dl', '//']
104
106
  end
105
107
  @compress = true
106
108
  # @support_repeat_previous = true
@@ -115,6 +117,7 @@ module OrigenTesters
115
117
  @overlay_style = :subroutine # default to use subroutine for overlay
116
118
  @capture_style = :hram # default to use hram for capture
117
119
  @overlay_subr = nil
120
+ @overlay_history = {} # used to track labels, subroutines, digsrc pins used etc
118
121
 
119
122
  if options[:add_flow_enable]
120
123
  self.add_flow_enable = options[:add_flow_enable]
@@ -203,6 +206,12 @@ module OrigenTesters
203
206
  when :subroutine, :default
204
207
  subroutine_overlay(overlay_str, options)
205
208
  ovly_style = :subroutine
209
+ when :label, :global_label
210
+ options[:dont_compress] = true
211
+ unless @overlay_history.key?(overlay_str)
212
+ cc "#{overlay_str}"
213
+ @overlay_history[overlay_str] = { is_label: true }
214
+ end
206
215
  when :handshake
207
216
  if @delayed_handshake
208
217
  if @delayed_handshake != overlay_str
@@ -458,7 +467,6 @@ module OrigenTesters
458
467
  # Ensure the match pins are don't care by default
459
468
  pin.dont_care
460
469
  options[:pin2].dont_care if options[:pin2]
461
-
462
470
  if !options[:pin2]
463
471
  cc "for the #{pin.name.upcase} pin to go #{state.to_s.upcase}"
464
472
  match_block(timeout_in_cycles, options) do |match_or_conditions, fail_conditions|
@@ -254,7 +254,6 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Contro
254
254
  enable :nvm_minimum_ft, if_enable: "nvm_minimum_room", if_job: :fr
255
255
  enable :nvm_minimum_ft, if_enable: "nvm_minimum_cold", if_job: :fc
256
256
  disable :nvm_minimum_ft, if_enable: "nvm_minimum_hot", if_job: :fh
257
-
258
257
  log "Test enable words that wrap a lot of tests"
259
258
  if_enable :word1 do
260
259
  5.times do |i|
@@ -340,6 +339,39 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Contro
340
339
  func :test36, on_fail: { render: 'multi_bin;' }, if_flag: :my_flag, number: 51570
341
340
  end
342
341
 
342
+ if tester.v93k? && !tester.smt8?
343
+ log "Tests of flow loop"
344
+ loop from: 0, to: 5, step: 1, var: '$LOOP_VARIABLE' do
345
+ func :test_myloop, number: 56000
346
+ end
347
+
348
+ log "Tests of flow loop, no step"
349
+ loop from: 0, to: 5, var: '$LOOP_VARIABLE' do
350
+ func :test_myloop2, number: 5610
351
+ end
352
+
353
+ log "Tests of flow loop, non-default test number increment"
354
+ loop from: 0, to: 5, var: '$LOOP_VARIABLE', test_num_inc: 2 do
355
+ func :test_myloop3, number: 56200
356
+ end
357
+
358
+ log "Tests of decrementing loop"
359
+ loop from: 5, to: 2, step: -1, var: '$LOOP_VARIABLE' do
360
+ func :test_myloop4, number: 56300
361
+ end
362
+
363
+ log "Tests of nested flow loop, depth 3"
364
+ loop from: 0, to: 9, step: 2, var: '$LOOP_VARIABLE1'do
365
+ loop from: 1, to: 10, step: 1, var: '$LOOP_VARIABLE2' do
366
+ loop from: 1, to: 5, step: 1, var: '$LOOP_VARIABLE3' do
367
+ func :test_myloop5, number: 56400
368
+ end
369
+ end
370
+ end
371
+
372
+ # Test of skipping variable name not yet ready
373
+ end
374
+
343
375
  log 'An optimization test case, this should not generate a flag on V93K'
344
376
  func :test1, id: :t1a, number: 51580
345
377
 
data/program/prb1.rb CHANGED
@@ -8,6 +8,10 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_description: 'Prob
8
8
  self.resources_filename = 'prb1'
9
9
  end
10
10
 
11
+ # Extra log below not in approved/ folder to show that comments are
12
+ # being skipped correctly during the difference checks
13
+ log 'PRB1 Test Flow Version 00001 - do not copy me to approved!'
14
+
11
15
  import 'components/prb1_main'
12
16
 
13
17
  import 'test' # import top-level test.rb directly, note that Flow.create options of sub-flow will be ignored!
@@ -339,4 +339,37 @@ end
339
339
  ~~~
340
340
 
341
341
 
342
+ #### Flow Loops for V93k (SMT7 only)
343
+ Use flow loop control to permit re-running tests without using additional sequence labels.
344
+
345
+ ~~~ruby
346
+ loop from: 0, to: 5, step: 1, var: '$LOOP_VARIABLE' do
347
+ func :test_myloop, number: 56000
348
+ end
349
+ ~~~
350
+
351
+ Indicating step value is optional, default is 1.
352
+
353
+ These loops can also be nested:
354
+ ~~~ruby
355
+ loop from: 0, to: 9, step: 2, var: '$LOOP_VARIABLE1'do
356
+ loop from: 1, to: 10, step: 1, var: '$LOOP_VARIABLE2' do
357
+ loop from: 1, to: 5, step: 1, var: '$LOOP_VARIABLE3' do
358
+ func :test_myloop5, number: 56400
359
+ end
360
+ end
361
+ end
362
+ ~~~
363
+
364
+ You can also indicate a test number increment if desired (default is 1):
365
+ ~~~ruby
366
+ loop from: 0, to: 5, var: '$LOOP_VARIABLE', test_num_inc: 2 do
367
+ func :test_myloop3, number: 56200
368
+ end
369
+ ~~~
370
+
371
+ Decrementing loops, having `from:` value > `to:` value and using negative `step:`, is also supported.
372
+
373
+
374
+
342
375
  % 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.48.3
4
+ version: 0.49.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: 2021-04-15 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.57.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: dentaku
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: simplecov
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -544,7 +558,6 @@ files:
544
558
  - templates/origen_guides/pattern/stil.md.erb
545
559
  - templates/origen_guides/pattern/timing.md.erb
546
560
  - templates/origen_guides/pattern/ultraflex.md.erb
547
- - templates/origen_guides/pattern/ultraflex.md.erb~
548
561
  - templates/origen_guides/pattern/v93k.md.erb
549
562
  - templates/origen_guides/program/charz.md.erb
550
563
  - templates/origen_guides/program/code.md.erb
@@ -586,7 +599,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
586
599
  - !ruby/object:Gem::Version
587
600
  version: '0'
588
601
  requirements: []
589
- rubygems_version: 3.1.4
602
+ rubygems_version: 3.0.1
590
603
  signing_key:
591
604
  specification_version: 4
592
605
  summary: This plugin provides Origen tester models to drive ATE type testers like
@@ -1,30 +0,0 @@
1
- % render "layouts/guides.html" do
2
-
3
- This page will be used to document any UltraFLEX-only APIs related to pattern generation,
4
- however the goal is to have as few of these as possible so that Origen pattern source code can re-target
5
- automatically to any supported platform.
6
-
7
- There are no significant APIs in this category currently, therefore refer to the
8
- [Common Pattern API](<%= path "guides/pattern/common" %>) which can fully target the UltraFLEX.
9
-
10
- ### DigSrc
11
-
12
- UltraFlex supports <code>:digsrc</code> as a <code>tester.overlay_style</code> set like this:
13
-
14
- ~~~ruby
15
- tester.overlay_style = :digsrc
16
- ~~~
17
-
18
- By default Origen will automatically place the digsrc start opcode at the beginning of the resulting pattern
19
- when overlay is used. In some cases (like when the pattern is used in a pattern set that has already started
20
- the instrument in a previous pattern, or possibly in svm_patterns) this behavior is undesirable.
21
-
22
- The insertion of this start opcode can be disabled by placing the following code **before** any overlay operations
23
- for a given pin.
24
-
25
- ~~~ruby
26
- tester.digsrc_skip_start :pin_or_group_name if tester.ultraflex?
27
- # Overlay operations can happen after this point
28
- ~~~
29
-
30
- % end