Class: OrigenTesters::ATP::Validator
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Processor
#add_global_flag, #clean_flag, #extract_globals, #extract_volatiles, #global_flag?, #global_flags, #handler_missing, #process_all, #run, #volatile?, #volatile_flags
Constructor Details
#initialize(flow) ⇒ Validator
14
15
16
|
# File 'lib/origen_testers/atp/validator.rb', line 14
def initialize(flow)
@flow = flow
end
|
Instance Attribute Details
#flow ⇒ Object
Returns the value of attribute flow.
4
5
6
|
# File 'lib/origen_testers/atp/validator.rb', line 4
def flow
@flow
end
|
Class Method Details
.testing ⇒ Object
10
11
12
|
# File 'lib/origen_testers/atp/validator.rb', line 10
def self.testing
@testing
end
|
.testing=(value) ⇒ Object
6
7
8
|
# File 'lib/origen_testers/atp/validator.rb', line 6
def self.testing=(value)
@testing = value
end
|
Instance Method Details
#error(message) ⇒ Object
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/origen_testers/atp/validator.rb', line 42
def error(message)
if Validator.testing
puts message
else
Origen.log.error(message)
end
end
|
#process(node) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/origen_testers/atp/validator.rb', line 18
def process(node)
if @top_level_called
super
else
@top_level_called = true
setup
super(node)
unless @testing
exit 1 if on_completion
end
end
end
|
#setup ⇒ Object
39
40
|
# File 'lib/origen_testers/atp/validator.rb', line 39
def setup
end
|
#test_process(node) ⇒ Object
For test purposes, returns true if validation failed rather than exiting the process
33
34
35
36
37
|
# File 'lib/origen_testers/atp/validator.rb', line 33
def test_process(node)
@testing = true
process(node)
on_completion
end
|