Class: OrigenTesters::SmartestBasedTester::Base::Flow

Inherits:
Object
  • Object
show all
Includes:
Generator, Generator::FlowControlAPI, Palette
Defined in:
lib/origen_testers/smartest_based_tester/base/flow.rb

Direct Known Subclasses

V93K::Flow

Defined Under Namespace

Modules: Palette

Constant Summary

Constants included from Generator::FlowControlAPI

Generator::FlowControlAPI::FLOW_METHODS, Generator::FlowControlAPI::RELATION_METHODS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Palette

#assign_value, #bad_bin, #good_bin, #group, #if_then, #multi_bin, #print, #print_to_datalog, #run, #run_and_branch

Methods included from Generator::FlowControlAPI

#apply_current_context!, #apply_relationships, #at_run_start, #conditionally_deactivated?, #confirm_valid_context, #context_changed?, #current_context, #extract_flow_control_options!, #extract_relation_options!, #find_by_id, #generate_unique_label, #identity_map, #if_all_failed, #if_all_passed, #if_any_failed, #if_any_passed, #if_enable, #if_failed, #if_job, #if_passed, #if_ran, #record_id, #replace_context_with_current, #replace_relationship_dependent, #save_context, #summarize_context, #track_relationships, #unless_enable, #unless_job, #unless_ran

Methods included from Generator

#close, #collection, #collection=, #compiler, #current_dir, #dont_diff=, execute_source, #file_extension, #file_pipeline, #filename=, #identity_map, #import, #inhibit_output, #on_close, #output_file, #output_inhibited?, #platform, #reference_file, #render, #set_flow_description, #stats, #to_be_written?, #write_from_template, #write_to_file

Instance Attribute Details

#pattern_masterObject

Returns the value of attribute pattern_master.



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 8

def pattern_master
  @pattern_master
end

#test_methodsObject

Returns the value of attribute test_methods.



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 8

def test_methods
  @test_methods
end

#test_suitesObject

Returns the value of attribute test_suites.



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 8

def test_suites
  @test_suites
end

Instance Method Details

#enable_flow_word(variable, options = {}) ⇒ Object

Convenience method to provide similar functionality to enabling a Teradyne flow word/variable



98
99
100
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 98

def enable_flow_word(variable, options = {})
  assign_value(variable, 1, options)
end

#filenameObject



14
15
16
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 14

def filename
  super.gsub('_flow', '')
end

#finalize(options = {}) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 18

def finalize(options = {})
  super
  flow_control_variables.uniq!
  collection.each { |n| n.finalize if n.respond_to?(:finalize) }
  test_suites.finalize
  test_methods.finalize
end

#flow_control_variablesObject



115
116
117
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 115

def flow_control_variables
  @flow_control_variables ||= []
end

#hardware_bin_descriptionsObject



111
112
113
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 111

def hardware_bin_descriptions
  @hardware_bin_descriptions ||= {}
end

#skip(identifier = nil, options = {}) ⇒ Object



102
103
104
105
106
107
108
109
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 102

def skip(identifier = nil, options = {})
  identifier, options = nil, identifier if identifier.is_a?(Hash)
  open_skips << []
  yield
  nodes = open_skips.pop
  s = if_then(:skip, options)
  s.else_nodes = nodes
end

#subdirectoryObject



10
11
12
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 10

def subdirectory
  'testflow'
end

#test(test_suite, options = {}) ⇒ Object

Convenience method that will automatically generate a run and branch if a :bin option is supplied. If no :bin option is present then it will generate a simple run entry in the flow.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/origen_testers/smartest_based_tester/base/flow.rb', line 29

def test(test_suite, options = {})
  sbin = options[:sbin] || options[:softbin] || options[:soft_bin]
  if options[:bin] || sbin
    node = run_and_branch(test_suite, options)
    options.delete(:id)
    # Only pass options to configure the bin, don't pass flow control options, those apply to the main
    # test only in this case
    bin = bad_bin(options[:bin], options.slice(*(FlowNode::ATTRS[:bad_bin].keys + FlowNode::ALIASES[:bad_bin].keys)))
    node.else_nodes << bin
    node
  else
    run(test_suite, options)
  end
end