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 ShiftRotStages(PipeModBaseChain
):
9 inp
= ShiftRotInputStage(self
.pspec
)
10 main
= ShiftRotMainStage(self
.pspec
)
14 class ShiftRotStageEnd(PipeModBaseChain
):
16 out
= ShiftRotOutputStage(self
.pspec
)
20 class ShiftRotBasePipe(ControlBase
):
21 def __init__(self
, pspec
):
22 ControlBase
.__init
__(self
)
24 self
.pipe1
= ShiftRotStages(pspec
)
25 self
.pipe2
= ShiftRotStageEnd(pspec
)
26 self
._eqs
= self
.connect([self
.pipe1
, self
.pipe2
])
28 def elaborate(self
, platform
):
29 m
= ControlBase
.elaborate(self
, platform
)
30 m
.submodules
.pipe1
= self
.pipe1
31 m
.submodules
.pipe2
= self
.pipe2