Class: RubyHDL::High::Sterminate

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

Overview

Describes a SW implementation of a terminate statement.

Instance Method Summary collapse

Constructor Details

#initializeSterminate

Create a new break statement in sequencer +sequencer+.



2340
2341
2342
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2340

def initialize
  @sequencer = sequencer
end

Instance Method Details

#to_cObject

Convert to C code.



2352
2353
2354
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2352

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

#to_rubyObject

Convert to Ruby code.



2345
2346
2347
2348
2349
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2345

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