Class: RubyHDL::High::Statement

Inherits:
Object
  • Object
show all
Defined in:
lib/HDLRuby/std/sequencer_sw.rb

Overview

Describes a SW implementation of a statement.

Direct Known Subclasses

Sbreak, Scontinue, Sif, Siter, Sloop, Sreturn, Step, Sterminate, Swhile, Sync, Transmit

Instance Method Summary collapse

Instance Method Details

#each_statement(&ruby_block) ⇒ Object

Iterate on the statements.



2178
2179
2180
2181
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2178

def each_statement(&ruby_block)
  return to_enum(:each_statement) unless ruby_block
  # By default nothing to do.
end

#each_statement_deep(&ruby_block) ⇒ Object

Iterate deeply on the statements.



2184
2185
2186
2187
2188
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2184

def each_statement_deep(&ruby_block)
  return to_enum(:each_statement_deep) unless ruby_block
  # Just apply ruby_block on self.
  ruby_block.call(self)
end