From 7f1066d06416debdf793398e7ce31c35309785b1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 20 Apr 2019 12:49:33 +0100 Subject: [PATCH] improve ControlBase.ports enumeration of its o_data and i_data --- src/add/singlepipe.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index ca01e858..967f2d43 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -650,12 +650,16 @@ class ControlBase: ] if hasattr(self.p.i_data, "ports"): res += self.p.i_data.ports() - else: + elif isinstance(self.p.i_data, Sequence): res += self.p.i_data + else: + res.append(self.p.i_data) if hasattr(self.n.o_data, "ports"): res += self.n.o_data.ports() - else: + elif isinstance(self.n.o_data, Sequence): res += self.n.o_data + else: + res.append(self.n.o_data) return res def _elaborate(self, platform): -- 2.30.2