Class: OrigenTesters::ATP::Processors::ContinueImplementer

Inherits:
OrigenTesters::ATP::Processor show all
Defined in:
lib/origen_testers/atp/processors/continue_implementer.rb

Overview

Implements continue on a fail branch for V93K by removing any bin nodes that are siblings of continue nodes. The continue nodes are also removed in the process since they have now served their function.

Instance Method Summary collapse

Methods inherited from OrigenTesters::ATP::Processor

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

Instance Method Details

#on_group(node) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/origen_testers/atp/processors/continue_implementer.rb', line 15

def on_group(node)
  f = node.find(:on_fail)
  if f && f.find(:continue)
    with_continue do
      node = node.updated(nil, process_all(node.children))
    end
    node
  else
    node.updated(nil, process_all(node.children))
  end
end

#on_on_fail(node) ⇒ Object

Delete any on-fail child if it's 'empty'



8
9
10
11
12
13
# File 'lib/origen_testers/atp/processors/continue_implementer.rb', line 8

def on_on_fail(node)
  if cont = node.find(:continue) || @continue
    node = node.updated(nil, node.children - [cont] - node.find_all(:set_result))
  end
  node.updated(nil, process_all(node.children))
end

#with_continueObject



27
28
29
30
31
32
# File 'lib/origen_testers/atp/processors/continue_implementer.rb', line 27

def with_continue
  orig = @continue
  @continue = true
  yield
  @continue = orig
end