FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
6673 Discussions

PCIe with DMA Memory Sizing

Aflop
New Contributor I
1,232 Views

Background :

I am currently using the Arria 10 GX Devkit in preparation for a similar custom board. I have adapted the PCIe Avalon-MM DMA example which Intel provides and come up with a custom design which fits my needs in the moment. I am using Quartus 19.3 pro.

 

Problem :

The memory sector sizes which are returned when I run 'lspci' do not match those which I set in Platform Designer. 

I have attached "pd_component" which shows the overall design of the platform designer component. 

I have also attached "lspci_output" which shows what the command returns when the devkit is slotted in. 

The table below shows the settings I input into platform designer and the lspci reported size

Bar#Data WidthTotal Memory(B)BaseEndlspci
232320000x00000x7cff32K
3850000x80000x938764K
43240000xa0000xaf9f64K
525610240xb0000xb3ff64K

 

Question :

How to I ensure the 'lspci' command returns the correct sizes of these memory sectors?

 

Thank you for your help.

Labels (1)
0 Kudos
7 Replies
RongYuan
Employee
1,155 Views

Hi,

The BAR2 requires 32KB so that size is assigned to this BAR.

Though BAR3 requires only 5KB, a 64KB is assigned to this BAR because of the END addr 0x9387. Similar situation to BAR4 and BAR5.


Regards,

Rong


0 Kudos
RongYuan
Employee
1,089 Views

Any further questions?


0 Kudos
Aflop
New Contributor I
1,057 Views

I need the lspci command to return the correct sizes of the memory BARs. Lets say I have 3 memory regions of 4KB how would I align these in memory such that lspci returns 4K for their respective sizes?

0 Kudos
RongYuan
Employee
1,030 Views

For these 3 BARs, you assign addr 0x0-0xfff each in qsys.


Regards,

Rong


0 Kudos
Aflop
New Contributor I
980 Views

Assigning the address 0x0-0xfff for each on-chip RAM will result in an error because you are mapping 3 different RAM modules to the same memory region. Attached is a picture of the error. 

To clarify there is a previous project which has different memory modules mapped to different regions and the lspci command returns the correct sizing of these BARs, i.e. there is a 4K BAR not mapped to 0x0-0xfff. Unfortunately this project was done in AHDL and I do not have the time to decode it. 

0 Kudos
RongYuan
Employee
889 Views

If you want multiple Bars to access one on-chip mem, please try AVMM Pipeline Bridge IP. You can define your address width there.


Regards,

Rong


0 Kudos
Aflop
New Contributor I
787 Views

This is not the accepted solution. I already have multiple BARs. I never said I wanted them to access one on-chip mem. Maybe it is the accepted solution for YOUR problem but it is not what I asked.

I have multiple BARs access multiple on-chip Mem and it is working fine other than the lspci command does not reflect the correct size. I have moved on to other problems of more importance now. When I have time to investigate this again I will.  

0 Kudos
Reply