From: Luke Kenneth Casson Leighton Date: Sat, 20 Apr 2019 21:08:00 +0000 (+0100) Subject: convert ControlBase to iter X-Git-Tag: ls180-24jan2020~1209 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a71dadcc7209e73db6a5799f519f0c6b6b393cb;p=ieee754fpu.git convert ControlBase to iter --- 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