From b680889ce46594284b660b17523452fe7f119720 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 4 May 2021 13:55:57 +0100 Subject: [PATCH] remove exception from data on FUBaseData, explicitly eq() it --- src/soc/fu/pipe_data.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/soc/fu/pipe_data.py b/src/soc/fu/pipe_data.py index ca67fd1b..abee2df9 100644 --- a/src/soc/fu/pipe_data.py +++ b/src/soc/fu/pipe_data.py @@ -35,11 +35,12 @@ class FUBaseData: if exc_kls is not None: name = "exc_o" if output else "exc_i" self.exception = exc_kls(name=name) - self.data.append(self.exception) def __iter__(self): yield from self.ctx yield from self.data + if hasattr(self, "exception"): + yield from self.exception.ports() def eq(self, i): eqs = [self.ctx.eq(i.ctx)] @@ -51,6 +52,8 @@ class FUBaseData: "type mismatch in FUBaseData %s %s" % \ (repr(self.data[j]), repr(i.data[j])) eqs.append(self.data[j].eq(i.data[j])) + if hasattr(self, "exception"): + eqs.append(self.exception.eq(i.exception)) return eqs def ports(self): -- 2.30.2