Class: HDLRuby::High::Cast

Inherits:
Low::Cast show all
Includes:
HExpression
Defined in:
lib/HDLRuby/hruby_high.rb

Overview

Describes a high-level cast expression

Constant Summary

Constants included from Low::Low2Symbol

Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable

Instance Attribute Summary

Attributes included from HExpression

#systemT, #type

Attributes inherited from Low::Cast

#child

Attributes inherited from Low::Expression

#type

Attributes included from Low::Hparent

#parent

Instance Method Summary collapse

Methods included from HExpression

#[], #as, #coerce, #constant?, #inout, #input, #ljust, #lr, #ls, #mux, orig_operator, #orig_operator, #output, #rjust, #rr, #rs, #sext, #to_bit, #to_unsigned, #to_value, #to_value?, #zext

Methods inherited from Low::Cast

#boolean_in_assign2select, #clone, #each_node, #each_node_deep, #each_ref_deep, #eql?, #explicit_types, #hash, #initialize, #to_c, #to_high, #to_verilog, #to_vhdl, #use_name?

Methods included from Low::OneChildMutable

#map_nodes!, #replace_expressions!, #set_child!

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, #use_name?

Methods included from Low::Low2Symbol

#to_sym

Methods included from Low::Hparent

#scope

Constructor Details

This class inherits a constructor from HDLRuby::Low::Cast

Instance Method Details

#to_exprObject

Converts to a new expression.



2568
2569
2570
# File 'lib/HDLRuby/hruby_high.rb', line 2568

def to_expr
    return Cast.new(self.type,self.child.to_expr)
end

#to_lowObject

Converts the unary expression to HDLRuby::Low.



2573
2574
2575
# File 'lib/HDLRuby/hruby_high.rb', line 2573

def to_low
    return HDLRuby::Low::Cast.new(self.type.to_low,self.child.to_low)
end