I am using a Cyclone IV GX FPGA with the integrated PCIe Hard-IP.
The FPGAs PCIe is connected to an ARMv7 CPU running Linux.
In the FPGA Design (with Platfromdesigner) the PCIe Hard-IP's Avalon txs Slave Port and multiple Avalon Master Bars are used.
Two DMA controllers inside the FPGA write Data to the CPUs RAM via the txs Port. And the CPU has read/write access to the Avalon Slaves via the bars.
Now i have the problem of arbitration/priorities between txs and bar ports. After reading the IP Compiler for PCIe Userguide, I still have no clue which port has a higher priority (also priorities between different bars would be interessting).
In my application the txs should have the lowest priority, so that the DMAs get throttled. As result a low latency read/write to bars should be possible.
I read about PCIe's Virtual Channels, but as far as I know the Cyclone IV does only support one Virtual Channel, so no solution?
Is there any way to setup arbitration/priorities between PCIe txs and bars:
- Using PCIe Configurationspace (Config of FPGA Endpoint / CPU Rootport?
- Adding Arbitration mechanism in Platform Designer between txs and Bars?
Thanks in advance!
Thanks for your answers.
Currently, the Cyclone IX GX PCIe Hard IP does not offer a feature to lower prioritize the txs. Instead, I will recommend to use the tx_ws signal which creates a DLLP transmission priority. Please check if this can be useful to your application.
You may refer to Pg B-22 (Figure B-19) in following user guide for some reference on using the tx_ws signal.
I am using the QSYS/Platformdesigner method. So i think i won't be able to use the tx_ws at all?
As explained above, one method is to use the tx_ws signal. Alternatively, you can use software to specify priority on servicing requested interrupts and use interrupts.
As for using config space or arbitration on the interface to specify priority, this has not be implemented or tested using our Hard IP before. Hence, its feasibility and implementation challenges is unknown.
Currently the design is using two datapaths:
- time critical: One datapath issues a MSI with an interval of x kHz => the isr handler fetches data from bar0.
- lower priority: Two DMA controllers in the qsys design write/read data to the host memory over the txs port and issue MSIs when they are finished.
The issue is that reading data from the isr handler via bar0 gets delayed by the concurrently access of the DMA controllers. I also think that the MSIs requests will get delayed?
How could tx_ws help me in this design?