A useful combinatorial wrapper around stages that chains them together
and then presents a Stage-API-conformant interface.
- Pipeline:
- --------
+ UnbufferedPipeline:
+ ------------------
A simple stalling clock-synchronised pipeline that has no buffering
(unlike BufferedPipeline). A stall anywhere along the line will
BufferedPipeline.__init__(self, ExampleStage)
-class Pipeline(PipelineBase):
+class UnbufferedPipeline(PipelineBase):
""" A simple pipeline stage with single-clock synchronisation
and two-way valid/ready synchronised signalling.
return m
-class ExamplePipeline(Pipeline):
+class ExamplePipeline(UnbufferedPipeline):
""" an example of how to use the combinatorial pipeline.
"""
def __init__(self):
- Pipeline.__init__(self, ExampleStage)
+ UnbufferedPipeline.__init__(self, ExampleStage)
if __name__ == '__main__':
from nmigen.cli import verilog, rtlil
from example_buf_pipe import ExampleBufPipe, ExampleBufPipeAdd
-from example_buf_pipe import ExamplePipeline, Pipeline, ExampleStageCls
+from example_buf_pipe import ExamplePipeline, UnbufferedPipeline
+from example_buf_pipe import ExampleStageCls
from example_buf_pipe import PrevControl, NextControl, BufferedPipeline
from example_buf_pipe import StageChain
return self.output
-class ExampleLTPipeline(Pipeline):
+class ExampleLTPipeline(UnbufferedPipeline):
""" an example of how to use the combinatorial pipeline.
"""
def __init__(self):
stage = LTStage()
- Pipeline.__init__(self, stage)
+ UnbufferedPipeline.__init__(self, stage)
class ExampleLTBufferedPipeDerived(BufferedPipeline):
'src2': i.src2 + 1}
-class ExampleAddRecordPipe(Pipeline):
+class ExampleAddRecordPipe(UnbufferedPipeline):
""" an example of how to use the combinatorial pipeline.
"""
def __init__(self):
stage = ExampleAddRecordStage()
- Pipeline.__init__(self, stage)
+ UnbufferedPipeline.__init__(self, stage)
def test7_resultfn(o_data, expected, i, o):