Class: RubyHDL::High::Sloop
- Inherits:
-
Object
- Object
- RubyHDL::High::Sloop
- Defined in:
- lib/HDLRuby/std/sequencer_sw.rb
Overview
Describes a SW implementation of a loop statement.
Instance Method Summary collapse
-
#initialize(sequencer, &ruby_block) ⇒ Sloop
constructor
Create a new infinite loop statement in sequencer +sequencer+ with +ruby_block+ for generating the block that is taken.
-
#to_ruby ⇒ Object
Convert to ruby code.
Constructor Details
#initialize(sequencer, &ruby_block) ⇒ Sloop
Create a new infinite loop statement in sequencer +sequencer+ with +ruby_block+ for generating the block that is taken.
2018 2019 2020 2021 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2018 def initialize(sequencer, &ruby_block) @sequencer = sequencer @blk = Sblock.new(sequencer,&ruby_block) end |
Instance Method Details
#to_ruby ⇒ Object
Convert to ruby code.
2024 2025 2026 |
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2024 def to_ruby return "loop do\n#{@blk.to_ruby}\n#{@sequencer.clk_up}\nend\n" end |