Class: RubyHDL::High::Sterminate

Inherits:
Statement show all
Defined in:
lib/HDLRuby/std/sequencer_sw.rb

Overview

Describes a SW implementation of a terminate statement.

Instance Method Summary collapse

Methods inherited from Statement

#each_statement, #each_statement_deep

Constructor Details

#initialize(sequencer) ⇒ Sterminate

Create a new break statement in sequencer +sequencer+.



2489
2490
2491
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2489

def initialize(sequencer)
  @sequencer = sequencer
end

Instance Method Details

#to_cObject

Convert to C code.



2501
2502
2503
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2501

def to_c
  return @sequencer.clk_up_c + "\nreturn;"
end

#to_rubyObject

Convert to Ruby code.



2494
2495
2496
2497
2498
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2494

def to_ruby
  # Implemented as returning from a function since a sequencer
  # is implemented as one.
  return @sequencer.clk_up + "\nreturn"
end