I have a task (that is part of a class) which
reads file from the user and drives the data to the
dut. Each test category can have distinct no. of inputs
to drive which comes from the input file. So, there will
be as much number of columns in the file as the no. of inputs
to drive and each column corresponds to the inputs.
Now, I want to parameterize this method by passing an arguement
to the task that tells the no. of inputs (and so, the number of columns)
coming from the file. The data widht of the inputs could be
different and so I need to paratermize it as well based on the input size.
Also, as the number of output data from this task (which goes to the dut input)
varies, I can use it as array but the individual data widht of the
various inputs could be different.
For example,
task read_file (filename, dataout[i], input_no);
for (i=0; i<= input_no; i++)
dataout[i] =
endtask
Which is the best way I can acheive such parameterized tasks in sv?
Thanks,
Babu