Hi eapenabrm,
I am using the Arria 10 Dev Kit (
https://www.altera.com/products/boards_and_kits/dev-kits/altera/kit-a10-gx-fpga.html)
Before seeing your suggestion, I was trying to use the reference design out of box so I hadn't tried to build the design. But I was sure that both the device side and the driver side specify the device id as e003. But as we've seen so far, it didn't work out of box.
After seeing your reply, I went into Qsys and saw the "Device Identification Registers" tab, and saw the "Device ID" register (which was set to e003). So I changed it to e093 (see image
https://www.alteraforum.com/forum/attachment.php?attachmentid=14330 ), saved the qsys file, and generated the HDL with default options.
Unfortunately, when I tried to recompile this design with the new Qsys register setting to make this setting effective, the assembler, which seems to be the step generating the sof file, failed and complained the following:
Error (210027): Can't use configuration device EPCQL256 with selected programming mode
(See attachment
https://www.alteraforum.com/forum/attachment.php?attachmentid=14331 )
I am not sure what I did wrong, but the only change was the Device ID register in the qsys file. I was using Quartus Prime Standard Edition 17.0. Could it be because of the version of Quartus? It seem that the Arria 10 reference design was built with 16.0.
Any further suggestion is much appreciated!
--- Quote Start ---
Which kit are you using the Arria V or the Arria 10 Dev Kit? When building the example design, did you notice the PCIe config space registers. They usually have these Vendor ID and DEvice ID registers in it, with the Vendor ID preset to the Altera one and Device ID being 00000 . If this is the case with your design, then you may need to set the appropriate DEvice ID in your PCIe component (E0073 for Arria V / E0093 for Arria 10/ or E001 for default) and build the system again. Program the FPGA on the board. Then in the driver code make sure you use the same Device ID that is in the HW and build the driver again. This way the Device ID will match. Once the Device is enumerated successfully, the BAR registers will get enabled and you should be able to read and write from them, perform DMA etc.
--- Quote End ---