class ALUInputData(IntegerData):
def __init__(self, pspec):
super().__init__(pspec)
- self.a = Signal(64, reset_less=True)
- self.b = Signal(64, reset_less=True)
+ self.a = Signal(64, reset_less=True) # RA
+ self.b = Signal(64, reset_less=True) # RB/immediate
+ self.c = Signal(64, reset_less=True) # RC/RS
self.so = Signal(reset_less=True)
self.carry_in = Signal(reset_less=True)
yield from super().__iter__()
yield self.a
yield self.b
+ yield self.c
yield self.carry_in
yield self.so
def eq(self, i):
lst = super().eq(i)
- return lst + [self.a.eq(i.a), self.b.eq(i.b),
+ return lst + [self.a.eq(i.a), self.b.eq(i.b), self.c.eq(i.c),
self.carry_in.eq(i.carry_in),
self.so.eq(i.so)]
self.cr0.eq(i.cr0), self.ov.eq(i.ov),
self.ov32.eq(i.ov32), self.so.eq(i.so)]
+
class IntPipeSpec:
def __init__(self, id_wid=2, op_wid=1):
self.id_wid = id_wid
self.opkls = lambda _: CompALUOpSubset(name="op")
self.stage = None
+
class ALUPipeSpec(IntPipeSpec):
def __init__(self, id_wid, op_wid):
super().__init__(id_wid, op_wid)