Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,753 Views

arria v using DMA through ACP

I am trying to make cache coherent dma copies by using the ACP port on the arria v. 

I am copying only from the first Gigabyte of memory. 

I am using the cyclone v preloader that comes with the EDK installation. 

 

I followed the steps in the arria v HPS TRM in chapter 9 subsection "AXI Master Configuration for ACP Access" on page 28-29 in order to use the ACP. 

So far i have: 

1. Enabled the SCU by setting the SCU enable bit in the SCU Control Register at 0xFFFEC000 

2. Marked the memory shareable and cache able(write-back allocate on write) 

3. Enabled the caches 

4. Initialized the MMU and populated the MMU page table 

5. Set the SMP bit in the ACTLR  

6. Set the shared attribute override enable bit the in the auxiliary controller register in the L2 cache controller 

7. Flushed the L2 cache after setting the shared attribute override enable bit as mentioned in the L2 310 cache controller documentation on arm's website 

8. Configured ARUSER and AWUSER signals(configured as 11111 in binary to PAGE 0 using the ACP ID Mapper. 

9. Added 0x80000000 to the source and destination addresses in order for the DMA to pass through the ACP window. 

 

I am using altera's HW library to use the DMA, ACP ID mapper,MMU and caches. 

 

Now i am doing a simple test so that i copy from a source buffer with predefined data to destination buffer and then comparing using memcmp. 

 

Both the source and the destination buffers are zeroed before i fill the source buffer with the predefined data 

 

The test works only when the source buffer are from the heap and was allocated by malloc or when it is a global variable. 

 

When the source buffer is from the stack the memcmp fails and when checking it's content some of the cells having the 0 value(meaning the copy on those cells didn't succeeded). 

 

How can i use the ACP with source buffer from the stack?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor I
55 Views

Your cache set-up looks OK. 

You can download all you need for DMA & ACP from our freeware page: 

www.code-time.com 

 

Demo# 50 is the one that will interest you. 

You need to to download mAbassi and not uAbassi. 

You can extract the Cache set up code using the archiver if you don't want to link the library in your project. 

 

Regards
Altera_Forum
Honored Contributor I
55 Views

 

--- Quote Start ---  

Your cache set-up looks OK. 

You can download all you need for DMA & ACP from our freeware page: 

www.code-time.com (http://www.code-time.com

 

Demo# 50 is the one that will interest you. 

You need to to download mAbassi and not uAbassi. 

You can extract the Cache set up code using the archiver if you don't want to link the library in your project. 

 

Regards 

--- Quote End ---  

 

 

where can i find the code for demo# 50 or the binary of the demo? 

i downloaded mAbassi and all i find is some header fil, u-boot and some libs
Altera_Forum
Honored Contributor I
55 Views

 

--- Quote Start ---  

Your cache set-up looks OK. 

You can download all you need for DMA & ACP from our freeware page: 

www.code-time.com 

 

Demo# 50 is the one that will interest you. 

You need to to download mAbassi and not uAbassi. 

You can extract the Cache set up code using the archiver if you don't want to link the library in your project. 

 

Regards 

--- Quote End ---  

 

 

where can i download the code for demo# 50? the readme in the freeware download says only demo# 3 in included
Altera_Forum
Honored Contributor I
55 Views

You are correct, my mistake. 

You can go to the code-time.com/bsp.html page and fill your email address in the form and indicate Demo# 50 in the comments 

I'll make sure to be the one get it and will forward you the user, password & URL to download the correct package. 

Else, if you want to wait, I'll get the web page updated next week. 

 

Regards
Altera_Forum
Honored Contributor I
55 Views

 

--- Quote Start ---  

You are correct, my mistake. 

You can go to the code-time.com/bsp.html page and fill your email address in the form and indicate Demo# 50 in the comments 

I'll make sure to be the one get it and will forward you the user, password & URL to download the correct package. 

Else, if you want to wait, I'll get the web page updated next week. 

 

Regards 

--- Quote End ---  

 

 

i will glad to fill it,it doesn't let me to send the Form it tried to open an email program on my pc,is there another way to fill it?
Altera_Forum
Honored Contributor I
55 Views

Normally it's directly in your browser. 

But I'm no web expert... 

Send an email directly to info AT code-time.com
Altera_Forum
Honored Contributor I
55 Views

 

--- Quote Start ---  

Normally it's directly in your browser. 

But I'm no web expert... 

Send an email directly to info AT code-time.com 

--- Quote End ---  

 

 

i have sent the email under the subject "request for Demo# 50" 

Thank you in advance if you could send the user name and password wth a url to download the demo or the correct BSP
Reply