this is a heap sorting RTL module in verilog according this paper "Dual port memory based heapsort implementation for FPGA".