cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
495 Views
Registered: ‎08-06-2014

what is "ap_auto"?

 It shows on the messages during HLS synthesis. But I found no introduction of it in ug902. 

0 Kudos
3 Replies
Highlighted
480 Views
Registered: ‎07-23-2019

 

As the name suggests, it's an ap type autogenerated by the type you defined when you use HLS pragmas

 

0 Kudos
Highlighted
Contributor
Contributor
420 Views
Registered: ‎08-06-2014

So here is my issue.

I modified HLS example project "fft_single", for reading float data from PS, doing FFT and then writing data back to PS. 

My code is as following:

#include "fft_top.h"
#include <complex>
#include "hls_x_complex.h"
#include "ap_utils.h"

void dummy_proc_fe(
    bool direction,
    config_t* config, 
	hls::x_complex<float> in[FFT_LENGTH],
	hls::x_complex<float> out[FFT_LENGTH])
{
    int i; 
    config->setDir(direction);
    config->setSch(0x2AB);
    for (i=0; i< FFT_LENGTH; i++)
        out[i] = in[i];
}

void dummy_proc_be(
    status_t* status_in, 
    bool* ovflo,
	hls::x_complex<float> in[FFT_LENGTH],
	hls::x_complex<float> out[FFT_LENGTH])
{
    int i; 
    for (i=0; i< FFT_LENGTH; i++)
        out[i] = in[i];
    *ovflo = status_in->getOvflo() & 0x1;
}


void fft_top(
    bool direction,
	volatile float * data_ps,
    bool* ovflo)
{
#pragma HLS INTERFACE m_axi port=data_ps
#pragma HLS INTERFACE s_axilite port=direction
#pragma HLS INTERFACE s_axilite port=ovflo
#pragma HLS INTERFACE s_axilite port=return

#pragma HLS dataflow

    float in[2 * FFT_LENGTH];
    hls::x_complex<float> in_complex[FFT_LENGTH];

    hls::x_complex<float> xn[FFT_LENGTH]; 
hls::x_complex<float> xk[FFT_LENGTH]; config_t fft_config; status_t fft_status; hls::x_complex<float> out_complex[FFT_LENGTH]; float out[2 * FFT_LENGTH]; // 1.read data from PS and construct to complex type memcpy(in, (const float *)data_ps, 2 * FFT_LENGTH * sizeof(float)); for(int i = 0; i < FFT_LENGTH; i++) { in_complex[i] = hls::x_complex<float>(in[i],in[FFT_LENGTH + i]); } dummy_proc_fe(direction, &fft_config, in_complex, xn); // 2.FFT IP hls::fft<config1>(xn, xk, &fft_status, &fft_config); dummy_proc_be(&fft_status, ovflo, xk, out_complex); // 3.write data back to PS for(int i = 0; i < FFT_LENGTH; i++) { out[i] = out_complex[i].real(); out[i + FFT_LENGTH] = out_complex[i].imag(); } memcpy((float *)data_ps, out, 2 * FFT_LENGTH * sizeof(float)); }

But during HLS synthesis, I got:

ERROR: [XFORM 203-801] Interface mode 'ap_auto' on the actual argument 'out.assign' is incompatible with the mode 'ap_fifo' on the formal argument 'xn' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:738) for function 'fft<config1>' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:738). Please consider to duplicate the function to avoid mode conflicts.
ERROR: [XFORM 203-801] Interface mode 'ap_auto' on the actual argument 'in.assign' is incompatible with the mode 'ap_fifo' on the formal argument 'xk' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:739) for function 'fft<config1>' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:738). Please consider to duplicate the function to avoid mode conflicts.
ERROR: [XFORM 203-801] Interface mode 'ap_auto' on the actual argument 'fft_status.data.V' (fft_top.cpp:143) is incompatible with the mode 'ap_fifo' on the formal argument 'status.data.V' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:740) for function 'fft<config1>' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:738). Please consider to duplicate the function to avoid mode conflicts.
ERROR: [XFORM 203-801] Interface mode 'ap_auto' on the actual argument 'fft_config.data.V' (fft_top.cpp:142) is incompatible with the mode 'ap_fifo' on the formal argument 'config_ch.data.V' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:741) for function 'fft<config1>' (D:/Xilinx/Vivado/2019.1/common/technology/autopilot/hls_fft_x_complex.h:738). Please consider to duplicate the function to avoid mode conflicts.
ERROR: [HLS 200-70] Failed building synthesis data model.

So I'm wondering why HLS generate 'ap_auto' interface?  I think the reason could be something with data_ps(reading and writing), but I don't have a clue about that. 

0 Kudos
Highlighted
391 Views
Registered: ‎07-23-2019

 

Emm, you can't access external memory like that, I'm afraid

 

 

0 Kudos