class HDLRuby::Low::TimeBlock

Describes a timed block.

NOTE:

Describes a timed block.

NOTE:

Extends the Block class with generation of C text.

Extends the TimeBlock class with generation of hdr text.

Add the conversion to high.

Extends the TimeBlock class with generation of HDLRuby::High text.

Extends the TimeBlock class with functionality for breaking assingments to concats.

Describes a timed block.

NOTE:

Extends the TimeBlock class with separation between signals and variables.

Public Instance Methods

add_statement(statement) click to toggle source

Adds a statement.

NOTE: TimeBlock is supported.

# File lib/HDLRuby/hruby_low.rb, line 4235
def add_statement(statement)
    unless statement.is_a?(Statement) then
        raise AnyError, 
              "Invalid class for a statement: #{statement.class}"
    end
    @statements << statement
    # And set its parent.
    statement.parent = self
    statement
end
delete_unless!(keep) click to toggle source

Removes the signals and corresponding assignments whose name is not in keep.

# File lib/HDLRuby/hruby_low_cleanup.rb, line 198
def delete_unless!(keep)
    # Nothing to cleanup.
end
eql?(obj) click to toggle source

Comparison for hash: structural comparison.

Calls superclass method
# File lib/HDLRuby/hruby_low.rb, line 4261
def eql?(obj)
    return false unless obj.is_a?(TimeBlock)
    return super(obj)
end
hash() click to toggle source

Hash function.

Calls superclass method
# File lib/HDLRuby/hruby_low.rb, line 4267
def hash
    return super
end
to_hdr(level = 0, header = true) click to toggle source

Generates the text of the equivalent hdr text. level is the hierachical level of the object.

Calls superclass method
# File lib/HDLRuby/hruby_low2hdr.rb, line 515
def to_hdr(level = 0, header = true)
    super(level,header,true)
end
to_high() click to toggle source

Creates a new high time block statement.

# File lib/HDLRuby/hruby_low2high.rb, line 351
def to_high
    # Create the new block statement.
    res = HDLRuby::High::TimeBlock.new(self.mode,self.name)
    # Add the statements.
    self.each_statement { |stmnt| res.add_statement(stmnt.to_high) }
    return res
end
unshift_statement(statement) click to toggle source

Adds a statement and the begining of the block

NOTE: TimeWait is not supported unless for TimeBlock objects.

# File lib/HDLRuby/hruby_low.rb, line 4249
def unshift_statement(statement)
    unless statement.is_a?(Statement) then
        raise AnyError,
              "Invalid class for a statement: #{statement.class}"
    end
    @statements.unshift(statement)
    # And set its parent.
    statement.parent = self
    statement
end
with_var(upper = nil) click to toggle source

Converts to a variable-compatible block where upper is the upper block if any.

NOTE: the result is a new block.

# File lib/HDLRuby/hruby_low_with_var.rb, line 257
def with_var(upper = nil)
    # For the specific case of block, the conversion is not
    # done.
    return self
end