Origen-SDK / origen_testers

Origen drivers/APIs for ATE tester platforms
http://origen-sdk.org/testers
MIT License
11 stars 23 forks source link

Characterization API, how should it be integrated? #91

Open info-rchitect opened 6 years ago

info-rchitect commented 6 years ago

Hi,

I have got a Characterization (Charz) API, within our interface, that I think would provide value to the general community. Can someone lay out how it should be integrated? Here is a short primer:

  1. Define charz profile(s)
  2. Adding charz to an existing flow file

Defining a charz profile:

add_charz_profile :qnd do |charz|
  charz.vmin =    { res: 10.mV, max: 1.0.V, min: 0.5.V, spec: 'vdd' }
  charz.vmax =    { res: 10.mV, min: 1.0.V, max: 1.25.V, spec: 'vdd', mode: 'Binary' }
  charz.shmoo1d = { x_start: 0.6.V, x_stop: 1.15.V, x_spec: 'vdd', x_steps: 20 }
  charz.shmoo2d = { x_start: 0.6.V, x_stop: 1.15.V, x_spec: 'vdd', x_steps: 20, y_start: 20.Mhz, y_start: 80.Mhz, y_spec: 'tper', y_steps: 20  }
end

'vmin', 'vmax', etc are charz routines that dictate what test method to use and have a list of default parameters that will get overridden by the information in the charz profile (above) and the parent test encountered during the parsing of the flow file. Here is an example of the flow API:

Flow.create do |options|
  charz_on :qnd, [:vmin,:vmax]
  func :mytest1
  func :mytest2
  func :mytest3, charz: { qnd: :shmoo1d }
  func :mytest4, charz_off: true
  func :mytest5 
end

Tests 1,2,5 will all get the vmin and vmax tests created based on the settings in the :qnd charz profile. Test 3 will only get a shmoo1d test created and test 4 will get no charz tests created. The charz module just keeps track of charz sessions on a stack (initiated by the charz_on flow method and the charz test level option), so users can create multiple profiles and access them at will in the flow file. This feature really saves a lot of time in bringing up a charz program, would to share it with the community but need some help hooking it up.

regards

ginty commented 6 years ago

Hi @info-rchitect, first of all thanks! This is exactly the kind of off-the-shelf solution that I hoped the community would start building on top of the base Origen infrastructure.

This seems like a nice flow-level API, but to understand where it should live/be integrated can you give more detail about what it would generate here?

Does it generate additional flow output, or does it rely on supporting test methods? If so, will they be included in this release?

Basically, if I were to use the API in your example in one of my apps, what would this new feature give me and what would I need to provide on my side (if anything) to make it work in my application.

Once I get a better understanding of that then what options we have for integration will be clearer.

Thanks!

info-rchitect commented 6 years ago

@ginty These flow methods create tests on the fly, based on the charz profiles settings and the parent test. I would bet that creating characterization flows involved a lot of copying and pasting of test method parameters from the tests being characterized to the search or shmoo test methods. Now, that is all taken care of. There are charz routine classes that specify default parameters for various characterization test methods. We currently have them setup for our internal test methods, but origen testers could hook them up to the spec search and shmoo methods that come with any platform. Here is an example of a charz routine class:

 module Charz
    module Routines
      class SpecSearch < Routine
        SEARCH_MODES = %w(Linear Binary LinBin)

        # These must not contain underscores
        TYPES_SUPPORTED = [:vmin, :vmax, :fmin, :fmax, :timsearch, :levsearch]

        DICTIONARY = {
          res:                Param.new('SpecSearch_ResolutionValue', Numeric, false),
          min:                Param.new('SpecSearch_Minimum', Numeric, true),
          max:                Param.new('SpecSearch_Maximum', Numeric, true),
          steps:              Param.new('SpecSearch_SpecStep', Numeric, false),
          mode:               Param.new('SpecSearch_SearchMode', SEARCH_MODES, false),
          spec:               Param.new('SpecSearch_SpecVariable', String, true),
          setup_pins:         Param.new('SpecSearch_SetupPinList', String, false),
          result_pins:        Param.new('SpecSearch_ResultPinList', String, false),
          log:                Param.new('SpecSearch_LogToConsole', [true, false], false),
          output_var:         Param.new('SpecSearch_OutputVariable', String, false),
          mask_b:             Param.new('SpecSearch_MaskBefore', Numeric, false),
          mask_a:             Param.new('SpecSearch_MaskAfter', Numeric, false),
          match_loop_cnt_var: Param.new('Functional_MatchLoopCountVariable', String, false)
        }

        # A charz routine will initialize to contain all of the test method
        # parameters necessary for execution but many will be blank strings.
        # This is because
        def initialize(type, options)
          @type = type
          @test_method = 'SpecSearch'
          @dictionary = DICTIONARY
          define_default_params
          super(options)
          fail unless search_ok?
        end

        def self.types_supported
          TYPES_SUPPORTED
        end

        def self.test_method
          'SpecSearch'
        end

        def self.dictionary_map
          DICTIONARY.each do |nick, struct|
            tm_param = struct.id.gsub('_', '.')
            Origen.log.info("'#{nick}' is short for '#{tm_param}'")
          end
          nil
        end

The work to make this compatible with 'ac_tml.AcTest.SpecSearch', 'ac_tml.AcTest.SetBasedSpecSearch', 'ac_tml.AcTest.Shmoo', or any other origen testers charz test methods should be pretty easy. The charz module just creates a bunch of tests in an array and when it encounters 'charz_off', it wraps them in a group and inserts them in the flow.

priyavadan commented 4 years ago

@CodyBriscoe can you pick this up and share your ideas for integrating the Charz api either into OrigenTesters directly or through another plugin? I am sure @Origen-SDK/core is just as interested in this.

info-rchitect commented 4 years ago

I have given this some thought and it really just comes down to ensuring test nodes can be cloned easily. Once the cloning mechanism is setup, the code for the charz profiles/sessions should just drop in. Setting up the templates for any test method is the easiest part.