mirror of
https://github.com/YosysHQ/yosys
synced 2026-02-02 15:26:19 +00:00
verific: allow mixed SV/VHDL in -f files
This commit is contained in:
parent
f5ea73eb97
commit
f3c87610f5
1 changed files with 18 additions and 0 deletions
|
|
@ -3744,10 +3744,28 @@ struct VerificPass : public Pass {
|
|||
veri_file::DefineMacro("VERIFIC");
|
||||
veri_file::DefineMacro(is_formal ? "FORMAL" : "SYNTHESIS");
|
||||
|
||||
#ifdef VERIFIC_VHDL_SUPPORT
|
||||
int i;
|
||||
FOREACH_ARRAY_ITEM(file_names, i, filename) {
|
||||
std::string filename_str = filename;
|
||||
if ((filename_str.substr(filename_str.find_last_of(".") + 1) == "vhd") ||
|
||||
(filename_str.substr(filename_str.find_last_of(".") + 1) == "vhdl")) {
|
||||
vhdl_file::SetDefaultLibraryPath((proc_share_dirname() + "verific/vhdl_vdbs_2019").c_str());
|
||||
if (!vhdl_file::Analyze(filename, work.c_str(), vhdl_file::VHDL_2019)) {
|
||||
verific_error_msg.clear();
|
||||
log_cmd_error("Reading VHDL sources failed.\n");
|
||||
}
|
||||
} else if (!veri_file::Analyze(filename, analysis_mode, work.c_str())) {
|
||||
verific_error_msg.clear();
|
||||
log_cmd_error("Reading Verilog/SystemVerilog sources failed.\n");
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!veri_file::AnalyzeMultipleFiles(file_names, analysis_mode, work.c_str(), veri_file::MFCU)) {
|
||||
verific_error_msg.clear();
|
||||
log_cmd_error("Reading Verilog/SystemVerilog sources failed.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
delete file_names;
|
||||
verific_import_pending = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue