Class: OrigenTesters::Test::J750BaseInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/origen_testers/test/j750_base_interface.rb

Direct Known Subclasses

J750HPTInterface, J750Interface

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ J750BaseInterface

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



6
7
# File 'lib/origen_testers/test/j750_base_interface.rb', line 6

def initialize(options = {})
end

Instance Method Details

#block_loop(name, options) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/origen_testers/test/j750_base_interface.rb', line 42

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

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



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
40
# File 'lib/origen_testers/test/j750_base_interface.rb', line 13

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



9
10
11
# File 'lib/origen_testers/test/j750_base_interface.rb', line 9

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

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



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/origen_testers/test/j750_base_interface.rb', line 113

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

  name = "meas_#{name}" unless name.to_s =~ /meas/

  if options[:pins] == :hi_v
    ins = test_instances.board_pmu(name)
  elsif options[:pins] == :power
    ins = test_instances.powersupply(name)
  else
    ins = test_instances.pin_pmu(name)
  end
  ins.set_wait_flags(:a) if options[:duration] == :dynamic
  ins.pin_levels = options.delete(:pin_levels) if options[:pin_levels]
  ins.lo_limit = options[:lo_limit]
  ins.hi_limit = options[:hi_limit]

  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

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



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/origen_testers/test/j750_base_interface.rb', line 85

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

  block_loop(name, options) do |block, i, group|
    ins = test_instances.mto_memory(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

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

    name = "meas_#{name}" unless name.to_s =~ /meas/

    if options[:pins] == :hi_v
      ins = test_instances.board_pmu(name)
    elsif options[:pins] == :power
      ins = test_instances.powersupply(name)
    else
      ins = test_instances.pin_pmu(name)
    end
    ins.set_wait_flags(:a) if options[:duration] == :dynamic
    ins.pin_levels = options.delete(:pin_levels) if options[:pin_levels]
    ins.lo_limit = options[:lo_limit]
    ins.hi_limit = options[:hi_limit]

    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

#nop(options = {}) ⇒ Object



81
82
83
# File 'lib/origen_testers/test/j750_base_interface.rb', line 81

def nop(options = {})
  flow.nop options
end

#or_ids(options = {}) ⇒ Object

OR 2 IDS together into 1 flag



77
78
79
# File 'lib/origen_testers/test/j750_base_interface.rb', line 77

def or_ids(options = {})
  flow.or_flags(options[:id1], options[:id2], options)
end

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



62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/origen_testers/test/j750_base_interface.rb', line 62

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



55
56
57
58
59
60
# File 'lib/origen_testers/test/j750_base_interface.rb', line 55

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