mirror of https://github.com/YosysHQ/yosys.git
Fix verific -vlog-incdir and -vlog-libdir handling
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
3b79a2e3dc
commit
5041ed2f7d
|
@ -65,6 +65,8 @@ int verific_verbose;
|
||||||
bool verific_import_pending;
|
bool verific_import_pending;
|
||||||
string verific_error_msg;
|
string verific_error_msg;
|
||||||
|
|
||||||
|
vector<string> verific_incdirs, verific_libdirs;
|
||||||
|
|
||||||
void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefile, const char *msg, va_list args)
|
void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefile, const char *msg, va_list args)
|
||||||
{
|
{
|
||||||
string message_prefix = stringf("VERIFIC-%s [%s] ",
|
string message_prefix = stringf("VERIFIC-%s [%s] ",
|
||||||
|
@ -1658,6 +1660,8 @@ void verific_import(Design *design, std::string top)
|
||||||
veri_file::Reset();
|
veri_file::Reset();
|
||||||
vhdl_file::Reset();
|
vhdl_file::Reset();
|
||||||
Libset::Reset();
|
Libset::Reset();
|
||||||
|
verific_incdirs.clear();
|
||||||
|
verific_libdirs.clear();
|
||||||
verific_import_pending = false;
|
verific_import_pending = false;
|
||||||
|
|
||||||
if (!verific_error_msg.empty())
|
if (!verific_error_msg.empty())
|
||||||
|
@ -1814,13 +1818,13 @@ struct VerificPass : public Pass {
|
||||||
|
|
||||||
if (GetSize(args) > argidx && args[argidx] == "-vlog-incdir") {
|
if (GetSize(args) > argidx && args[argidx] == "-vlog-incdir") {
|
||||||
for (argidx++; argidx < GetSize(args); argidx++)
|
for (argidx++; argidx < GetSize(args); argidx++)
|
||||||
veri_file::AddIncludeDir(args[argidx].c_str());
|
verific_incdirs.push_back(args[argidx]);
|
||||||
goto check_error;
|
goto check_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetSize(args) > argidx && args[argidx] == "-vlog-libdir") {
|
if (GetSize(args) > argidx && args[argidx] == "-vlog-libdir") {
|
||||||
for (argidx++; argidx < GetSize(args); argidx++)
|
for (argidx++; argidx < GetSize(args); argidx++)
|
||||||
veri_file::AddYDir(args[argidx].c_str());
|
verific_libdirs.push_back(args[argidx]);
|
||||||
goto check_error;
|
goto check_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1886,6 +1890,11 @@ struct VerificPass : public Pass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto &dir : verific_incdirs)
|
||||||
|
veri_file::AddIncludeDir(dir.c_str());
|
||||||
|
for (auto &dir : verific_libdirs)
|
||||||
|
veri_file::AddYDir(dir.c_str());
|
||||||
|
|
||||||
while (argidx < GetSize(args))
|
while (argidx < GetSize(args))
|
||||||
file_names.Insert(args[argidx++].c_str());
|
file_names.Insert(args[argidx++].c_str());
|
||||||
|
|
||||||
|
@ -2139,6 +2148,8 @@ struct VerificPass : public Pass {
|
||||||
veri_file::Reset();
|
veri_file::Reset();
|
||||||
vhdl_file::Reset();
|
vhdl_file::Reset();
|
||||||
Libset::Reset();
|
Libset::Reset();
|
||||||
|
verific_incdirs.clear();
|
||||||
|
verific_libdirs.clear();
|
||||||
verific_import_pending = false;
|
verific_import_pending = false;
|
||||||
goto check_error;
|
goto check_error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue