cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BradleyB9
Observer
Observer
256 Views
Registered: ‎09-25-2020

Limitations on m_axi protocol kernel interface parameters?

Hello! I was wondering if there were any limitations on the size of the variables that you can specify for the m_axi protocal and how it would fail?

I am trying to build a kernel for hardware emulation that takes in 2 pointers, a scalar and a pointer to use as the return argument. This is the signature of the function and the interface pragmas:

 

typedef ap_int<128> __m128i;

void my_kernel(__m128i * var1, const __m128i var2 [5], uint64_t var3, __m128i var4 [670])
    {
        #pragma HLS INTERFACE s_axilite port=return bundle=control
        #pragma HLS INTERFACE s_axilite port=var1 bundle=control
        #pragma HLS INTERFACE s_axilite port=var2 bundle=control
        #pragma HLS INTERFACE s_axilite port=var3 bundle=control
        #pragma HLS INTERFACE s_axilite port=var4 bundle=control

        #pragma HLS INTERFACE m_axi port=var1 offset=slave bundle=gmem
        #pragma HLS INTERFACE m_axi port=var2 offset=slave bundle=gmem2
        #pragma HLS INTERFACE m_axi port=var4 offset=slave bundle=gmem3

 

with this kernel, I get the following error:

 

INFO: [OCL_UTIL] internal step: source .local/dr.bd.tcl
WARNING: [IP_Flow 19-3331] Invalid parameters found in dependency constraints of 'PORT_VECTOR_LEFT.M_AXI_PBUF_COPY_0_ARADDR' 
WARNING: [IP_Flow 19-3331] Invalid parameters found in dependency constraints of 'PORT_VECTOR_LEFT.M_AXI_PBUF_COPY_0_ARADDR' 
WARNING: [IP_Flow 19-3553] Error found in parameter dependencies in XGUI files. Invalid parameters found in dependency constraints of 'PORT_VECTOR_LEFT.M_AXI_PBUF_COPY_0_ARADDR' 

ERROR: [IP_Flow 19-3428] Failed to create Customization object pfm_dynamic_my_kernel_1_0
CRITICAL WARNING: [IP_Flow 19-5622] Failed to create IP instance 'pfm_dynamic_my_kernel_1_0'. Failed to customize IP instance 'pfm_dynamic_my_kernel_1_0'. Failed to load customization data
ERROR: [BD 41-1712] Create IP failed with errors
ERROR: [BD 5-7] Error: running create_bd_cell  -vlnv xilinx.com:hls:my_kernel:1.0 -type ip -name my_kernel_1 .
[OPTRACE]|23111|12|ipirun.tcl|sdx_vpl|1608081865245|END|Open bd and insert kernels|
ERROR: caught error: ERROR: [Common 17-39] 'create_bd_cell' failed due to earlier errors.

    while executing
"create_bd_cell -type ip -vlnv xilinx.com:hls:my_kernel:1.0 my_kernel_1"
    invoked from within
"set my_kernel_1 [create_bd_cell -type ip -vlnv xilinx.com:hls:my_kernel:1.0 my_kernel_1]"
    (file ".local/dr.bd.tcl" line 33)
    invoked from within
"source $dr_bd_tcl"
[01:24:25] Run vpl: Step create_bd: Failed
Failed to update block diagram in project required for hardware synthesis.The project is 'prj'. The block diagram update script is '.local/dr.bd.tcl'. The block diagram update script was generated by system linker. An error stack with function names and arguments may be available in the 'vivado.log'.
INFO: [Common 17-206] Exiting Vivado at Wed Dec 16 01:24:25 2020...

 

What is weird is that by simply commenting out the pragma 

 

#pragma HLS INTERFACE m_axi port=var4 offset=slave bundle=gmem3

 

the kernel builds fine. I have tried silly things such as reordering the arguments and renaming them but nothing else has worked. The only difference is the size of the variable.

Please let me know if you have any suggestions or things to try! I am happy to provide more info if needed.

 

0 Kudos
1 Reply
BradleyB9
Observer
Observer
209 Views
Registered: ‎09-25-2020

I found a solution to this. In my kernel, I was using var4 like this:

__m128i *newvar = var4 + ((selector >> 5) & mask);
 
In order to do this, I had to copy the memory contents of var4 into a new variable beforehand:
 
for (int i = 0; i < 670; i++) {
memcpy(&rsource[i], &randomsource[i], sizeof(__m128i));
}
 
I am not sure if there is a way to get around this or a more efficient way. If you think of one, please let me know!
0 Kudos