cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
simozz
Mentor
Mentor
1,164 Views
Registered: ‎05-14-2017

AXI DMA SG - Bypass S2MM to MM2S

Jump to solution

I am trying to use an AXI Ethernet Subsystem with AXI DMA to stream out data from PL.

For this purpose I am using 2 AXI DMA as shown below:

Screenshot_2020-09-03_10-48-15.png

axi_dma_0 writes data from PL to DDR.

axi_eth_dma_0 is the AXI Ethernet Subsystem's dedicated DMA.

My goal is to forward the data written into DDR from axi_dma_0 S2MM channel to the AXI Ethernet Subsystem using, of course, axi_eth_dma_0 MM2S channel.

For this purpose I have set the following setup:

Screenshot_2020-09-03_10-55-35.png

sg_s2mm_reg[0] address = 0x60000000
sg_s2mm_reg[0][NXTDESC] = 0x60000040
sg_s2mm_reg[0][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[0][BUFFER_ADDRESS] = 0x64000010
sg_s2mm_reg[0][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[0][CONTROL] = 0x00000400

sg_mm2s_reg[0] address = 0x70000000
sg_mm2s_reg[0][NXTDESC] = 0x70000040
sg_mm2s_reg[0][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[0][BUFFER_ADDRESS] = 0x64000000
sg_mm2s_reg[0][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[0][CONTROL] = 0x00000410

sg_s2mm_reg[1] address = 0x60000040
sg_s2mm_reg[1][NXTDESC] = 0x60000080
sg_s2mm_reg[1][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[1][BUFFER_ADDRESS] = 0x64001010
sg_s2mm_reg[1][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[1][CONTROL] = 0x00000400

sg_mm2s_reg[1] address = 0x70000040
sg_mm2s_reg[1][NXTDESC] = 0x70000080
sg_mm2s_reg[1][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[1][BUFFER_ADDRESS] = 0x64001000
sg_mm2s_reg[1][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[1][CONTROL] = 0x00000410

sg_s2mm_reg[2] address = 0x60000080
sg_s2mm_reg[2][NXTDESC] = 0x600000c0
sg_s2mm_reg[2][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[2][BUFFER_ADDRESS] = 0x64002010
sg_s2mm_reg[2][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[2][CONTROL] = 0x00000400

sg_mm2s_reg[2] address = 0x70000080
sg_mm2s_reg[2][NXTDESC] = 0x700000c0
sg_mm2s_reg[2][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[2][BUFFER_ADDRESS] = 0x64002000
sg_mm2s_reg[2][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[2][CONTROL] = 0x00000410

sg_s2mm_reg[3] address = 0x600000c0
sg_s2mm_reg[3][NXTDESC] = 0x60000100
sg_s2mm_reg[3][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[3][BUFFER_ADDRESS] = 0x64003010
sg_s2mm_reg[3][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[3][CONTROL] = 0x00000400

sg_mm2s_reg[3] address = 0x700000c0
sg_mm2s_reg[3][NXTDESC] = 0x70000100
sg_mm2s_reg[3][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[3][BUFFER_ADDRESS] = 0x64003000
sg_mm2s_reg[3][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[3][CONTROL] = 0x00000410

sg_s2mm_reg[4] address = 0x60000100
sg_s2mm_reg[4][NXTDESC] = 0x60000140
sg_s2mm_reg[4][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[4][BUFFER_ADDRESS] = 0x64004010
sg_s2mm_reg[4][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[4][CONTROL] = 0x00000400

sg_mm2s_reg[4] address = 0x70000100
sg_mm2s_reg[4][NXTDESC] = 0x70000140
sg_mm2s_reg[4][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[4][BUFFER_ADDRESS] = 0x64004000
sg_mm2s_reg[4][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[4][CONTROL] = 0x00000410

sg_s2mm_reg[5] address = 0x60000140
sg_s2mm_reg[5][NXTDESC] = 0x60000180
sg_s2mm_reg[5][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[5][BUFFER_ADDRESS] = 0x64005010
sg_s2mm_reg[5][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[5][CONTROL] = 0x00000400

sg_mm2s_reg[5] address = 0x70000140
sg_mm2s_reg[5][NXTDESC] = 0x70000180
sg_mm2s_reg[5][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[5][BUFFER_ADDRESS] = 0x64005000
sg_mm2s_reg[5][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[5][CONTROL] = 0x00000410

sg_s2mm_reg[6] address = 0x60000180
sg_s2mm_reg[6][NXTDESC] = 0x600001c0
sg_s2mm_reg[6][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[6][BUFFER_ADDRESS] = 0x64006010
sg_s2mm_reg[6][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[6][CONTROL] = 0x00000400

sg_mm2s_reg[6] address = 0x70000180
sg_mm2s_reg[6][NXTDESC] = 0x700001c0
sg_mm2s_reg[6][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[6][BUFFER_ADDRESS] = 0x64006000
sg_mm2s_reg[6][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[6][CONTROL] = 0x00000410

sg_s2mm_reg[7] address = 0x600001c0
sg_s2mm_reg[7][NXTDESC] = 0x60000200
sg_s2mm_reg[7][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[7][BUFFER_ADDRESS] = 0x64007010
sg_s2mm_reg[7][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[7][CONTROL] = 0x00000400

sg_mm2s_reg[7] address = 0x700001c0
sg_mm2s_reg[7][NXTDESC] = 0x70000200
sg_mm2s_reg[7][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[7][BUFFER_ADDRESS] = 0x64007000
sg_mm2s_reg[7][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[7][CONTROL] = 0x00000410

sg_s2mm_reg[8] address = 0x60000200
sg_s2mm_reg[8][NXTDESC] = 0x60000240
sg_s2mm_reg[8][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[8][BUFFER_ADDRESS] = 0x64008010
sg_s2mm_reg[8][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[8][CONTROL] = 0x00000400

sg_mm2s_reg[8] address = 0x70000200
sg_mm2s_reg[8][NXTDESC] = 0x70000240
sg_mm2s_reg[8][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[8][BUFFER_ADDRESS] = 0x64008000
sg_mm2s_reg[8][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[8][CONTROL] = 0x00000410

sg_s2mm_reg[9] address = 0x60000240
sg_s2mm_reg[9][NXTDESC] = 0x60000280
sg_s2mm_reg[9][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[9][BUFFER_ADDRESS] = 0x64009010
sg_s2mm_reg[9][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[9][CONTROL] = 0x00000400

sg_mm2s_reg[9] address = 0x70000240
sg_mm2s_reg[9][NXTDESC] = 0x70000280
sg_mm2s_reg[9][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[9][BUFFER_ADDRESS] = 0x64009000
sg_mm2s_reg[9][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[9][CONTROL] = 0x00000410

sg_s2mm_reg[10] address = 0x60000280
sg_s2mm_reg[10][NXTDESC] = 0x600002c0
sg_s2mm_reg[10][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[10][BUFFER_ADDRESS] = 0x6400a010
sg_s2mm_reg[10][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[10][CONTROL] = 0x00000400

sg_mm2s_reg[10] address = 0x70000280
sg_mm2s_reg[10][NXTDESC] = 0x700002c0
sg_mm2s_reg[10][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[10][BUFFER_ADDRESS] = 0x6400a000
sg_mm2s_reg[10][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[10][CONTROL] = 0x00000410

sg_s2mm_reg[11] address = 0x600002c0
sg_s2mm_reg[11][NXTDESC] = 0x60000300
sg_s2mm_reg[11][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[11][BUFFER_ADDRESS] = 0x6400b010
sg_s2mm_reg[11][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[11][CONTROL] = 0x00000400

sg_mm2s_reg[11] address = 0x700002c0
sg_mm2s_reg[11][NXTDESC] = 0x70000300
sg_mm2s_reg[11][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[11][BUFFER_ADDRESS] = 0x6400b000
sg_mm2s_reg[11][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[11][CONTROL] = 0x00000410

sg_s2mm_reg[12] address = 0x60000300
sg_s2mm_reg[12][NXTDESC] = 0x60000340
sg_s2mm_reg[12][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[12][BUFFER_ADDRESS] = 0x6400c010
sg_s2mm_reg[12][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[12][CONTROL] = 0x00000400

sg_mm2s_reg[12] address = 0x70000300
sg_mm2s_reg[12][NXTDESC] = 0x70000340
sg_mm2s_reg[12][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[12][BUFFER_ADDRESS] = 0x6400c000
sg_mm2s_reg[12][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[12][CONTROL] = 0x00000410

sg_s2mm_reg[13] address = 0x60000340
sg_s2mm_reg[13][NXTDESC] = 0x60000380
sg_s2mm_reg[13][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[13][BUFFER_ADDRESS] = 0x6400d010
sg_s2mm_reg[13][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[13][CONTROL] = 0x00000400

sg_mm2s_reg[13] address = 0x70000340
sg_mm2s_reg[13][NXTDESC] = 0x70000380
sg_mm2s_reg[13][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[13][BUFFER_ADDRESS] = 0x6400d000
sg_mm2s_reg[13][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[13][CONTROL] = 0x00000410

sg_s2mm_reg[14] address = 0x60000380
sg_s2mm_reg[14][NXTDESC] = 0x600003c0
sg_s2mm_reg[14][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[14][BUFFER_ADDRESS] = 0x6400e010
sg_s2mm_reg[14][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[14][CONTROL] = 0x00000400

sg_mm2s_reg[14] address = 0x70000380
sg_mm2s_reg[14][NXTDESC] = 0x700003c0
sg_mm2s_reg[14][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[14][BUFFER_ADDRESS] = 0x6400e000
sg_mm2s_reg[14][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[14][CONTROL] = 0x00000410

sg_s2mm_reg[15] address = 0x600003c0
sg_s2mm_reg[15][NXTDESC] = 0x60000400
sg_s2mm_reg[15][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[15][BUFFER_ADDRESS] = 0x6400f010
sg_s2mm_reg[15][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[15][CONTROL] = 0x00000400

sg_mm2s_reg[15] address = 0x700003c0
sg_mm2s_reg[15][NXTDESC] = 0x70000400
sg_mm2s_reg[15][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[15][BUFFER_ADDRESS] = 0x6400f000
sg_mm2s_reg[15][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[15][CONTROL] = 0x00000410

sg_s2mm_reg[16] address = 0x60000400
sg_s2mm_reg[16][NXTDESC] = 0x60000440
sg_s2mm_reg[16][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[16][BUFFER_ADDRESS] = 0x64010010
sg_s2mm_reg[16][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[16][CONTROL] = 0x00000400

sg_mm2s_reg[16] address = 0x70000400
sg_mm2s_reg[16][NXTDESC] = 0x70000440
sg_mm2s_reg[16][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[16][BUFFER_ADDRESS] = 0x64010000
sg_mm2s_reg[16][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[16][CONTROL] = 0x00000410

sg_s2mm_reg[17] address = 0x60000440
sg_s2mm_reg[17][NXTDESC] = 0x60000480
sg_s2mm_reg[17][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[17][BUFFER_ADDRESS] = 0x64011010
sg_s2mm_reg[17][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[17][CONTROL] = 0x00000400

sg_mm2s_reg[17] address = 0x70000440
sg_mm2s_reg[17][NXTDESC] = 0x70000480
sg_mm2s_reg[17][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[17][BUFFER_ADDRESS] = 0x64011000
sg_mm2s_reg[17][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[17][CONTROL] = 0x00000410

sg_s2mm_reg[18] address = 0x60000480
sg_s2mm_reg[18][NXTDESC] = 0x600004c0
sg_s2mm_reg[18][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[18][BUFFER_ADDRESS] = 0x64012010
sg_s2mm_reg[18][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[18][CONTROL] = 0x00000400

sg_mm2s_reg[18] address = 0x70000480
sg_mm2s_reg[18][NXTDESC] = 0x700004c0
sg_mm2s_reg[18][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[18][BUFFER_ADDRESS] = 0x64012000
sg_mm2s_reg[18][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[18][CONTROL] = 0x00000410

sg_s2mm_reg[19] address = 0x600004c0
sg_s2mm_reg[19][NXTDESC] = 0x60000500
sg_s2mm_reg[19][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[19][BUFFER_ADDRESS] = 0x64013010
sg_s2mm_reg[19][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[19][CONTROL] = 0x00000400

sg_mm2s_reg[19] address = 0x700004c0
sg_mm2s_reg[19][NXTDESC] = 0x70000500
sg_mm2s_reg[19][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[19][BUFFER_ADDRESS] = 0x64013000
sg_mm2s_reg[19][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[19][CONTROL] = 0x00000410

sg_s2mm_reg[20] address = 0x60000500
sg_s2mm_reg[20][NXTDESC] = 0x60000540
sg_s2mm_reg[20][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[20][BUFFER_ADDRESS] = 0x64014010
sg_s2mm_reg[20][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[20][CONTROL] = 0x00000400

sg_mm2s_reg[20] address = 0x70000500
sg_mm2s_reg[20][NXTDESC] = 0x70000540
sg_mm2s_reg[20][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[20][BUFFER_ADDRESS] = 0x64014000
sg_mm2s_reg[20][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[20][CONTROL] = 0x00000410

sg_s2mm_reg[21] address = 0x60000540
sg_s2mm_reg[21][NXTDESC] = 0x60000580
sg_s2mm_reg[21][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[21][BUFFER_ADDRESS] = 0x64015010
sg_s2mm_reg[21][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[21][CONTROL] = 0x00000400

sg_mm2s_reg[21] address = 0x70000540
sg_mm2s_reg[21][NXTDESC] = 0x70000580
sg_mm2s_reg[21][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[21][BUFFER_ADDRESS] = 0x64015000
sg_mm2s_reg[21][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[21][CONTROL] = 0x00000410

sg_s2mm_reg[22] address = 0x60000580
sg_s2mm_reg[22][NXTDESC] = 0x600005c0
sg_s2mm_reg[22][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[22][BUFFER_ADDRESS] = 0x64016010
sg_s2mm_reg[22][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[22][CONTROL] = 0x00000400

sg_mm2s_reg[22] address = 0x70000580
sg_mm2s_reg[22][NXTDESC] = 0x700005c0
sg_mm2s_reg[22][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[22][BUFFER_ADDRESS] = 0x64016000
sg_mm2s_reg[22][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[22][CONTROL] = 0x00000410

sg_s2mm_reg[23] address = 0x600005c0
sg_s2mm_reg[23][NXTDESC] = 0x60000000
sg_s2mm_reg[23][NXTDESC_MSB] = 0x00000000
sg_s2mm_reg[23][BUFFER_ADDRESS] = 0x64017010
sg_s2mm_reg[23][BUFFER_ADDRESS_MSB] = 0x00000000
sg_s2mm_reg[23][CONTROL] = 0x00000400

sg_mm2s_reg[23] address = 0x700005c0
sg_mm2s_reg[23][NXTDESC] = 0x70000000
sg_mm2s_reg[23][NXTDESC_MSB] = 0x00000000
sg_mm2s_reg[23][BUFFER_ADDRESS] = 0x64017000
sg_mm2s_reg[23][BUFFER_ADDRESS_MSB] = 0x00000000
sg_mm2s_reg[23][CONTROL] = 0x00000410

axi_dma_sg.s2mm_curdesc = 0x60000000
axi_dma_sg.s2mm_curdesc_msb = 0x00000000
axi_dma_sg.s2mm_taildesc = 0x60000600
axi_dma_sg.s2mm_taildesc_msb = 0x00000000

axi_eth_dma_sg.s2mm_curdesc = 0x70000000
axi_eth_dma_sg.mm2s_curdesc_msb = 0x00000000
axi_eth_dma_sg.mm2s_taildesc = 0x70000600
axi_eth_dma_sg.mm2s_taildesc_msb = 0x00000000

Difference of 16 bytes from sg_s2mm_reg[n][BUFFER_ADDRESS] and sg_mm2s_reg[n][BUFFER_ADDRESS] is due to ethernet frame header data placed before sg_s2mm_reg[n][BUFFER_ADDRESS].

 

Currently, only axi_dma_0 works fine, but axi_eth_dma_0 doesn't stream anything.

Is this setup allowed ? Shouldn't axi_eth_dma_0 stream anyway ?

Thanks.

s.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
simozz
Mentor
Mentor
647 Views
Registered: ‎05-14-2017

I forgot to post why the whole block (DMA and Ethernet Subsystem) wasn't working.

I was not setting the TXSOF and TXEOF bits in scatter gather bd control reg. Shame on me !

I setup an ILA on the MM2S interface and I could see that the DMA was ready to transfer (TVALID asserted), but Ethernet Subsystem was not (TREADY not asserted).

Setting these bits the AXI4-Stream communication was successful.

Regards.

s.

View solution in original post

Tags (1)
12 Replies
simozz
Mentor
Mentor
1,137 Views
Registered: ‎05-14-2017

I noticed is that for axi_dma_0 the device-tree generated is the following:

		axi_dma_0: dma@a0000000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-7.1", "xlnx,axi-dma-1.00.a";
			interrupt-names = "s2mm_introut";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4>;
			reg = <0x0 0xa0000000 0x0 0x10000>;
			xlnx,addrwidth = <0x28>;
			xlnx,include-sg ;
			xlnx,sg-length-width = <0x1a>;
			dma-channel@a0000030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 89 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
		};

which seems correct.

However, for the axi_eth_dma_0 the device-tree generated is:

		axi_eth_dma_0: dma@a0010000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,eth-dma";
			interrupt-names = "mm2s_introut", "s2mm_introut";
			interrupt-parent = <&gic>;
			interrupts = <0 90 4 0 91 4>;
			reg = <0x0 0xa0010000 0x0 0x10000>;
			xlnx,addrwidth = /bits/ 8 <0x28>;
		};

Strangely, it doesn't have the dma-channel blocks declarated. Also, it's missing the

			xlnx,include-sg ;
			xlnx,sg-length-width = <0x1a>;

lines.

Could it be the root of the problem ?

Thanks.

s.

0 Kudos
simozz
Mentor
Mentor
1,077 Views
Registered: ‎05-14-2017

Hello,

Any hint or suggestion please ?

s.

0 Kudos
savula
Moderator
Moderator
1,048 Views
Registered: ‎10-30-2017

Hi @simozz ,

the AXI eth Dma0 that is connected as part of Ethernet subsystem will be configured using AXI Ethernet 0 IP and not with the processor. Pleas check the AXI lite interface of AXI eth dma0 connected to axi ethernet. The device tree that generated for axi eth dma0 looks fine. 

Please refer the xapp1305 and following link: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841830/PS+and+PL+based+Ethernet+in+Zynq+MPSoC

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
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.

simozz
Mentor
Mentor
1,040 Views
Registered: ‎05-14-2017

Hello @savula ,

I am trying to use the DMA using UIO driver (setting compatible="generic-uio").

I suppose you are referring to the AXI Ethernet Subsystem Linux driver. Am I right ?

s.

0 Kudos
savula
Moderator
Moderator
1,038 Views
Registered: ‎10-30-2017

@simozz ,

yes, you are correct. you need to use the AXI Ethernet Subsystem Linux driver for axi eth dma0. 

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
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.

simozz
Mentor
Mentor
1,027 Views
Registered: ‎05-14-2017

OK, things become clearer.

Why can't it be done via UIO driver ? What is the missing piece ?

In my design both AXI DMA use the same code (just differ addresses of DDR). One works while the other does not. 

Is the missing declaration of dma channels in device-tree the cause of this problem in UIO ? 

Could you please just clarify this ?

Thanks.

s.

0 Kudos
savula
Moderator
Moderator
1,024 Views
Registered: ‎10-30-2017

Hi @simozz ,

off course both the dma's uses same UIO driver.

Best Regards,
Srikanth

0 Kudos
simozz
Mentor
Mentor
1,019 Views
Registered: ‎05-14-2017

I am quiet surprised regarding AXI Lite control because I can access to AXI Ethernet DMA registers and I can see that DMA S_AXI Lite is connected to PS.

s.

0 Kudos
savula
Moderator
Moderator
1,016 Views
Registered: ‎10-30-2017

Hi @simozz ,

Yes, I misunderstood it. 

0 Kudos
simozz
Mentor
Mentor
985 Views
Registered: ‎05-14-2017

@savula 

OK, no problem.

Do the dma channels blocks in device-tree  pl.dtsi are relevant for the UIO driver ? If so, this could be a missing piece since they are missing (not autogenerated).

s.

0 Kudos
simozz
Mentor
Mentor
731 Views
Registered: ‎05-14-2017

@savula wrote:

Yes, I misunderstood it. 


Hello @savula,

So how can I use the AXI DMA for Ethenet Subsystem with UIO ?

Do I have to apply a patch for the device-tree ? Anything else ?

Thanks.

s.

0 Kudos
simozz
Mentor
Mentor
648 Views
Registered: ‎05-14-2017

I forgot to post why the whole block (DMA and Ethernet Subsystem) wasn't working.

I was not setting the TXSOF and TXEOF bits in scatter gather bd control reg. Shame on me !

I setup an ILA on the MM2S interface and I could see that the DMA was ready to transfer (TVALID asserted), but Ethernet Subsystem was not (TREADY not asserted).

Setting these bits the AXI4-Stream communication was successful.

Regards.

s.

View solution in original post

Tags (1)