3179 views|6 replies

6

Posts

0

Resources
The OP
 

Please help, how does the FPGA Ethernet data receiver perform CRC check? [Copy link]

I am a novice, and I have recently been learning FPGA Ethernet data transmission and reception. I have encountered some problems in CRC verification. Please help me.

1. I found some Verilog programs for generating CRC-32 checksums on the Internet. The sender can successfully generate the corresponding CRC checksum, but if the receiver calculates the data containing the CRC checksum according to the sender's program, it cannot get an all-zero result. In this case, how can I perform CRC check at the data receiver? It is too complicated to remove the CRC part of the data to generate a new CRC checksum and then compare it with the original CRC part. According to the principle of CRC, the complete data should be directly CRC calculated to see if it is all zero to judge?

2. Secondly, when viewing the input Ethernet frame data through the ila core, it is found that the CRC part of the data is opposite to the high and low bits actually calculated. Why is this?

The code picture of CRC-32 calculation is as follows. Please help me!

This post is from FPGA/CPLD

Latest reply

I have used CRC check when adjusting the flash controller. The sender performs bit operations according to the check code formula and sends the check code. The receiver calculates the check in the same way and compares them. I have not studied it in depth in Ethernet.  Details Published on 2020-8-5 17:21
 

122

Posts

0

Resources
2
 
The Ethernet checksum itself is not all zero, it should be a fixed coefficient value, please understand it carefully.
This post is from FPGA/CPLD
 
 

6

Posts

0

Resources
3
 
Hao Xushuai posted on 2020-7-30 13:16 The Ethernet checksum itself is not all zero, it should be a fixed coefficient value, you should understand it well.

My understanding of the receiver's CRC check is to divide the received new frame by the selected divisor (such as the CRC-32 standard) using " modulo 2 division"
. - If the remainder R = 0, the frame is judged to be correct and accepted.
- If the remainder R ! = 0, the frame is judged to be erroneous.

Is this understanding correct? I have just started learning this, so some of the principles may not be clear to me.

This post is from FPGA/CPLD
 
 
 

122

Posts

0

Resources
4
 

This understanding is just the simplest verification method. In Ethernet, this method has been improved. You can check it out on Baidu.

This post is from FPGA/CPLD
 
 
 

1

Posts

0

Resources
5
 
I have used CRC check when adjusting the flash controller. The sender performs bit operations according to the check code formula and sends the check code. The receiver calculates the check in the same way and compares them. I have not studied it in depth in Ethernet.
This post is from FPGA/CPLD
 
 
 

6

Posts

0

Resources
6
 
jieye2599 posted on 2020-8-5 17:21 CRC check was used when adjusting the flash controller. The sender performs bit operations according to the check code formula and sends the check code. The receiver calculates it in the same way...

Well, currently I also extract the CRC checksum of the Ethernet frame and compare it with the recalculated one. Although the function is realized, it takes a long time.

This post is from FPGA/CPLD
 
 
 

6

Posts

0

Resources
7
 
Hao Xushuai posted on 2020-8-3 18:27 This understanding is just the simplest verification method. In Ethernet, this method has been improved. You can check it out on Baidu.

OK, I'll check again.

This post is from FPGA/CPLD
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list