From 1d46ffb591f0ca43a76b8ff0fafb61bf67a7490b Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 12 Dec 2018 10:08:56 +0000 Subject: [PATCH] fhdl.ast.Signal: assign an internal name if tracer fails. --- nmigen/fhdl/ast.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nmigen/fhdl/ast.py b/nmigen/fhdl/ast.py index 198b5c4..b78021f 100644 --- a/nmigen/fhdl/ast.py +++ b/nmigen/fhdl/ast.py @@ -505,7 +505,10 @@ class Signal(Value, DUID): super().__init__() if name is None: - name = tracer.get_var_name() + try: + name = tracer.get_var_name() + except tracer.NameNotFound: + name = "$signal" self.name = name if isinstance(bits_sign, int): -- 2.30.2