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!

Showing results for 
Search instead for 
Did you mean: 
Registered: ‎12-12-2018

in sdsoc implement fft,bulid release successful,but zcu104 dont work

 i tried to implement fft in sdsoc 18.3,and the release build is ok ,but the zcu104 don't work.and , make multiple warning,

such as :  image.png




I changed the FFT length and wanted to pass the array by reading the image,rather than  in the form of the read file in the sample.

this is my fft_top.cpp file:


void dummy_proc_fe(
    bool direction,
    config_t* config, 
//    cmpxD	ataIn in[FFT_LENGTH],
	float in_re [FFT_LENGTH], float in_im [FFT_LENGTH],
    cmpxDataIn out[FFT_LENGTH])

    int i; 

    for (i=0; i< FFT_LENGTH; i++){
//        out[i] = in[i];
//To reduce function execution time, we also want to apply inlining to HW sub functions:

void dummy_proc_be(
    status_t* status_in, 
    bool* ovflo,
    cmpxDataOut in[FFT_LENGTH], 
    float out_re[FFT_LENGTH],
    float out_im[FFT_LENGTH])

	#pragma HLS INLINE
    int i; 
    for (i=0; i< FFT_LENGTH; i++){
    	out_re[i] = in[i].real();
    	out_im[i] = in[i].imag();
    *ovflo = status_in->getOvflo() & 0x1;
void fft_top(
    bool direction,
	float in_re[FFT_LENGTH], float in_im[FFT_LENGTH],
	float out_re[FFT_LENGTH], float out_im[FFT_LENGTH],
    bool* ovflo)
#pragma HLS dataflow
    complex<data_in_t> xn[FFT_LENGTH];
    complex<data_out_t> xk[FFT_LENGTH];
    config_t fft_config;
    status_t fft_status;

    // FFT IP
    hls::fft<config1>(xn, xk, &fft_status, &fft_config);
    dummy_proc_be(&fft_status, ovflo, xk, out_re,out_im);

fft_top.h file config params


// configurable params
const char FFT_INPUT_WIDTH                     = 16;
const char FFT_OUTPUT_WIDTH                    = FFT_INPUT_WIDTH;
const char FFT_CONFIG_WIDTH                    = 16;
const char FFT_NFFT_MAX                        = 7;
const int  FFT_LENGTH                          = 1 << FFT_NFFT_MAX; 

my fft input way:

Mat rightimage = imread("cut_left.jpg", IMREAD_GRAYSCALE);
Mat leftimage  = imread("cut_right.jpg", IMREAD_GRAYSCALE);
Mat src1, src2;

float * l_real = (float *) sds_alloc(sizeof(float) * 2 * R * 2 * R * rowNum * colNum);
	float * l_imag = (float *) sds_alloc(sizeof(float) * 2 * R * 2 * R * rowNum * colNum);
	float * r_real = (float *) sds_alloc(sizeof(float) * 2 * R * 2 * R * rowNum * colNum);
	float * r_imag = (float *) sds_alloc(sizeof(float) * 2 * R * 2 * R * rowNum * colNum);
int FWD_INV = 1;

for(int i=0; i<rows; i++)
		for(int j=0; j<cols; j++)
			l_real[i*2 * R * colNum+j] = src1.at<float>(i,j);
			r_real[i*2 * R * colNum+j] = src2.at<float>(i,j);
for (int temp = 0;temp < 2 * R;temp++)
//    	printf("row fftsss \n");
    	in_re_l[temp] = l_real[row*2*R*colNum+2*R*col+temp];
    	in_re_r[temp] = r_real[row*2*R*colNum+2*R*col+temp];
fft_top(FWD_INV, in_re_l, in_im_l, out_re_l, out_im_l, &ovflo);

I find that many people can implement FFT in sdsoc, but I don't know what my problem is, who can help me?

I will really appreciate it. 

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
Registered: ‎08-20-2018

Re: in sdsoc implement fft,bulid release successful,but zcu104 dont work

Hi @mu_yu 

are you referring to https://github.com/t-kuha/sdsoc/wiki/FFT-in-SDSoC-(C-callable-IP)?

If yes, it looks like the author has tested the code with Zybo Z7-20 & Snickerdoodle Black, which have Zynq-7000 on them. (SDSoC 2017.2 windows)

Please refer below issue


Best Regards,
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Registered: ‎12-12-2018

Re: in sdsoc implement fft,bulid release successful,but zcu104 dont work

you are right, And I has realized his example.

you don't understand what I mean, I mean the example is in the form of reading a.dat file,However, I need to read the image information and take its pixels as FFT input,

But I don't know which parameters to change to achieve my goal.That's my problem.

I've tried to change FFT_NFFT_MAX to fit my size, and annotated config->setSch(0x2AB);And direction = 1.

but fft don't work.

that's why?

0 Kudos