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

Get BAR contents from PCIe ipcore application side

Altera_Forum
Honored Contributor II
771 Views

Hi all, 

 

I want to get the RC (host) give access to the memory on the FPGA board via PCIe. In order to do this the application code running in the FPGA needs to know the contents of the BAR used to access that memory. This is needed because PCIe transaction contains the mapped address as seen from the host. To calculate the memory address as seen by the FPGA I need to subtract the BAR contents from the address in the transaction. 

 

I've googled around and have read the PCIe core documentation but did not find a good way to read the BARs. There is the LMI but the documentation says that one should not use it except for writing AER stuff. 

 

If reading the BAR is complicated (as via LMI) I would also need a signal that the BAR has changed, because the host may change it at any time and to correctly process a transaction I need the actual value. Reading the BAR via LMI for every transaction does not look reasonable. 

 

So how is this supposed to be done? 

 

Thanks, 

harti
0 Kudos
0 Replies
Reply