3bde19bd17ccee0db87481c2bd8c0ab3979c33a8
1 from nmutil
.singlepipe
import ControlBase
2 from nmutil
.pipemodbase
import PipeModBaseChain
3 from soc
.fu
.alu
.input_stage
import ALUInputStage
4 from soc
.fu
.logical
.main_stage
import LogicalMainStage
5 from soc
.fu
.alu
.output_stage
import ALUOutputStage
8 class DivStagesStart(PipeModBaseChain
):
10 inp
= ALUInputStage(self
.pspec
)
11 main
= DivMainStage1(self
.pspec
)
12 return [inp
, main
, out
]
14 class DivStagesEnd(PipeModBaseChain
):
16 main
= DivMainStage2(self
.pspec
)
17 out
= ALUOutputStage(self
.pspec
)
18 return [inp
, main
, out
]
21 class LogicalBasePipe(ControlBase
):
22 def __init__(self
, pspec
):
23 ControlBase
.__init
__(self
)
24 self
.pipe1
= DivStagesStart(pspec
)
25 self
.pipe5
= DivStagesEnd(pspec
)
26 self
._eqs
= self
.connect([self
.pipe1
, self
.pipe5
])
28 def elaborate(self
, platform
):
29 m
= ControlBase
.elaborate(self
, platform
)
30 m
.submodules
.pipe1
= self
.pipe1
31 m
.submodules
.pipe5
= self
.pipe5