from nmigen.compat.sim import run_simulation
from nmigen.cli import verilog, rtlil
+from singlepipe import PassThroughStage
from multipipe import (CombMultiInPipeline, PriorityCombMuxInPipe)
return [self.mid, self.idx, self.data]
-class PassThroughStage:
- def ispec(self):
- return PassData()
- def ospec(self):
- return self.ispec() # same as ospec
- def process(self, i):
- return i # pass-through
-
-
-
def testbench(dut):
stb = yield dut.out_op.stb
assert stb == 0
class TestPriorityMuxPipe(PriorityCombMuxInPipe):
def __init__(self):
self.num_rows = 4
- stage = PassThroughStage()
+ def iospecfn(): return PassData()
+ stage = PassThroughStage(iospecfn)
PriorityCombMuxInPipe.__init__(self, stage, p_len=self.num_rows)