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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design Zedboard read DDR3 from PL
  • 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 354 subscribers
  • Views 623 views
  • Users 0 members are here
Related

Zedboard read DDR3 from PL

massol
massol over 11 years ago

Hi everyone,

I wonder if it's possible to read the DDR3 memory with a custom ip core axi4-lite master interface connected to an interconnect then connected to the HP zynq port ?

Because I'm trying since 3 or 4 weeks to do that and that's give me wrong things.

(I use an ILA to see what's happen on the master/slave communication.)

I write DDR3 in SDK via ps : Xil_Out32(DDR_BASE_ADDRESS, 0x00000001); so at the 0x10000000 ddr3 address, write 0x00000001 data.

Then I want to read this data via my PL custom ip(this ip is just a redirection): Xil_Out32(MY_IP_BASE_ADDRESS, DDR_BASE_ADDRESS); so I send to my ip the address to read.

And then I read my ip register which normally store the data : data = Xil_In32(MY_IP_BASE_ADDRESS + REGISTER_1); so read address 0x43C00004 and the data is not 0x00000001 but 0x9FA90DDC (On the ILA) and 0x9FA90DDD on the sdk terminal;


Someone can help me to understand ?

I use Vivado 2013.4 on windows 7 machine.

Thanks for your help,

Best regards.

  • Sign in to reply
  • Cancel
Parents
  • martingaraj
    0 martingaraj over 10 years ago

    For people that go crazy about "solved" problems without ACTUAL SOLUTIONS, here is one if my experiments:

    - either disable caches for good

    - or flush the cache before reading the data


    This is what an SDK hello application looks like then:

    #include <stdio.h>
    #include "platform.h"
    #include <unistd.h>

    #include "xparameters.h"
    #include "xil_io.h"
    #include "xstatus.h"
    #include "xscugic.h"
    #include "xil_exception.h"

    #include "ps7_init.h"
    #include "xil_cache.h"

    #define PARAM_BASE_ADDRESS               0x00000000

    int main()
    {
    t// initialization
        init_platform();
        //ps7_init();
        ps7_post_config();
        // cleanup_platform();ttttttttt// DISABLING CACHES


        // variables
        u32 offset;
        u32 param;
        int i = 0;
        xil_printf(" PL WRITING & PS READING DRAM MEMORY TEST ");

        // loop
        while ( 1 ) {

        tgetchar();

        tXil_DCacheFlushRange(PARAM_BASE_ADDRESS, 4*1);      // CACHE FLUSHING
        toffset = 0X00000000;
        tfor (i = 0; i < 50 ; i++){ttttttt// LOOP FOR READING DATA
        ttparam = Xil_In32(PARAM_BASE_ADDRESS + offset);
            txil_printf("mem_read %d : %x
    r",i , param);
            toffset = offset + 4;
        t}
        }

        cleanup_platform();
        return 0;
    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • martingaraj
    0 martingaraj over 10 years ago

    For people that go crazy about "solved" problems without ACTUAL SOLUTIONS, here is one if my experiments:

    - either disable caches for good

    - or flush the cache before reading the data


    This is what an SDK hello application looks like then:

    #include <stdio.h>
    #include "platform.h"
    #include <unistd.h>

    #include "xparameters.h"
    #include "xil_io.h"
    #include "xstatus.h"
    #include "xscugic.h"
    #include "xil_exception.h"

    #include "ps7_init.h"
    #include "xil_cache.h"

    #define PARAM_BASE_ADDRESS               0x00000000

    int main()
    {
    t// initialization
        init_platform();
        //ps7_init();
        ps7_post_config();
        // cleanup_platform();ttttttttt// DISABLING CACHES


        // variables
        u32 offset;
        u32 param;
        int i = 0;
        xil_printf(" PL WRITING & PS READING DRAM MEMORY TEST ");

        // loop
        while ( 1 ) {

        tgetchar();

        tXil_DCacheFlushRange(PARAM_BASE_ADDRESS, 4*1);      // CACHE FLUSHING
        toffset = 0X00000000;
        tfor (i = 0; i < 50 ; i++){ttttttt// LOOP FOR READING DATA
        ttparam = Xil_In32(PARAM_BASE_ADDRESS + offset);
            txil_printf("mem_read %d : %x
    r",i , param);
            toffset = offset + 4;
        t}
        }

        cleanup_platform();
        return 0;
    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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 © 2026 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