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
7 class ShiftRotStart(PipeModBaseChain
):
9 inp
= ShiftRotInputStage(self
.pspec
)
12 class ShiftRotStage(PipeModBaseChain
):
14 main
= ShiftRotMainStage(self
.pspec
)
18 class ShiftRotStageEnd(PipeModBaseChain
):
20 out
= ShiftRotOutputStage(self
.pspec
)
24 class ShiftRotBasePipe(ControlBase
):
25 def __init__(self
, pspec
):
26 ControlBase
.__init
__(self
)
28 self
.pipe1
= ShiftRotStart(pspec
)
29 self
.pipe2
= ShiftRotStage(pspec
)
30 self
.pipe3
= ShiftRotStageEnd(pspec
)
31 self
._eqs
= self
.connect([self
.pipe1
, self
.pipe2
, self
.pipe3
])
33 def elaborate(self
, platform
):
34 m
= ControlBase
.elaborate(self
, platform
)
35 m
.submodules
.pipe1
= self
.pipe1
36 m
.submodules
.pipe2
= self
.pipe2
37 m
.submodules
.pipe3
= self
.pipe3