Module: HDLRuby::Low::Hparent

Included in:
Behavior, Chunk, Code, Delay, Event, Expression, Scope, SignalI, Statement, SystemI, SystemT, Type, When
Defined in:
lib/HDLRuby/hruby_low.rb

Overview

Gives parent definition and access properties to an hardware object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

The parent.



45
46
47
# File 'lib/HDLRuby/hruby_low.rb', line 45

def parent
  @parent
end

Instance Method Details

#hierarchyObject

Get the full parents hierachy.



68
69
70
71
72
73
74
75
76
# File 'lib/HDLRuby/hruby_low.rb', line 68

def hierarchy
    res = []
    cur = self
    while(cur) do
        res << cur
        cur = cur.parent
    end
    return res
end

#scopeObject

Get the parent scope.



61
62
63
64
65
# File 'lib/HDLRuby/hruby_low.rb', line 61

def scope
    cur = self.parent
    cur = cur.parent until cur.is_a?(Scope)
    return cur
end