In order to accelerate sorting in the softcore for arbitrary-sized input, a sorting network is used first to sort the entire list first in small chunks, as in [1]}. Then, a traditional recursive merge sort approach is performed, but instead of merging each two sublists by comparing one element by one, it uses a parallel merge block. The merge block (the last \(log_2(N)\)  layers of odd-even mergesort) is to merge two already-sorted lists together, as demonstrated in a numerical example in Figure REF . In our implementation, we add one more stage in the beginning to enable merging arbitrarily long lists progressively, and the algorithm is inline with the intrinsics merge algorithm [2]}.
