FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5890 Discussions

Problem on Linux PCI Express driver for an Avalon-MM DMA reference design

Altera_Forum
Honored Contributor II
1,473 Views

Hi I'm Joel 

 

I'm trying to use the PCI Express Avalon-MM DMA reference design (https://www.altera.com/products/reference-designs/all-reference-designs/interface/ref-pciexpress-ava...) but I'm having some troubles with the Linux driver. 

 

 

I'm working on an Ubuntu 14.04 LTS, 64 bits machine. I've already my Stratix V FPGA plugged in the PCI Express port of my computer.  

 

 

Using instructions in the literature (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/an/an690.pdf), I used the command "sudo make" to compile the driver. When I run the "sudo ./install", I keep having the error displayed in "installation_error.png". Though I'm having that error, when typing "lsmod" I see that the module altera_dma is well loaded into the kernel.  

 

 

At this point I'm not sure about how to fix that, I know the problem is that there is no file /dev/altera_dma and because, of that I can't run the user application as depicted by "run_error.png" 

 

 

Please can you help? Do you have any idea of what might be wrong? 

 

 

Best regards
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
270 Views

To fix this I just modified the Device ID. It was initially 0xE003. I changed it to 0xE001 (this one is the default Altera's PCIe Reference Design Device ID). It can also be found in the SoC design when opening QSYS

Altera_Forum
Honored Contributor II
270 Views

Hi Joel, 

 

I am having the same problem with https://www.altera.com/en_us/pdfs/literature/an/an690.pdf, pretty much the same but I am using a Cyclone V.  

 

I can see from the reference design specs the default device ID is the same as you mentioned above: 0xE003. Where exactly did you modify it? In any of the files for the driver/application on the host side? Did you modify it in the QSYS design? 

 

Kind Regards, 

Aidan
Altera_Forum
Honored Contributor II
270 Views

Hey Aidanob 

 

If you go to "altera_dma_cmd.h", at line 6 you'll find 

# define ALTERA_DMA_DID 0xE003. 

 

The Device ID registered in your operating system and the one in the driver code must match. In my case, the device ID of my Stratix V FPGA board was 0xE001 from my operating system standpoint, so I had to modify the default value specified in the driver code. To check what device ID your operating system is seeing you can try doing: 

- lspci 

- cat /proc/bus/pci/devices |grep Altera  

 

"lspci" should give something like: Altera Corporation Device e001 (rev01). That "e001" is your device ID 

 

 

--- Quote Start ---  

Hi Joel, 

 

I am having the same problem with https://www.altera.com/en_us/pdfs/literature/an/an690.pdf, pretty much the same but I am using a Cyclone V.  

 

I can see from the reference design specs the default device ID is the same as you mentioned above: 0xE003. Where exactly did you modify it? In any of the files for the driver/application on the host side? Did you modify it in the QSYS design? 

 

Kind Regards, 

Aidan 

--- Quote End ---  

Altera_Forum
Honored Contributor II
270 Views

Hi Joel, 

 

Thanks for the detailed and clear response! 

 

Kind Rgds, 

Aidan
Altera_Forum
Honored Contributor II
270 Views

Hi Joel, 

 

Thank you for sharing you experience! I am encountering the same problem. The only difference is that I am using a Arria-10 Dev Board.  

I tried to follow your instruction but soon found that the output of lspci shows that I should use 0xE003 as DID. 

# lspci | grep Altera 01:00.0 Non-VGA unclassified device: Altera Corporation Device e003 (rev 01)  

 

May I ask if there's any other step you took between changing the DID and seeing /dev/altera_dma showing up? 

Did you have to unplug/plug the FPGA, and/or reboot the host machine? 

 

Any suggestion is much appreciated! 

 

 

 

 

--- Quote Start ---  

Hey Aidanob 

 

If you go to "altera_dma_cmd.h", at line 6 you'll find 

# define ALTERA_DMA_DID 0xE003. 

 

The Device ID registered in your operating system and the one in the driver code must match. In my case, the device ID of my Stratix V FPGA board was 0xE001 from my operating system standpoint, so I had to modify the default value specified in the driver code. To check what device ID your operating system is seeing you can try doing: 

- lspci 

- cat /proc/bus/pci/devices |grep Altera  

 

"lspci" should give something like: Altera Corporation Device e001 (rev01). That "e001" is your device ID 

--- Quote End ---  

Altera_Forum
Honored Contributor II
270 Views

Hello,  

 

I have the same issue. Is there any workaround btw?  

 

Best Regards
Reply