Skip to content

Commit

Permalink
gen/fhdl/hierarchy: Sort instances to generate deterministic hierarch…
Browse files Browse the repository at this point in the history
…y in verilog.
  • Loading branch information
enjoy-digital committed Jul 3, 2024
1 parent aac828b commit d4d1a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litex/gen/fhdl/hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_tree(self, module, ident=0, with_modules=True, with_instances=True, with
r += self.get_tree(mod, ident + 1)

# Instances.
for s in module._fragment.specials:
for s in sorted(module._fragment.specials, key=lambda x: str(x)):
if (self.depth is None) or (ident <= self.depth):
if isinstance(s, Instance):
show = with_instances
Expand Down

0 comments on commit d4d1a1b

Please sign in to comment.