from soc.fu.alu.main_stage import ALUMainStage
from soc.fu.alu.output_stage import ALUOutputStage
-class ALUStages(PipeModBaseChain):
+
+class ALUStagesOld(PipeModBaseChain):
def get_chain(self):
inp = ALUInputStage(self.pspec)
main = ALUMainStage(self.pspec)
- return [inp, main]
+ return [inp, main, out]
class ALUStageEnd(PipeModBaseChain):
return [out]
-class ALUBasePipe(ControlBase):
+class ALUBasePipeOld(ControlBase):
def __init__(self, pspec):
ControlBase.__init__(self)
self.pspec = pspec
m.submodules.pipe2 = self.pipe2
m.d.comb += self._eqs
return m
+
+
+class ALUStages(PipeModBaseChain):
+ def get_chain(self):
+ inp = ALUInputStage(self.pspec)
+ main = ALUMainStage(self.pspec)
+ out = ALUOutputStage(self.pspec)
+ return [inp, main, out]
+
+
+class ALUBasePipe(ControlBase):
+ def __init__(self, pspec):
+ ControlBase.__init__(self)
+ self.pspec = pspec
+ self.pipe1 = ALUStages(pspec)
+ self._eqs = self.connect([self.pipe1])
+
+ def elaborate(self, platform):
+ m = ControlBase.elaborate(self, platform)
+ m.submodules.pipe1 = self.pipe1
+ m.d.comb += self._eqs
+ return m