Re: Verifying CRCs

From: Rob Warnock (rpw3_at_rpw3.org)
Date: 07/12/04


Date: Mon, 12 Jul 2004 02:05:17 -0500

Francois Grieu <fgrieu@francenet.fr> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) wrote:
...
| On why the CRC is setup to all ones, and complemented before
| sending, in many CRC systems, Rob said:
|
| > (Ethernet) pre-initializes the result to all one's *and* it
| > one's-complements the result before appending it to the outgoing
| > frame [thus improving its ability to detect lost runs of zeros
| > at points in the frame where the current running CRC happens
| > to be zero].
|
| This is to be understood as: at points in the frame where otherwise
| the current running CRC would happen to be zero, if this
| pre-initialization and final complement was not done. Including,
| for every frame, right before the data, and after the CRC.
+---------------

Exactly so.

+---------------
| > Although putting multiple CRCs in a packet is done by some protocols.
| > E.g., DEC's DDCMP link-level protocol had a short, fixed-length header
| > which contained both the length of the following variable-length data
| > section *and* a CRC-16 over just the header (including that data length).
|
| This technique is still useful today in multidrop, half-duplex industial
| networks where nodes are memory-starved, and want to use a single
| buffer for ingoing frames and outgoing frames, while NOT loosing the
| outgoing frame content (for possible retransmission) until it was
| acknowledged. Protecting the packet header with an internal CRC
| avoids a possible problem when the node number field gets corrupted.
+---------------

Interesting, thanks.

Note that DDCMP was also multidrop-capable [we even used it that way
back at DCA], and the node IDs were, of course, in the CRC-protected
header.

-Rob

-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607



Relevant Pages

  • Re: crc on only data or including the address
    ... >For that i am implementing ethernet packet generator in the fpga. ... >am sending 64 bytes of frame from the fpga with the most significand ... Actually, what is sent is the FCS, which is bit reversed ... >2) Is CRC implemented on only data or on whole frame? ...
    (comp.arch.fpga)
  • Re: Suggestions for custom application-layer protocol?
    ... CRC is detected, the end of the first frame is known and it can now be ... The slave only needs to be able to ... updated CRC accumulator must be compared with the two most recently ...
    (comp.os.linux.embedded)
  • Re: Suggestions for custom application-layer protocol?
    ... CRC is detected, the end of the first frame is known and it can now be ... The slave only needs to be able to ... updated CRC accumulator must be compared with the two most recently ...
    (comp.unix.programmer)
  • Re: Crc16 on power failure
    ... after the machine is restarted (power on in this case). ... XOR the CRC with the XOR of that word ... Compute the FCS of a frame, and add it at the end of the frame. ...
    (comp.arch.embedded)
  • Re: CRC, which error patterns can be detected?
    ... >> They are different binary numbers and depend upon frame size. ... >> CRC stands for cyclic reduncance check, named for the way it is ... > is a valid message, if and only if e ... Therefore an error pattern is undetected, ...
    (sci.math)