Module: C99::J750BaseInterface

Included in:
J750Interface
Defined in:
lib/c99/j750_interface.rb

Instance Method Summary collapse

Instance Method Details

#block_loop(name, options) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/c99/j750_interface.rb', line 41

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



12
13
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
# File 'lib/c99/j750_interface.rb', line 12

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

#initialize(_options = {}) ⇒ Object

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



5
6
# File 'lib/c99/j750_interface.rb', line 5

def initialize(_options = {})
end

#log(msg) ⇒ Object



8
9
10
# File 'lib/c99/j750_interface.rb', line 8

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

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



61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/c99/j750_interface.rb', line 61

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



54
55
56
57
58
59
# File 'lib/c99/j750_interface.rb', line 54

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