- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
PPC405 DMA and DCache -> How to create a shadow memory?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-10-2010 04:41 PM
Hi,
Im using EDK10.1, PPC405 in a XC4VFX20, MPMC4.03.
My system has 128MB DDR (from 0x00000000 to 0x07FFFFFFF). In this DDR I have several video buffers.
I have a 2D graphics controller which performs DMA transactions to and from the DDR via a PLB port on the MPMC. The 2D graphics controller is used for basic operations such as line drawing, filling, memory copy, etc. It is blindingly fast compared with issuing software instructions.
I now wish to enable caches in my system to boost the performance even futher. I call:
XCache_EnableICache(0x800000000);
XCache_EnableDCache(0x800000000);
The system keeps working, but the graphics are not good. It is clearly a problem with DMA and the Cache Coherency.
I tried to switch the caches on and off during DMA transfer from the 2D controller and the problem went away, but there was a massive performance hit calling cache enable so often.
So I want to create a shadow memory (somehow)!!??
I would like to put this memory in the range of 0x08000000 to 0x0FFFFFFF.
Can anyone sugest how I would do this? Could I create a PLB to PLB bridge and somehow do address mapping?
Or is there anyway I can set a cache bypass flag on the video buffer memory region?
Thanks
Lachlan.
Solved! Go to Solution.
Re: PPC405 DMA and DCache -> How to create a shadow memory?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2010 12:37 PM
You should be able to create an additional PLB PIM on the MPMC with a different address range. No need for a bridge.
Re: PPC405 DMA and DCache -> How to create a shadow memory?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2010 02:06 PM
Thanks Dylan,
You have pointed me in the right spot.
MPMC 4.03a Datasheet page 37:
Base/High/Offset Parameters If you want to implement a shadow or aliased memory you need to double the amount of addressable memory. This can be done by increasing the C_<PIM_Type>_HIGHADDR by an amount that will double the address range.
Cheers
Lachlan.
DMA error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-01-2010 02:13 AM
Hi,
I was trying to transfer data through DMA core. To enable interrupt I used XDmaCentral_InterruptEnableSet() function. But when using this function an error is generated. It is shown that "region ilmb_cntlr_dlmb_cntlr is full". Could anyone please tell the meaning of the error and how it can be removed.
thanks in advance.
Re: DMA error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-01-2010 01:47 PM
Hi,
I think the "region full" error is more related to compile time issues..
You should revise your linker script, and if necessary enlarge the size of the RAM you are using, or reduce the size of the program code. By calling the XDMACentral..() funtion, you are actually using the library function, which will take more space..
Lachlan.











