Class: HDLRuby::Low::RefThis

Inherits:
Ref show all
Defined in:
lib/HDLRuby/hruby_db.rb,
lib/HDLRuby/hruby_low.rb,
lib/HDLRuby/hruby_low2c.rb,
lib/HDLRuby/hruby_low2vhd.rb,
lib/HDLRuby/hruby_verilog.rb,
lib/HDLRuby/hruby_low2high.rb,
lib/HDLRuby/hruby_low_mutable.rb,
lib/HDLRuby/hruby_low_skeleton.rb,
lib/HDLRuby/hruby_low_fix_types.rb,
lib/HDLRuby/hruby_low_bool2select.rb

Overview

Extends the RefName class with functionality for converting booleans in assignments to select operators.

Direct Known Subclasses

High::RefThis

Constant Summary

Constants included from Low2Symbol

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

Instance Attribute Summary

Attributes inherited from Expression

#type

Attributes included from Hparent

#parent

Instance Method Summary collapse

Methods inherited from Ref

#each_node, #each_node_deep, #path_each, #to_vhdl

Methods inherited from Expression

#boolean?, #break_types!, #each_node, #each_node_deep, #each_ref_deep, #extract_selects_to!, #initialize, #leftvalue?, #replace_expressions!, #replace_names!, #rightvalue?, #set_type!, #statement, #to_vhdl

Methods included from Low2Symbol

#to_sym

Constructor Details

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

Instance Method Details

#boolean_in_assign2selectObject

Converts booleans in assignments to select operators.



290
291
292
293
# File 'lib/HDLRuby/hruby_low_bool2select.rb', line 290

def boolean_in_assign2select
    # Simply clone.
    return self.clone
end

#cloneObject

Clones this.



4721
4722
4723
# File 'lib/HDLRuby/hruby_low.rb', line 4721

def clone
    return RefThis.new
end

#eql?(obj) ⇒ Boolean

Comparison for hash: structural comparison.

Returns:

  • (Boolean)


4726
4727
4728
# File 'lib/HDLRuby/hruby_low.rb', line 4726

def eql?(obj)
    return obj.is_a?(RefThis)
end

#explicit_types(type = nil) ⇒ Object

Explicit the types conversions in the index ref where +type+ is the expected type of the condition if any.



430
431
432
433
# File 'lib/HDLRuby/hruby_low_fix_types.rb', line 430

def explicit_types(type = nil)
    # Simply duplicate.
    return self.clone
end

#hashObject

Hash function.



4731
4732
4733
# File 'lib/HDLRuby/hruby_low.rb', line 4731

def hash
    return super
end

#map_nodes!(&ruby_block) ⇒ Object

Maps on the children.



1799
1800
1801
# File 'lib/HDLRuby/hruby_low_mutable.rb', line 1799

def map_nodes!(&ruby_block)
    # Nothing to do.
end

#to_another_verilogObject



1498
1499
1500
# File 'lib/HDLRuby/hruby_verilog.rb', line 1498

def to_another_verilog
    return ""
end

#to_c(level = 0, left = false) ⇒ Object

Generates the C text of the equivalent HDLRuby::High code. +level+ is the hierachical level of the object and +left+ tells if it is a left value or not.



1965
1966
1967
# File 'lib/HDLRuby/hruby_low2c.rb', line 1965

def to_c(level = 0, left = false)
    return "this()"
end

#to_c_signal(level = 0) ⇒ Object

Generates the C text for reference as left value to a signal. +level+ is the hierarchical level of the object.



1971
1972
1973
# File 'lib/HDLRuby/hruby_low2c.rb', line 1971

def to_c_signal(level = 0)
    return "this()"
end

#to_high(level = 0) ⇒ Object

Generates the text of the equivalent HDLRuby::High code. +level+ is the hierachical level of the object.



723
724
725
# File 'lib/HDLRuby/hruby_low2high.rb', line 723

def to_high(level = 0)
    return ""
end