convert branch pipeline to use msr/cia as immediates
[soc.git] / src / soc / fu / spr / pipeline.py
1 from nmutil.singlepipe import ControlBase
2 from nmutil.pipemodbase import PipeModBaseChain
3 from soc.fu.spr.main_stage import SPRMainStage
4
5 class SPRStages(PipeModBaseChain):
6 def get_chain(self):
7 main = SPRMainStage(self.pspec)
8 return [main]
9
10
11 class SPRBasePipe(ControlBase):
12 def __init__(self, pspec):
13 ControlBase.__init__(self)
14 self.pspec = pspec
15 self.pipe1 = SPRStages(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