class RubyRTL::Sig

further defined in dsl.rb attributes :

Attributes

name[RW]
subscript_of[RW]
subsignals[RW]
type[RW]

Public Class Methods

new(name,type=:bit) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 57
def initialize name,type=:bit
  @name=name
  @type=build_type(type)
end

Public Instance Methods

!=(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 138
def !=(other)
  other=treat_int(other)
  Binary.new(self,"!=",other)
end
&(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 82
def &(other)
  other=treat_int(other)
  Binary.new(self,"&",other)
end
*(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 128
def *(other)
  other=treat_int(other)
  Binary.new(self,"*",other)
end
+(other) click to toggle source

arith

# File lib/ruby_rtl/dsl.rb, line 118
def +(other)
  other=treat_int(other)
  Binary.new(self,"+",other)
end
-(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 123
def -(other)
  other=treat_int(other)
  Binary.new(self,"-",other)
end
-@() click to toggle source
# File lib/ruby_rtl/dsl.rb, line 148
def -@
  Unary.new("-",self)
end
/(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 133
def /(other)
  other=treat_int(other)
  Binary.new(self,"/",other)
end
<(other) click to toggle source

comparison

# File lib/ruby_rtl/dsl.rb, line 93
def <(other)
  other=treat_int(other)
  Binary.new(self,"<",other)
end
<=(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 98
def <=(other)
  other=treat_int(other)
  Binary.new(self,"<=",other)
end
==(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 113
def ==(other)
  other=treat_int(other)
  Binary.new(self,"==",other)
end
>(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 103
def >(other)
  other=treat_int(other)
  Binary.new(self,"<",other)
end
>=(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 108
def >=(other)
  other=treat_int(other)
  Binary.new(self,"<=",other)
end
[](index) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 152
def [](index)
  @indexed||={}
  index=treat_int(index)
  @indexed[index.to_s]||=Indexed.new(self,index,@type.type)
end
^(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 87
def ^(other)
  other=treat_int(other)
  Binary.new(self,"^",other)
end
coerce(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 158
def coerce(other)
  [IntLit.new(other), self]
end
treat_int(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 62
def treat_int(other)
  case other
  when Integer
    if other >=0
      #return UIntLit.new(other)
      return RUIntLit.new(other)
    else
      #return IntLit.new(other)
      return RIntLit.new(other)
    end
  else
    return other
  end
end
|(other) click to toggle source
# File lib/ruby_rtl/dsl.rb, line 77
def |(other)
  other=treat_int(other)
  Binary.new(self,"|",other)
end