Class: RubyHDL::High::Sbreak
- Defined in:
- lib/HDLRuby/std/sequencer_sw.rb
Overview
Describes a SW implementation of a break statement.
Instance Method Summary collapse
-
#initialize(sequencer) ⇒ Sbreak
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
Instance Method Details
#to_c ⇒ Object
Convert to C code.
3214 3215 3216 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3214 def to_c return @sequencer.clk_up_c + "\nbreak;" end |
#to_python(l = "") ⇒ Object
Convert to Python code.
3219 3220 3221 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3219 def to_python(l = "") return @sequencer.clk_up_python(l) + "\n#{l}break;" end |
#to_ruby ⇒ Object
Convert to Ruby code.
3209 3210 3211 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3209 def to_ruby return @sequencer.clk_up + "\nbreak" end |
#to_tf(l = "") ⇒ Object
Convert to Tensorflow code.
3224 3225 3226 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3224 def to_tf(l = "") return "return tf.constant(0)" end |