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

Bug in V-Series Avalon-MM DMA for PCI Express: port size mismatch->wrong data read

Altera_Forum
Honored Contributor II
838 Views

I was testing the sample (http://www.alterawiki.com/wiki/reference_design:_gen2x4_avmm_dma_-_arria_v) in the wiki in my Arria V starter kit, and tweaking a little the parameters (enabled bursting in BAR2) and initializing the onchip memory with some data. 

 

I noticed that in the host PC, with a small Linux driver, half of the data read from the PCI bus memiory was repeated: of every 256 bytes, the second half was repeated from the first half. 

 

The cause appeared when trying to run a simulation (lesson learned: always generante simulation files in Qsys and at least load the simulation), Modelsim complained with a compilation error. HPRxmReadData_i and other ports had inconsistent sizes (128 in Verilog Source, and 256 in the code generated by QSys). 

 

The fix : in the file <quartus installation dir>\ip\altera\altera_pcie\altera_pcie_hip_256_avmm\pcie_256_avmm_port.tcl , look for the procedure add_pcie_hip_port_avmm_hprxmaster and change  

 

set rxm_data_width 256 

 

by  

 

set rxm_data_width [ get_parameter_value DMA_WIDTH ] 

 

Hope this helps 

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
101 Views

Hi Ramon, Thank you for sharing this finding, indeed true in v15.0 theparameter rxm_data_width was fixed to 256.

Altera_Forum
Honored Contributor II
101 Views

 

--- Quote Start ---  

I was testing the sample (http://www.alterawiki.com/wiki/reference_design:_gen2x4_avmm_dma_-_arria_v) in the wiki in my Arria V starter kit, and tweaking a little the parameters (enabled bursting in BAR2) and initializing the onchip memory with some data. 

 

I noticed that in the host PC, with a small Linux driver, half of the data read from the PCI bus memiory was repeated: of every 256 bytes, the second half was repeated from the first half. 

 

The cause appeared when trying to run a simulation (lesson learned: always generante simulation files in Qsys and at least load the simulation), Modelsim complained with a compilation error. HPRxmReadData_i and other ports had inconsistent sizes (128 in Verilog Source, and 256 in the code generated by QSys). 

 

The fix : in the file <quartus installation dir>\ip\altera\altera_pcie\altera_pcie_hip_256_avmm\pcie_256_avmm_port.tcl , look for the procedure add_pcie_hip_port_avmm_hprxmaster and change  

 

set rxm_data_width 256 

 

by  

 

set rxm_data_width [ get_parameter_value DMA_WIDTH ] 

 

Hope this helps 

 

--- Quote End ---  

 

 

Thanks for sharing this.
Altera_Forum
Honored Contributor II
101 Views

Hi ramon_garcia, 

 

Thanks for the resolution. It is helpful.
Reply