In reply to dave_59:
hi dave,
i was trying to follow the example mentioned in sv lrm :
task stimulus( int length );
int a, b, c, success;
success = std::randomize( a, b, c ) with { a < b ; a + b < length };
…
success = std::randomize( a, b ) with { b - a > length };
…
endtask
based on the above example i was trying to randomize my addr1. start_addr and end_addr are generated before i am randomizing addr1 but its returing 0.
can you please let me know how can i randomize the same. suppose my start_addr is 5 and end_addr is 10 then addr1 can be anything between 5 and 10.