I have code as shown below.
class my_item extends uvm_object;
rand bit [31:0] id;
endclass
...
...
my_item m_data;
my_item record_data;
m_data.randomize();
record_data = m_data;
...
...
do begin
m_data.randomize(); // dead loop here and I have no idea how to update
end while (m_data.id == record_data.id);
The record_data is also changed every time when m_data is randomized… what I want to do is just make sure the second time to randomize is not the same as the result from the first time of randomization…
Thank you for any help.