Following is the sequence code
class basic_sequence extends from uvm_sequence(#sequence_item);
sequence_item item;
task body()
fp1 =fscanf("abc.txt", addr, data);
`uvm_do_with(item,{
item.addr = addr;
item.data = data;
});
endtask
endclass
I have constrained addr and data from file reading data. It is not happening with the above code. data_item is getting a random value.
I have written a user-defined task to solve this problem like below
inplace of uvm_do_with call uder defined do_rw task like below
fp1 = fscanf("abc.txt", addr, data);
while(!eof(fp1) {
do_rw(addr, data);
}
This will work. I used above solution to work. I really don't understand why uvm is not supporting it with uvm_do_with. any answers for fit??
Thanks,
Satya