From: whitequark Date: Sat, 22 Dec 2018 22:00:58 +0000 (+0000) Subject: compat.genlib.fsm: fix naming for non-Signal LHS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c153dbfa36e7c0c1dacce8c8a9bcbe93e7ef14c;p=nmigen.git compat.genlib.fsm: fix naming for non-Signal LHS. --- diff --git a/nmigen/compat/genlib/fsm.py b/nmigen/compat/genlib/fsm.py index e817894..509c9ef 100644 --- a/nmigen/compat/genlib/fsm.py +++ b/nmigen/compat/genlib/fsm.py @@ -78,8 +78,9 @@ class _LowerNext(ValueTransformer, StatementTransformer): except KeyError: related = node.target if isinstance(node.target, Signal) else None next_value = Signal(node.target.shape(), - name="{}_fsm_next".format(node.target.name)) - next_value_ce = Signal(name="{}_fsm_next_ce".format(node.target.name)) + name=None if related is None else "{}_fsm_next".format(related.name)) + next_value_ce = Signal( + name=None if related is None else "{}_fsm_next_ce".format(related.name)) self.registers.append((node.target, next_value_ce, next_value)) return next_value.eq(node.value), next_value_ce.eq(1) else: