From 3fa4d3a9c6ffe4bcb060e8ff88a033074d10a8fa Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 20 Apr 2019 22:11:24 +0100 Subject: [PATCH] convert FPOpData to __iter__ --- src/add/fpadd/statemachine.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- 2.30.2