A flexible communication mechanism for pipeline parallelism