Skip to content

Commit

Permalink
Reduce the time it takes to figure out we're dealing with an invalid …
Browse files Browse the repository at this point in the history
…design involving defparams with infinitely recursive module instantiations
  • Loading branch information
MikePopoloski committed Nov 26, 2024
1 parent 47ccb86 commit 81a1cfd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/ast/Compilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2359,10 +2359,11 @@ void Compilation::resolveDefParamsAndBinds() {

DefParamVisitor initialVisitor(options.maxInstanceDepth, generateLevel);
initialClone.getRoot(/* skipDefParamsAndBinds */ true).visit(initialVisitor);
saveState(initialVisitor, initialClone);
if (checkProblem(initialVisitor))
return;

saveState(initialVisitor, initialClone);

// If we have found more binds, do another visit to let them be applied
// and potentially add blocks and defparams to our set for this level.
if (initialClone.bindDirectives.size() > numBindsSeen) {
Expand Down

0 comments on commit 81a1cfd

Please sign in to comment.