From 3ac13eb8f9a83b2a89587ce83b72c4966e9bad2e Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 31 Jan 2020 03:38:58 +0000 Subject: [PATCH] back.rtlil: don't emit wires for empty signals. Fixes #312. --- nmigen/back/rtlil.py | 3 +++ 1 file changed, 3 insertions(+) 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] -- 2.30.2