545b3435045aa436baf8cf83735abaaec81899be
[soc.git] / src / soc / fu / branch / pipeline.py
1 from nmutil.singlepipe import ControlBase
2 from nmutil.pipemodbase import PipeModBaseChain
3 from soc.fu.branch.main_stage import BranchMainStage
4
5 class BranchStages(PipeModBaseChain):
6 def get_chain(self):
7 main = BranchMainStage(self.pspec)
8 return [main]
9
10
11 class BranchBasePipe(ControlBase):
12 def __init__(self, pspec):
13 ControlBase.__init__(self)
14 self.pipe1 = BranchStages(pspec)
15 self._eqs = self.connect([self.pipe1])
16
17 def elaborate(self, platform):
18 m = ControlBase.elaborate(self, platform)
19 m.submodules.pipe = self.pipe1
20 m.d.comb += self._eqs
21 return m