Skip to content

Commit

Permalink
Add --elaborate-only for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Nov 15, 2024
1 parent 234905d commit c9030c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/slang_frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct SynthesisSettings {
std::optional<bool> extern_modules;
std::optional<bool> no_implicit_memories;
std::optional<bool> empty_blackboxes;
std::optional<bool> elaborate_only;

enum HierMode {
NONE,
Expand Down Expand Up @@ -86,6 +87,8 @@ struct SynthesisSettings {
"Require a memory style attribute to consider a variable for memory inference");
cmdLine.add("--empty-blackboxes", empty_blackboxes,
"Assume empty modules are blackboxes");
cmdLine.add("--elaborate-only", elaborate_only,
"Do not do netlist conversion");
}
};

Expand Down Expand Up @@ -3224,6 +3227,12 @@ struct SlangFrontend : Frontend {
log_error("Compilation failed\n");
}

if (settings.elaborate_only.value_or(false)) {
if (!driver.reportCompilation(*compilation, /* quiet */ false))
log_error("Compilation failed\n");
return;
}

global_compilation = &(*compilation);
global_sourcemgr = compilation->getSourceManager();
global_diagengine = &driver.diagEngine;
Expand Down

0 comments on commit c9030c9

Please sign in to comment.