Class: HDLRuby::High::Binary
- Inherits:
-
Low::Binary
- Object
- Base::Expression
- Low::Expression
- Low::Operation
- Low::Binary
- HDLRuby::High::Binary
- Includes:
- HExpression
- Defined in:
- lib/HDLRuby/hruby_high.rb
Overview
Describes a high-level binary expression
Constant Summary
Constants included from Low::Low2Symbol
Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable
Instance Attribute Summary
Attributes included from HExpression
Attributes inherited from Low::Binary
Attributes inherited from Low::Operation
Attributes inherited from Low::Expression
Attributes included from Low::Hparent
Instance Method Summary collapse
-
#to_expr ⇒ Object
Converts to a new expression.
-
#to_low ⇒ Object
Converts the binary expression to HDLRuby::Low.
Methods included from HExpression
#[], #as, #coerce, #constant?, #mux, orig_operator, #orig_operator, #to_value, #to_value?
Methods inherited from Low::Binary
#boolean?, #boolean_in_assign2select, #clone, #each_node, #each_node_deep, #each_ref_deep, #eql?, #explicit_types, #hash, #initialize, #map_nodes!, #replace_expressions!, #set_left!, #set_right!, #to_c, #to_change, #to_high, #to_verilog, #to_vhdl
Methods inherited from Low::Operation
#eql?, #explicit_types, #hash, #initialize, #set_operator!, #to_c, #to_high, #to_vhdl
Methods inherited from Low::Expression
#boolean?, #break_types!, #clone, #each_node, #each_node_deep, #each_ref_deep, #eql?, #explicit_types, #extract_selects_to!, #hash, #initialize, #leftvalue?, #map_nodes!, #replace_expressions!, #replace_names!, #rightvalue?, #set_type!, #statement, #to_c, #to_high, #to_vhdl
Methods included from Low::Low2Symbol
Constructor Details
This class inherits a constructor from HDLRuby::Low::Binary
Instance Method Details
#to_expr ⇒ Object
Converts to a new expression.
2390 2391 2392 2393 |
# File 'lib/HDLRuby/hruby_high.rb', line 2390 def to_expr return Binary.new(self.type, self.operator, self.left.to_expr, self.right.to_expr) end |
#to_low ⇒ Object
Converts the binary expression to HDLRuby::Low.
2396 2397 2398 2399 2400 |
# File 'lib/HDLRuby/hruby_high.rb', line 2396 def to_low # return HDLRuby::Low::Binary.new(self.operator, return HDLRuby::Low::Binary.new(self.type.to_low, self.operator, self.left.to_low, self.right.to_low) end |