Jump to content

Use of set_compare() method on registers vs register fields

Recommended Posts

I have used the set_compare(UVM_NO_CHECK) to disable checking by mirror() on a selected field or fields of a register, and to disable checking of the entire register. But what about the reverse - it I apply set_compare(UVM_NO_CHECK) to the entire register, and then apply set_compare(UVM_CHECK) to selected fields, will mirror() check those fields or will the overall register set_compare mode override the field settings? What I have is a 32-bit register with 32 bit fields, of which I am only concerned about one bit. I would be tedious (and I hope somewhat unnecessary) to have to apply set_compare(UVM_NO_CHECK) 31 times just to isolate the bit of interest.

Link to comment
Share on other sites

I think it should work if you apply the set_compare(UVM_CHECK) to the selected fields.

Because, the field value is compared only when the compare policy for that particular register field and the check argument of either:

1. the entire register :: mirror is set to <UVM_ACTIVE>, or

2. the register block :: mirror is set to <UVM_ACTIVE>, or

3. the particular field :: mirror is set to <UVM_ACTIVE>.


Please, correct me if I'm wrong...

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...