FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP

PCIe Completion ID

Altera_Forum
Honored Contributor II
1,731 Views

I am implementing a PCIe endpoint with the Altera IP. I need to know the endpoint's Completer ID to send it back in the descriptor of read completions. On other core's I've worked with this was output from the PCIe Core so you could see the ID after enumeration, although I find no documentation to that effect. 

 

How can I determine my ID? 

 

Thanks, 

rdburns
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
678 Views

Do I need to drop in altpcierd_tl_cfg_sample.vhd from the example design to pull the bus and device number out of the configuration space?

0 Kudos
Altera_Forum
Honored Contributor II
678 Views

 

--- Quote Start ---  

I am implementing a PCIe endpoint with the Altera IP. I need to know the endpoint's Completer ID to send it back in the descriptor of read completions. On other core's I've worked with this was output from the PCIe Core so you could see the ID after enumeration, although I find no documentation to that effect. 

 

How can I determine my ID? 

 

Thanks, 

rdburns 

--- Quote End ---  

 

 

As far as I know (but I think there will be another way to do it) you have to determine it by having a look at the control menu (windows) or use lspci (Linux). The ID consists of the bus number (7:0), the device number (4:0) and the function number (2:0) (see PCIe Spec). Thats the manual way if you, like me, doing some kind of prototyping. If you want to use you're card in different systems I would suggest doing it this way: 

Let the driver send the ID to your fpga or write it in the memory and let the fpga read the memory. 

 

I have to admit I'm relativly new to the topic, so correct me if I'm wrong/ theres a much more efficient way.
0 Kudos
Altera_Forum
Honored Contributor II
678 Views

I think the proper way is to drop in altpcierd_tl_cfg_sample.vhd, you can then get the bus and device number as an output from that port. Seems to work properly in simulation. 

 

Thanks,
0 Kudos
Reply