class HDLRuby::High::TimeBehavior
Describes a high-level timed behavior.
Constants
- High
High-level libraries for describing digital hardware.
Public Class Methods
new(mode, &ruby_block)
click to toggle source
Creates a new timed behavior built by executing ruby_block
. mode
can be either :seq or :par for respectively sequential or
Calls superclass method
HDLRuby::Low::TimeBehavior::new
# File lib/HDLRuby/hruby_high.rb, line 3948 def initialize(mode, &ruby_block) # Create a default par block for the behavior. block = High.make_time_block(mode,&ruby_block) # Initialize the behavior with it. super(block) end
Public Instance Methods
to_low()
click to toggle source
Converts the time behavior to HDLRuby::Low
.
# File lib/HDLRuby/hruby_high.rb, line 3956 def to_low # Create the low level block. blockL = self.block.to_low # Create the low level events. eventLs = self.each_event.map { |event| event.to_low } # Create and return the resulting low level behavior. timeBehaviorL = HDLRuby::Low::TimeBehavior.new(blockL) # For debugging: set the source high object timeBehaviorL.properties[:low2high] = self.hdr_id self.properties[:high2low] = timeBehaviorL eventLs.each(&timeBehaviorL.method(:add_event)) return timeBehaviorL end