cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
2,621 Views
Registered: ‎03-29-2017

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)

Jump to solution

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));
}

Tags (2)
Memcpy.PNG
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Teacher
Teacher
4,527 Views
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)

Jump to solution

@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

0 Kudos
1 Reply
Highlighted
Teacher
Teacher
4,528 Views
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)

Jump to solution

@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

0 Kudos