Fix to remove compile warning with VHDL

This commit is contained in:
Simon Southwell 2024-01-27 14:52:10 +00:00
commit 2a1285fee5
6 changed files with 17 additions and 14 deletions

View file

@ -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]

View file

@ -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;

View file

@ -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

View file

@ -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