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.
5988 Discussions

PCIe. How to get BAR address from PCI device.

Altera_Forum
Honored Contributor II
1,310 Views

Hello.  

 

I need absolute address (from BAR) in my device. So, I need a BAR address. I can read this address from PCI config throw lmi bus, and it's worked. But I can't find any signal that BARs is set. Also I'm find that from time from lmi_rden to lmi_ack take a 16 clocks. Why so long? Can I decrease performance PCIe if I will continuously read BAR register?  

 

Thank. Sorry for bad English.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
488 Views

Any BAR is aligned to its natural size. That means in your application, once you have a BAR indication from the PCIe IP you only need to decode the relevant lower significant bits of the address. 

 

For example, consider you have configured your IP to claim a BAR of size 1 MiB. When your PCI device is configured by system software (i.e. operating system and driver), a request to an address in the granted address window will send the request to your IP. In that case you only have to decode the 20 LSBs of the TLP address to know the offset within the granted BAR range. 

 

I see no need to lookup lmi_* together with a full-scale address decoder for the actual assigned physical BAR address if you have BAR indication from the PCIe IP block.
Altera_Forum
Honored Contributor II
488 Views

 

--- Quote Start ---  

Any BAR is aligned to its natural size. That means in your application, once you have a BAR indication from the PCIe IP you only need to decode the relevant lower significant bits of the address. 

 

For example, consider you have configured your IP to claim a BAR of size 1 MiB. When your PCI device is configured by system software (i.e. operating system and driver), a request to an address in the granted address window will send the request to your IP. In that case you only have to decode the 20 LSBs of the TLP address to know the offset within the granted BAR range. 

 

I see no need to lookup lmi_* together with a full-scale address decoder for the actual assigned physical BAR address if you have BAR indication from the PCIe IP block. 

--- Quote End ---  

 

 

A big THANK!
Reply