Class: OrigenSTIL::Processor::Timesets
- Inherits:
-
Base
- Object
- Base
- OrigenSTIL::Processor::Timesets
show all
- Defined in:
- lib/origen_stil/processor/timesets.rb
Instance Method Summary
collapse
Methods inherited from Base
#handler_missing, #process
Instance Method Details
#on_time_expr(node) ⇒ Object
21
22
23
|
# File 'lib/origen_stil/processor/timesets.rb', line 21
def on_time_expr(node)
Expression.new.run(node)
end
|
12
13
14
15
16
17
18
19
|
# File 'lib/origen_stil/processor/timesets.rb', line 12
def on_waveform_table(node)
name = node.to_a[0]
name = name.value if name.try(:type) == :name
@timesets[name] = {}
if period = node.find(:period)
@timesets[name][:period_in_ns] = process_all(period.children).first * 1_000_000_000
end
end
|
#run(node, options = {}) ⇒ Object
Extract WaveformTables from the given AST and return as a hash of
timesets and attributes
6
7
8
9
10
|
# File 'lib/origen_stil/processor/timesets.rb', line 6
def run(node, options = {})
@timesets = {}
process(node)
@timesets
end
|