origen_testers 0.51.4 → 0.52.0

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: '09276262e65db795a4ffe2fe26e6836607fd2c75bf279d652baacc35c3fdcdf4'
4
- data.tar.gz: 3216437c32107ef156b639005c153529ee19d53871a2330f62c0a2816f17caa2
3
+ metadata.gz: 806f6c174a2b26a0ead003ab2a26ad6874ab43ceaeb1f72b90183f0c549f0b0f
4
+ data.tar.gz: 997ca9d806de6b205cf98013f9260b5b44e2e0a82dda42b2aa98020a9a9c961c
5
5
  SHA512:
6
- metadata.gz: 5bdb430e032bdf00efb5f4c67b9b18c5c4f3fae20d5413c48f31052d99560f42a9d18bcabe291bf3223f067abb34eeb857813f73c05fa40a2180e3ef2c728ed6
7
- data.tar.gz: 17d7dbe630c36fba16baa9154d976a628899587632ad8d3b4ecd7edcb4283e127c09e82cd9cb5891ce7b4a2e939a82a1c18bafc82dd98e6a9ebcfca0f3b3e69d
6
+ metadata.gz: 79ade702c6acb3876aa888ca66570afea165a48a52c08fb0d19f41707f0f02a6c32151d694fd4d4a4cbff45dd1b53c73ca27c5e2e56bd733a48975452a4f8f66
7
+ data.tar.gz: d84b6632197fb9305b4fb7032eecf5620a424fb292ab46c6b24376116f7701aff2dabeec31a11c5b18214285adbfab98fc38f739a720c62feb9494389c2ff2f3
data/config/commands.rb CHANGED
@@ -200,7 +200,7 @@ when "examples", "test"
200
200
  puts
201
201
  puts "To approve any diffs in the reference.list files run the following command:"
202
202
  puts
203
- platforms = %w(j750 j750_literals j750_hpt ultraflex ultraflex_literals v93k v93k_multiport v93k_enable_flow v93k_disable_flow v93k_limits_file v93k_global v93k_smt8) # put here the various platforms used in examples/program_generator.rb
203
+ platforms = %w(j750 j750_literals j750_hpt ultraflex ultraflex_literals v93k v93k_multiport v93k_enable_flow v93k_disable_flow v93k_limits_file v93k_global v93k_smt8 v93k_flowgrouping) # put here the various platforms used in examples/program_generator.rb
204
204
  reflist_command = ''
205
205
  platforms.each do |platform|
206
206
  unless reflist_command == ''
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
- MINOR = 51
4
- BUGFIX = 4
3
+ MINOR = 52
4
+ BUGFIX = 0
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -479,6 +479,21 @@ module OrigenTesters::ATP
479
479
  end
480
480
  end
481
481
 
482
+ def add_auxiliary_flow(name, options = {})
483
+ if tester.smt8?
484
+ if name.to_s != options[:path].split('.').last.to_s
485
+ fail "Auxiliary flow path does not end in '#{name}'. The path instead is '#{options[:path]}'. Please update the path to align with the provided name."
486
+ end
487
+ extract_meta!(options) do
488
+ apply_conditions(options) do
489
+ n2(:auxiliary_flow, n1(:name, name), n1(:path, options[:path]))
490
+ end
491
+ end
492
+ else
493
+ fail 'Auxiliary flow API is only usable in SMT8.'
494
+ end
495
+ end
496
+
482
497
  def bin(number, options = {})
483
498
  if number.is_a?(Hash)
484
499
  fail 'The bin number must be passed as the first argument'
@@ -547,6 +562,22 @@ module OrigenTesters::ATP
547
562
  end
548
563
  end
549
564
 
565
+ def unset_flag(flag, options = {})
566
+ extract_meta!(options) do
567
+ apply_conditions(options) do
568
+ unset_flag_node(flag)
569
+ end
570
+ end
571
+ end
572
+
573
+ def add_flag(flag, options = {})
574
+ extract_meta!(options) do
575
+ apply_conditions(options) do
576
+ add_flag_node(flag)
577
+ end
578
+ end
579
+ end
580
+
550
581
  def set(var, val, options = {})
551
582
  extract_meta!(options) do
552
583
  apply_conditions(options) do
@@ -938,6 +969,14 @@ module OrigenTesters::ATP
938
969
  n1(:set_flag, flag)
939
970
  end
940
971
 
972
+ def unset_flag_node(flag)
973
+ n1(:unset_flag, flag)
974
+ end
975
+
976
+ def add_flag_node(flag)
977
+ n1(:add_flag, flag)
978
+ end
979
+
941
980
  # Ensures the flow ast has a volatile node, then adds the
942
981
  # given flags to it
943
982
  def add_volatile_flags(node, flags)
@@ -8,8 +8,8 @@ module OrigenTesters::ATP
8
8
  @atp
9
9
  end
10
10
 
11
- ([:test, :bin, :pass, :continue, :cz, :log, :sub_test, :volatile, :add_global_flag, :set_flag, :set, :enable, :disable, :render,
12
- :context_changed?, :ids, :describe_bin, :describe_softbin, :describe_soft_bin, :loop] +
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, :loop, :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)
@@ -50,7 +50,12 @@ module OrigenTesters
50
50
  parents.unshift(File.basename(f.filename, '.*').to_s.downcase)
51
51
  f = f.parent
52
52
  end
53
- File.join tester.package_namespace, 'flows', *parents
53
+ # need to variablize this for internal usage!!
54
+ if Origen.interface.respond_to?(:insertion)
55
+ File.join tester.package_namespace, Origen.interface.insertion.to_s, 'flows', *parents
56
+ else
57
+ File.join tester.package_namespace, 'flows', *parents
58
+ end
54
59
  else
55
60
  'testflow/mfh.testflow.group'
56
61
  end
@@ -447,17 +452,26 @@ module OrigenTesters
447
452
 
448
453
  def on_whenever(node)
449
454
  expressions, *nodes = *node
450
-
455
+ and_string = ' and '
456
+ or_string = ' or '
457
+ if smt8?
458
+ and_string = ' && '
459
+ or_string = ' || '
460
+ end
451
461
  case node.type
452
462
  when :whenever_all
453
- condition = expressions.map { |e| "#{generate_expr_string(e)}" }.join(' and ')
463
+ condition = expressions.map { |e| "#{generate_expr_string(e)}" }.join(and_string)
454
464
  when :whenever_any
455
- condition = expressions.map { |e| "#{generate_expr_string(e)}" }.join(' or ')
465
+ condition = expressions.map { |e| "#{generate_expr_string(e)}" }.join(or_string)
456
466
  else
457
467
  condition = expressions.map { |e| "#{generate_expr_string(e)}" }.join('ERROR')
458
468
  end
459
469
 
460
- line "if #{condition} then"
470
+ if smt8?
471
+ line "if (#{condition})"
472
+ else
473
+ line "if #{condition} then"
474
+ end
461
475
  line '{'
462
476
  @indent += 1
463
477
  process_all(node.children)
@@ -471,13 +485,23 @@ module OrigenTesters
471
485
  alias_method :on_whenever_all, :on_whenever
472
486
 
473
487
  def on_loop(node, options = {})
474
- # TODO: don't have the SMT8 way to do this yet
475
- if smt8?
476
- fail 'Flow loop control not yet supported for SMT8!'
477
- end
478
488
  start = node.to_a[0]
489
+ if start.is_a?(String)
490
+ start = generate_flag_name(start)
491
+ unless smt8?
492
+ start = "@#{start}"
493
+ end
494
+ end
479
495
  stop = node.to_a[1]
496
+ if stop.is_a?(String) && smt8?
497
+ stop = generate_flag_name(stop)
498
+ elsif stop.is_a?(String)
499
+ fail 'loops with \'stop\' defined as a variable cannot be supported in the defined environments.'
500
+ end
480
501
  step = node.to_a[2]
502
+ if smt8? && !(step == -1 || step == 1)
503
+ fail 'SMT8 does not support steps other than -1 or 1.'
504
+ end
481
505
  if node.to_a[3].nil?
482
506
  fail 'You must supply a loop variable name!'
483
507
  else
@@ -487,7 +511,7 @@ module OrigenTesters
487
511
  unless smt8?
488
512
  var = "@#{var}"
489
513
  end
490
- num = (stop - start) / step + 1
514
+ # num = (stop - start) / step + 1
491
515
  # Handle increment/decrement
492
516
  if step < 0
493
517
  compare = '>'
@@ -496,13 +520,24 @@ module OrigenTesters
496
520
  compare = '<'
497
521
  incdec = "+ #{step}"
498
522
  end
499
- line "for #{var} = #{start}; #{var} #{compare} #{stop + step} ; #{var} = #{var} #{incdec}; do"
500
- line "test_number_loop_increment = #{test_num_inc}"
501
- line '{'
502
- @indent += 1
503
- process_all(node.children)
504
- @indent -= 1
505
- line '}'
523
+ if tester.smt7?
524
+ line "for #{var} = #{start}; #{var} #{compare} #{stop + step} ; #{var} = #{var} #{incdec}; do"
525
+ line "test_number_loop_increment = #{test_num_inc}"
526
+ line '{'
527
+ @indent += 1
528
+ process_all(node.children)
529
+ @indent -= 1
530
+ line '}'
531
+ elsif smt8?
532
+ line "for (#{var} : #{start}..#{stop})"
533
+ line '{'
534
+ @indent += 1
535
+ process_all(node.children)
536
+ @indent -= 1
537
+ line '}'
538
+ else
539
+ fail 'Environment was not supported for flow loops.'
540
+ end
506
541
  end
507
542
 
508
543
  def generate_expr_string(node, options = {})
@@ -614,6 +649,15 @@ module OrigenTesters
614
649
  end
615
650
  end
616
651
 
652
+ def on_unset_flag(node)
653
+ flag = generate_flag_name(node.value)
654
+ if smt8?
655
+ line "#{flag} = 0;"
656
+ else
657
+ line "@#{flag} = 0;"
658
+ end
659
+ end
660
+
617
661
  # Note that for smt8?, this should never be hit anymore since groups are now generated as sub-flows
618
662
  def on_group(node)
619
663
  on_fail = node.children.find { |n| n.try(:type) == :on_fail }
@@ -88,7 +88,11 @@ module OrigenTesters
88
88
  return flow_sheets[id] if flow_sheets[id] # will return flow if already existing
89
89
  p = platform::Flow.new
90
90
  p.inhibit_output if Origen.interface.resources_mode?
91
- p.filename = filename
91
+ if id == Origen.file_handler.current_file.basename('.rb').to_s && Origen.interface.try(:use_flow_name_for_top_level)
92
+ p.filename = Origen.interface.flow_name
93
+ else
94
+ p.filename = filename
95
+ end
92
96
  p.test_suites ||= platform::TestSuites.new(p)
93
97
  p.test_methods ||= platform::TestMethods.new(p)
94
98
  flow_sheets[id] = p
@@ -7,7 +7,8 @@ module OrigenTesters
7
7
  # and their default values
8
8
  class ExtractFlowVars < ATP::Processor
9
9
  OWNERS = [:all, :this_flow, :sub_flows]
10
- CATEGORIES = [:jobs, :referenced_flags, :set_flags, :set_flags_extern,
10
+ CATEGORIES = [:jobs, :referenced_flags, :set_flags, :unset_flags, :add_flags,
11
+ :set_flags_extern, :unset_flags_extern, :add_flags_extern,
11
12
  :referenced_enables, :set_enables]
12
13
 
13
14
  def run(node, options = {})
@@ -72,6 +73,22 @@ module OrigenTesters
72
73
  end
73
74
  end
74
75
 
76
+ def on_unset_flag(node)
77
+ add generate_flag_name(node.value), :unset_flags
78
+ # Also separate flags which have been set and which should be externally visible
79
+ if !node.to_a.include?('auto_generated') || node.to_a.include?('extern')
80
+ add generate_flag_name(node.value), :unset_flags_extern
81
+ end
82
+ end
83
+
84
+ def on_add_flag(node)
85
+ add generate_flag_name(node.value), :add_flags
86
+ # Also separate flags which have been set and which should be externally visible
87
+ if !node.to_a.include?('auto_generated') || node.to_a.include?('extern')
88
+ add generate_flag_name(node.value), :add_flags_extern
89
+ end
90
+ end
91
+
75
92
  def on_if_enabled(node)
76
93
  flag, *nodes = *node
77
94
  [flag].flatten.each do |f|
@@ -2,7 +2,7 @@ module OrigenTesters
2
2
  module SmartestBasedTester
3
3
  class Base
4
4
  class TestMethod
5
- FORMAT_TYPES = [:current, :voltage, :time, :string, :integer, :double, :boolean]
5
+ FORMAT_TYPES = [:current, :voltage, :time, :string, :integer, :double, :boolean, :class, :list_strings, :list_classes]
6
6
 
7
7
  # Returns the object representing the test method library that the
8
8
  # given test method is defined in
@@ -107,10 +107,20 @@ module OrigenTesters
107
107
  type = send(name)
108
108
  elsif respond_to?(name.sub(/b$/, ''))
109
109
  type = inverse_of(send(name.sub(/b$/, '')))
110
+ elsif parameters[attr].is_a?(Hash) || parameters[attr.to_sym].is_a?(Hash)
111
+ type = :hash
110
112
  else
111
113
  fail "Unknown attribute type: #{parameters[attr]}"
112
114
  end
113
115
  end
116
+ if val.nil? && !tester.print_all_params
117
+ nil
118
+ else
119
+ handle_val_type(val, type, attr)
120
+ end
121
+ end
122
+
123
+ def handle_val_type(val, type, attr)
114
124
  case type
115
125
  when :current, 'CURR'
116
126
  "#{val}[A]"
@@ -126,9 +136,9 @@ module OrigenTesters
126
136
  val
127
137
  when :boolean
128
138
  # Check for valid values
129
- if [0, 1, true, false].include?(val)
139
+ if [0, 1, true, false, 'true', 'false'].include?(val)
130
140
  # Use true/false for smt8 and 0/1 for smt7
131
- if [1, true].include?(val)
141
+ if [1, true, 'true'].include?(val)
132
142
  tester.smt8? ? true : 1
133
143
  else
134
144
  tester.smt8? ? false : 0
@@ -136,6 +146,18 @@ module OrigenTesters
136
146
  else
137
147
  fail "Unknown boolean value for attribute #{attr}: #{val}"
138
148
  end
149
+ when :hash, :class
150
+ val
151
+ when :list_strings
152
+ unless val.is_a?(Array)
153
+ fail "#{val} is not an Array. List_strings must have Array values"
154
+ end
155
+ "##{val}"
156
+ when :list_classes
157
+ unless val.is_a?(Array)
158
+ fail "#{val} is not an Array. List_classes must have Array values"
159
+ end
160
+ "##{val.to_s.gsub('"', '')}"
139
161
  else
140
162
  fail "Unknown type for attribute #{attr}: #{type}"
141
163
  end
@@ -48,7 +48,7 @@ module OrigenTesters
48
48
  # What SMT7 calls a declaration
49
49
  def declarations
50
50
  if variables
51
- (variables[:all][:jobs] + variables[:all][:referenced_flags] + variables[:all][:set_flags]).uniq.sort do |x, y|
51
+ (variables[:all][:jobs] + variables[:all][:referenced_flags] + variables[:all][:set_flags] + variables[:all][:unset_flags] + variables[:all][:add_flags]).uniq.sort do |x, y|
52
52
  x = x[0] if x.is_a?(Array)
53
53
  y = y[0] if y.is_a?(Array)
54
54
  # Need to use strings for the comparison as some declarations can be a string and some a symbol
@@ -19,6 +19,9 @@ module OrigenTesters
19
19
  # flow, the default value is :signature
20
20
  attr_reader :unique_test_names
21
21
 
22
+ # use flow variable grouping or not
23
+ attr_accessor :flow_variable_grouping
24
+
22
25
  # Returns the SMT version, defaults to 7
23
26
  attr_reader :smt_version
24
27
 
@@ -66,6 +69,8 @@ module OrigenTesters
66
69
  # defaults to the application's namespace if not defined (SMT8 only)
67
70
  attr_writer :package_namespace
68
71
 
72
+ attr_writer :spec_path, :seq_path
73
+
69
74
  # When set to true, the bins and softbins sheets from the limits spreadsheet will
70
75
  # be written out to a standalone (spreadsheet) file instead (SMT8 only)
71
76
  attr_accessor :separate_bins_file
@@ -74,6 +79,10 @@ module OrigenTesters
74
79
  # format (SMT8 only)
75
80
  attr_accessor :zip_patterns
76
81
 
82
+ # When set to true (the default), parameters will be generated in the flow file regardless if the default is selected
83
+ # (SMT8 only)
84
+ attr_accessor :print_all_params
85
+
77
86
  def initialize(options = {})
78
87
  options = {
79
88
  # whether to use multiport bursts or not, if so this indicates the name of the port to use
@@ -104,6 +113,7 @@ module OrigenTesters
104
113
  if smt8?
105
114
  @pat_extension = 'pat'
106
115
  @program_comment_char = ['println', '//']
116
+ @print_all_params = options[:print_all_params].nil? ? true : options[:print_all_params]
107
117
  else
108
118
  @pat_extension = 'avc'
109
119
  @program_comment_char = ['print_dl', '//']
@@ -135,15 +145,20 @@ module OrigenTesters
135
145
  @unique_test_names = :signature
136
146
  end
137
147
  end
138
- if smt8?
139
- @create_limits_file = true
148
+ if options.key?(:create_limits_file)
149
+ @create_limits_file = options[:create_limits_file]
140
150
  else
141
- if options.key?(:create_limits_file)
142
- @create_limits_file = options[:create_limits_file]
151
+ if smt8?
152
+ @create_limits_file = true
143
153
  else
144
154
  @create_limits_file = false
145
155
  end
146
156
  end
157
+
158
+ if options.key?(:flow_variable_grouping)
159
+ @flow_variable_grouping = options[:flow_variable_grouping]
160
+ end
161
+
147
162
  if options[:literal_flags]
148
163
  @literal_flags = true
149
164
  end
@@ -152,6 +167,8 @@ module OrigenTesters
152
167
  end
153
168
 
154
169
  @package_namespace = options.delete(:package_namespace)
170
+ @spec_path = options.delete(:spec_path)
171
+ @seq_path = options.delete(:seq_path)
155
172
  self.limitfile_test_modes = options[:limitfile_test_modes] || options[:limitsfile_test_modes]
156
173
  self.force_pass_on_continue = options[:force_pass_on_continue]
157
174
  self.delayed_binning = options[:delayed_binning]
@@ -167,6 +184,13 @@ module OrigenTesters
167
184
  @package_namespace || Origen.app.namespace
168
185
  end
169
186
 
187
+ def spec_path
188
+ @spec_path || 'specs'
189
+ end
190
+
191
+ def seq_path
192
+ @seq_path || 'specs'
193
+ end
170
194
  # Set the test mode(s) that you want to see in the limits files, supply an array of mode names
171
195
  # to set multiple.
172
196
  def limitfile_test_modes=(val)
@@ -4,6 +4,7 @@ module OrigenTesters
4
4
  require 'origen_testers/smartest_based_tester/base/flow'
5
5
  class Flow < Base::Flow
6
6
  TEMPLATE = "#{Origen.root!}/lib/origen_testers/smartest_based_tester/v93k_smt8/templates/template.flow.erb"
7
+ IN_IDENTIFIER = '_AUTOIN'
7
8
 
8
9
  def on_test(node)
9
10
  test_suite = node.find(:object).to_a[0]
@@ -93,18 +94,44 @@ module OrigenTesters
93
94
  @sub_flows ||= {}
94
95
  path = Pathname.new(node.find(:path).value)
95
96
  name = path.basename('.*').to_s
97
+ path = Origen.interface.sub_flow_path_overwrite(path) if Origen.interface.respond_to? :sub_flow_path_overwrite
96
98
  @sub_flows[name] = "#{path.dirname}.#{name}".gsub(/(\/|\\)/, '.')
97
99
  # Pass down all input variables before executing
100
+ if sub_flow.input_variables.size > 0 && tester.flow_variable_grouping
101
+ line "// #{name} sub-flow input variables"
102
+ line '{'
103
+ @indent += 1
104
+ end
98
105
  sub_flow.input_variables.each do |var|
99
- var = var[0] if var.is_a?(Array)
100
- line "#{name}.#{var} = #{var};"
106
+ # Handle the inout variables
107
+ # Get the main value into the temporary input variable
108
+ if sub_flow.inout_variables.keys.include?(var)
109
+ var = var[0] if var.is_a?(Array)
110
+ line "#{name}.#{var} = #{sub_flow.inout_variables[var]};"
111
+ else
112
+ var = var[0] if var.is_a?(Array)
113
+ line "#{name}.#{var} = #{var};"
114
+ end
115
+ end
116
+ if sub_flow.input_variables.size > 0 && tester.flow_variable_grouping
117
+ @indent -= 1
118
+ line '}'
101
119
  end
102
120
  line "#{name}.execute();"
103
121
  # And then retrieve all common output variables
122
+ if (output_variables & sub_flow.output_variables).size > 0 && tester.flow_variable_grouping
123
+ line "// #{name} sub-flow output variables"
124
+ line '{'
125
+ @indent += 1
126
+ end
104
127
  (output_variables & sub_flow.output_variables).sort.each do |var|
105
128
  var = var[0] if var.is_a?(Array)
106
129
  line "#{var} = #{name}.#{var};"
107
130
  end
131
+ if (output_variables & sub_flow.output_variables).size > 0 && tester.flow_variable_grouping
132
+ @indent -= 1
133
+ line '}'
134
+ end
108
135
  if on_pass = node.find(:on_pass)
109
136
  pass_lines = capture_lines do
110
137
  @indent += 1
@@ -146,20 +173,48 @@ module OrigenTesters
146
173
  end
147
174
  end
148
175
 
176
+ def on_auxiliary_flow(node)
177
+ @auxiliary_flows ||= {}
178
+ path = node.find(:path).value
179
+ name = node.find(:name).value
180
+ @auxiliary_flows[name] = "#{path}"
181
+ line "#{name}.execute();"
182
+ end
183
+
149
184
  def sub_flows
150
185
  @sub_flows || {}
151
186
  end
152
187
 
188
+ def auxiliary_flows
189
+ @auxiliary_flows || {}
190
+ end
191
+
192
+ def inout_variables
193
+ @inout_variables || {}
194
+ end
195
+
153
196
  # Variables which should be defined as an input to the current flow
154
197
  def input_variables
155
198
  vars = flow_variables
156
199
  # Jobs and enables flow into a sub-flow
157
- (vars[:all][:jobs] + vars[:all][:referenced_enables] + vars[:all][:set_enables] +
200
+ in_var_array = (vars[:all][:jobs] + vars[:all][:referenced_enables] + vars[:all][:set_enables] +
158
201
  # As do any flags which are referenced by it but which are not set within it
159
- (vars[:all][:referenced_flags] - vars[:all][:set_flags])).uniq.sort do |x, y|
202
+ (vars[:all][:referenced_flags] - vars[:all][:set_flags] - vars[:all][:unset_flags])).uniq
203
+ identified_inout_variables = in_var_array.select { |e| output_variables.include?(e) }
204
+ result = in_var_array.reject { |e| output_variables.include?(e) }
205
+ @inout_variables = {}
206
+ # create inout variables with unique ids to reduce user conflicts
207
+ identified_inout_variables.each do |var|
208
+ unique_id = 0
209
+ var.each_byte { |n| unique_id += n }
210
+ identifier = IN_IDENTIFIER + "_#{unique_id.to_s[0..4]}"
211
+ @inout_variables[:"#{var}#{identifier}"] = var
212
+ end
213
+ result += @inout_variables.keys
214
+ result.uniq.sort do |x, y|
160
215
  x = x[0] if x.is_a?(Array)
161
216
  y = y[0] if y.is_a?(Array)
162
- x <=> y
217
+ x.to_s <=> y.to_s
163
218
  end
164
219
  end
165
220
 
@@ -170,6 +225,10 @@ module OrigenTesters
170
225
  (vars[:this_flow][:set_flags] +
171
226
  # As do any flags set by its children which are marked as external
172
227
  vars[:all][:set_flags_extern] +
228
+ # Other test methods are setting the flags
229
+ vars[:this_flow][:add_flags] +
230
+ # Other test methods are set in the children
231
+ vars[:all][:add_flags_extern] +
173
232
  # And any flags which are set by a child and referenced in this flow
174
233
  (vars[:this_flow][:referenced_flags] & vars[:sub_flows][:set_flags]) +
175
234
  # And also intermediate flags, those are flags which are set by a child and referenced
@@ -217,6 +276,11 @@ module OrigenTesters
217
276
  h << i + "#{var} = -1;"
218
277
  end
219
278
  end
279
+ # Handle the inout variables
280
+ # Use the original variable name and get the value out of the temporary input variable
281
+ inout_variables.each do |inout_var, orig_var|
282
+ h << i + "#{orig_var} = #{inout_var};"
283
+ end
220
284
  h << '' unless flow_variables[:this_flow][:set_flags].empty?
221
285
  h
222
286
  end
@@ -65,35 +65,37 @@ module OrigenTesters
65
65
  Origen.log.info "Writing... #{output_file}"
66
66
  spreadsheet = RODF::Spreadsheet.new
67
67
  Origen.interface.flow_sheets.each do |name, flow|
68
- if flow.limits_file
69
- limits_name = flow.limits_file.filename.sub('.csv', '')
70
- table = spreadsheet.table limits_name
71
- flow.limits_file.output_file.readlines.each_with_index do |line, i|
72
- # Need to fix the first row, SMT8 won't allow the Low/High limits cells not to be merged
73
- if i == 0
74
- row = table.row
75
- x = nil
76
- line.chomp.split(',').each do |word|
77
- if word == 'Low Limit'
78
- x = 0
79
- elsif word == 'High Limit'
80
- row.cell 'Low Limit', span: x + 1
81
- x = 0
82
- elsif word == 'Unit'
83
- row.cell 'High Limit', span: x + 1
84
- row.cell word
85
- x = nil
86
- elsif x
87
- x += 1
88
- else
68
+ if tester.create_limits_file
69
+ if flow.limits_file
70
+ limits_name = flow.limits_file.filename.sub('.csv', '')
71
+ table = spreadsheet.table limits_name
72
+ flow.limits_file.output_file.readlines.each_with_index do |line, i|
73
+ # Need to fix the first row, SMT8 won't allow the Low/High limits cells not to be merged
74
+ if i == 0
75
+ row = table.row
76
+ x = nil
77
+ line.chomp.split(',').each do |word|
78
+ if word == 'Low Limit'
79
+ x = 0
80
+ elsif word == 'High Limit'
81
+ row.cell 'Low Limit', span: x + 1
82
+ x = 0
83
+ elsif word == 'Unit'
84
+ row.cell 'High Limit', span: x + 1
85
+ row.cell word
86
+ x = nil
87
+ elsif x
88
+ x += 1
89
+ else
90
+ row.cell word
91
+ end
92
+ end
93
+ else
94
+ row = table.row
95
+ line.chomp.split(',').each do |word|
89
96
  row.cell word
90
97
  end
91
98
  end
92
- else
93
- row = table.row
94
- line.chomp.split(',').each do |word|
95
- row.cell word
96
- end
97
99
  end
98
100
  end
99
101
  end
@@ -21,6 +21,9 @@ flow <%= flow_name %> {
21
21
  <%= line %>
22
22
  % end
23
23
 
24
+ % end
25
+ % auxiliary_flows.each do |name, path|
26
+ flow <%= name %> calls <%= path %> {}
24
27
  % end
25
28
  % sub_flows.each do |name, path|
26
29
  flow <%= name %> calls <%= path %> { }