move pipelines to pipe dir
[soc.git] / src / soc / pipe / alu / pipeline.py
1 from nmutil.singlepipe import ControlBase
2 from nmutil.pipemodbase import PipeModBaseChain
3 from soc.alu.input_stage import ALUInputStage
4 from soc.alu.main_stage import ALUMainStage
5 from soc.alu.output_stage import ALUOutputStage
6
7 class ALUStages(PipeModBaseChain):
8 def get_chain(self):
9 inp = ALUInputStage(self.pspec)
10 main = ALUMainStage(self.pspec)
11 out = ALUOutputStage(self.pspec)
12 return [inp, main, out]
13
14
15 class ALUBasePipe(ControlBase):
16 def __init__(self, pspec):
17 ControlBase.__init__(self)
18 self.pipe1 = ALUStages(pspec)
19 self._eqs = self.connect([self.pipe1])
20
21 def elaborate(self, platform):
22 m = ControlBase.elaborate(self, platform)
23 m.submodules.pipe = self.pipe1
24 m.d.comb += self._eqs
25 return m