Cyclone V Avalon-MM Interface for PCIe Root Port Questions
I have some questions with regards to the use of the Cyclone V Avalon-MM Interface for PCIe, used as a root port.
I have a pretty good understanding of PCIe. I have implemented PCIe endpoints in FPGA fabric before, but this is my first root port implementation in FPGA fabric.
The documentation with regards to the use of the Cyclone V Avalon-MM Interface for PCIe, when used as a root port, is fairly lacking in my opinion. I have a bunch of questions with regards to its use, but I will try to start with a few more basic ones.
But first, I will supply some more details about my configuration.
I am using a Cyclone V SoC with the Cyclone V Avalon-MM Interface for PCIe, configured as a root port, 2 lane, Gen1 device.
The PCIe endpoint connecting to the root port is another FPGA device, 2 lane, Gen2. This will be the only endpoint device used. This helps bound the problem to a certain extent, as I will not need to support any type of endpoint device.
The root port device will be the only device performing memory reads and writes to the endpoint. The endpoint will not be performing any memory reads or writes to the root port. (In other words, the root port will always the requester in the endpoint will always be the completer.)
The root port device will only be performing memory reads and writes to the endpoint BAR space.
On to my first round of questions.
What parts of the PCIe protocol stack does the IP perform, when configured as a root port? I can see that it takes care of the physical and link layers, but how much of the transaction layer is covered? I suppose my question, more specifically, is what do I need to submit to the IP? Do I need to supply a complete TLP, along with TLP header, payload, etc.?
Does the IP, when configured as a root port, perform any transaction level configuration, e.g. send any configuration TLPs?
Is the only way to send TLPs is through the root port TLP data registers? Or can the Avalon-MM bridge (Txs) be used to submit TLPs? If the Avalon-MM bridge can be used, how would you send Configuration TLPs? More specifically, what is the Avalon-MM address which would be used? Is there a translation table which needs to be used? Where would this translation table be located?
It looks to me like the transaction level configuration will need to be done by my custom logic. I will need to do bus enumeration, along with pulling the configuration of the endpoint. I just need to know how to interact with the PCIe root port IP in order to do this.
Thanks in advance.