Skip to content

Commit

Permalink
systemverilog: visit_object only when debug or report flag
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
  • Loading branch information
kamilrakoczy committed Apr 6, 2022
1 parent 10815d6 commit 70fb49c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions systemverilog-plugin/uhdmastfrontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ struct UhdmAstFrontend : public UhdmCommonFrontend {
UHDM::Serializer serializer;

std::vector<vpiHandle> restoredDesigns = serializer.Restore(filename);
for (auto design : restoredDesigns) {
std::stringstream strstr;
UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : strstr);
if (this->shared.debug_flag || !this->report_directory.empty()) {
for (auto design : restoredDesigns) {
std::stringstream strstr;
UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : strstr);
}
}
UhdmAst uhdm_ast(this->shared);
AST::AstNode *current_ast = uhdm_ast.visit_designs(restoredDesigns);
Expand Down

0 comments on commit 70fb49c

Please sign in to comment.