Forum Discussion
pcie for dummies
Hello to all.
I would need a text on the fundamentals of the PCIe. I would like to study the concepts of Endpoint, Root, and Protocol. I'm using the example hip_cvgt_g2_x4_avmm_dma128_1602.qar, downloaded from the altera's site, but I do not understand what should I change in order to read and write on the PCIe my custom data (from other logic FPGA). Can you help me? Regards, Luca12 Replies
- Altera_Forum
Honored Contributor
I've only worked with PCIe on Arria 10 but I assume the PCIe hard IP core is set up the same on Cyclone V. The easiest way to generate interrupts is to use the legacy interrupt capability. The MSI stuff is complicated. To enable legacy interrupts go into the Avalon-MM settings tab for the PCIe core in Qsys and check the box for "Export MSI/MSI-X conduit interfaces". Doing that exposes some new ports on the PCIe block. The signals you're interested in are intx_req and intx_ack. To generate an interrupt you will assert the intx_req line. The core then asserts intx_ack when the interrupt packet has been sent to the root port (PC). Software (on the PC) also has to change a bit in a register in the endpoint configuration space to enable the legacy interrupt generation. If intx_ack is not asserted after you assert intx_req then you don't have interrupts enabled. You can read about all of this in the user guide for the PCIe hard IP block. Just search for "legacy interrupts" in the pdf.
I assume you have PCIe transfers working between the end point and PC and just need to get interrupts working. If you don't even have PCIe transfers working then you need to get technical help from Altera or someone else. - Altera_Forum
Honored Contributor
Hi rsefton. I'm not skill with pcie.
Can you explain me if i must use the avalonst or avalonmm examples? And can you explain me if for my project is better to use a internal memory example or a external sdram example? The idea is: 1) the board generates 64kB of data 2) the board send with dma 64kB to sdram of PC 3)the board checks if. Dma is complete (is possible?) 4)the board send interrupt to pc. 5)the pc read 64kB of data from pc sdram. 6) the pc executes a dma write to board for inform it to send another 64kB of data