Nios - Ethernet Frame Format

Jul 08, 2004 4 Replies

Hi,



I would like to know if the Ethernet packets sent through the Nios Ethernet Kit, do they have a 32-bit CRC as the trailer.



If there is a CRC trailer does the Nios software and hardware check this automatically? And if there isn't a 32-bit CRC trailer, how can we calculate and add this?



Thanx


Hi,

I would like to know if the Ethernet packets sent through the Nios Ethernet Kit, do they have a 32-bit CRC as the trailer.

If there is a CRC trailer does the Nios software and hardware check this automatically? And if there isn't a 32-bit CRC trailer, how can we calculate and add this?

Thanx

You can do it in SW (using NIOS) or FPGA. Latter one is of course much faster but takes some resources.

Try googling for "crc32 calculation". I've used this source for SW implementation:

formatting link

And if you want to do it in HW, try this tool that generates synthesizable VHDL/Verilog:

formatting link

-JS-

Hi,

In addition to the other reply on your question: end of frame CRC (sometimes called FCS) can be calculated in hardware on many Ethernet MACs; this way it is done independently of the CPU. I'm not sure if all MACs do this, but when I was messing with the opencores.org Ethernet MAC it had this capability... the software that talks to the MAC had to enable CRC generation on a frame-by-frame basis -- so given this I would highly recommend getting the data sheet of the Ethernet MAC you're using to see if it supports this feature.

Jesse Kempa Altera Corp. jkempa at altera dot com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required