From: whitequark Date: Fri, 31 Jan 2020 03:38:58 +0000 (+0000) Subject: back.rtlil: don't emit wires for empty signals. X-Git-Tag: v0.2~31 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ac13eb8f9a83b2a89587ce83b72c4966e9bad2e;p=nmigen.git back.rtlil: don't emit wires for empty signals. Fixes #312. --- diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 4a994fd..dbddd61 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -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]