module HDLRuby::Low::Hparent
Gives parent definition and access properties to an hardware object.
Attributes
parent[R]
The parent.
Public Instance Methods
parent=(parent)
click to toggle source
Set the parent
.
Note: if parent
is nil, the current parent is removed.
# File lib/HDLRuby/hruby_low.rb, line 50 def parent=(parent) if @parent and parent and !@parent.equal?(parent) then # The parent is already defined,it is not to be removed, # and the new parent is different, error. raise AnyError, "Parent already defined." else @parent = parent end end
scope()
click to toggle source
Get the parent scope.
# File lib/HDLRuby/hruby_low.rb, line 61 def scope cur = self.parent cur = cur.parent until cur.is_a?(Scope) return cur end