class HDLRuby::High::Binary

Describes a high-level binary expression

Public Instance Methods

to_expr() click to toggle source

Converts to a new expression.

# File lib/HDLRuby/hruby_high.rb, line 2787
def to_expr
    return Binary.new(self.type, self.operator,
                      self.left.to_expr, self.right.to_expr)
end
to_low() click to toggle source

Converts the binary expression to HDLRuby::Low.

# File lib/HDLRuby/hruby_high.rb, line 2793
def to_low
    # return HDLRuby::Low::Binary.new(self.type.to_low, self.operator,
    #                                self.left.to_low, self.right.to_low)
    binaryL = HDLRuby::Low::Binary.new(self.type.to_low, self.operator,
                                   self.left.to_low, self.right.to_low)
    # For debugging: set the source high object
    binaryL.properties[:low2high] = self.hdr_id
    self.properties[:high2low] = binaryL
    return binaryL
end