cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
johnfuhrer
Visitor
Visitor
6,315 Views
Registered: ‎06-05-2009

SDK issue with AXI Ethernet and multiple DMA controllers on ISE 13.1

Hi all, I'm using 13.1 targeting a Virtex 6.

 

Just wanted to share a problem I found when I created an EDK AXI microblaze project with AXI Ethernet and multiple DMA controllers.

 

As you all know, when you create the project with system builder and add AXI Ethernet, it also adds and connects a dma controller named "dma_ETHERNET". I also needed extra dma channels so I added two more axi_dma IP cores, which by default get named "axi_dma_0" and "axi_dma_1".

 

So far so good. You export the design to SDK, and when you create a BSP (in my case a xilkernel based with lwip130 and xilmfs) you will see in "xparamters.h" that your DMA devices have their device IDs assigned according to alphabetical order. Thus, unless you re-name your DMA IP cores in EDK, given the default names, "axi_dma_0" will get assigned device ID 0.

 

This should not be a problem, BUT: when you include lwip130 (I'm using version 3.00.a), you will run into a problem which got me busy for a while to find out. Your ethernet will not work because the lwip library will be trying to use the wrong DMA controller.

 

If you look into "lwip130_v3_00_a/src/contrib/ports/xilinx/netif/xaxiemacif_dma.c", in function "init_axi_dma" at line 631 you will see: DMAConfig = XAxiDma_LookupConfig(XPAR_AXIDMA_0_DEVICE_ID);

 

So it always tries to use whatever DMA core is assigned to device ID 0.

 

Solution: if you need to use ethernet and additional DMA engines, make sure you re-name your ethernet DMA core so that it is first in alphabetical order (this is how I got it to work).

 

Suggestion to Xilinx: I think a better solution would be if the information of which DMA device is associated with your ethernet core was exported to SDK so that some other define in xparameters would hold that information in a more generic way, and lwip would use that define instead of hardcodedly use XPAR_AXIDMA_0_DEVICE_ID.

 

Regards,

John

5 Replies
mati@logtel.com
Observer
Observer
6,111 Views
Registered: ‎03-12-2012

Thanks John,

I have the same issue with Kintex7 on the KC705 board with 13.4 and lwip140.

It took me over a day to find what is the problem, you saved me the other half of the work - finding a solution.

 

for Xilinx a faster solution would be to just export the dma selection to the top level were you can choose which dma to use instead of the hard coded option.

And offcorse to add a note on the function call: "please make sure you use the correct dma channel".

another solution would be to use the defalut name of the ethernet dma channel ie XPAR_ETHERNET_DMA_DEVICE_ID instead of general XPAR_AXIDMA_0_DEVICE_ID.

 

Mati

0 Kudos
leonzyz_bupt
Visitor
Visitor
5,629 Views
Registered: ‎12-10-2012

thank you very much
I changed the code in lwip , and changed it's make file (I don't know how to rebuild bsp in SDK gui...), rebuild the lwip4.a , It works fine now.

0 Kudos
sgeorgi_sen
Explorer
Explorer
3,984 Views
Registered: ‎04-07-2014

Hi all,

 

this problem remains in Vivado 2014.4. The DMA's DEVICE_ID is fixed to 0 in the lwip code.

 

xaxiemacif_dma.c: DMAConfig = XAxiDma_LookupConfig(XPAR_AXIDMA_0_DEVICE_ID);

As soon as a second dma device is used it may get DEVICE_ID=0 leading to software malfunction as soon as network is initialized.

 

Is the DEVICE_ID assigned through alphabetical ordering? At least it worked for me to assign the other dma component a name behind axi_ethernet in alphabetical order.

 

Regards,

Sebastian

0 Kudos
adyer2
Observer
Observer
2,210 Views
Registered: ‎02-06-2012

Issue still exists in 2016.4.

0 Kudos
htsvn
Xilinx Employee
Xilinx Employee
2,185 Views
Registered: ‎08-02-2007

hi,

 

a change request has been filed against LWIP. The CR ID is CR-988210

 

--hs

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos