mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-22 13:53:40 +00:00
Define SYNTHESIS earlier and in both, support ignored module specification
This commit is contained in:
parent
a94cd0b3d8
commit
60e598b9c8
2 changed files with 12 additions and 6 deletions
|
@ -3394,8 +3394,13 @@ struct VerificPass : public Pass {
|
||||||
unsigned verilog_mode = veri_file::SYSTEM_VERILOG;
|
unsigned verilog_mode = veri_file::SYSTEM_VERILOG;
|
||||||
const char* arg = args[argidx].c_str();
|
const char* arg = args[argidx].c_str();
|
||||||
|
|
||||||
|
// Define macros
|
||||||
|
hdl_file_sort::DefineMacro("SYNTHESIS");
|
||||||
|
veri_file::DefineMacro("SYNTHESIS");
|
||||||
|
|
||||||
// Ignore translate_off statements
|
// Ignore translate_off statements
|
||||||
hdl_file_sort::SetIgnoreTranslateOff(0);
|
hdl_file_sort::SetIgnoreTranslateOff(0);
|
||||||
|
veri_file::SetIgnoreTranslateOff(0);
|
||||||
|
|
||||||
// Treat .v as SystemVerilog too (overriding default behavior to treat it as VERILOG_2000)
|
// Treat .v as SystemVerilog too (overriding default behavior to treat it as VERILOG_2000)
|
||||||
hdl_file_sort::RemoveFileExt(".v");
|
hdl_file_sort::RemoveFileExt(".v");
|
||||||
|
@ -3468,6 +3473,12 @@ struct VerificPass : public Pass {
|
||||||
log("AUTO-DISCOVER: registered file %s from .f file processing\n", file_name);
|
log("AUTO-DISCOVER: registered file %s from .f file processing\n", file_name);
|
||||||
}
|
}
|
||||||
delete file_names;
|
delete file_names;
|
||||||
|
} else if (args[argidx] == "-i") {
|
||||||
|
const char *ignore_module = args[++argidx].c_str();
|
||||||
|
log("AUTO-DISCOVER: ignoring module %s\n", ignore_module);
|
||||||
|
veri_file::AddToIgnoredModuleNames(ignore_module);
|
||||||
|
veri_file::AddToIgnoredParsedModuleNames(ignore_module);
|
||||||
|
hdl_file_sort::RegisterIgnoreUnitName(ignore_module);
|
||||||
} else {
|
} else {
|
||||||
veri_file::AddIncludeDir(args[argidx].c_str());
|
veri_file::AddIncludeDir(args[argidx].c_str());
|
||||||
if (!hdl_file_sort::RegisterDir(args[argidx].c_str())) {
|
if (!hdl_file_sort::RegisterDir(args[argidx].c_str())) {
|
||||||
|
@ -3478,11 +3489,6 @@ struct VerificPass : public Pass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define macros
|
|
||||||
hdl_file_sort::DefineMacro("YOSYS");
|
|
||||||
hdl_file_sort::DefineMacro("VERIFIC");
|
|
||||||
hdl_file_sort::DefineMacro("SYNTHESIS");
|
|
||||||
|
|
||||||
// Analyze discovered/sorted files
|
// Analyze discovered/sorted files
|
||||||
if (!analyze_function(veri_file::MFCU)) {
|
if (!analyze_function(veri_file::MFCU)) {
|
||||||
verific_error_msg.clear();
|
verific_error_msg.clear();
|
||||||
|
|
2
verific
2
verific
|
@ -1 +1 @@
|
||||||
Subproject commit 28f79dbcfa0d0a96a9fe02f7ed075df7f48682a6
|
Subproject commit 9f13ecc2e1f265ee03a3548d11c68e290e7ec4bf
|
Loading…
Add table
Add a link
Reference in a new issue