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

Methods included from Low2Symbol

#to_sym

Methods included from Hparent

#scope

Constructor Details

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

Instance Method Details

#boolean_in_assign2selectObject

Converts booleans in assignments to select operators.



313
314
315
316
# File 'lib/HDLRuby/hruby_low_bool2select.rb', line 313

def boolean_in_assign2select
    # Simply clone.
    return self.clone
end

#cloneObject

Clones this.



4912
4913
4914
# File 'lib/HDLRuby/hruby_low.rb', line 4912

def clone
    return RefThis.new
end

#eql?(obj) ⇒ Boolean

Comparison for hash: structural comparison.

Returns:

  • (Boolean)


4917
4918
4919
# File 'lib/HDLRuby/hruby_low.rb', line 4917

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.



434
435
436
437
# File 'lib/HDLRuby/hruby_low_fix_types.rb', line 434

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

#hashObject

Hash function.



4922
4923
4924
# File 'lib/HDLRuby/hruby_low.rb', line 4922

def hash
    return super
end

#map_nodes!(&ruby_block) ⇒ Object

Maps on the children.



1888
1889
1890
# File 'lib/HDLRuby/hruby_low_mutable.rb', line 1888

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

#to_another_verilogObject



1592
1593
1594
# File 'lib/HDLRuby/hruby_verilog.rb', line 1592

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.



2002
2003
2004
# File 'lib/HDLRuby/hruby_low2c.rb', line 2002

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.



2008
2009
2010
# File 'lib/HDLRuby/hruby_low2c.rb', line 2008

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