Automatically include vhdl_sys vpi module.
This commit is contained in:
parent
9ee938f0b4
commit
19099c944f
|
|
@ -1035,6 +1035,7 @@ int main(int argc, char **argv)
|
||||||
describes the system functions so that elaboration knows
|
describes the system functions so that elaboration knows
|
||||||
how to handle them. */
|
how to handle them. */
|
||||||
fprintf(iconfig_file, "sys_func:%s%csystem.sft\n", base, sep);
|
fprintf(iconfig_file, "sys_func:%s%csystem.sft\n", base, sep);
|
||||||
|
fprintf(iconfig_file, "sys_func:%s%cvhdl_sys.sft\n", base, sep);
|
||||||
|
|
||||||
/* If verilog-2005/9 is enabled or icarus-misc or verilog-ams,
|
/* If verilog-2005/9 is enabled or icarus-misc or verilog-ams,
|
||||||
* then include the v2005_math library. */
|
* then include the v2005_math library. */
|
||||||
|
|
|
||||||
36
main.cc
36
main.cc
|
|
@ -118,6 +118,22 @@ ivl_sfunc_as_task_t def_sfunc_as_task = IVL_SFUNC_AS_TASK_ERROR;
|
||||||
|
|
||||||
map<string,const char*> flags;
|
map<string,const char*> flags;
|
||||||
char*vpi_module_list = 0;
|
char*vpi_module_list = 0;
|
||||||
|
void add_vpi_module(const char*name)
|
||||||
|
{
|
||||||
|
if (vpi_module_list == 0) {
|
||||||
|
vpi_module_list = strdup(name);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
char*tmp = (char*)realloc(vpi_module_list,
|
||||||
|
strlen(vpi_module_list)
|
||||||
|
+ strlen(name)
|
||||||
|
+ 2);
|
||||||
|
strcat(tmp, ",");
|
||||||
|
strcat(tmp, name);
|
||||||
|
vpi_module_list = tmp;
|
||||||
|
}
|
||||||
|
flags["VPI_MODULE_LIST"] = vpi_module_list;
|
||||||
|
}
|
||||||
|
|
||||||
map<perm_string,unsigned> missing_modules;
|
map<perm_string,unsigned> missing_modules;
|
||||||
map<perm_string,bool> library_file_map;
|
map<perm_string,bool> library_file_map;
|
||||||
|
|
@ -615,19 +631,7 @@ static void read_iconfig_file(const char*ipath)
|
||||||
library_file_map[path] = true;
|
library_file_map[path] = true;
|
||||||
|
|
||||||
} else if (strcmp(buf,"module") == 0) {
|
} else if (strcmp(buf,"module") == 0) {
|
||||||
if (vpi_module_list == 0) {
|
add_vpi_module(cp);
|
||||||
vpi_module_list = strdup(cp);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
char*tmp = (char*)realloc(vpi_module_list,
|
|
||||||
strlen(vpi_module_list)
|
|
||||||
+ strlen(cp)
|
|
||||||
+ 2);
|
|
||||||
strcat(tmp, ",");
|
|
||||||
strcat(tmp, cp);
|
|
||||||
vpi_module_list = tmp;
|
|
||||||
}
|
|
||||||
flags["VPI_MODULE_LIST"] = vpi_module_list;
|
|
||||||
|
|
||||||
} else if (strcmp(buf, "out") == 0) {
|
} else if (strcmp(buf, "out") == 0) {
|
||||||
free((void *)flags["-o"]);
|
free((void *)flags["-o"]);
|
||||||
|
|
@ -779,8 +783,10 @@ int main(int argc, char*argv[])
|
||||||
|
|
||||||
library_suff.push_back(strdup(".v"));
|
library_suff.push_back(strdup(".v"));
|
||||||
|
|
||||||
vpi_module_list = strdup("system");
|
// Start the module list with the base system module.
|
||||||
flags["VPI_MODULE_LIST"] = vpi_module_list;
|
add_vpi_module("system");
|
||||||
|
add_vpi_module("vhdl_sys");
|
||||||
|
|
||||||
flags["-o"] = strdup("a.out");
|
flags["-o"] = strdup("a.out");
|
||||||
min_typ_max_flag = TYP;
|
min_typ_max_flag = TYP;
|
||||||
min_typ_max_warn = 10;
|
min_typ_max_warn = 10;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue