• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM816x, C6A816x and AM389x Processors Forum » AM3894 fast DDR2 access problem : read and write in same time, it going to broken
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

AM3894 fast DDR2 access problem : read and write in same time, it going to broken

AM3894 fast DDR2 access problem : read and write in same time, it going to broken

This question is answered
Min Chul KIM
Posted by Min Chul KIM
on Apr 18 2012 01:03 AM
Prodigy140 points

4834.aaa.zipDeer TI, thank you for read.
This is a question for AM3894 DDR2 write and read problem when it happen in almost same time.
We hope someone has answer or helpful information to solve this critical issue. It is emergency for us.

First, we have designed system to capturing 14bit( = 16bit with padding 2bits) WORD pixels from special sensor that it connected with LVDS cable.
Spartan3(FPGA) has programmed capturing sensor signal into FIFO and it stores in internal buffer by toggling EDMA transfer.
When it start to capture, FIFO and AM3894 EDMA directly stores image data into DDR2 memory (0xC0000000 ~ ) and while doing store, embedded linux application reads stored data thru cmem driver for send data via TCP/IP socket.

Second, problem occurs when it works on GbE connection, about 1 to 2 seconds passed reading data crashes. Actually written data was crashed.
We suppose to it crash when write and read in same time.
When it connected as 100Mbps TX, crashing data is less occurs than GbE.
And absolutely, finishing write without read action then read them, there’s no problem.


Here is our block diagram.

 


We uses PSP 4.0.0.12 and customized own DMA driver based your source.
Cmem also used last version of yours , and adjusted virtual memory size.

So, we want to know how it be solved by using what kind of solution like interleaving for DDR2 write & read.
We attaches our memory setting source code in uboot. (plz refer to aaa.zip file)

Regards, Raphael Kim.

AM3894 DDR2 conflict same time error memorycmem crash in write
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • RandyP
    Posted by RandyP
    on May 05 2012 19:01 PM
    Verified Answer
    Verified by Min Chul KIM
    Guru60340 points

    Raphael Kim,

    What do you mean by "crash"?

    Writing to one area of DDR2 while reading from another area of DDR2 is okay and will not cause problems. If two masters try to access DDR2 at the same time, both will execute at different times if they are going to the same EMIF or at the same time if they are going to different EMIFs.

    Please look through the errata document to see if there are any access situations that may cause problems for your specific situation. But I do not know of anything that would cause the problem you have described.

    Regards,
    RandyP

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Min Chul KIM
    Posted by Min Chul KIM
    on May 28 2012 19:53 PM
    Verified Answer
    Verified by Min Chul KIM
    Prodigy140 points

    Dear RandyP.
    That "CRASH" meant "Conflict" in same address accessing as you written.
    And we have to do best for solving this problem.

    Thank you very much, RandyP.
     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on May 28 2012 22:48 PM
    Verified Answer
    Verified by Min Chul KIM
    Guru60340 points

    If I understand correctly, you are writing to a buffer and at the same time you are reading from that same buffer. Is this correct?

    It appears that you are reading from the buffer too fast, so that you are reading from locations in the buffer that have not yet been written to. This race condition will always be a problem. It is usually solved by using two buffers, commonly referred to as a ping-pong buffering method.

    Is this your problem, and could this be your solution?

    Regards,
    RandyP

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Min Chul KIM
    Posted by Min Chul KIM
    on May 28 2012 23:51 PM
    Prodigy140 points

    Dear RandyP.

    Yes, but there's something special argument, maybe it is a condition.
    We have a driver to access DDR2 memory from FIFO(FPGA) memory for copying 16bit data array with eDMA.
    and embedded linux application approaching written memory address with cmem drivers (referenced address to  physical memory address).
    Actually it maybe not really same time access in once, but it will be really seems like same time - write and read in just between really close clock ?

    I think it need to be changed to DDR3 for enough read and write bandwidth.
    But  face up to reality, PCB artwork done, and we don't have to change components and circuits.
    Want to find the way, just all.

    Thanks :) 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on May 29 2012 05:44 AM
    Guru60340 points

    Could this also be a cache coherency problem?

    The EDMA will copy from the FIFO(FPGA) to the DDR2 memory. If the Cortex-A8 reads from that buffer in DDR2, it will store some of that data in its cache memory. The next time the EDMA copies new data from the FIFO(FPGA) to the DDR2, the Cortex-A8 may still have some portions stored in cache memory and would not read the correct new data from DDR2.

    If the buffer is smaller than the A8's cache, this could be an issue. If the buffer is significantly larger than the A8's cache, and if the linux application reads the entire buffer sequentially, then this would probably not be the problem.

    Regards,
    RandyP

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use