Class: RubyHDL::High::Sreturn
- Defined in:
- lib/HDLRuby/std/sequencer_sw.rb
Overview
Describes a SW implementation of a return statement.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(sequencer, val) ⇒ Sreturn
constructor
Create a new break statement in sequencer +sequencer+ returning value +val+.
-
#to_c ⇒ Object
Convert to Ruby 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 Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
3259 3260 3261 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3259 def value @value end |
Instance Method Details
#to_c ⇒ Object
Convert to Ruby code.
3274 3275 3276 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3274 def to_c return @sequencer.clk_up_c + "\nreturn #{@value.to_c};" end |
#to_python(l = "") ⇒ Object
Convert to Python code.
3279 3280 3281 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3279 def to_python(l = "") return @sequencer.clk_up_python(l) + "\n#{l}return #{@value.to_python}" end |
#to_ruby ⇒ Object
Convert to Ruby code.
3269 3270 3271 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3269 def to_ruby return @sequencer.clk_up + "\nreturn #{@value.to_ruby}" end |
#to_tf(l = "") ⇒ Object
Convert to TensorFlow code.
3284 3285 3286 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 3284 def to_tf(l = "") return "\n#{l}return #{@value.to_tf}" end |