Allow the formal engine to perform a same-cycle result in the ALU
[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.pspec = pspec
15 self.pipe1 = BranchStages(pspec)
16 self._eqs = self.connect([self.pipe1])
17
18 def elaborate(self, platform):
19 m = ControlBase.elaborate(self, platform)
20 m.submodules.pipe = self.pipe1
21 m.d.comb += self._eqs
22 return m