The algorithm for scrambler is similar to the one for CRC.

No, I don’t have scrambler code that is publicly available.

Thanks,

Evgeni

I have looked at the code for your stand alone crc-gen program. Do you have a stand alone for the scrambler? I am trying to understand how to generate the MxN scrambler matrix. Would it be possible to share your algorithm or take a peek at that code?

Thanks

]]>Can you please place a testbench into the write up.

I see lot of people asking why their input don’t match outputs from crc online calculators

Namely regarding the manipulation data_in.

Thanks,

Wes

This question about “interleaved” CRC calculation comes up quite often. The short answer is – not quite. One problem is that you need to account for 128-bit of leading and trailing zeros when calculating CRC on split data:

data[255:0] = {data[255:128],128′b0} ^ {128′b0,data[127:0]}.

You can calculate CRC for each 128-bit chunk, but then you need to adjust the result by x^128 multiplication over finite field before proceeding to the next 256-bit data chunk.

Thanks,

Evgeni

Let say for example that we have a datapath of 256 bits. Is it possible to compute the first 128 bytes CRC and the second 128 bytes CRC at the same time, and then combine them (so without injecting the first result in the second computation)?

Thanks! ]]>

Thank you very much for the help!

The cookbook is also very useful.

Your website is wonderful and laid out very nicely. I will read the other parts of it as I get time, it looks very interesting.

-Stephen

]]>Yes, that’s the common practice.

Here is the reference you might find useful. See chapter 12 on page 89.

https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/manual/stx_cookbook.pdf

Thanks,

Evgeni

I understand your question. This is, in fact, one of the most frequently asked things. The simplest approach is to have 4 CRC generators for 32-, 64-, 96-, and 128-bit data. Then select the output based on the number of valid words. There are more complex solutions involving finite field arithmetics that help save some area. But I haven’t yet seen those in public domain. If I have some time, I’ll enhance this CRC generator. But it’s not a priority.

Thanks,

Evgeni