I am working in hardware domain. I need to generate all nCk combinations of numbers from 0 to n-1. It is easy to do it using software but this is to be done using HDL - VHDL. I cannot spend much on computational complexity and need to generate at the rate of 1 sample/second (1 clk cycle per combination). Intermediate memory is available.
Eg:- suppose for 6C4, I need to generate
(1,2,3,4) (1,2,3,5) (1,2,3,6) (1,2,4,5) (1,2,4,6) (1,2,5,6) (1,3,4,5) (1,3,4,6) (1,3,5,6) (1,4,5,6) (2,3,4,5) (2,3,4,6) (2,3,5,6) (2,4,5,6) (3,4,5,6)
Order is important.
Edit: 'k' and 'n' are always even. Is there some way to simplify the logic taking this into consideration.
In this case 'n' and 'k' inputs to the entity may vary('n' with a upper limit of 16)