A new approach for parallelising and optimising hardware compilation and partitioning in hardware/software co-design