Full rewrite of sim_pipeline_test