Method: HDLRuby::Low::Block#add_variable

Defined in:
lib/HDLRuby/hruby_low_with_var.rb

#add_variable(name, type) ⇒ Object

Adds variable +name+ with +type+.



137
138
139
140
141
142
143
144
# File 'lib/HDLRuby/hruby_low_with_var.rb', line 137

def add_variable(name,type)
    # Ensure name is a symbol.
    name = name.to_sym
    # Declares the variable as an inner.
    inner = add_inner(SignalI.new(name,type))
    # And register it as a variable.
    variables[name] = inner 
end