FPGARelated.com
Forums

Nios - Ethernet Frame Format

Started by Colin July 8, 2004
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
Colin wrote:
> And if there isn't a 32-bit CRC trailer, how can > we calculate and add this?
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: http://cell-relay.indiana.edu/cell-relay/publications/software/CRC/32bitCRC.c.html And if you want to do it in HW, try this tool that generates synthesizable VHDL/Verilog: http://www.easics.com/webtools/crctool -JS-
csim036@ec.auckland.ac.nz (Colin) wrote in message news:<eeab73c0.0407072122.3ceee0e@posting.google.com>...
> 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, 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
Thanx guys I really appreciate you help.