03-27-2019 11:20 AM
Hi,
with 4 DDR banks, is it possible to have like 2 reads and 2 write at the same time ?
The kernel global bandwidth example shows only 1 read and 1 write at a time.
04-04-2019 07:02 AM
I managed to use the 4 banks at the same time, but not with the kernel global bandwidth example, which may have a problem.
extern "C" { void sobel(uint512_dt *inimg, uint512_dt *outimg, uint512_dt *inimg2, uint512_dt *outimg2) { #pragma HLS INTERFACE m_axi port=inimg offset=slave bundle=gmem0 #pragma HLS INTERFACE m_axi port=outimg offset=slave bundle=gmem1 #pragma HLS INTERFACE m_axi port=inimg2 offset=slave bundle=gmem2 #pragma HLS INTERFACE m_axi port=outimg2 offset=slave bundle=gmem3 #pragma HLS INTERFACE s_axilite port=inimg bundle=control #pragma HLS INTERFACE s_axilite port=outimg bundle=control #pragma HLS INTERFACE s_axilite port=inimg2 bundle=control #pragma HLS INTERFACE s_axilite port=outimg2 bundle=control #pragma HLS INTERFACE s_axilite port=return bundle=control uint512_dt local_buffer; uint512_dt local_buffer2; loop_read: for(int line = 0; line < 64*64; line++) { #pragma HLS PIPELINE local_buffer = inimg[line]; outimg[line] = local_buffer; local_buffer2 = inimg2[line]; outimg2[line] = local_buffer2; } return; } }
03-28-2019 09:08 AM
All these DDR banks can be used independently.
03-28-2019 09:30 AM
How can I achieve that modifying the example ?
#define NDDR_BANKS 4 kernel __attribute__ ((reqd_work_group_size(1,1,1))) void bandwidth(__global uint16 * __restrict input0, __global uint16 * __restrict output0, __global uint16 * __restrict input1, __global uint16 * __restrict output1, ulong num_blocks) { __attribute__((xcl_pipeline_loop)) for (ulong blockindex = 0; blockindex < num_blocks; blockindex++) { uint16 temp0 = input0[blockindex]; output0[blockindex] = temp0; uint16 temp1 = input1[blockindex]; output1[blockindex] = temp1; } }
It should already be 2 read + 2 write at the same time, but for some reason, it's not the case.
03-31-2019 10:10 PM
Is the DDR mapping changed in config.mk file?
Add the appropriate changes for LDCLFLAGS in config.mk file
Regards,
Vishnu
----------------------------------------------------------------------------------------------
Kindly note- 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.
----------------------------------------------------------------------------------------------
04-01-2019 06:40 AM
I see no config.mk file in the project folder.
Can you explain "appropriate changes" please ?
04-01-2019 07:34 AM
Hi @xil_tour,
you can find config.mk file in the following path :
Based on number of banks you want to use, you can set ddr_banks variable and corresponding banks.
Regards,
Vishnu
----------------------------------------------------------------------------------------------
Kindly note- 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.
----------------------------------------------------------------------------------------------
04-01-2019 07:55 AM
Can't I change that after having imported the project in SDx ?
04-02-2019 03:24 AM
Hi @xil_tour,
Under the Hardware Functions, right click the kernel and select "Edit XOCC Options",
if you are using 1DDR then add : --sp bandwidth_1.m_axi_gmem0:DDR[0]
if you are using 2DDR then add : --sp bandwidth_1.m_axi_gmem0:DDR[0] --sp bandwidth_1.m_axi_gmem0:DDR[1]
According based on number of DDR's you can add to XOCC Options.
Regards,
Vishnu
----------------------------------------------------------------------------------------------
Kindly note- 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.
----------------------------------------------------------------------------------------------
04-02-2019 06:52 AM
I already have this in the "XOCC Options" :
--sp bandwidth_1.m_axi_gmem0:bank0 --sp bandwidth_1.m_axi_gmem1:bank1 --sp bandwidth_1.m_axi_gmem2:bank2 --sp bandwidth_1.m_axi_gmem3:bank3
Are DDR[0] and bank0 valid aliases ?
04-04-2019 02:42 AM
Hi @xil_tour,
yes, DDR[0] and bank0 are valid aliases.
Regards,
Vishnu
----------------------------------------------------------------------------------------------
Kindly note- 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.
----------------------------------------------------------------------------------------------
04-04-2019 07:02 AM
I managed to use the 4 banks at the same time, but not with the kernel global bandwidth example, which may have a problem.
extern "C" { void sobel(uint512_dt *inimg, uint512_dt *outimg, uint512_dt *inimg2, uint512_dt *outimg2) { #pragma HLS INTERFACE m_axi port=inimg offset=slave bundle=gmem0 #pragma HLS INTERFACE m_axi port=outimg offset=slave bundle=gmem1 #pragma HLS INTERFACE m_axi port=inimg2 offset=slave bundle=gmem2 #pragma HLS INTERFACE m_axi port=outimg2 offset=slave bundle=gmem3 #pragma HLS INTERFACE s_axilite port=inimg bundle=control #pragma HLS INTERFACE s_axilite port=outimg bundle=control #pragma HLS INTERFACE s_axilite port=inimg2 bundle=control #pragma HLS INTERFACE s_axilite port=outimg2 bundle=control #pragma HLS INTERFACE s_axilite port=return bundle=control uint512_dt local_buffer; uint512_dt local_buffer2; loop_read: for(int line = 0; line < 64*64; line++) { #pragma HLS PIPELINE local_buffer = inimg[line]; outimg[line] = local_buffer; local_buffer2 = inimg2[line]; outimg2[line] = local_buffer2; } return; } }