whoops forgot field accessor
[soc.git] / src / soc / fu / trap / pipeline.py
1 from nmutil.singlepipe import ControlBase
2 from nmutil.pipemodbase import PipeModBaseChain
3 from soc.fu.trap.main_stage import TrapMainStage
4
5 class TrapStages(PipeModBaseChain):
6 def get_chain(self):
7 main = TrapMainStage(self.pspec)
8 return [main]
9
10
11 class TrapBasePipe(ControlBase):
12 def __init__(self, pspec):
13 ControlBase.__init__(self)
14 self.pspec = pspec
15 self.pipe1 = TrapStages(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