From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC calculation in FPGA with x^3+x+1 polynomial

Hi All,

 

Merry christmas to all!!

 

Here is my problem.. I am trying to generate a 3-bit CRC with the polynomial x^3 + x +1. I am trying to do it in FPGA.

I am not allowed to use a loop within a timed structure and cannot use remainder function in FPGA. Hence can any one tell me how can I go with this??

 

Thanks,

Yogesh

0 Kudos
Message 1 of 6
(3,987 Views)

How many bits are in the message you are trying to perform a CRC on?  Instead of using a loop, you could serialize the CRC process, but that could be a lot of calls to the same code.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,971 Views)

Hi,

 

I need to perform CRC on a total of 26bits. So, doing it serially is not a good option.

 

Thanks and regards,

Yogesh

0 Kudos
Message 3 of 6
(3,887 Views)

Can you give more insight into what performance metrics you need? What is the throughput of the system? What latency can be accmodated?

 

Depending on those factors, you might not even need the SCL and can instead just use a regular while loop (at least for most of the code).

0 Kudos
Message 4 of 6
(3,695 Views)

Hi Dragis,

 

I have the STL in the main FPGA VI. This is used as a SPI driver. I cannot replace this with a while loop.

 

Thanks,

Yogesh

0 Kudos
Message 5 of 6
(3,659 Views)

Thanks for the information. In that case you can use the High Throughput Math Library nodes to perform the calculation. Those nodes perform the same functions as the primitives but they are pipelined (configurable) and have handshaking signals to deal with synchronization. Different factorizations of your polynomial can help with reducing the latency of the operation.

0 Kudos
Message 6 of 6
(3,630 Views)