Class: OrigenTesters::SmartestBasedTester::Base::Flow
- Inherits:
-
Object
- Object
- OrigenTesters::SmartestBasedTester::Base::Flow
- Includes:
- Generator, Generator::FlowControlAPI, Palette
- Defined in:
- lib/origen_testers/smartest_based_tester/base/flow.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Palette
Constant Summary
Constants included from Generator::FlowControlAPI
Generator::FlowControlAPI::FLOW_METHODS, Generator::FlowControlAPI::RELATION_METHODS
Instance Attribute Summary collapse
-
#pattern_master ⇒ Object
Returns the value of attribute pattern_master.
-
#test_methods ⇒ Object
Returns the value of attribute test_methods.
-
#test_suites ⇒ Object
Returns the value of attribute test_suites.
Instance Method Summary collapse
-
#enable_flow_word(variable, options = {}) ⇒ Object
Convenience method to provide similar functionality to enabling a Teradyne flow word/variable.
- #filename ⇒ Object
- #finalize(options = {}) ⇒ Object
- #flow_control_variables ⇒ Object
- #hardware_bin_descriptions ⇒ Object
- #skip(identifier = nil, options = {}) ⇒ Object
- #subdirectory ⇒ Object
-
#test(test_suite, options = {}) ⇒ Object
Convenience method that will automatically generate a run and branch if a :bin option is supplied.
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_master ⇒ Object
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_methods ⇒ Object
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_suites ⇒ Object
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, = {}) assign_value(variable, 1, ) end |
#filename ⇒ Object
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( = {}) super flow_control_variables.uniq! collection.each { |n| n.finalize if n.respond_to?(:finalize) } test_suites.finalize test_methods.finalize end |
#flow_control_variables ⇒ Object
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_descriptions ⇒ Object
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, = {}) identifier, = nil, identifier if identifier.is_a?(Hash) open_skips << [] yield nodes = open_skips.pop s = if_then(:skip, ) s.else_nodes = nodes end |
#subdirectory ⇒ Object
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, = {}) sbin = [:sbin] || [:softbin] || [:soft_bin] if [:bin] || sbin node = run_and_branch(test_suite, ) .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([:bin], .slice(*(FlowNode::ATTRS[:bad_bin].keys + FlowNode::ALIASES[:bad_bin].keys))) node.else_nodes << bin node else run(test_suite, ) end end |