[sv-cc] integrating directC code


Subject: [sv-cc] integrating directC code
From: Francoise Martinolle (fm@cadence.com)
Date: Tue Jan 28 2003 - 13:25:45 PST


There was some discussion today about how to specify and link the directC
code.
Today there is dynamic shared library mechanism which is being widely used
to be able to
integrate C or C++ code and which is portable. It is not complicated to do.
I believe that is sufficient for our purpose.
I am afraid that allowing .o and .a may not be as easy as it sounds.

Either the user would have to make the code PIC (position independent) and
indicate that
it is relocatable otherwise here will be a linking error on dlopen
or if the code has to be linked statically, this would have to be
indicated as a non PIC
object to the tool, the tool would have to statically link it with the main
program,
and re-exec the newly formed executable.
I really don't think we should standardize on a method to link .o and .a files.
A standard should concentrate on a minimum method that is portable and
which provides
maximum flexibility and leave it up to the vendors to provide additional
specific user-friendly methods.

Andrzej also mentioned allowing the C source and object code to be located
in the
same directory as the module which uses it. I believe that this is also a
matter
of convenience for some users and we should not standardize this specific way.

Andrzej 's other idea was to (if I understood it correcly) to use the -y-v
flags for
verilog library and file search to also apply to C libraries and source
file. First I would like to
note that these options are not specified in the Verilog 1364 standard,
second that they
are overly complicated and disliked by some users.
Provided we specify a way to distinguish between a verilog library and a C
library,
I would not want to overload the semantics of these options with looking
for C source code.
No standard body can standardize on a set of tool switch names. Some shells
may not accept arguments which start by a - or a +. This is not portable. A
standard
can say that certain switches may be provided to indicate a shared library
list name
for example.

Francoise
        '



This archive was generated by hypermail 2b28 : Tue Jan 28 2003 - 13:26:40 PST