Class: HDLRuby::High::When

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

Overview

Extends the When class for hybrid Ruby-C simulation.

Constant Summary collapse

High =
HDLRuby::High

Constants included from Low::Low2Symbol

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

Instance Attribute Summary

Attributes inherited from Low::When

#match, #statement

Attributes included from Low::Hparent

#parent

Instance Method Summary collapse

Methods inherited from Low::When

#add_blocks_code, #add_make_block, #blocks2seq!, #boolean_in_assign2select!, #break_types!, #casts_without_expression!, #clone, #delete_related!, #delete_unless!, #each_block, #each_block_deep, #each_deep, #each_node, #each_node_deep, #each_statement, #each_statement_deep, #eql?, #explicit_types!, #extract_declares!, #extract_selects!, #hash, #map_nodes!, #mix?, #replace_expressions!, #replace_names!, #set_match!, #set_statement!, #to_c, #to_ch, #to_hdr, #to_high, #to_upper_space!, #to_vhdl, #top_block, #use_name?, #with_var

Methods included from Low::Low2Symbol

#to_sym

Methods included from Low::Hparent

#hierarchy, #no_parent!, #scope

Constructor Details

#initialize(match, statement) ⇒ When

Creates a new when for a casde statement that executes +statement+ on +match+.



2561
2562
2563
# File 'lib/HDLRuby/hruby_high.rb', line 2561

def initialize(match,statement)
    super(match,statement)
end

Instance Method Details

#init_sim(systemT) ⇒ Object

Initialize the simulation for system +systemT+.



658
659
660
# File 'lib/HDLRuby/hruby_rsim.rb', line 658

def init_sim(systemT)
    self.statement.init_sim(systemT)
end

#to_lowObject

Converts the if to HDLRuby::Low.



2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
# File 'lib/HDLRuby/hruby_high.rb', line 2566

def to_low
    # return HDLRuby::Low::When.new(self.match.to_low,
    #                               self.statement.to_low)
    whenL = HDLRuby::Low::When.new(self.match.to_low,
                                  self.statement.to_low)
    # # For debugging: set the source high object 
    # whenL.properties[:low2high] = self.hdr_id
    # self.properties[:high2low] = whenL
    return whenL
end