Class: OrigenTesters::Test::UltraFLEXInterface

Inherits:
Object
  • Object
show all
Includes:
UltraFLEX::Generator
Defined in:
lib/origen_testers/test/ultraflex_interface.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ UltraFLEXInterface

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



8
9
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 8

def initialize(options = {})
end

Instance Method Details

#bin(number, options = {}) ⇒ Object



106
107
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 106

def bin(number, options = {})
end

#block_loop(name, options) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 69

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



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
42
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 15

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



11
12
13
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 11

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

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



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 44

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

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

  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]

  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
    use_limit_params = [:lo_limit, :hi_limit, :scale, :units] # define options to strip for flow.test
    options_use_limit = options.dup                           # duplicate, as modifying options directly, even an assigned copy modifies original
    flow.test(ins, options.reject! { |k, _| use_limit_params.include? k })    # set up test skipping use-limit options
    flow.use_limit(name, options_use_limit) if options_use_limit[:hi_limit] || options_use_limit[:lo_limit]  # Only use use-limit if limits present in flow
  end
end

#mto_memory(args) ⇒ Object



102
103
104
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 102

def mto_memory(args)
  # DO NOTHING, NOT YET SUPPORTED IN ULTRAFLEX
end

#nop(options = {}) ⇒ Object



98
99
100
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 98

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

#or_ids(options = {}) ⇒ Object

OR 2 IDS together into 1 flag



94
95
96
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 94

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

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



89
90
91
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 89

def para(name, options = {})
  print "UltraFLEX Parametric Test not yet supported for UltraFlex!\n"
end

#por(options = {}) ⇒ Object



82
83
84
85
86
87
# File 'lib/origen_testers/test/ultraflex_interface.rb', line 82

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