In reply to sagar@aceic.com:
Sagar,
We can do it by using system functions. Steps are below
- Create your own sequence which extends from uvm_sequence and should be parameterised by your object.
- Inside the body task use the system functions to read the text file.
fopen, fgetc,fscanf using these u can read the data & assing to some reg or int(2 state) variable. - Now you have sampled data from the text file. Ex: You can pass these sampled data to the APB write task to write in to reg or memory.
- Use uvm macro like `uvm_do_with (addr ,data,sel_line). U can cnstraint radimazation by assigning sampled value to the item
ex: req.DATA = data(smpled).
It worked for us.
Regards,
Sharana