Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with CRC in Ethernet MAC design

Status
Not open for further replies.

Mudugamuwa

Newbie level 6
Joined
Sep 26, 2006
Messages
12
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,361
Hi,

I'm designing a Ethernet MAC with a Xilinx chip. The problem I have is with respect to the CRC at the end of Ethernet frame.

I want to know from where I have to start calculating the CRC. From books it says, from the data given from the upper layer (layer 3) in ISO hierarchy. According to that the First byte of Layer 3 is 'IP Version' which is 0x04. So the first bit becomes zero. This is a problem to me cos I think the first bit should be '1' to calculate a CRC. So I want to know should I start from the first '1' possition to calculate the CRC.

I really thankful to anyone who can help.

Best regards,
Sudeera.
 

ethernet crc calculation

Frame check sequence (FCS)= CRC—Consists of 4 bytes. This sequence contains a 32-bit cyclic redundancy check (CRC) value, which is created by the sending MAC and is recalculated by the receiving MAC to check for damaged frames. The FCS is generated over the DA, SA, Length/Type, and Data fields.

**broken link removed**
 

mac crc calculation

Ethernet MAC is L2 sublayer so doesnt have any intelligance of L3 . It will treat all L3 protocol as same .
on incomming ethernet packet , MAC should start calculating CRC from Destination MAC address to end of datagram.(Do not consider preamble & SFD during calculation of CRC).
If you are offloading any L3 feature in your hardware (dont call it as ethernet MAC) ie IP CRC calculation then you should consider that IP has only IP Header checksum which starts from IP version field to the end of IP header option .
 

online ethernet crc calculator

There is an online tool that can generate CRC Verilog or VHDL code for different polynomials and data widths. It's on http://outputlogic.com

Hope it helps
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top