[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ethmac] A question on crc32



20-Jul-01
 
   Hi,
 
          Just few small comments :
 
1. 
When you calculate the CRC for any given Eth-Packet you simple pas the
WHOLE packet as it is with no compliment no rotate no invertion.
 
2. 
Once the whole data pass the CRC generator (which is simple 32 bit of
the FF with some xor's) the value the 32 FF show represent the CRC of
the Packet.
 
3a. 
Technicaly you could have attach this result to the end of the packet
and send it as it is HOWEVER if you do so the station who get this
packet which inculde the CRC and test to check that the packet was not
corrupted will get once the whole packet with the CRC pass through the
CRC checker the 32 FF will show value 0.
 
3b.
Since 0 is a problematic number as you might have the whole 32 FF stuck
at 0 the way the CRC value is attach to the packet is by doing a bitwise
rotation and invertion this will cause the CRC checker not to show the
value 0 for good CRC but rather what is reffer as the crc_magic_number
which is a value you will ALWAYS get for any given Eth-Packet.
 
BTW I used the word CRC Checker and CRC generator but they are basicly
the same 32FF with the same Equations.
 
have a nice day
 
   Illan
 

-----Original Message-----
From: zou.yixin@mail.zte.com.cn [mailto:zou.yixin@mail.zte.com.cn]
Sent: Friday, July 20, 2001 4:54 AM
To: ethmac@opencores.org
Subject: [ethmac] A question on crc32



 The algorithm is adopted in IEEE Std 802.3-2000: 

Mathematically,the CRC value corresponding to a given frame is defined
by the following procedure: 
a)The first 32 bits of the frame are complemented. 
b)The n bits of the frame are then considered to be the coef cients of a
polynomial M(x)of degree n ¨C1. 
(The first bit of the Destination Address field corresponds to the x^(n
¨C1)term and the last bit of the 
data field corresponds to the x^0 term.) 
c)M(x)is multiplied by x^32 and divided by G(x),producing a remainder
R(x)of degree 31. 
d)The coefficients of R(x)are considered to be a 32-bit sequence. 
e)The bit sequence is complemented and the result is the CRC. 

My question is :why should the first 32 bits  be complemented? And the
same quetion in step e). 




--
To unsubscribe from ethmac mailing list please visit http://www.opencores.org/mailinglists.shtml