Sorry, you need to enable JavaScript to visit this website.

transferring data from PS to PL on LINUX Platfrom

Zedboard forums is currently read-only while it under goes maintenance.

Unsolved
4 posts / 0 new
shivangi_29
Junior(0)
transferring data from PS to PL on LINUX Platfrom

Hello everyone,
 
I am working on how to tranfer data from processor to FPGA on LINUX platform. I have created my on IP consisting of AXI Lite and AXI Full, please provide some guidence how to program the register of AXI lite and data transfer mechanism through AXI full on LINUX Platform.
 
Thanks & Regards
Shivangi Jaiswal
 
 

rembo
Junior(0)
I was trying the same, can

I was trying the same, can you explain what your block design consists of?
 

shivangi_29
Junior(0)
There is a zynq processor and

There is a zynq processor and custom IP, interconnection between there two are through AXI interconnect bridge. I have created devicetree.dtb file. I am also controlling ad9364 agile tranceiver through SPI line by creating SPI as a device by doing some changed in .dtb file.Now next step is to transfer data through AXI. I get to know we can do it by UIO method but dont know how to start. 
plz provide some solution.
Thanks & Regards
Shivangi 

shivangi_29
Junior(0)
I have done some changes in

I have done some changes in .dtb file and UIO0 has been created in /dev/uio0. There is also two mapping shown in /sys/class/uio/maps/mapo/map1. 
This is my .dtb file

 

 PL.dts

 

 {

amba_pl: amba_pl {

#address-cells = <1>;

#size-cells = <1>;

compatible = "simple-bus";

ranges ;

mod_ip_0: mod_ip@43c00000 {

compatible = "dmen-uio";

reg = <0x43c00000 0x10000 0x7aa00000 0x10000>;

xlnx,s00-axi-addr-width = <0x4>;

xlnx,s00-axi-data-width = <0x20>;

xlnx,s01-axi-addr-width = <0xa>;

xlnx,s01-axi-aruser-width = <0x1>;

xlnx,s01-axi-awuser-width = <0x1>;

xlnx,s01-axi-buser-width = <0x1>;

xlnx,s01-axi-data-width = <0x20>;

xlnx,s01-axi-id-width = <0xc>;

xlnx,s01-axi-ruser-width = <0x1>;

xlnx,s01-axi-wuser-width = <0x1>;

};

};

};

 

This is programming I have done respective of virtual and physical address mapping

 

C coding:

 

 

ad9361_uio_fd = open(AD9361_UIO_DEV, O_RDWR);

printf("hi");

if(ad9361_uio_fd < 1)

{

printf("%s: Can't open ad9361_uio device\n\r", __func__);

return;

}

 

 

 

FILE *fp;

uint32_t mem_size=0x10000;

uint32_t mem_addr=0x43c00000;

fp = fopen ("/sys/class/uio/uio0/maps/map0/size","r");

fscanf(fp,"0x%0x", &mem_size);

fclose(fp);

fp = fopen ("/sys/class/uio/uio0/maps/map0/addr","r");

fscanf(fp,"0x%0x", &mem_addr);

fclose(fp);

 

 

FILE *fs;

uint32_t mem_size_1=0x10000;

uint32_t mem_addr_1=0x77a00000;

fs = fopen ("/sys/class/uio/uio0/maps/map1/size","r");

fscanf(fs,"0x%0x", &mem_size_1);

fclose(fs);

fs = fopen ("/sys/class/uio/uio0/maps/map1/addr","r");

fscanf(fs,"0x%0x", &mem_addr_1);

fclose(fs);

 

I am stuck at this point. what will be the next step??

 

Thanks
shivangi