cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor
Visitor
8,101 Views
Registered: ‎03-04-2015

How can I use AXI Stream-FIFO with Linux OS

How can I use  AXI Stream-FIFO with Linux OS, should I write FIFO driver by myself?

 

I have bulid my own BOOT.bin devicetree uImage and I use linux for my OS.

 

Here's my part pl.dtsi code : 

 

axi_fifo_mm_s_0: axi-fifo-mm-s@43c00000 {
compatible = "xlnx,axi-fifo-mm-s-4.0";
interrupt-parent = <&ps7_scugic_0>;
interrupts = <0 29 4>;
reg = <0x43c00000 0x10000>;
xlnx,axi-str-rxd-protocol = "XIL_AXI_STREAM_ETH_DATA";
xlnx,axi-str-rxd-tdata-width = <0x20>;
xlnx,axi-str-txc-protocol = "XIL_AXI_STREAM_ETH_CTRL";
xlnx,axi-str-txc-tdata-width = <0x20>;
xlnx,axi-str-txd-protocol = "XIL_AXI_STREAM_ETH_DATA";
xlnx,axi-str-txd-tdata-width = <0x20>;
xlnx,axis-tdest-width = <0x4>;
xlnx,axis-tid-width = <0x4>;
xlnx,axis-tuser-width = <0x4>;
xlnx,data-interface-type = <0x0>;
xlnx,has-axis-tdest = <0x0>;
xlnx,has-axis-tid = <0x0>;
xlnx,has-axis-tkeep = <0x0>;
xlnx,has-axis-tstrb = <0x0>;
xlnx,has-axis-tuser = <0x0>;
xlnx,rx-fifo-depth = <0x1000>;
xlnx,rx-fifo-pe-threshold = <0x2>;
xlnx,rx-fifo-pf-threshold = <0xfd2>;
xlnx,s-axi-id-width = <0x4>;
xlnx,s-axi4-data-width = <0x20>;
xlnx,tx-fifo-depth = <0x1000>;
xlnx,tx-fifo-pe-threshold = <0x2>;
xlnx,tx-fifo-pf-threshold = <0xfd2>;
xlnx,use-rx-cut-through = <0x0>;
xlnx,use-rx-data = <0x1>;
xlnx,use-tx-ctrl = <0x1>;
xlnx,use-tx-cut-through = <0x0>;
xlnx,use-tx-data = <0x1>;
} ;

 

I want to know how can I control my FIFO like I use below function in standalone.

 

XLlFifo_Initialize(&fifo,AXI_FIFO_BASEADDR);

XLlFifo_Write(&fifo,&text,length);
XLlFifo_TxSetLen(&fifo,length);

...

 

Can anybody help me to figure out or offer example!!

 

Thanks in advance !!!!

 

 

 

 

 

0 Kudos
5 Replies
Highlighted
Xilinx Employee
Xilinx Employee
8,091 Views
Registered: ‎06-14-2012

Re: How can I use AXI Stream-FIFO with Linux OS

Please see the link below.

 

http://www.wiki.xilinx.com/Zynq+Linux+pl330+DMA

 

Regards

Sikta

0 Kudos
Highlighted
Visitor
Visitor
8,044 Views
Registered: ‎03-04-2015

Re: How can I use AXI Stream-FIFO with Linux OS

Thanks your reply!

 

But my kernel vresion is xilinx-v2014.2 . It say the DMA330 driver is obsolete.

 

Can I just run it on xilinx-v2014.2 or I need to modify somewhere? 

 

Thanks in advance.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,013 Views
Registered: ‎06-14-2012

Re: How can I use AXI Stream-FIFO with Linux OS

Can you try just running it?

 

Regards

Sikta

0 Kudos
Highlighted
Observer
Observer
7,980 Views
Registered: ‎02-16-2015

Re: How can I use AXI Stream-FIFO with Linux OS

Is there a better solution than this? I am thinking I am going to have to write the FIFO driver. The pl330 depends on many non existant libraries that are not in petalinux 2014. 

 

thanks,

kevin

0 Kudos
Highlighted
Visitor
Visitor
7,967 Views
Registered: ‎03-04-2015

Re: How can I use AXI Stream-FIFO with Linux OS

Sorry, I'm so new to zynq.

 

I tried to compile "FIFO DMA Test Driver Source" with my cross-compile.  

 

But it got many errors and I dont know how to figure it out. It seems does not have libraryor something is too old.

 

My kernel version is linux-xlnx-xilinx-v2014.2.

 

Thanks your reply!

 

0 Kudos