class HDLRuby::Low::TimeBlock
Describes a timed block.
NOTE:
-
this is the only kind of block that can include time statements.
-
this kind of block is not synthesizable!
Describes a timed block.
NOTE:
-
this is the only kind of block that can include time statements.
-
this kind of block is not synthesizable!
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:
-
this is the only kind of block that can include time statements.
-
this kind of block is not synthesizable!
Extends the TimeBlock
class with separation between signals and variables.
Public Instance Methods
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
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
Comparison for hash: structural comparison.
# File lib/HDLRuby/hruby_low.rb, line 4261 def eql?(obj) return false unless obj.is_a?(TimeBlock) return super(obj) end
Hash
function.
# File lib/HDLRuby/hruby_low.rb, line 4267 def hash return super end
Generates the text of the equivalent hdr text. level
is the hierachical level of the object.
# File lib/HDLRuby/hruby_low2hdr.rb, line 515 def to_hdr(level = 0, header = true) super(level,header,true) end
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
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
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