# US 8,578,240 B1 · CRC computation for packet length not multiple of data path width

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,578,240 B1
- Document ID: US8578240B1
- Status: Granted
- Kind: B1
- Application number: 13/011,445
- Filed: 2011-01-21
- Granted: 2013-11-05
- Earliest claimed: 2011-01-21
- Assignees: Juniper Networks, Inc.
- Applicants: Ravi Pathakota; Abhijeet Sampatrao Jadhav; Sai Kishore; Naveen Jain
- Inventors: Ravi Pathakota; Abhijeet Sampatrao Jadhav; Sai Kishore; Naveen Jain
- Web page: https://patentgrep.com/patent/US8578240B1

## CPC

- H03M 13/091: {Parallel or block-wise CRC computation}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

A communication device may include a cyclic redundancy check (CRC) calculator. The CRC calculator may determine a packet remainder of a packet based on a data path width associated with the communication device; append zeros to the packet remainder to generate an appended packet remainder equal in size to the data path width; compute a first CRC value for the appended packet; reverse bits of the computed first CRC value to obtain a reversed CRC value; multiply the bit reversed CRC value with a value based on a reciprocal CRC polynomial to generate a multiplication product; compute a second CRC value for the generated multiplication product based on the reciprocal CRC polynomial; and reverse bits of the second CRC value to generate a CRC for the packet.

## Claims

### Claim 1

A communication device comprising:
a cyclic redundancy check (CRC) calculator to:
determine a packet remainder of a packet based on a data path width associated with the communication device;
append zeros to the packet remainder to generate an appended packet remainder equal in size to the data path width;
compute a first CRC value for the appended packet;
reverse bits of the first CRC value to obtain a reversed CRC value;
multiply the reversed CRC value by a value based on a reciprocal CRC polynomial to generate a multiplication product;
compute a second CRC value for the multiplication product based on the reciprocal CRC polynomial; and
reverse bits of the second CRC value to generate a particular CRC value for the packet.

### Claim 2 (depends on 1)

The communication device of claim 1, where the CRC calculator is further to:
receive a current packet segment of the packet,
the current packet segment having a size corresponding to the data path width; and
compute a current CRC value based on the current packet segment and a previous CRC value.

### Claim 3 (depends on 2)

The communication device of claim 2,
where the previous CRC value is based on an initial CRC value when the current packet segment corresponds to a first packet segment, and
where the previous CRC value is based on a previous packet segment when the current packet segment does not correspond to the first packet segment.

### Claim 4 (depends on 2)

The communication device of claim 2,
where the particular CRC value corresponds to the current CRC value when the current packet segment corresponds to a last packet segment, and
where the last packet segment corresponds to the packet remainder.

### Claim 5 (depends on 1)

The communication device of claim 1, where the CRC calculator is further to:
retrieve the value based on the reciprocal CRC polynomial from a look up table.

### Claim 6 (depends on 5)

The communication device of claim 5,
where the look up table relates a particular size of the packet remainder to a particular reciprocal CRC value,
where the particular reciprocal CRC value is computed using the reciprocal CRC polynomial, and
where the reciprocal CRC polynomial is obtained by reversing bits of a CRC polynomial used to compute the first CRC value.

### Claim 7 (depends on 6)

The communication device of claim 6,
where the CRC polynomial corresponds to an Ethernet polynomial, and
where the reciprocal CRC polynomial corresponds to the Ethernet polynomial with reversed bits.

### Claim 8 (depends on 1)

The communication device of claim 1, where the CRC calculator is further to:
generate the reciprocal CRC polynomial by reversing bits of a CRC polynomial,
the CRC polynomial being used to compute the first CRC value, and
the second CRC value being computed using the reciprocal CRC polynomial; and
calculate the value based on the reciprocal CRC polynomial based on a CRC function, the generated reciprocal CRC polynomial, and a quantity of the zeros that were appended to the packet remainder.

### Claim 9 (depends on 1)

The communication device of claim 1, where the reversed CRC value is multiplied by the value based on the reciprocal CRC polynomial.

### Claim 10

A method comprising:
determining, by a communication device, a packet remainder of a packet based on a data path width associated with the communication device;
appending, by the communication device, zeros to the packet remainder to generate an appended packet remainder equal in size to the data path width;
computing, by the communication device, a first cyclic redundancy check (CRC) value for the appended packet;
reversing, by the communication device, bits of the first CRC value to obtain a bit reversed CRC value;
multiplying, by the communication device, the bit reversed CRC value a value based on a reciprocal CRC polynomial to generate a multiplication product;
computing, by the communication device, a second CRC value for the multiplication product; and
reversing, by the communication device, bits of the second CRC value to generate a CRC value for the packet.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
receiving a current packet segment of the packet,
the current packet segment having a size corresponding to the data path width; and
computing a current CRC value based on the current packet segment and a previous CRC value.

### Claim 12 (depends on 11)

The method of claim 11,
where the previous CRC value is based on an initial CRC value when the current packet segment corresponds to a first packet segment, and
where the previous CRC value is based on a previous packet segment when the current packet segment does not correspond to the first packet segment.

### Claim 13 (depends on 11)

The method of claim 11,
where the CRC value for the packet corresponds to the current CRC value when the current packet segment corresponds to last packet segment, and
where the last packet segment corresponds to the packet remainder.

### Claim 14 (depends on 10)

The method of claim 10, further comprising:
retrieving the value based on the reciprocal CRC polynomial from a look up table.

### Claim 15 (depends on 14)

The method of claim 14,
where the look up table relates a particular size of the packet remainder to the particular reciprocal CRC value,
where the particular reciprocal CRC value is computed using a reciprocal CRC polynomial, and
where the reciprocal CRC polynomial is obtained by reversing bits of a CRC polynomial used to compute the first CRC value.

### Claim 16 (depends on 10)

The method of claim 10, further comprising:
generating the reciprocal CRC polynomial by reversing bits of a CRC polynomial,
the CRC polynomial being used to compute the first CRC value, and
the second CRC value being computed using the reciprocal CRC polynomial; and
calculating the value based on the reciprocal CRC polynomial based on a CRC function, the reciprocal CRC polynomial, and a quantity of the zeros that were appended to the packet remainder.

### Claim 17 (depends on 10)

The method of claim 10, where multiplying the bit reversed CRC value by the value based on the reciprocal CRC polynomial comprises:
using modulo 2 arithmetic to generate the multiplication product.

### Claim 18

A non-transitory computer-readable medium storing instructions, the instructions comprising:
one or more instructions that, when executed by at least one processor of a communication device, to cause the at least one processor to:
determine a packet remainder for a packet based on a data path width associated with the communication device;
append zeros to the packet remainder to generate an appended packet remainder equal in size to the data path width;
compute a first CRC value for the packet after appending the zeros to the packet;
reverse bits of the first CRC value to obtain a bit reversed CRC value;
multiply the bit reversed CRC value by a value based on a reciprocal CRC polynomial to generate a multiplication product;
compute a second CRC value for the generated multiplication product based on the reciprocal CRC polynomial; and
reverse bits of the second CRC value to generate a CRC value for the packet.

### Claim 19 (depends on 18)

The non-transitory computer-readable medium of claim 18, where the instructions further comprise:
one or more instructions that, when executed by the at least one processor, to cause the at least one processor to:
generate the reciprocal CRC polynomial by reversing bits of a CRC polynomial,
the CRC polynomial being used to compute the first CRC value, and
the second CRC value being computed using the reciprocal CRC polynomial; and
calculate the value based on the reciprocal CRC polynomial, based on a CRC function, the reciprocal CRC polynomial, and a quantity of the zeros that were appended to the packet remainder.

### Claim 20 (depends on 18)

The non-transitory computer-readable medium of claim 18, where the instructions further comprise:
one or more instructions that, when executed by the at least one processor, to cause the at least one processor to:
receive a packet;
determine that the packet has a size that is not a multiple of the data path width;
divide the packet into one or more packet segments,
a particular packet segment having a size corresponding to the data path width; and
generate the packet remainder, where
the packet remainder having a size that is less than the data path width.
