Remove static system function return descriptors.

The information is provided by the VPI modules.
This commit is contained in:
Martin Whitaker 2019-10-21 13:49:19 +01:00
parent a92a3074c0
commit d1ae818a9f
1 changed files with 4 additions and 23 deletions

View File

@ -29,16 +29,8 @@
* via the lookup_sys_func function. * via the lookup_sys_func function.
*/ */
static const struct sfunc_return_type sfunc_table[] = { static const struct sfunc_return_type default_return_type =
{ "$realtime", IVL_VT_REAL, 1, false, false }, { 0, IVL_VT_LOGIC, 32, false, false };
{ "$bitstoreal", IVL_VT_REAL, 1, false, false },
{ "$itor", IVL_VT_REAL, 1, false, false },
{ "$realtobits", IVL_VT_LOGIC, 64, false, false },
{ "$time", IVL_VT_LOGIC, 64, false, false },
{ "$stime", IVL_VT_LOGIC, 32, false, false },
{ "$simtime", IVL_VT_LOGIC, 64, false, false },
{ 0, IVL_VT_LOGIC, 32, false, false }
};
struct sfunc_return_type_cell : sfunc_return_type { struct sfunc_return_type_cell : sfunc_return_type {
struct sfunc_return_type_cell*next; struct sfunc_return_type_cell*next;
@ -89,19 +81,8 @@ const struct sfunc_return_type* lookup_sys_func(const char*name)
if (def) if (def)
return def; return def;
/* Next, look in the core table. */ /* No luck finding, so return the default description. */
unsigned idx = 0; return &default_return_type;
while (sfunc_table[idx].name) {
if (strcmp(sfunc_table[idx].name, name) == 0)
return sfunc_table + idx;
idx += 1;
}
/* No luck finding, so return the trailer, which gives a
default description. */
return sfunc_table + idx;
} }
void add_sys_func(const struct sfunc_return_type&ret_type) void add_sys_func(const struct sfunc_return_type&ret_type)