Can I run multiple CDMA blocks in parallel?

Hi,

I have few questions about using multiple CDMA blocks.

I’m using CDMA block for data transfer between DRAM in PS and BRAM in PL.

In my design, a CDMA block transfers data to twelve BRAMs in serial (transfer to 1st BRAM → transfer to 2nd BRAM → … → transfer to 12th BRAM) and it takes about 15-ms.

It’s too long time, so I added one more CDMA for parallel processing and connected six BRAMs to each CDMA.

But the spent time was same.

My block design and test code is attached below. (Please don’t mind about CDMA1, CDMA0 and CDMA2 are connected to six BRAMs each and S_AXI_HP0 and S_AXI_HP2 are connected to axi_smc0 and axi_smc2 each)

image

  1. First of all, is it possible to run multiple CDMA blocks in parallel?
  2. If so, how can I run them in parallel . (Is the code below correct?)
    (cdma_sa_reg: source address, cdma_da_reg: destination address)

ts = time.time()

cdma0.write(cdma_sa_reg, buf00_addr)
cdma0.write(cdma_da_reg, bram00_addr)
cdma2.write(cdma_sa_reg, buf12_addr)
cdma2.write(cdma_da_reg, bram12_addr)
cdma0.write(cdma_btt_reg, int(data_byte_num))
cdma2.write(cdma_btt_reg, int(data_byte_num))

cdma0.write(cdma_sa_reg, buf01_addr)
cdma0.write(cdma_da_reg, bram01_addr)
cdma2.write(cdma_sa_reg, buf13_addr)
cdma2.write(cdma_da_reg, bram13_addr)
cdma0.write(cdma_btt_reg, int(data_byte_num))
cdma2.write(cdma_btt_reg, int(data_byte_num))

cdma0.write(cdma_sa_reg, buf02_addr)
cdma0.write(cdma_da_reg, bram02_addr)
cdma2.write(cdma_sa_reg, buf20_addr)
cdma2.write(cdma_da_reg, bram20_addr)
cdma0.write(cdma_btt_reg, int(data_byte_num))
cdma2.write(cdma_btt_reg, int(data_byte_num))

cdma0.write(cdma_sa_reg, buf03_addr)
cdma0.write(cdma_da_reg, bram03_addr)
cdma2.write(cdma_sa_reg, buf21_addr)
cdma2.write(cdma_da_reg, bram21_addr)
cdma0.write(cdma_btt_reg, int(data_byte_num))
cdma2.write(cdma_btt_reg, int(data_byte_num))

cdma0.write(cdma_sa_reg, buf10_addr)
cdma0.write(cdma_da_reg, bram10_addr)
cdma2.write(cdma_sa_reg, buf22_addr)
cdma2.write(cdma_da_reg, bram22_addr)
cdma0.write(cdma_btt_reg, int(data_byte_num))
cdma2.write(cdma_btt_reg, int(data_byte_num))

cdma0.write(cdma_sa_reg, buf11_addr)
cdma0.write(cdma_da_reg, bram11_addr)
cdma2.write(cdma_sa_reg, buf23_addr)
cdma2.write(cdma_da_reg, bram23_addr)
cdma0.write(cdma_btt_reg, int(data_byte_num))
cdma2.write(cdma_btt_reg, int(data_byte_num))

te = time.time()
print("CDMA took ", str(te-ts), “s”)

1 Like