Class: RubyHDL::High::Sterminate
- Defined in:
- lib/HDLRuby/std/sequencer_sw.rb
Overview
Describes a SW implementation of a terminate statement.
Instance Method Summary collapse
-
#initialize(sequencer) ⇒ Sterminate
constructor
Create a new break statement in sequencer +sequencer+.
-
#to_c ⇒ Object
Convert to C code.
-
#to_python(l = "") ⇒ Object
Convert to Python code.
-
#to_ruby ⇒ Object
Convert to Ruby code.
-
#to_tf(l = "") ⇒ Object
Convert to TensorFlow code.
Methods inherited from Statement
#each_statement, #each_statement_deep
Constructor Details
#initialize(sequencer) ⇒ Sterminate
Create a new break statement in sequencer +sequencer+.
3292 3293 3294 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3292 def initialize(sequencer) @sequencer = sequencer end |
Instance Method Details
#to_c ⇒ Object
Convert to C code.
3304 3305 3306 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3304 def to_c return @sequencer.clk_up_c + "\nreturn;" end |
#to_python(l = "") ⇒ Object
Convert to Python code.
3309 3310 3311 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3309 def to_python(l = "") return @sequencer.clk_up_python(l) + "\n#{l}return;" end |
#to_ruby ⇒ Object
Convert to Ruby code.
3297 3298 3299 3300 3301 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3297 def to_ruby # Implemented as returning from a function since a sequencer # is implemented as one. return @sequencer.clk_up + "\nreturn" end |
#to_tf(l = "") ⇒ Object
Convert to TensorFlow code.
3314 3315 3316 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3314 def to_tf(l = "") return "\n#{l}return;" end |