element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development transfer data from PS to PL on linux Platform
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 2 replies
  • Subscribers 311 subscribers
  • Views 580 views
  • Users 0 members are here
Related

transfer data from PS to PL on linux Platform

shivangi_29
shivangi_29 over 6 years ago

There is a zynq processor and custom IP, interconnection between these two are through AXI interconnect bridge. I have created devicetree.dtb file..Now next step is to transfer data through AXI. I get to know we can do it through UIO method but dont know how to start. 
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>;

};

};

};

 

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=0x7aa00000;

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

  • Sign in to reply
  • Cancel
  • jafoste4
    0 jafoste4 over 6 years ago

    Hello,

    What board are you running this on?

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shivangi_29
    0 shivangi_29 over 6 years ago in reply to jafoste4

    Hello

    What board are you running this on?

    Zedboard, zynq 7000 SOC IC.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube