Class: HDLRuby::High::Value
- Inherits:
-
Low::Value
- Object
- Base::Expression
- Low::Expression
- Low::Value
- HDLRuby::High::Value
- Includes:
- HExpression, Vprocess
- Defined in:
- lib/HDLRuby/hruby_high.rb
Overview
Describes a high-level value.
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::Value
Attributes inherited from Low::Expression
Attributes included from Low::Hparent
Instance Method Summary collapse
-
#constant? ⇒ Boolean
Tell if the expression is constant.
-
#to_expr ⇒ Object
Converts to a new expression.
-
#to_low ⇒ Object
Converts the value to HDLRuby::Low.
-
#to_value ⇒ Object
Converts to a new value.
-
#to_value? ⇒ Boolean
Tell if the expression can be converted to a value.
Methods included from Vprocess
Methods included from HExpression
#[], #as, #coerce, #inout, #input, #ljust, #lr, #ls, #mux, #orig_operator, orig_operator, #output, #rjust, #rr, #rs, #sext, #to_bit, #to_unsigned, #zext
Methods inherited from Low::Value
#<=>, #boolean_in_assign2select, #clone, #eql?, #even?, #explicit_types, #hash, #initialize, #odd?, #set_content!, #to_arith, #to_c, #to_c_make, #to_ch, #to_getrange, #to_high, #to_i, #to_verilog, #to_vhdl, #width
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
Methods included from Low::Hparent
Constructor Details
This class inherits a constructor from HDLRuby::Low::Value
Instance Method Details
#constant? ⇒ Boolean
Tell if the expression is constant.
2687 2688 2689 2690 |
# File 'lib/HDLRuby/hruby_high.rb', line 2687 def constant? # A value is a constant. return true end |
#to_expr ⇒ Object
Converts to a new expression.
2693 2694 2695 |
# File 'lib/HDLRuby/hruby_high.rb', line 2693 def to_expr return self.to_value end |
#to_low ⇒ Object
Converts the value to HDLRuby::Low.
2698 2699 2700 2701 2702 2703 |
# File 'lib/HDLRuby/hruby_high.rb', line 2698 def to_low # Clone the content if possible content = self.content.frozen? ? self.content : self.content.clone # Create and return the resulting low-level value return HDLRuby::Low::Value.new(self.type.to_low,self.content) end |
#to_value ⇒ Object
Converts to a new value.
2680 2681 2682 2683 2684 |
# File 'lib/HDLRuby/hruby_high.rb', line 2680 def to_value # # Already a value. # self return Value.new(self.type,self.content) end |
#to_value? ⇒ Boolean
Tell if the expression can be converted to a value.
2675 2676 2677 |
# File 'lib/HDLRuby/hruby_high.rb', line 2675 def to_value? return true end |