From: whitequark Date: Fri, 14 Dec 2018 15:21:13 +0000 (+0000) Subject: back.pysim: better naming. NFC. X-Git-Tag: working~259 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3f32a1faf56b63e09787ffc0b073e868718b200;p=nmigen.git back.pysim: better naming. NFC. --- diff --git a/nmigen/back/pysim.py b/nmigen/back/pysim.py index 984de7c..3b72d77 100644 --- a/nmigen/back/pysim.py +++ b/nmigen/back/pysim.py @@ -279,14 +279,14 @@ class Simulator: self._domain_triggers[cd.rst] = domain self._domain_signals[domain] = ValueSet() - fragment_names = {} - def add_fragment(fragment, hierarchy=("top",)): - fragment_names[fragment] = hierarchy + hierarchy = {} + def add_fragment(fragment, scope=("top",)): + hierarchy[fragment] = scope for subfragment, name in fragment.subfragments: - add_fragment(subfragment, (*hierarchy, name)) + add_fragment(subfragment, (*scope, name)) add_fragment(root_fragment) - for fragment, fragment_name in fragment_names.items(): + for fragment, fragment_name in hierarchy.items(): for signal in fragment.iter_signals(): self._signals.add(signal)