From 7a71dadcc7209e73db6a5799f519f0c6b6b393cb Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 20 Apr 2019 22:08:00 +0100 Subject: [PATCH] convert ControlBase to iter --- src/add/singlepipe.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index 760f4462..88709ffc 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -687,8 +687,12 @@ class ControlBase: """ return eq(self.p.i_data, i) + def __iter__(self): + yield from self.p + yield from self.n + def ports(self): - return self.p.ports() + self.n.ports() + return list(self) def _elaborate(self, platform): """ handles case where stage has dynamic ready/valid functions -- 2.30.2