Skip to content

Commit

Permalink
Prepend Verilog globals to module AST
Browse files Browse the repository at this point in the history
Fixes YosysHQ#4653. Further AST and RTLIL stages seem to be order-sensitive,
and appending globals to the module children list did not work.
  • Loading branch information
jmi2k committed Oct 11, 2024
1 parent 0200a76 commit 5c62838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/ast/ast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ void AST::process(RTLIL::Design *design, AstNode *ast, bool nodisplay, bool dump
if (child->type == AST_MODULE || child->type == AST_INTERFACE)
{
for (auto n : design->verilog_globals)
child->children.push_back(n->clone());
child->children.insert(child->children.begin(), n->clone());

// append nodes from previous packages using package-qualified names
for (auto &n : design->verilog_packages) {
Expand Down

0 comments on commit 5c62838

Please sign in to comment.