UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer cpandya90
Observer
5,166 Views
Registered: ‎05-12-2017

Transferring data from block Ram to DDR through CDMA

Jump to solution

Hi all,

 

I want to transfer content from block RAM to DDR memory through CDMA block. I made a project in vivado and created simple application in SDK. I attached block diagram of my project design and application file. In the block diagram I connected one block Ram to M_AXI of CDMA block. Other block Ram is connected to processor through GP0 port. Hp0 port of processor is connected to M_AXI of CDMA block. S_AXI_LITE port of CDMA is connected to GP0 port of processor. I have created this project to compare data transfer speed from block Ram to DDR memory through processor and through CDMA block. In software application I am able to move data from block Ram to DDR using processor but I am not able to move content using CDMA block. I am not able to write data at source and destination memory locations using CDMA. It got stuck at DoSimplePollTransfer().  

 

Any help or advice is greatly appreciated. Thanks!

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
Teacher muzaffer
Teacher
7,933 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 this is also what I suggest in my 5/28 post. You should just move both brams into a single interconnect and have a unified and fully accessible address space.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
16 Replies
Observer cpandya90
Observer
5,157 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

Here I attached address editor of my design

address aditor.PNG
0 Kudos
Teacher muzaffer
Teacher
5,145 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 from which bram are you trying to read through cdma? I assume you realize that cdma doesn't have access to bram0. One way to make your life easier is to have a single 2x3 interconnect and put axi-lite of cdma,  a single bram and hp0 as slaves on it (x3 portion) with cdma master port and gp0 as masters (2x portion). This would have a unified address space which makes programming the cdma registers cleaner.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Observer cpandya90
Observer
5,141 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@muzaffer

In this design two transfers, I want to do

(1) From bram0 to DDR memory through processor.(it's working fine.)

(2) From bram1 to DDR memory through CDMA.(it isn't working)

 

 Any help or advice is greatly appreciated. Thanks!

0 Kudos
Teacher muzaffer
Teacher
5,125 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 the problem is most probably with the way you're programming the cdma. How do you debug it? Maybe you can show it here.

 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Observer cpandya90
Observer
5,071 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@muzaffer

In this source memory is block ram and destination memory is DDR.

I am doing transfer using given below connection

For conducting the actual memory transfers:

AXI CDMA Master AXI port --> AXI BRAM controller 

AXI CDMA Master AXI port --> Slave AXI port on the PS (high performance)

For controlling the AXI CDMA core from the PS:

AXI CDMA Slave AXIlite port --> Master AXI port on the PS

 

In SDK environment, I am selecting Debug as>> Launch on Hardware-system debugger.

0 Kudos
Observer cpandya90
Observer
4,961 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution
0 Kudos
Teacher muzaffer
Teacher
4,955 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 

when you say:

 

>> (2) From bram1 to DDR memory through CDMA.(it isn't working)

 

what is it that doesn't work? How do you test it?

 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Observer cpandya90
Observer
4,950 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@muzaffer

 

In second transfer, from bram1 to ddr, I am not able to initialize source data locations.

In application file, it got stuck at DoSimplePollTransfer().

 

static int DoSimplePollTransfer(XAxiCdma *InstancePtr, int Length, int Retries)
{
	int Index;
	int Status;

	xil_printf("\r\n--- Entering DoSimplePollTransfer() --- \r\n");
	for (Index = 0; Index < MY_SIZE_BYTE; Index++) {
		srcDMA[Index] = Index & 0xFF;
		dstDMA[Index] = 0;
	}

Source locations are not updated with Index value and application failed. hen I am using XAxiCdma_SimpleTransfer() function for data transfer.

 

0 Kudos
Teacher muzaffer
Teacher
4,944 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 I tried to tell you this before. What do you think happens when the PS tries to access the address 0xc0000000 ? In as much detail as you can image, trace that access.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
Observer cpandya90
Observer
3,967 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution
@muzaffer
Address 0xc0000000 is reserved, so I changed address to 0x50000000 of bram1 for data transfer using CDMA block. But I am getting the same error. I am not able to initialize source and destination locations and stuck at that.
Thanks
0 Kudos
Teacher muzaffer
Teacher
3,963 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 one more hint. here is how the processor accesses the bram0. can you draw a similar path which shows how the processors access bram1 ? design.PNG

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
Observer cpandya90
Observer
3,961 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@muzaffer
If I want to do data transfer from bram to ddr using cdma block, then do I need to give access of this block ram to the processor.
Because in this I haven't given access of bram1 to processor.
bram1 is only used for cdma data transfer process. CDMA supposed to read data from bram1 and write data to ddr through hp0 port in my project.

block_design.PNG

In the block design I have shown path for data transfer using CDMA block.

Thanks.

0 Kudos
Teacher muzaffer
Teacher
3,953 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution
@cpandya90 that's exactly your problem. In your program you ie ps tries to access bram1 to initialize it but there is no path from ps to bram1. If you want ps to have access to bram1 you need to give it
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
Teacher muzaffer
Teacher
7,934 Views
Registered: ‎03-31-2012

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

@cpandya90 this is also what I suggest in my 5/28 post. You should just move both brams into a single interconnect and have a unified and fully accessible address space.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
Observer cpandya90
Observer
3,936 Views
Registered: ‎05-12-2017

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

Finally I made changes in block design and I make correction as shown below figure. My project is now working fine. 

BD.PNG

 

I also made changes in my application file as per follow.

char * srcDMA = (char *) 0x40000000;// from BRAM
char * srcCPU = (char *) 0x40000000;// from BRAM
char * dstDMA = (char *) 0x00100000;// to DDR
char * dstCPU = (char *) 0x00200000;// to DDR



Thank you @muzaffer for helping me out. I really appreciate your help.

0 Kudos
Adventurer
Adventurer
798 Views
Registered: ‎08-30-2018

Re: Transferring data from block Ram to DDR through CDMA

Jump to solution

Dear @cpandya90,

 

Thank you for sharing this design in the forum. I also have done this project and it works well. In this design, if you notice, you'll see that the data transaction is performed between DDR_PS inside the PS part and the BRAM which is located in thePL part of the device.

 

Now, I have a design that I want to write to the DDR3_PL (1G / SODIMM / 32-bits) through either Zynq_PS (XSCT or SDK) or PCIe and use the AXI DMA in order to read the written data of DDR3_PL and write them into the BRAM. I have opened a case regarding this issue, but still could not succeed. Can you please have a look and give me some ideas, hints?

 

The link is : https://forums.xilinx.com/t5/Networking-and-Connectivity/Transfer-Data-from-DDR3-PL-to-BRAM-using-Zynq-on-ZC706/m-p/914611#M14832

 

Thanks in advance for your support. I also tag @muzaffer to use his experience and knowledge.

 

Bests,

Daryon