Hello Jim, Hello community,
I ran into the requirement to generate a set of random numbers (k) out of range (n), but without repitition.
There is a system with 100 possible Tx Slots (1..100).
My FPGA is able to send data on 10 arbitrary (programmable) slots.
So in my testbench I would like to generate an integer_vector(1 to 10) with random numbers of range (1,100), but of course without repitition. Something like this:
MyIntVec := MyRandVar.RandIntV(1,100,10,norep)
Is something like this possible with RandomPkg? I saw that there is the possibility to prohibit values, but I did not understand how to combine this with my issue.
Maybe one possible solution would be to throw the dices over and over again until there is no repition left inside the set of values. What do you think about that issue?
Thank you very much.