Friday, November 13, 2009

Link Training, the First Step in Communication



[ Team LiB ]





Link Training, the First Step in Communication


Link training is one of the first protocols that two agents perform to establish link configuration parameters such as link width, lane polarities, or maximum supported data rate. The following screenshots show the actual data captured for a X4 link training session between the Catalyst PX-4 Exerciser and a PCI Express system board. It should be noted that the link training exercise demonstrated here is based on the 1.0 specification. In the images that follow, several of the repeated packets (all of the idle state) are removed for clarity, but all of the sequences are shown. During the Link Training, the two agents start the communication by sending a low level "ordered set" TS1, and once they each recognize the expected packet from the other side they proceed with link width negotiation, confirmed by both agents with TS2. This is immediately followed by a sequence of three DLLPs (Data Link Layer Packets) to exchange flow control credit information.


Figure A-6. Start with TS1

After detecting the receiver at opposite sides of the link, each device starts by sending at least 1024 TS1 packets to allow adequate time for starting communication, locking the clocks, and reversing lane polarity if necessary.


Figure A-7. SKIP

At all times,SKIP "Ordered Sets" are sent approximately every 5 microseconds to compensate for clock synchronization mismatch between the two agents.


Figure A-8. Completion of 1024 TS1

After 1024 TS1 PADs, TS1 packets with data are sent to announce the group of lanes that are eligible to become the active link lanes. As indicated in packet 1052, the link fields switch from being PAD to include a Link number.


Figure A-9. Lane Number Declaration

In this sequence, lane numbers are being declared after the communication has been established. As indicated in packet 1070, the lane fields switch from being PAD to include Lane numbers.


Figure A-10. Start of TS2

TS2 packets start after Link setup. TS2 packets are far fewer than TS1. These are sent as a confirmation of successful physical layer link negotiation.


Figure A-11. Initialization of Flow Control 1

Initialization of Flow Control packets start after link training is completed by the physical layer. INIT FC1 sequences contain 3 packets to advertise available buffering for posted, non-posted and completion transaction types. These packets are repeated until both agents acknowledge it by starting the INIT FC2 transmissions.


Figure A-12. Initialization of Flow Control 2

There are three INIT FC2 packets which are repeated until both sides acknowledge by going into FC Updates. The Flow Control status of device is periodically updated using "Update FC " packets.


Figure A-13. Flow Control Updates

Flow control updates and SKIPs are continuously repeated. At this time, TLP packets can be inserted anytime to perform data transfers.


Figure A-14. Alternate Display in Listing Format


All bus activities may be viewed in the Symbol listing form which represents the bus data in raw form. In this listing, the SKP (1C) symbol after the COM (BC) identifies the SKIP type ordered set.





    [ Team LiB ]



    No comments: