verify the fcs of ethernet frame

OP (Company: cdac) #4129181
hi
 i am trying to transmit a Ethernet frame from fpga to pc.
 my udp frame is:
constant udp_frameB :frame60:=
         (x"FF",x"FF",x"FF",x"FF", -- mac dest
    x"FF",x"FF",x"00",x"00",
    x"00",x"04",x"14",x"13", -- mac src
    x"08",x"00",x"45",x"00", -- IP header
    x"00",x"2E",x"00",x"00",
    x"00",x"00",x"40",x"11",
    x"7A",x"C0",x"00",x"00", -- IP src
    x"00",x"00",x"FF",x"FF", -- IP dest
    x"FF",x"FF",x"00",x"00", -- port src
    x"50",x"DA",x"00",x"12",-- port dest + len
    x"00",x"00",x"42",x"42", -- checksum udp + data "B"
    x"42",x"42",x"42",x"42",
    x"42",x"42",x"42",x"42",
    x"42",x"42",x"42",x"42",
    x"42",x"42",x"42",x"42");
for the above frame i have calculated the FCS using the crc-32 
polynomial-X"04C11DB7".
FCS is-X"D96F0BBF"
I have adopted following method to calculate FCS:
IEEE 802.3 defines the polynomial M(x) as the destination address, 
source address,length/type, and data of a frame, with the first 32-bits 
complemented. The result of CRC is complemented, and the result is the 
IEEE 802.3 32-bit CRC,referred to as the Frame Check Sequence (FCS) 
field. The FCS is appended to the end of the Ethernet frame, and is 
transmitted highest order bit first (x31, x30,…, x1, x0).
please tell me ,Is FCS correct or not?
and also tell me that if the FCS is not correct then will wireshark 
capture it or not?
#4129200
Sidharth Kashyap wrote:
> Is FCS correct or not?

I don't know.

> and also tell me that if the FCS is not correct then will wireshark
> capture it or not?

In most cases, it won't. If a switch or router is betwen the fpega and 
the pc, it should discard the ethernet frame if the fcs is wrong. Most 
ethernet/wlan cards are verifying the checksum and the os will never see 
the checksum. If you haven't one of these cards, and there is nothing 
between the pc and the fpega, wireshark should be able to capture 
ethernetframes with wrong fcs. Otherwise, it won't.

Reply

A question of your own? This thread is over 11 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.