Thank you for your reply. The difficulty is that my testbench is performing another operation ; something of error injection. This module repeats for a few cyles. I want the generator to be a separate module and for every input that is generated for the DUT, I want my error module to alter the data and send it to the DUT.
So basically, input needs to ramp up by 1 ; error module should use this data and iterate over a few cycles by adding errors in different positions; then the input needs to ramp up by 1 again and go back to error module and repeat the same process. I do not know how to implement this.