Start array of sequences on sequencers with arguments

I have an array of sequences and sequencers. I am starting like shown below.

      for (int i=0; i < 5; i++) begin
         fork
            automatic int val = i;
            m_seq[val].start(my_sequencer[val]);
         join_none
      end

Is there any way I can pass arguments with this? I want each seq to randomize according to the index i.

Thanks in advance for any suggestions.

In reply to Bruce_031:

You can add a variable to your sequence class and set it sometime between creating the sequence and just before calling start.

1 Like