From: Luke Kenneth Casson Leighton Date: Sat, 20 Apr 2019 21:11:24 +0000 (+0100) Subject: convert FPOpData to __iter__ X-Git-Tag: ls180-24jan2020~1207 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3fa4d3a9c6ffe4bcb060e8ff88a033074d10a8fa;p=ieee754fpu.git convert FPOpData to __iter__ --- diff --git a/src/add/fpadd/statemachine.py b/src/add/fpadd/statemachine.py index eae01e2e..1ece16d8 100644 --- a/src/add/fpadd/statemachine.py +++ b/src/add/fpadd/statemachine.py @@ -34,11 +34,15 @@ class FPOpData: self.z = FPOpOut(width) self.mid = Signal(id_wid, reset_less=True) + def __iter__(self): + yield self.z + yield self.mid + def eq(self, i): return [self.z.eq(i.z), self.mid.eq(i.mid)] def ports(self): - return [self.z, self.mid] + return list(self) class FPADDBaseMod: