Fix to remove compile warning with VHDL
This commit is contained in:
parent
fe189b26a1
commit
2a1285fee5
6 changed files with 17 additions and 14 deletions
|
|
@ -33,12 +33,12 @@ class PyVProcClass :
|
|||
api = None
|
||||
|
||||
# Constructor
|
||||
def __init__(self, nodeIn, cmodulename = "./PyVproc.so") :
|
||||
def __init__(self, nodeIn, cmodulename = "./PyVProc.so") :
|
||||
self.node = nodeIn
|
||||
self.api = self.__loadPyModule(cmodulename)
|
||||
|
||||
# Method to load Python C module
|
||||
def __loadPyModule(self, name = "./PyVproc.so") :
|
||||
def __loadPyModule(self, name = "./PyVProc.so") :
|
||||
|
||||
module = CDLL(name)
|
||||
module.argtypes = [c_int32]
|
||||
|
|
|
|||
|
|
@ -46,37 +46,37 @@ static regirqfunc_p VregIrq;
|
|||
static int BindToApiFuncs(void)
|
||||
{
|
||||
void* hdl = dlopen("VProc.so", RTLD_NOW | RTLD_GLOBAL);
|
||||
|
||||
|
||||
if (hdl == NULL)
|
||||
{
|
||||
fprintf(stderr, "***ERROR: failed to load shared object\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if ((Vwrite = (wfunc_p)dlsym(hdl, "VWrite")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "***ERROR: failed to find symbol VWrite\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if ((Vread = (rfunc_p)dlsym(hdl, "VRead")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "***ERROR: failed to find symbol VRead\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if ((Vtick = (tkfunc_p)dlsym(hdl, "VTick")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "***ERROR: failed to find symbol VTick\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if ((VregIrq = (regirqfunc_p)dlsym(hdl, "VRegIrq")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "***ERROR: failed to find symbol VRegIrq\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ int RunPython(const int node)
|
|||
char strbuf[DEFAULTSTRBUFSIZE];
|
||||
int status;
|
||||
int rtnval = 0;
|
||||
|
||||
|
||||
if (status = BindToApiFuncs())
|
||||
{
|
||||
return status;
|
||||
|
|
@ -151,7 +151,7 @@ int RunPython(const int node)
|
|||
fprintf(stderr, "***Error: RunPython() : Failed to load \"%s\"\n", strbuf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (Py_FinalizeEx() < 0)
|
||||
{
|
||||
return 120;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ CFLAGS = -fPIC \
|
|||
-I${MODEL_TECH}/../include \
|
||||
-DVP_MAX_NODES=${MAX_NUM_VPROC} \
|
||||
-DMODELSIM \
|
||||
-DDISABLE_LEVEL_INT \
|
||||
-D_REENTRANT
|
||||
|
||||
# Common flags for vsim
|
||||
|
|
|
|||
|
|
@ -188,4 +188,4 @@ gui : rungui
|
|||
#------------------------------------------------------
|
||||
|
||||
clean:
|
||||
@rm -rf ${VPROC_PLI} ${VLIB} obj sim *.vcd
|
||||
@rm -rf ${PYVRPOC_PLI} ${VPROC_PLI} ${VLIB} obj sim *.vcd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue