Class: HDLRuby::High::Chunk

Inherits:
Low::Chunk show all
Defined in:
lib/HDLRuby/hruby_high.rb

Overview

Describes a non-HDLRuby code chunk.

Instance Attribute Summary

Attributes inherited from Low::Chunk

#name

Attributes included from Low::Hparent

#parent

Instance Method Summary collapse

Methods inherited from Low::Chunk

#add_lump, #c_code_allocate!, #each_deep, #each_lump, #initialize, #to_c, #to_high

Methods included from Low::Hparent

#hierarchy, #scope

Constructor Details

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

Instance Method Details

#to_lowObject

Converts the if to HDLRuby::Low.



2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
# File 'lib/HDLRuby/hruby_high.rb', line 2171

def to_low
    # return HDLRuby::Low::Chunk.new(self.name,
    #                                *self.each_lump.map do |lump|
    #     lump = lump.respond_to?(:to_low) ? lump.to_low : lump.to_s
    #     lump
    # end)
    chunkL = HDLRuby::Low::Chunk.new(self.name,
                                   *self.each_lump.map do |lump|
        lump = lump.respond_to?(:to_low) ? lump.to_low : lump.to_s
        lump
    end)
    # # For debugging: set the source high object 
    # chunkL.properties[:low2high] = self.hdr_id
    # self.properties[:high2low] = chunkL
    return chunkL
end