Jump to content
  • 0

confused on how to fill data in bram through axi_bram_controller


dakefeng

Question

Made a simple zynq project, a small bram in PL and an axi bram controller connected to its port. The axi ip routed to axi interconnection without any complain. 

At SDK import a test BRAM application and it shows pass test. 

But I am still very confused how to access the data and addr in the BRAM. The AXI memory base add is 40000000 and high is 4000FFFF, does that  mean this is the memory address range I need to read and write?

Thanks,

Dake

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

It sure sounds like it would mean that.  Don't forget, though, that this is a physical memory address and not a virtual memory address.  To get access to physical memory addresses, I often find myself opening /dev/kmem.  I may even request a local map via mmap of the portion of /dev/kmem I need.

Hope this helps,

Dan

Link to comment
Share on other sites

You are right.  I had thought you were trying to run a Linux application.  Honestly, I don't know the answer to your question.  Hopefully someone who does will pipe up.

But, while I'm here, let me make sure I understand: you say it passes a test BRAM application.  Do you have any source code or materials for that application?  Can you copy from it and learn from it that way?

Dan

Link to comment
Share on other sites

Unforturnaly it doesn't work.

 

u32 addr=Bram.Config.MemBaseAddress;

int cnt=0;

while(cnt<10){

     xil_printf("At addr: %x\r\n",addr);

     XBram_Out32(addr,0x7fff);

     xil_printf("done%d\r\n",cnt);

    addr++;

    cnt++;

    usleep(100);

}

The program hangs at the second try of XBram_Out32 calling.

How can I fill the memory? Thanks a lot.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...