weird exception, oe not found in the shiftrot input record
[soc.git] / src / soc / fu / shift_rot / pipeline.py
1 from nmutil.singlepipe import ControlBase
2 from nmutil.pipemodbase import PipeModBaseChain
3 from soc.fu.shift_rot.input_stage import ShiftRotInputStage
4 from soc.fu.shift_rot.main_stage import ShiftRotMainStage
5 from soc.fu.shift_rot.output_stage import ShiftRotOutputStage
6
7 class ShiftRotStages(PipeModBaseChain):
8 def get_chain(self):
9 inp = ShiftRotInputStage(self.pspec)
10 main = ShiftRotMainStage(self.pspec)
11 return [inp, main]
12
13
14 class ShiftRotStageEnd(PipeModBaseChain):
15 def get_chain(self):
16 out = ShiftRotOutputStage(self.pspec)
17 return [out]
18
19
20 class ShiftRotBasePipe(ControlBase):
21 def __init__(self, pspec):
22 ControlBase.__init__(self)
23 self.pspec = pspec
24 self.pipe1 = ShiftRotStages(pspec)
25 self.pipe2 = ShiftRotStageEnd(pspec)
26 self._eqs = self.connect([self.pipe1, self.pipe2])
27
28 def elaborate(self, platform):
29 m = ControlBase.elaborate(self, platform)
30 m.submodules.pipe1 = self.pipe1
31 m.submodules.pipe2 = self.pipe2
32 m.d.comb += self._eqs
33 return m