Forum Discussion

lcy2000's avatar
lcy2000
Icon for New Contributor rankNew Contributor
12 months ago

Arria 10 PCIe Retraining with LMI with Configuration Space Bypass Enabled

Hello,

We are working on a PCIe Root Port with Arria 10 GX1150. And the Quartus version is 22.4. Currently the downstream device is a X520 (intel 82599) 10gigabyte ethernet adapter, capable of PCIe Gen 2 x 8.

The link has established at Gen1 x 8, smoothly. And after reading the Arria 10 Avalon-ST Interface User Guide, I understand that upgrading the PCIe link requires a explicit write to Link Control register in PCIe Capability.

Since we are using Configuration Space Bypass, perhaps the only chance to do so is to drive the LMI interface. And I set up a Singal Tap on ltssmstate[4:0] with a trigger of LTSSM Recovery States, as the retraining should be on.

But after I write bit 5 of Link Control register through LMI, nothing happens. Signal Tap is not triggered, and the retraining bit remains zero. And I have checked "Target Link Speed" field, it has a POR value of 3 (Gen 3) on root port side and 2 (Gen 2) on downstream EP.

My question is that is there any other pieces I'm missing to upgrade the PCIe link?

Thank you very much for handling this ticket.

9 Replies

  • Wincent_Altera's avatar
    Wincent_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi,

    The link has established at Gen1 x 8, smoothly.
    >> is the pcie able to enumerate in the host ? LTSSM = L0 stage ?

    But after I write bit 5 of Link Control register through LMI, nothing happens. Signal Tap is not triggered, and the retraining bit remains zero.
    >> can I know any specific signal you mentioned ?
    >> or you the whole stp is "waiting for trigger" May I know which input clock that you currently using ?
    >> if in "waiting for trigger" perhaps you can try to change your input clock as "pld_clk" as per mentioned in the user guide
    >> https://cdrdv2-public.intel.com/705404/ug_a10_pcie_avst-17-0-683647-705404.pdf



    If you are targeted Arria 10 RootPort design, I suggest you to try out our example design
    https://www.rocketboards.org/foswiki/Projects/Arria10PCIeRootPortWithMSI

    Regards,
    Wincent

    • lcy2000's avatar
      lcy2000
      Icon for New Contributor rankNew Contributor

      Hi Wincent,

      Nice to meet you again. Last time I raised a ticket for Arria 10 DevKit FMC PERST problem. It seems like our solder mods works fine regarding PHY RESET. Thank you again

      Sorry for my vague description. To clarify your questions:

      • Is the pcie able to enumerate in the host ? LTSSM = L0 stage ?

      >> Yes, after initial link, LTSSM settled on L0 (0xF), which is good. We are able to do enumeration with no error, through AVST interface to downstream device.

      • Can I know any specific signal you mentioned ?

      >> I have set up a trigger on LTSSM=0xc (Recovery.Rcvlock) , but it did not trigger. I also used signal tap transitional mode to capture the whole LTSSM transistion from reset to some time after writing Link Retraining bit. It shows that it remains on 0xF (L0) after initial link has established. And recovery states are never reached.

      • Which input clock that you currently using ?

      >> I use coreclkout_hip for signal tap input clocking, which is the same clock for pld_clk as recommended in UG.

      Further, I would like to ask:

      1. Is LMI intended for retraining when CfgBp is enabled? I have read the golden example from rocketboards in our last threads. I believe it is not well suited, because of CfgBp.

      2. I also read about Autonomous Speed Change logic (altpcie_sc_*.v) through Hard IP Dynamic Reconfig. Look like it never touched LMI somehow. Does it provides another option to do link upgrading?

      Best regards,

      Chenyang

      • Wincent_Altera's avatar
        Wincent_Altera
        Icon for Regular Contributor rankRegular Contributor

        Hi Chenyang,

        Okay, I recall the case you file, glad that you have the solution.
        thanks for sharing with me how you able to resolve it

        Sorry for my vague description. To clarify your questions:

        • Is the pcie able to enumerate in the host ? LTSSM = L0 stage ?

        >> Yes, after initial link, LTSSM settled on L0 (0xF), which is good. We are able to do enumeration with no error, through AVST interface to downstream device.
        --> okay sound good, Are you using our example design ? if Yes , May I know which design that you are using ? AVST ?
        --> or this is custom design ?

        • Can I know any specific signal you mentioned ?

        >> I have set up a trigger on LTSSM=0xc (Recovery.Rcvlock) , but it did not trigger. I also used signal tap transitional mode to capture the whole LTSSM transistion from reset to some time after writing Link Retraining bit. It shows that it remains on 0xF (L0) after initial link has established. And recovery states are never reached.

        --> How was other signal ? in this cases I suspect other signal might interrupt the signal captured.
        --> using transitional is just fine, perhaps you can set other signal rather than ltssm as "dont care".
        --> or set the ltssm signal as "dont care" so that you can monitor overall of the link up flow including "0xc"

        • Which input clock that you currently using ?

        >> I use coreclkout_hip for signal tap input clocking, which is the same clock for pld_clk as recommended in UG.

        --> okay that sound fine, as long as you can capture the signal instead of "waiting for trigger"

        Further, I would like to ask:

        1. Is LMI intended for retraining when CfgBp is enabled? I have read the golden example from rocketboards in our last threads. I believe it is not well suited, because of CfgBp.
        --> to be honest, I never implement LMI with CfgBP before. But I can lay down some of my suggestion based on my own understanding. Hope that can be a good reference for you
        --> The Local Management Interface (LMI) is used to access and control various configuration and status registers within the PCIe Hard IP. It allows for reading and writing to these registers, enabling fine-grained control over the PCIe link and its parameters.
        --> The Configuration Bypass (CfgBp) feature allows the user to bypass the automatic configuration of certain PCIe parameters and instead manually configure them through the LMI. This can be useful for custom configurations or for debugging purposes.

        --> When CfgBp is enabled, the automatic configuration of certain PCIe parameters is bypassed, and the user must manually configure these parameters using the LMI. This includes tasks such as setting the link width, speed, and other configuration settings.

        --> as following above , LMI is intended use in retaining the PCIe link when CfgBP is enable, with that you can manually configure the PCIe link parameter and initiate the retraining process.

        2. I also read about Autonomous Speed Change logic (altpcie_sc_*.v) through Hard IP Dynamic Reconfig. Look like it never touched LMI somehow. Does it provides another option to do link upgrading?
        --> I dont get your question, what upgrading that you are referring ? speed upgrade or width ?

        Regards,

        Wincent

  • Wincent_Altera's avatar
    Wincent_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi,

    I wish to follow up with you about this case.

    Do you have any further questions on this matter ?

    ​​​​​​​Else I would like to have your permission to close this forum ticket. Nevertheless, you can still response to the forum and I will be available to assist you.

    Regards,

    Wincent_Altera

    p/s: If any answer from the community or Altera Support is helpful, please feel free to give the best answer or rate 9/10 survey.


    • lcy2000's avatar
      lcy2000
      Icon for New Contributor rankNew Contributor

      Hi Wincent,

      Sorry for delay this week. We are still checking the SI issues on our side. It is ok to close this case, which I believe is unrelated.

      Thank you very much for your patience

      Best regards,

      Chenyang

      • Wincent_Altera's avatar
        Wincent_Altera
        Icon for Regular Contributor rankRegular Contributor

        Hi ChenYang,

        Thanks for your confirmation, If you seeing any issue related to IP / FPGA. feel free to file a new thread.
        We will be there to help out.

        Hence, I will transitioned this thread to community support.

        If you have a new question, feel free to open a new thread to get support from Altera experts.

        Otherwise, the community users will continue to help you on this thread. Thank you

        If your support experience falls below a 9 out of 10, I kindly request the opportunity to rectify it before concluding our interaction. If the issue cannot be resolved, please inform me via this forum page of the cause so that I can learn from it and strive to enhance the quality of future service experiences.

        Regards,

        Wincent_Altera

        p/s: If any answer from the community or Altera Support is helpful, please feel free to give the best answer or rate 9/10 survey.