def RubyVPI.load_test aDesignHandleOrPath, *aTestFilePaths
design =
if aDesignHandleOrPath.is_a? VPI::Handle
aDesignHandleOrPath
else
VPI.vpi_handle_by_name(aDesignHandleOrPath.to_s, nil)
end
raise ArgumentError, "cannot access the design under test: #{aDesignHandleOrPath.inspect}" unless design
sandbox = Module.new
sandbox.const_set :DUT, design
sandboxBinding = sandbox.module_eval('binding')
aTestFilePaths.flatten.compact.uniq.each do |path|
if HAVE_RUBY_19X
eval File.read(path), sandboxBinding, path
else
sandbox.module_eval File.read(path), path
end
end
sandbox
end