Class: HDLRuby::High::Chunk

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

Overview

Extends the Chunk class for hybrid Ruby-C simulation.

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, #no_parent!, #scope

Constructor Details

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

Instance Method Details

#to_lowObject

Converts the if to HDLRuby::Low.



2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
# File 'lib/HDLRuby/hruby_high.rb', line 2423

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