This blog provides information/ideas about PCI Express Data Link Layer.

We changed!Check out our new look!

Monday, August 18, 2008

Link CRC(LCRC)

The Data Link Layer protects the contents of the TLP by using a 32-bit LCRC value. The Data Link Layer calculates the LCRC value based on the TLP received from the Transaction Layer and the sequence number it has just applied. The LCRC calculation utilizes each bit in the packet, includ­ing the reserved bits (such as bits 7:4 of byte 0).

On the receiver side, the first step that the Data Link Layer takes is to check the LCRC value. It does this by applying the same LCRC algorithm to the received TLP (not including the attached 32-bit LCRC). If a single or multiple-bit error occurs during transmission, the calculated LCRC value should not match the received LCRC value. If the calculated LCRC value does not equal the received value, the TLP is discarded and a Nak DLLP is scheduled for transmission. If the calculated value equals the re­ceived value, the Data Link Layer then proceeds to check the sequence number.

Like sequence numbers, the LCRC protects the contents of a TLP on a link-by-link basis. If a TLP travels across several links (for example, passes through a switch on its way to the root complex), an LCRC value is generated and checked for each link. In this way, it is different than the ECRC value that may be generated for a TLP. The ECRC serves to protect the TLP contents from one end of the PCI Express topology to the other end, while the LCRC only ensures TLP reliability for a give link. The 32-bit LCRC value for TLPs is also differentiated from the 16-bit CRC value that is used for DLLP packets.

1 comment:

OutputLogic said...

I want to point out that the data width for 32-bit LCRC calculation doesn't have to 32-bit. In fact, for x16 PCI Express the data width is 128-bit (or 256-bit if the SerDes is Double Data Rate).

There is an online tool that can generate Verilog or VHDL code for the LCRC for different data width.
The tool is at OutputLogic.com

DISCLAMIER

Verilog Course Team does not warrant or assume any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed. No warranty of any kind, implied, expressed or statutory, including to fitness for a particular purpose and freedom from computer virus, is given with respect to the contents of this blog or its hyper links to other Internet resources. Reference in this blog to any specific commercial products, processes, or services, or the use of any trade, firm or corporation name is for the information, and does not constitute endorsement, recommendation, or favoring.