Skip to content

Commit

Permalink
Merge pull request #4742 from YosysHQ/hierarchy_notify_top_attr
Browse files Browse the repository at this point in the history
Print a note about finding attribute (* top *) in hierarchy
  • Loading branch information
povik authored Nov 27, 2024
2 parents 3bab837 + 96c526d commit 956313e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion passes/hierarchy/hierarchy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,10 @@ struct HierarchyPass : public Pass {

if (top_mod == nullptr)
for (auto mod : design->modules())
if (mod->get_bool_attribute(ID::top))
if (mod->get_bool_attribute(ID::top)) {
log("Attribute `top' found on module `%s'. Setting top module to %s.\n", log_id(mod), log_id(mod));
top_mod = mod;
}

if (top_mod == nullptr)
{
Expand Down

0 comments on commit 956313e

Please sign in to comment.