I ran into the requirement to generate a set of random numbers (k) out of range (n), but without repitition.
An example: 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?
*Hello, I am interested in doing a random verification check in my testbench and I am new to this. Can anyone help me to do this. I have an adder module (33 bit) and I need to add two random values (32 bit) and should store in this 33 bit register. help is appreciated. Thanks in advance