Why second arugment in do_compare , that uvm_comparer comparer use ?
Please go over the next user-guides:
Just another view. The compare function is always related to a comparer. You can use the standard comparer which is uvm_comparer. But there might be reasons to create your own comparer as an extension of uvm_comparer. This has to be pointed out by passing the actual comparer to the compare function.
I did not get clarity. Can you please elaborate the answer…
This is what the UVM Refernce is saying:
The uvm_comparer class provides a policy object for doing comparisons. The policies determine how miscompares are treated and counted. Results of a comparison are stored in the comparer object. The uvm_object::compare and uvm_object::do_compare methods are passed a uvm_comparer policy object.