From 6c73a1b863cec18f8da8fc2f6678511f311e39ca Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 9 May 2020 00:01:12 +0100 Subject: [PATCH] add ALUFirstInputData --- src/soc/alu/pipe_data.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/soc/alu/pipe_data.py b/src/soc/alu/pipe_data.py index 083ca105..fe76aeb7 100644 --- a/src/soc/alu/pipe_data.py +++ b/src/soc/alu/pipe_data.py @@ -17,6 +17,25 @@ class IntegerData: return [self.ctx.eq(i.ctx)] +class ALUFirstInputData(IntegerData): + def __init__(self, pspec): + super().__init__(pspec) + self.a = Signal(64, reset_less=True) + self.b = Signal(64, reset_less=True) + self.so = Signal(reset_less=True) + + def __iter__(self): + yield from super().__iter__() + yield self.a + yield self.b + yield self.so + + def eq(self, i): + lst = super().eq(i) + return lst + [self.a.eq(i.a), self.b.eq(i.b), + self.so.eq(i.so)] + + class ALUInputData(IntegerData): def __init__(self, pspec): super().__init__(pspec) -- 2.30.2