Module: HDLRuby::High::RCSimBlock
Overview
Module for extending the Block classes for hybrid Ruby-C simulation.
Instance Attribute Summary collapse
-
#rcstatement ⇒ Object
readonly
Returns the value of attribute rcstatement.
Instance Method Summary collapse
-
#to_rcsim(owner = nil) ⇒ Object
Generate the C description of the hardware case.
Instance Attribute Details
#rcstatement ⇒ Object (readonly)
Returns the value of attribute rcstatement.
781 782 783 |
# File 'lib/HDLRuby/hruby_rcsim.rb', line 781 def rcstatement @rcstatement end |
Instance Method Details
#to_rcsim(owner = nil) ⇒ Object
Generate the C description of the hardware case. +owner+ is a link to the C description of the owner behavior if any.
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 |
# File 'lib/HDLRuby/hruby_rcsim.rb', line 785 def to_rcsim(owner = nil) # Create the block C object. @rcstatement = RCSim.rcsim_make_block(self.mode) # Sets the owner if any. if owner then RCSim.rcsim_set_owner(@rcstatement,owner) end # Add the inner signals. if self.each_inner.any? then RCSim.rcsim_add_block_inners(@rcstatement, self.each_inner.map do |sig| sig.to_rcsim(@rcstatement) end) end # Add the statements. if self.each_statement.any? then RCSim.rcsim_add_block_statements(@rcstatement, self.each_statement.map do |stmnt| stmnt.to_rcsim end) end return @rcstatement end |