Class: RubyRTL::UIntType

Inherits:
Type
  • Object
show all
Defined in:
lib/ruby_rtl/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Ast

#comments

Instance Method Summary collapse

Methods inherited from Ast

#accept

Constructor Details

#initialize(nbits) ⇒ UIntType

Returns a new instance of UIntType.



315
316
317
# File 'lib/ruby_rtl/ast.rb', line 315

def initialize nbits
  @bitwidth=nbits
end

Instance Attribute Details

#bitwidthObject

Returns the value of attribute bitwidth.



314
315
316
# File 'lib/ruby_rtl/ast.rb', line 314

def bitwidth
  @bitwidth
end

Instance Method Details

#to_sObject



319
320
321
# File 'lib/ruby_rtl/ast.rb', line 319

def to_s
  "uint#{bitwidth}"
end