Class: C99::ATEInterface

Inherits:
Object show all
Includes:
OrigenTesters::ProgramGenerators
Defined in:
lib/c99/ate_interface.rb

Instance Method Summary collapse

Constructor Details

#initialize(_options = {}) ⇒ ATEInterface

Options passed to Flow.create and Library.create will be passed in here, use as desired to configure your interface



7
8
# File 'lib/c99/ate_interface.rb', line 7

def initialize(_options = {})
end

Instance Method Details

#block_loop(name, options) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/c99/ate_interface.rb', line 43

def block_loop(name, options)
  if options[:by_block]
    test_instances.group do |group|
      group.name = name
      $nvm.blocks.each_with_index do |block, i|
        yield block, i, group
      end
    end
  else
    yield
  end
end

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



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/c99/ate_interface.rb', line 14

def func(name, options = {})
  options = {
    duration: :static
  }.merge(options)

  block_loop(name, options) do |_block, i, group|
    ins = test_instances.functional(name)
    ins.set_wait_flags(:a) if options[:duration] == :dynamic
    ins.pin_levels = options.delete(:pin_levels) if options[:pin_levels]
    if group
      pname = "#{name}_b#{i}_pset"
      patsets.add(pname, [{ pattern: "#{name}_b#{i}.PAT" },
                          { pattern: 'nvm_global_subs.PAT', start_label: 'subr' }])
      ins.pattern = pname
      flow.test(group, options) if i == 0
    else
      pname = "#{name}_pset"
      patsets.add(pname, [{ pattern: "#{name}.PAT" },
                          { pattern: 'nvm_global_subs.PAT', start_label: 'subr' }])
      ins.pattern = pname
      if options[:cz_setup]
        flow.cz(ins, options[:cz_setup], options)
      else
        flow.test(ins, options)
      end
    end
  end
end

#log(msg) ⇒ Object



10
11
12
# File 'lib/c99/ate_interface.rb', line 10

def log(msg)
  flow.logprint(msg)
end

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



63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/c99/ate_interface.rb', line 63

def para(name, options = {})
  options = {
    high_voltage: false
  }.merge(options)
  if options.delete(:high_voltage)
    ins = test_instances.bpmu(name)
  else
    ins = test_instances.ppmu(name)
  end
  ins.dc_category = 'NVM_PARA'
  flow.test(ins, options)
  patsets.add("#{name}_pset", pattern: "#{name}.PAT")
end

#por(options = {}) ⇒ Object



56
57
58
59
60
61
# File 'lib/c99/ate_interface.rb', line 56

def por(options = {})
  options = {
    instance_not_available: true
  }.merge(options)
  flow.test('por_ins', options)
end