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_ruby ⇒ Object
Convert to Ruby code.
Methods inherited from Statement
#each_statement, #each_statement_deep
Constructor Details
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
2466 2467 2468 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2466 def value @value end |
Instance Method Details
#to_c ⇒ Object
Convert to Ruby code.
2481 2482 2483 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2481 def to_c return @sequencer.clk_up_c + "\nreturn #{val.to_c};" end |
#to_ruby ⇒ Object
Convert to Ruby code.
2476 2477 2478 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2476 def to_ruby return @sequencer.clk_up + "\nreturn #{@value.to_ruby}" end |