@pytest.mark.parametrize(
  ('stages'), [1, 3, 12]
)
def test_Pipeline( dump_vcd, stages ):

  # Create the pipeline
  pipeline = Pipeline( stages )
  pipeline.vcd_file = dump_vcd

  # Fill up the pipeline
  i = -1
  for i in range( 1-stages ):
    pipeline.advance()
    pipeline.insert( i )
    assert not pipeline.ready()

  # Insert one last item
  pipeline.advance()
  pipeline.insert( i+1 )

  # Make sure there is something at the tail of the pipeline
  assert pipeline.ready()

  # Start removing items from the pipeline
  for i in range( stages ):
    assert pipeline.ready()
    assert pipeline.remove() == i
    pipeline.advance()

  assert not pipeline.ready()

#-------------------------------------------------------------------------
# TestValRdyPipeline
#-------------------------------------------------------------------------
dataset/ETHPy150Open cornell-brg/pymtl/pclib/cl/pipelines_test.py/test_Pipeline/swapped operands of `-`