Module: OrigenTesters::BasicTestSetups

Includes:
ProgramGenerators
Included in:
Test::BasicInterface
Defined in:
lib/origen_testers/basic_test_setups.rb

Overview

Including this module in a class will create a basic test program interface that can generate programs for all ATE platforms supported by the Testers plugin.

It provides a number of methods that can be called from a test program flow file to do basic things like a functional test.

Examples:

How to setup and use

# lib/myapp/program_interface.rb
module MyApp
  class Interface
    include OrigenTesters::BasicTestSetups
  end
end

# program/prb1.rb
Flow.create interface: 'MyApp::Interface' do

  functional :my_pattern_1, bin: 10
  functional :my_pattern_2, bin: 11

end

Constant Summary

Constants included from ProgramGenerators

ProgramGenerators::PLATFORMS

Instance Method Summary collapse

Methods included from ProgramGenerators

#_load_generator, #initialize, #pre_initialize, #tester

Methods included from Interface

#add_description!, #add_flow_enable, #add_flow_enable=, #add_meta!, #all_pattern_references, #app_identifier, #atp, #clean_referenced_patterns, #clear_pattern_references, #clear_top_level_flow, #close, #comment, #comments, #compile, #consume_comments, #context_changed?, #context_or_parameter_changed?, #descriptions, #discard_comments, #discard_top_level_flow, #flow_generator, #generating_sub_program?, #identity_map, #import, #merge_pattern_references, #on_program_completion, #parameter_changed?, #pattern_references, #pattern_references_name, #pattern_references_name=, #platform, #record_pattern_reference, #referenced_patterns, #render, #resources_mode, #resources_mode?, resources_mode?, #set_top_level_flow, #test, #top_level_flow, #unique_test_names, #unique_test_names=, with_resources_mode, write=, #write?, write?, #write_files

Methods included from ATP::FlowAPI

#atp, #atp=, #hi_limit, #limit, #lo_limit

Instance Method Details

#extract_pattern(name, options = {}) ⇒ Object

Extract the pattern name from the given options, falling back to the given test name if a :pattern option is not present.

It will also strip any extension if one is present.



99
100
101
102
103
# File 'lib/origen_testers/basic_test_setups.rb', line 99

def extract_pattern(name, options = {})
  p = options[:pattern] || name
  p = p.to_s.sub(/\..*$/, '')
  p
end

#functional(name, options = {}) ⇒ Hash

Execute a functional test

Examples:

Customizing a test from the flow

functional :erase, pattern: 'erase_all_nosrc', sbin: 150

Applying global customization from the interface

include OrigenTesters::BasicTestSetups

def functional(name, options = {})
  # Apply custom defaults before calling
  options = {
    bin: 3,
    levels: 'nvm',
  }.merge(options)
  # Now call the generator
  super
end

Adding a custom interpose function for J750

include OrigenTesters::BasicTestSetups

# Override the default J750 test instance to add an interpose function
def functional(name, options = {})
  components = super
  if tester.j750?
    components[:test_instance].post_test_func = 'delayedBinning'
  end
end

Parameters:

  • name (Symbol, String)

    the name of the test.

  • options (Hash) (defaults to: {})

    the options to customize the test.

Options Hash (options):

  • :bin (Integer)

    The bin number

  • :sbin (Integer)

    The soft bin number

  • :pattern (String)

    The pattern name, if not specified the test name will be used

  • :pin_levels (String) — default: 'Lvl'

    The name of the pin levels

  • :time_set (String) — default: 'Tim'

    The name of the time set

Returns:

  • (Hash)

    all generated components of the test will be returned. The key naming will depend on what platform the test has been generated for, but for example this will contain :flow_line, :test_instance and :patset objects in the case of an IG-XL-based platform.

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/origen_testers/basic_test_setups.rb', line 70

def functional(name, options = {})
  options = {
    pin_levels: 'Lvl',
    time_set:   'Tim'
  }.merge(options)
  pattern = extract_pattern(name, options)
  if tester.j750? || tester.j750_hpt? || tester.ultraflex?
    ins = test_instances.functional(name, options)
    pname = "#{pattern}_pset"
    pset = patsets.add(pname, [{ pattern: "#{pattern}.PAT" }])
    ins.pattern = pname
    line = flow.test(ins, options)
    { test_instance: ins, flow_line: line, patset: pset }
  elsif tester.v93k?
    tm = test_methods.ac_tml.ac_test.functional_test
    ts = test_suites.run(name, options)
    ts.test_method = tm
    ts.pattern = pattern
    node = flow.test(ts, options)
    { test_method: tm, test_suite: ts, node: node }
  else
    fail "Unsupported tester: #{tester.class}"
  end
end