Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/HDLRuby/hruby_high.rb

Overview

Extends the String class for computing conversion to expression.

Instance Method Summary collapse

Instance Method Details

#to_exprObject

Convert to a new high-level string expression



4337
4338
4339
# File 'lib/HDLRuby/hruby_high.rb', line 4337

def to_expr
    return StringE.new(self)
end

#to_valueObject

Converts to a new high-level value.



4329
4330
4331
4332
4333
4334
# File 'lib/HDLRuby/hruby_high.rb', line 4329

def to_value
    # Convert the string to a bit string.
    bstr = BitString.new(self)
    # Use it to create the new value.
    return Value.new(Bit[bstr.width],self)
end