In reply to dvuvmsv:
It is highly recommended that you don't use the `uvm_do_* macros. Instead, you should learn the sequence API and use it directly. The reason for this is that it gives you fine-grain control over your sequences and makes it significantly easier to understand and debug. See this link and that link.
Then you need to understand the macro inserts the following line into your code
req.randomize() with {{ req.address == addr;
req.direction == direction;
req.hsize == hsize;
req.burst == burst;
req.data == data;
req.prot == prot;
}
And since the with constraint construct search the object being randomized first before looking in the local scope, this is the same as writing
req.randomize() with {{ req.address == addr;
req.direction == req.direction;
req.hsize == req.hsize;
req.burst == req.burst;
req.data == req.data;
req.prot == req.prot;
}