Jump to content

uvm_queue and do_compare

Recommended Posts


The uvm_queue and uvm_pool don't have implemented do_compare function. Could somebody please explain me why ? Maybe that feature could be added in future releases. I think that even `uvm_field_queue_object macro would solve the issue...

I understand that one can derive from those classes and implement the do_compare by himself. However, I think it would be more convenient to have it already implemented by the standard.

Thanks in advance.

Link to comment
Share on other sites


uvm_queue is a parameterized class. you never know what kind of type is actually used so you cannot write a generic comparison function (and as there are no type bounds in sv one cannot guarantee that the parameter is at least an uvm_object and use do_compare for the items)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...