class RubyRTL::UIntLit

Public Class Methods

new(val) click to toggle source
Calls superclass method RubyRTL::Literal::new
# File lib/ruby_rtl/ast.rb, line 234
def initialize val
  val=val==0 ? 1 : val
  bitwidth=Math.log2(val).floor+1
  super(val,UIntType.new(bitwidth))
end

Public Instance Methods

+(other) click to toggle source
# File lib/ruby_rtl/ast.rb, line 240
def +(other)
  ret=Binary.new(self,"+",other)
  ret.type=@type
  ret
end