back.rtlil: don't emit wires for empty signals.
authorwhitequark <whitequark@whitequark.org>
Fri, 31 Jan 2020 03:38:58 +0000 (03:38 +0000)
committerwhitequark <whitequark@whitequark.org>
Fri, 31 Jan 2020 03:38:58 +0000 (03:38 +0000)
Fixes #312.

nmigen/back/rtlil.py

index 4a994fd4ffd9f55e8bab6dd35005fd85f262dfb7..dbddd618965da92e2b374e220c6002a4348e8a78 100644 (file)
@@ -278,6 +278,9 @@ class _ValueCompilerState:
         self.ports[signal] = (len(self.ports), kind)
 
     def resolve(self, signal, prefix=None):
+        if len(signal) == 0:
+            return "{ }", "{ }"
+
         if signal in self.wires:
             return self.wires[signal]