move scheduler to pipeline.v