Forum Discussion

xingyunzhidi's avatar
xingyunzhidi
Icon for New Contributor rankNew Contributor
1 month ago

A question about reading the configuration space of the R-Tile PCIe IP EP

Hello,

Recently, I generated an EP device using the R-Tile PCIe IP, and I would like to access the configuration space of the EP device through the Hard IP Reconfiguration Interface.

  1. However, I found that the addresses of the configuration registers described in the R-Tile Avalon® Streaming FPGA IP for PCI Express* User Guide do not match those in the rtile-avst-ip-for-pcie-registermap.xlsx. For example, the User Guide mentions the address for the MSI-X Capability Structure for PF0 as 0x002100B0, while the .xlsx file states it is 0x000800B0.
  2. Shouldn't the PCIe configuration space be 4KB? Why are 16-bit address lines being used to access the configuration space?
  3. Given that the read data width is 8 bits, does a value of a configuration register (32 bits) need to be read four times to be obtained?
  4. If I want to know the bus number and device number of the EP device in the user logic, can I directly obtain these from the configuration registers?

Thank you!

Recently, I generated an EP device using the R-Tile PCIe IP. I would like to access the configuration space of the EP device through the Hard IP Reconfiguration Interface. However, I found that the addresses of the configuration registers described in the R-Tile Avalon® Streaming FPGA IP for PCI Express* User Guide do not match those in the rtile-avst-ip-for-pcie-registermap.xlsx. For example, the User Guide mentions the address for the MSI-X Capability Structure for PF0 is 0x002100B0, while the .xlsx file states it is 0x000800B0. Additionally, shouldn’t the PCIe configuration space be 4KB? Why are 16-bit address lines used to access the configuration space? Furthermore, if I want to know the bus number and device number of the EP device in the user logic, can I directly obtain them from the configuration registers?

Thank you!

5 Replies

  • VenT_Altera's avatar
    VenT_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi xingyunzhidi 

    Thank you for reaching out.
    Allow me some time to look into your issue. I shall come back to you with findings.

    Thanks.
    Best Regards,
    Ven 

  • VenT_Altera's avatar
    VenT_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi xingyunzhidi,

    Thank you for your patience.

    Please see my responses below to address your questions.
    1. I believe you referred to the x16 Register Map. There may be a typo in the Example illustration in the user guide. Please refer to the Register Map excel sheet for the reconfiguration address, i.e. 0x000800B0 for PF0 MSI-X Capability Structure Register.
    2. Yes, the PCIe Configuration Space is 4KB per function. 16-bit address is used to support the PFs.
    3. Yes, since the readdata is 8 bits wide, you need four times read operations to obtain the 32-bit register value.
    4. No. The BDF information is not stored in the PCIe Configuration Space Register. The BDF is managed by the host. You may find bus number information (not the full BDF) in Type 1 Configuration Space Header if you configure the R-Tile PCIe IP to RP. Please refer to the PCIe Base Spec for details.

    I hope this addresses your questions. Please let me know if you have any concerns.

    Thanks.
    Best Regards,
    Ven 

  • VenT_Altera's avatar
    VenT_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi xingyunzhidi,

    I hope you are doing well.
    Please let me know if you have any further questions regarding my previous reply.

    Thanks.
    Best Regards,
    Ven 

  • VenT_Altera's avatar
    VenT_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi xingyunzhidi 

    We have not received any response from you regarding the previous answer I provided. I will step back and allow the community to assist with any future follow-up questions. If you have a new question, feel free to open a new thread to get support from Altera experts.  

    Thank you for engaging with us!

    Thanks.
    Best Regards,
    Ven