From e3f32a1faf56b63e09787ffc0b073e868718b200 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 14 Dec 2018 15:21:13 +0000 Subject: [PATCH] back.pysim: better naming. NFC. --- nmigen/back/pysim.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) -- 2.30.2