Jump to content

Multiple architectures - which one?


Recommended Posts

I am relatively new to UVM, and I'm trying to think through the architecture of a transaction. Assume that in this case, I have the ability to modify the object under discussion directly.

 

I have a transaction that includes a payload and a CRC. I'd like to be able to run tests where the payload or the CRC is corrupted, but only sometimes.

 

It seems I have at least two choices. The CRC would get generated at the creation time for the packet. I could have a randomized boolean, bad_crc, that corrupts one or more bits of the CRC during creation. Normally this would be constrained to FALSE. On a test-by-test basis, this could be shaped by overriding the constraint.

 

But, I could also extend the class and call it bad_crc_packet_tx, with its own "new" function that mangles the CRC. 

 

I could also envision even weirder ways to get the same functionality, and there may be a better one. 

 

Any advice on standard UVM practice, benefits to either approach, or better approaches than those two?

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.

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