Class: HDLRuby::High::When

Inherits:
Low::When show all
Defined in:
lib/HDLRuby/hruby_high.rb,
lib/HDLRuby/hruby_rsim.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!, #signal2subs!, #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+.



2596
2597
2598
# File 'lib/HDLRuby/hruby_high.rb', line 2596

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

Instance Method Details

#fullnameObject

Returns the name of the signal with its hierarchy.



893
894
895
# File 'lib/HDLRuby/hruby_rsim.rb', line 893

def fullname
    return self.parent.fullname
end

#init_sim(systemT) ⇒ Object

Initialize the simulation for system +systemT+.



718
719
720
# File 'lib/HDLRuby/hruby_rsim.rb', line 718

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

#to_lowObject

Converts the if to HDLRuby::Low.



2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
# File 'lib/HDLRuby/hruby_high.rb', line 2601

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