Top Level Namespace

Defined Under Namespace

Modules: FileUtils, RDoc, RubyVPI, VPI, XX Classes: ERB, Float, Integer, String, VerilogParser

Constant Summary collapse

OBJECT_PATH =
File.join(File.dirname(__FILE__), '..', '..', 'obj')
LOADER_FUNC =
'vlog_startup_routines_bootstrap'
RUBY_FUNC =
'ruby_init'

Instance Method Summary collapse

Instance Method Details

#expand_incdir_options(aSimId) ⇒ Object

Returns an array of include-directory options.



91
92
93
94
# File 'lib/ruby-vpi/runner.rb', line 91

def expand_incdir_options aSimId # :nodoc:
  prefix = aSimId == :ivl ? '-I' : '+incdir+'
  @incdirs.map {|i| prefix + i}
end

#object_file_path(aSimId) ⇒ Object

Returns the path to the Ruby-VPI object file for the given simulator.



80
81
82
83
84
85
86
87
88
# File 'lib/ruby-vpi/runner.rb', line 80

def object_file_path aSimId # :nodoc:
  path = File.expand_path File.join(OBJECT_PATH, "#{aSimId}.so")

  unless File.exist? path
    raise "Object file #{path.inspect} is missing. Rebuild Ruby-VPI."
  end

  path
end

#sim_task(aSimId) ⇒ Object

Creates a new task for running the given simulator.



97
98
99
100
101
102
103
# File 'lib/ruby-vpi/runner.rb', line 97

def sim_task aSimId #:nodoc:
  desc "Simulate with #{RubyVPI::SIMULATORS.find_by_id(aSimId).name}."
  task aSimId => :setup do
    ENV['RUBYVPI_SIMULATOR'] = aSimId.to_s
    yield aSimId
  end
end