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

Converts to a new high-level expression.



3931
3932
3933
3934
3935
3936
# File 'lib/HDLRuby/hruby_high.rb', line 3931

def to_expr
    # 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