Jump to content

looking for a replacement for vera_crc()


Recommended Posts

hi,

there is no crc function predefined neither in SV nor in UVM (althrough there is an uvm_oneway_hash). depending upon what you want to do with that function it might have different solutions with SV+UVM.

- you really require a particular CRC function to compute a CRC as required in a protocol

- you require a hash function which maps a set of values into a single unique value (one way hash function)

Link to post
Share on other sites
  • 2 months later...

I realize this thread is a bit old, but in case you're still interested, I would recommend reading the paper at http://www.ross.net/crc/crcpaper.html. It's a very good layman's explanation of how table-driven CRC algorithms are derived. Using that, I was able to create a small SV package that implements a parameterized class that calculates CRCs for any polynomial that you desire. It's a worthwhile exercise both in understanding CRCs and in creating an efficient SV class implementation, and it's a fairly small undertaking.

The real challenge is figuring out what parameters to use for any given standard. (The polynomial is just one of several.) The paper gives you the parameters for Ethernet, so you're set there.

Link to post
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...