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 PL memory access from PS in Petaliunx
  • 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 3 replies
  • Subscribers 315 subscribers
  • Views 679 views
  • Users 0 members are here
Related

PL memory access from PS in Petaliunx

Former Member
Former Member over 10 years ago

Hi,
I have a custom designed peripheral in the PL of the Zynq that reads an external ADC and stores the results in a section of BRAM. I want to be able to access this from a Linux application to do further processing and transmission. The BRAM is connected to the AXI bus via an AXI BRAM Controller and the relevant parts are in the device tree for Linux. So this means I can access the memory from Linux and in my application.
The problem lies when I try to write the the memory, I only seem able to write to the first 32 bits. Using an ILA connected to the AXI port on the BRAM controller I only see activity when I write to the first address (0x43C00000), if I increment the pointer in Linux and try to write there is no bus activity. However the write is reflected in SDKs memory viewer when I look at the location of the pointer(the memory mapped location of the BRAM).
Is this lack of activity on the AXI bus expected or is it not actually writing?
When writing to the status register (stored in the BRAM) the peripheral never seems to react, this leads me to think the writes are never actually going through. But as far as I know there is no way to check this.
Can anyone offer any help?
Thanks

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 10 years ago

    This sounds like a hardware issue with your custom peripheral. It might be easier to debug the hardware at a 'bare metal' level using SDK. Perhaps some simple C code run in debug mode in the SDK. Another thing to try might be to build a simple BRAM peripheral using just the AXI_BRAM controller and a block of BRAM and see if you can read and write correctly. If this works it would validate the expected behaviour of the AXI BRAM Controller.

     

    -Gary

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

    Hi Gary,
    First of all thanks for your reply. I have since tracked it down to my bram controller. The problem seems to be that in synthesis a lot of the bram controllers logic is optimised out. I can't understand why this is happening, I suppose the synthesiser must be thinking it redundant. But pre and post synthesis behavioral show totally different operations of the controller. Mainly a few inputs are ignored and not connect to anything and lots of logic is gone.
    Any suggestions as to how I might stop this happening, or what the cause is?  

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

    Make sure that you have provided a clock and a reset input to the BRAM controller as well as a connection to an AXI Master interface.

     

    You don't mention which version of the Vivado tools you are using, but it is the current version you could build a basic AXI BRAM Controller and let the 'Run Connection Automation' option build a basic BRAM example for you to compare to your implementation. You will need to provide a clock and a reset. For a test you could enable FCLK_CLK0 and set to 50 MHz. Make sure that your Zynq processing system has a master AXI interface enabled. Then add an AXI_BRAM_Controller to your block diagram. Then 'Run Connection Automation' and let the system make the required connections for you. Test the result and compare to your implementation.

     

    -Gary

    • 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