Fix some missing/incorrect function return types in the system VPI modules.
This commit is contained in:
parent
9f93989944
commit
a92a3074c0
|
|
@ -90,11 +90,6 @@ static void error_message(vpiHandle callh, const char* msg)
|
|||
vpi_control(vpiFinish, 1);
|
||||
}
|
||||
|
||||
static PLI_INT32 sizetf_32 (ICARUS_VPI_CONST PLI_BYTE8*name)
|
||||
{
|
||||
(void)name; /* Parameter is not used. */
|
||||
return 32;
|
||||
}
|
||||
static PLI_INT32 sizetf_64 (ICARUS_VPI_CONST PLI_BYTE8*name)
|
||||
{
|
||||
(void)name; /* Parameter is not used. */
|
||||
|
|
@ -252,39 +247,43 @@ void sys_convert_register(void)
|
|||
s_vpi_systf_data tf_data;
|
||||
vpiHandle res;
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.user_data = "$bitstoreal";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = sizetf_64;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_bitstoreal_calltf;
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiRealFunc;
|
||||
tf_data.user_data = "$bitstoreal";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = 0;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_bitstoreal_calltf;
|
||||
res = vpi_register_systf(&tf_data);
|
||||
vpip_make_systf_system_defined(res);
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.user_data = "$itor";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = sizetf_64;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_itor_calltf;
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiRealFunc;
|
||||
tf_data.user_data = "$itor";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = 0;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_itor_calltf;
|
||||
res = vpi_register_systf(&tf_data);
|
||||
vpip_make_systf_system_defined(res);
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.user_data = "$realtobits";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = sizetf_64;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_realtobits_calltf;
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiSizedFunc;
|
||||
tf_data.user_data = "$realtobits";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = sizetf_64;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_realtobits_calltf;
|
||||
res = vpi_register_systf(&tf_data);
|
||||
vpip_make_systf_system_defined(res);
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.user_data = "$rtoi";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = sizetf_32;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_rtoi_calltf;
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiIntFunc;
|
||||
tf_data.user_data = "$rtoi";
|
||||
tf_data.tfname = tf_data.user_data;
|
||||
tf_data.sizetf = 0;
|
||||
tf_data.compiletf = sys_convert_compiletf;
|
||||
tf_data.calltf = sys_rtoi_calltf;
|
||||
res = vpi_register_systf(&tf_data);
|
||||
vpip_make_systf_system_defined(res);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,12 @@ static void check_var_arg(vpiHandle arg, vpiHandle callh, const char *name,
|
|||
vpi_control(vpiFinish, 1);
|
||||
}
|
||||
|
||||
static PLI_INT32 sys_countdrivers_sizetf(ICARUS_VPI_CONST PLI_BYTE8*name)
|
||||
{
|
||||
(void)name; /* Parameter is not used. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that the given $countdrivers() call has valid arguments.
|
||||
*/
|
||||
|
|
@ -204,12 +210,13 @@ void sys_countdrivers_register(void)
|
|||
s_vpi_systf_data tf_data;
|
||||
vpiHandle res;
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.tfname = "$countdrivers";
|
||||
tf_data.calltf = sys_countdrivers_calltf;
|
||||
tf_data.compiletf = sys_countdrivers_compiletf;
|
||||
tf_data.sizetf = 0;
|
||||
tf_data.user_data = "$countdrivers";
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiSizedFunc;
|
||||
tf_data.tfname = "$countdrivers";
|
||||
tf_data.calltf = sys_countdrivers_calltf;
|
||||
tf_data.compiletf = sys_countdrivers_compiletf;
|
||||
tf_data.sizetf = sys_countdrivers_sizetf;
|
||||
tf_data.user_data = "$countdrivers";
|
||||
res = vpi_register_systf(&tf_data);
|
||||
vpip_make_systf_system_defined(res);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ void v2009_enum_register(void)
|
|||
vpiHandle res;
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiOtherFunc;
|
||||
tf_data.calltf = ivl_enum_method_name_calltf;
|
||||
tf_data.compiletf = ivl_enum_method_name_compiletf;
|
||||
tf_data.sizetf = 0;
|
||||
|
|
@ -515,6 +516,7 @@ void v2009_enum_register(void)
|
|||
vpip_make_systf_system_defined(res);
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiOtherFunc;
|
||||
tf_data.calltf = ivl_enum_method_next_prev_calltf;
|
||||
tf_data.compiletf = ivl_enum_method_next_prev_compiletf;
|
||||
tf_data.sizetf = 0;
|
||||
|
|
@ -525,6 +527,7 @@ void v2009_enum_register(void)
|
|||
vpip_make_systf_system_defined(res);
|
||||
|
||||
tf_data.type = vpiSysFunc;
|
||||
tf_data.sysfunctype = vpiOtherFunc;
|
||||
tf_data.calltf = ivl_enum_method_next_prev_calltf;
|
||||
tf_data.compiletf = ivl_enum_method_next_prev_compiletf;
|
||||
tf_data.sizetf = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue