For bitwidth=32, the resource consumption for different max sort number is listed in the table below:
Max_sort_number | 8 | 16 | 32 | 64 | 128 | 256 | 512 |
Interval | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
LUT | 343 | 607 | 1135 | 2144 | 4192 | 8285 | 16477 |
Register | 1007 | 1835 | 3451 | 6692 | 13156 | 26082 | 51885 |
Insert Sort primitive set 1024 as the default maximum sort number. In order to achieve arbitrary sort number, firstly the input stream will be sorted every 1024 number by Insert Sort primitive, then we use Merge Sort primitive to merge the sorted stream, see reference Internals of Merge Sort. The picture below show the synthesis result for maximum sort number of 1024.