diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2022-06-09 08:57:48 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2022-06-09 08:57:48 +0200 |
commit | 6e8e4b4550c27c6c2f2e6d17877e5b8613f04317 (patch) | |
tree | 26d3a3dc3014f4a190e0e0afabf8bdb15699a461 /frontends/verific | |
parent | d1b2beab12e95cbbf7cec3fffbd09a2522291dd1 (diff) | |
download | yosys-6e8e4b4550c27c6c2f2e6d17877e5b8613f04317.tar.gz yosys-6e8e4b4550c27c6c2f2e6d17877e5b8613f04317.tar.bz2 yosys-6e8e4b4550c27c6c2f2e6d17877e5b8613f04317.zip |
verific: Added "-vlog-libext" option to specify search extension for libraries
Diffstat (limited to 'frontends/verific')
-rw-r--r-- | frontends/verific/verific.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index a9adb5a17..6351483db 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -86,7 +86,7 @@ bool verific_import_pending; string verific_error_msg; int verific_sva_fsm_limit; -vector<string> verific_incdirs, verific_libdirs; +vector<string> verific_incdirs, verific_libdirs, verific_libexts; void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefile, const char *msg, va_list args) { @@ -2323,6 +2323,7 @@ void verific_import(Design *design, const std::map<std::string,std::string> &par LineFile::DeleteAllLineFiles(); verific_incdirs.clear(); verific_libdirs.clear(); + verific_libexts.clear(); verific_import_pending = false; if (!verific_error_msg.empty()) @@ -2433,6 +2434,11 @@ struct VerificPass : public Pass { log("find undefined modules.\n"); log("\n"); log("\n"); + log(" verific -vlog-libext <extension>..\n"); + log("\n"); + log("Add Verilog library extensions, used when searching in library directories.\n"); + log("\n"); + log("\n"); log(" verific -vlog-define <macro>[=<value>]..\n"); log("\n"); log("Add Verilog defines.\n"); @@ -2716,6 +2722,12 @@ struct VerificPass : public Pass { goto check_error; } + if (GetSize(args) > argidx && args[argidx] == "-vlog-libext") { + for (argidx++; argidx < GetSize(args); argidx++) + verific_libexts.push_back(args[argidx]); + goto check_error; + } + if (GetSize(args) > argidx && args[argidx] == "-vlog-define") { for (argidx++; argidx < GetSize(args); argidx++) { string name = args[argidx]; @@ -2856,6 +2868,8 @@ struct VerificPass : public Pass { veri_file::AddIncludeDir(dir.c_str()); for (auto &dir : verific_libdirs) veri_file::AddYDir(dir.c_str()); + for (auto &ext : verific_libexts) + veri_file::AddLibExt(ext.c_str()); while (argidx < GetSize(args)) file_names.Insert(args[argidx++].c_str()); @@ -3345,6 +3359,7 @@ struct VerificPass : public Pass { LineFile::DeleteAllLineFiles(); verific_incdirs.clear(); verific_libdirs.clear(); + verific_libexts.clear(); verific_import_pending = false; goto check_error; } |