Class: OrigenTesters::SmartestBasedTester::Base::Processors::ExtractBinNames

Inherits:
ATP::Processor
  • Object
show all
Defined in:
lib/origen_testers/smartest_based_tester/base/processors/extract_bin_names.rb

Instance Method Summary collapse

Methods inherited from ATP::Processor

#add_global_flag, #clean_flag, #extract_globals, #extract_volatiles, #global_flag?, #global_flags, #handler_missing, #process, #process_all, #volatile?, #volatile_flags

Instance Method Details

#on_bin_descriptions(node) ⇒ Object



12
13
14
15
16
17
# File 'lib/origen_testers/smartest_based_tester/base/processors/extract_bin_names.rb', line 12

def on_bin_descriptions(node)
  node.children.each do |n|
    number, name = *n
    record number, name, type: n.type
  end
end

#on_test(node) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/origen_testers/smartest_based_tester/base/processors/extract_bin_names.rb', line 19

def on_test(node)
  if on_fail = node.find(:on_fail)
    if set_result = on_fail.find(:set_result)
      if bin = set_result.find(:bin)
        if bin.to_a[1]
          record(*bin.to_a, supplied: true, type: :hard)
        else
          record(*bin.to_a, default_name(node), type: :hard)
        end
      end
      if sbin = set_result.find(:softbin)
        if sbin.to_a[1]
          record(*sbin.to_a, supplied: true, type: :soft)
        else
          record(*sbin.to_a, default_name(node), type: :soft)
        end
      end
    end
  end
  process_all(node.children)
end

#run(node, options = {}) ⇒ Object



6
7
8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/processors/extract_bin_names.rb', line 6

def run(node, options = {})
  @bin_names = { soft: {}, hard: {} }
  process(node)
  @bin_names
end