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!

Reply
Explorer
Posts: 197
Registered: ‎03-29-2017
Accepted Solution

Unable to detect this error code in HLS :memory copy is not supported unless used on bus interface possible cause(s): non-static/non-constant local array with initialization)

Trying PRBS in HLS and integrating the HLS IP with XSDK as a Task. In Hls, during synthesis "memory copy is not supported unless used on bus interface possible cause(s): non-static/non-constant local array with initialization" .Please solve my problem.

 

Using kintex 7 and microblaze, i need to get random bits 0`s and 1`s in a consecutive manner at Tera Terminal through stream communication HLS IP and XSDK. Please suggest me.

 

Source code as follows

 

#include <stdio.h>
#include "ap_cint.h"

#define N 50

typedef uint32 DT;
void PRBS_Mem(volatile DT *d, int bit)
{
    // Define the RTL interfaces
    #pragma HLS interface ap_ctrl_none port=return
    #pragma HLS interface ap_bus port=m

    // Define the pcore interface as an AXI4 master
    #pragma HLS resource core=AXI4M variable=m
     unsigned lfsr  = 0xCD;
       int  i,j;
       DT buff1[N], buff2[50];

       memcpy(buff1, d, N*sizeof(DT));
        for ( i = 0; i < N; i++)
              {
              bit = ((lfsr >> 0) ^ (lfsr >> 2) ^ (lfsr >> 3) ^ (lfsr >> 4) ) & 1;
              buff1[i] = bit; //storing bit value in buff1

              lfsr = (lfsr >> 1) | (bit << 7);
              }
        for (j = 0; j < 50; j++)
        {
        buff2[j] = buff1[N-j] ; // from buff1 storing bit value into buff2 for reading the bits in consecutive ways
        }

        memcpy(d, buff2, N*sizeof(DT));
}

Memcpy.PNG

Accepted Solutions
Highlighted
Teacher
Posts: 5,146
Registered: ‎03-31-2012

Re: Unable to detect this error code in HLS :memory copy is not supported unless used on bus interface possible cause(s): non-static/non-constant local array with initialization)

@thaus_015 you have no port called "m" (lines 11 & 14) perhaps you meant "d" ?

- 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.

View solution in original post


All Replies
Highlighted
Teacher
Posts: 5,146
Registered: ‎03-31-2012

Re: Unable to detect this error code in HLS :memory copy is not supported unless used on bus interface possible cause(s): non-static/non-constant local array with initialization)

@thaus_015 you have no port called "m" (lines 11 & 14) perhaps you meant "d" ?

- 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.