Class: HDLRuby::High::When
- Defined in:
- lib/HDLRuby/hruby_high.rb
Overview
Describes a high-level when for a case statement.
Constant Summary collapse
Constants included from Low::Low2Symbol
Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable
Instance Attribute Summary
Attributes inherited from Low::When
Attributes included from Low::Hparent
Instance Method Summary collapse
-
#initialize(match, statement) ⇒ When
constructor
Creates a new when for a casde statement that executes +statement+ on +match+.
-
#to_low ⇒ Object
Converts the if to HDLRuby::Low.
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
Methods included from Low::Hparent
Constructor Details
#initialize(match, statement) ⇒ When
Creates a new when for a casde statement that executes +statement+ on +match+.
2291 2292 2293 |
# File 'lib/HDLRuby/hruby_high.rb', line 2291 def initialize(match,statement) super(match,statement) end |
Instance Method Details
#to_low ⇒ Object
Converts the if to HDLRuby::Low.
2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 |
# File 'lib/HDLRuby/hruby_high.rb', line 2296 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 |