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

How does Qsys compute BAR sizes for Avalon-MM PCIe?

corestar
New Contributor I
1,355 Views

I'm attempting to use the "Avalon-MM Cyclone V Hard IP for PCI Express" core. I created an example design modeled after:

 

C:\intelFPGA_lite\19.1\ip\altera\altera_pcie\altera_pcie_cv_hip_avmm\example_designs\ep_g1x1.qsys

 

It has the following BAR but I can't figure out where it gets the sizes.

bar0.jpgbar1.jpg

The user guide says:

param.jpg

What parameters? There is nothing else in the ep_g1x1.qsys that matches those sizes? 

And in my own attempt (see attached), it says:

my_bar.jpg

 

The root complex sees the FPGA, but sees 0 sizes for the BAR's.

0 Kudos
1 Solution
FvM
Honored Contributor II
1,307 Views
Hi,
BAR sizes are defined by the address map. Review chapter "Minimizing BAR Sizes and the PCIe Address Space" in Cyclone V AVMM for PCIe user manual.

View solution in original post

6 Replies
corestar
New Contributor I
1,315 Views

Partially figured it out myself. It's apparently not allowed to export the Rxm_BARX and Txs buses. It's clumsy, but I created Avalon to External Bus Bridge to connect to the Rx buses and an "External Bus to Avalon Bridge" for the Tx bus. The BAR sizes match the address sized in the bridge.

Still does not explain the example ep_g1x1.qsys where BAR0 is connected to a 4 KB block RAM and yest has a size of 4 MB.

 

0 Kudos
FvM
Honored Contributor II
1,308 Views
Hi,
BAR sizes are defined by the address map. Review chapter "Minimizing BAR Sizes and the PCIe Address Space" in Cyclone V AVMM for PCIe user manual.
corestar
New Contributor I
1,279 Views

Ok, I see. For my example, it automatically computed the address map based on the slaves attached to the BARs.

 

In the ep_g1x1.qsys example, they must have manually entered them:

 

address_map.jpg

 

The nearest power of 2 greater than 0x201000 is 22 to get the 4 MB for BAR0. Same for BAR2 with 2^15 being lowest power of 2 greater than 0x402F.

Thanks

0 Kudos
Wincent_Altera
Employee
1,270 Views

Hi,

 

Thanks FvM for helping on that, So do you still have any further question on this forum ?

Regards,
Wincent_Intel

0 Kudos
Wincent_Altera
Employee
1,222 Views

Hi

 

We have not hear from you and this Case is idling. It is not recommended to idle for too long.

Therefore following our support policy, I have to put this case in close status. My apologies if any inconvenience cause

Hence, This thread will be transitioned to community support.

If you have a new question, feel free to open a new thread to get support from Intel experts.

Otherwise, the community users will continue to help you on this thread. Thank you

If your support experience falls below a 9 out of 10, I kindly request the opportunity to rectify it before concluding our interaction. If the issue cannot be resolved, please inform me of the cause so that I can learn from it and strive to enhance the quality of future service experiences. 

 

Regards,

Wincent_Intel


0 Kudos
corestar
New Contributor I
1,191 Views

@Wincent_Altera 

 

Sorry, I see you asked if I have any further questions. Not at the moment. @FvM answered the main question. I've decided not to use the Avalon-MM PCIe and am using the Avalon-ST interface instead.

 

Thanks,

 

0 Kudos
Reply