Class: HDLRuby::High::Expression

Inherits:
Object
  • Object
show all
Defined in:
lib/HDLRuby/hruby_rsim.rb,
lib/HDLRuby/hruby_rcsim.rb

Overview

Extends the Expression class for hybrid Ruby-C simulation.

Instance Method Summary collapse

Instance Method Details

#execute(mode) ⇒ Object

Executes the expression in +mode+ (:blocking or :nonblocking) NOTE: to be overrided.



981
982
983
# File 'lib/HDLRuby/hruby_rsim.rb', line 981

def execute(mode)
    raise "execute must be implemented in class #{self.class}"
end

#init_sim(systemT) ⇒ Object

Initialize the simulation for system +systemT+.



975
976
977
# File 'lib/HDLRuby/hruby_rsim.rb', line 975

def init_sim(systemT)
    # By default: do nothing.
end

#to_rcsimObject

Generate the C description of the expression.



776
777
778
# File 'lib/HDLRuby/hruby_rcsim.rb', line 776

def to_rcsim
    raise "to_rcsim must be implemented in #{self.class}"
end