Support IVERILOG_VPI_MODULE_PATH environment variable
This commit is contained in:
parent
a638d1eed0
commit
a1ad6d4b51
22
vvp/main.cc
22
vvp/main.cc
|
|
@ -336,6 +336,28 @@ int main(int argc, char*argv[])
|
|||
flag_errors += 1;
|
||||
}
|
||||
|
||||
if (char *var = ::getenv("IVERILOG_VPI_MODULE_PATH")) {
|
||||
char *ptr = var;
|
||||
char *end = var+strlen(var);
|
||||
int len = 0;
|
||||
while (ptr <= end) {
|
||||
if (*ptr == 0 || *ptr == ':' || *ptr == ';') {
|
||||
if (len > 0) {
|
||||
if (vpip_module_path_cnt >= VPIP_MODULE_PATH_MAX) {
|
||||
fprintf(stderr, "Too many paths specified\n");
|
||||
return -1;
|
||||
}
|
||||
vpip_module_path[vpip_module_path_cnt++] = strndup(var, len);
|
||||
}
|
||||
len = 0;
|
||||
var = ptr+1;
|
||||
} else {
|
||||
len++;
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __MINGW32__
|
||||
/* Calculate the module path from the path to the command.
|
||||
This is necessary because of the installation process on
|
||||
|
|
|
|||
|
|
@ -166,6 +166,13 @@ select lxt format, which is far more compact, though limited to
|
|||
GTKWave or compatible viewers. It can also be used to suppress VCD
|
||||
output, a time-saver for regression tests.
|
||||
|
||||
.TP 8
|
||||
.B IVERILOG_VPI_MODULE_PATH=\fI/some/path:/some/other/path\fP
|
||||
This adds additional components to the VPI module search path. Paths
|
||||
specified in this way are searched after paths specified with \-M, but
|
||||
before the default search path. Multiple paths can be separated with
|
||||
colons or semicolons.
|
||||
|
||||
.SH INTERACTIVE MODE
|
||||
.PP
|
||||
The simulation engine supports an interactive mode. The user may
|
||||
|
|
|
|||
Loading…
Reference in New Issue