iverilog: Allow the user to specify the location of VPI modules.
Make it explicit in the manual that a path can be supplied with the -m option, and when it is, search for a SFT file there, not in the base directory.
This commit is contained in:
parent
9f7dc732ab
commit
b82c185051
|
|
@ -190,9 +190,13 @@ prefixed by "I " and other files are prefixed by "M ".
|
|||
.B -m\fImodule\fP
|
||||
Add this module to the list of VPI modules to be loaded by the
|
||||
simulation. Many modules can be specified, and all will be loaded, in
|
||||
the order specified. The system module is implicit and always included.
|
||||
If a System Function Table file (<module>.sft) exists for the module it
|
||||
will be loaded automatically.
|
||||
the order specified. The system module is implicit and always included
|
||||
(and loaded last). If a System Function Table file (<module>.sft)
|
||||
exists for the module it will be loaded automatically.
|
||||
|
||||
If the specified name includes at least one directory character, it is
|
||||
assumed to be prefixed by the path to the module, otherwise the module
|
||||
is assumed to be located in the \fIiverilog\fP base directory.
|
||||
.TP 8
|
||||
.B -N\fIpath\fP
|
||||
This is used for debugging the compiler proper. Dump the final netlist
|
||||
|
|
|
|||
|
|
@ -864,7 +864,14 @@ static void add_sft_file(const char *module)
|
|||
char *file;
|
||||
|
||||
file = (char *) malloc(strlen(base)+1+strlen(module)+4+1);
|
||||
sprintf(file, "%s%c%s.sft", base, sep, module);
|
||||
// If the module name has at least one directory character
|
||||
// in it, assume it includes the path, otherwise look in
|
||||
// the base directory.
|
||||
if (strchr(module, sep))
|
||||
sprintf(file, "%s.sft", module);
|
||||
else
|
||||
sprintf(file, "%s%c%s.sft", base, sep, module);
|
||||
|
||||
if (access(file, R_OK) == 0)
|
||||
fprintf(iconfig_file, "sys_func:%s\n", file);
|
||||
free(file);
|
||||
|
|
|
|||
Loading…
Reference in New Issue