An Alternate Protocol negotiation (APN) can be understood as a non-PCIe protocol that makes use of the PCIe PHY layer. It may be chosen to run the PCIe protocol in addition to one or multiple alternate protocols in the alternate protocol mode. This is negotiated by the link partners during Configuration LTSSM states while communicating their own capabilities with each other. For the CXL protocol, the same outline is utilized to bring the link up in CXL mode.
A Downstream Port (DSP) that supports Alternate Protocol Negotiation will start the negotiation process when it first enters Configuration.Lanenum.Wait, LinkUp = 0, and Modified TS Usage Mode Selected field is 010b. Modified TS1/TS2 Ordered Sets are exchanged during Alternate Protocol negotiation with Modified TS Usage = 010b. The DSP is responsible for ensuring that they arrive at a consensus on the Alternate Protocol Negotiation prior to transitioning to Configuration.Complete substate. It is permitted to fall back to PCIe protocol if the Alternate Protocol Negotiation does not arrive at a conclusion. On a successful negotiation to alternate protocol, the Link moves to L0 at 2.5 GT/s, switches the data rate to the higher data rates, performs equalization, if needed and enters L0 at the desired highest data rate.
Bit 10 Modified TS Usage Mode 2 Supported - Alternate Protocol - This bit indicates that this Port supports negotiating to use alternate protocols (Modified TS Usage 010b).
It is a two-phase process that occurs while in Configuration.Lanenum.Wait, Configuration.Lanenum.Accept, and Configuration.Complete before entering L0 at Gen1 speed. The capabilities between Host and Device is communicated using modified ordered sets, modTS1 and modTS2.
In Phase 1, Downstream Port (DSP) and Upstream Port (USP) advertise their Flex Bus capabilities by sending stream of modified TS1 ordered sets. During this time, it is important for both the link partners to support the alternate protocol. In Phase 2, the DSP sends a stream of modified TS2 Ordered Sets to the USP to indicate the negotiated capabilities which are nothing but whether the link should operate in PCIe mode or in CXL mode; for CXL mode, it also specifies which CXL protocols and features to enable and whether to operate in 1.1 or 2.0 mode. The USP acknowledges by sending modified TS2 Ordered Sets with the same Flex Bus enable bits set. This exchange occurs during Configuration.Complete.
CXL alternate protocol negotiation successfully completes only after the Downstream Port has confirmed that the Flex Bus enable bits reflected in the eight consecutive modified TS2 Ordered Sets it receives that causes the transition to Configuration.Idle match what it transmitted; otherwise, the Downstream Port logs an error in the Flex Bus Port Status register and the physical layer LTSSM returns to Detect.
After the link is successfully up in CXL mode with the common negotiated capabilities, it reaches L0 state at Gen1 speed, for it to function it should achieve speed of atleast 8GT/s. Because if the CXL link up happens but speed is less, then link will fail and go to Detect state. The capabilities logged in Flex Bus Port Control register and the capabilities communicated by exchange of modified TS1/TS2 ordered sets must be consistent.
Cadence Simulation VIP for CXL provides full support on APN to CXL mode, certain configurations in terms of soma parameters and register values can be programmed through testbench for testing scenarios. It is supported to test the resultant negotiation result when one or more capabilities are supported in either one of them only. VIP makes sure to test the basic requirements like CXL.io support while APN process. In case it captures incorrect and unrecoverable error, concludes the APN result as PCIe only depicting with this configuration programming, CXL cannot be brought up.
For more information:
- For more info on how Cadence CXL Verification IP and TripleCheck VIP enable users to confidently work in CXL, see our VIP for PCI Express, VIP for Compute Express Link and TripleCheck for PCI Express
- See the CXL consortium website for more details on CXL in general.